Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

From https://datamigrators.slack.com/archives/C01DVR2MRUP/p1652686826148709

Symptom

Problem 1

When attempting to perform a S2PX conversion you receive an error.

Symtom 1

You receive an error Exception in thread "main" java.lang.NullPointerException.

Code Block
$ mettleci s2px convert \
  -config customRoutine-zodiac.yaml \
  -source-dsx animalZodiacJobAndRoutines.dsx 
  -target-dsx target-dsx/zodiac.dsx \
  -source-specs /opt/dm/mci/specs/AnimalZodiac/ \
  -target-specs target-specs/ 
MettleCI Command Line (build 128)
(C) 2018-2022 Data Migrators Pty Ltd
Loading configuration
Preprocessing 'animalZodiacJobAndRoutines.dsx'
Converting jobs
Decomposing AnimalZodiac
Translating AnimalZodiacPx
Exception in thread "main" java.lang.NullPointerException
	at java.io.File.<init>(File.java:362)
	at com.datamigrators.mettle.svpx.translation.UnitTestConverter.convertSpec(UnitTestConverter.java:132)
	at com.datamigrators.mettle.svpx.translation.UnitTestConverter.convertUnitTest(UnitTestConverter.java:118)
	at com.datamigrators.mettle.svpx.translation.UnitTestConverter.convert(UnitTestConverter.java:60)
	at com.datamigrators.mettle.svpx.Bootstrap.convertJobs(Bootstrap.java:274)
	<etc.>

Solution 1

MettleCI assumes you are passing fully qualified -source-specs and -target-specs directories during conversion, and makes assumptions about the structure based on what MettleCI Workbench produces. In the example above you should use a path of the following form:

Code Block
-target-specs /opt/dm/mci/specs/target-specs/

Problem 2

Symptom 2

You receive Problem an error seemingly related to the

Code Block
Unexpected error 'e2d2a70e61661858' occurred
java.lang.NullPointerException
        at com.datamigrators.mettle.svpx.Bootstrap.convert(Bootstraptranslation.operations.AggregatorTranslation.translateStage(AggregatorTranslation.java:124)
	65)
        at com.datamigrators.mettle.svpx.translation.operations.MigrationCommandAbstractStageTranslation.executeprocessTranslationStages(MigrationCommandAbstractStageTranslation.java:54)
	60)
        at com.datamigrators.mettle.shellsvpx.Shelltranslation.executeCommand(Shell.java:175)
	at com.datamigrators.mettle.shell.Shell.run(Shelloperations.AbstractStageTranslation.translateRootContainer(AbstractStageTranslation.java:4541)
	at com.datamigrators.mettle.shell.MainClass.main(MainClass.java:173)

Solution

Ah, I see.  The system assumes you are passing the whole specs directory during conversion and makes assumptions about the structure based on what MettleCI Workbench produces.

Try using this path:

Code Block
-source-specs /opt/dm/mci/specs/s2px_original/<etc.>

Solution 2

You can receive this message if you’re using a version of the MettleCI Command Line prior to version 1.1-128 which is the minimum level required to support S2PX.
Please see the S2PX prerequisites documentation for details.