Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: for the plan.

Jump to: navigation, search

JET FAQ Why do I get errors stating variable '' is undefined?


I created an EMFT JET transformation project (the id is "my.jet.transformation") without any change and it worked perfectly via the run JET Transformation dialog.

Then I created a test plug-in to execute the transformation. The running result is very weird for it threw a "java.lang.NoClassDefFoundError: org/eclipse/jet/JET2Platform" exception in JET2 0.7.1 while an error message of "Variable "" is not defined." in JET2 0.8.0 (during debuging).


The default transformation project has the following tag in main.jet:

<ws:file template="templates/dump.jet" path="{$}/dump.xml"/>

This dumps the transformations input model to a file dump.xml in the root of the project containing the input.

But, when you use runTransformOnString, there is not project containing the input model. You have the following choices

  1. remove the above tag
  2. Change the {$} part to something that is dependent on data in the model itself
  3. Pass a value for into runTransformOnString...
Map arguments = new HashMap();
arguments.put("", "Some Known Project Name");
JET2Platform.runTransformOnString( transformID, yourXMLAsString, "xml", variables, monitor);

Back to the M2T-JET-FAQ

Back to the top