[JET] How to Dynamically call JET transform api through a plugin? [message #535825] |
Tue, 25 May 2010 20:18 |
Herat Acharya Messages: 7 Registered: May 2010 |
Junior Member |
|
|
Hi,
I am trying to dynamically call JET transform api through a plugin. But I am getting some error. Please help me with it
Detailed explanation:
1) I have created a new wizard plugin Which selects a particular file.
2) This is an XML file which i need to futher process using JET and create some new files.
3) I am already done with the JET templates for that XML. Now the question it to merge the 2 systems.
4) Hence on when we click the finish button of the wizard i give the xml file as input to the JET template.
5) I am using the following code to invoke JET template
IResource fileRes = (IResource) file // the path to xml file;
IStatus status = JET2Platform.runTransformOnResource("com.tibco.mdm.trwJetTemplate ",fileRes,monitor);
But it gives me a weird error when i click on finish button an alert message pops up sayin error in org/eclipse/jet/JET2Platform
and it gives no other error.
Please help me with this
Thanks in advance
Herat
[Updated on: Tue, 25 May 2010 20:43] Report message to a moderator
|
|
|
Re: [JET] How to Dynamically call JET transform api through a plugin? [message #535841 is a reply to message #535825] |
Tue, 25 May 2010 23:45 |
Herat Acharya Messages: 7 Registered: May 2010 |
Junior Member |
|
|
Hi
I just found out the exception its the following.... can any one please help me..
java.lang.NoClassDefFoundError: org/eclipse/jet/JET2PlatformEXCEPT org/eclipse/jet/JET2Platform
MSG org/eclipse/jet/JET2Platform
at com.tibco.mdm.testrepositorywiz.wizards.TestRepositoryWizard .doFinish(TestRepositoryWizard.java:123)
at com.tibco.mdm.testrepositorywiz.wizards.TestRepositoryWizard .access$0(TestRepositoryWizard.java:96)
at com.tibco.mdm.testrepositorywiz.wizards.TestRepositoryWizard $1.run(TestRepositoryWizard.java:67)
at org.eclipse.jface.operation.ModalContext$ModalContextThread. run(ModalContext.java:121)
Caused by: java.lang.ClassNotFoundException: org.eclipse.jet.JET2Platform
at org.eclipse.osgi.framework.internal.core.BundleLoader.findCl assInternal(BundleLoader.java:437)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:399)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:387)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:87)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 4 more
i have included org.eclipse.jet in my plugin dependancies ...
I found some thing here http://wiki.eclipse.org/JET_FAQ_Why_do_I_get_errors_stating_ variable_%27org.eclipse.jet.resource.project.name%27_is_unde fined%3F
and i implemented everything mentioned .. but still not working
the modified code is as follows:
IResource fileRes = (IResource) file;
Map<String, String> variables = new HashMap<String, String>();
variables.put("org.eclipse.jet.resource.project.name", "com.tibco.mdm.trwJetTemplate");
IStatus status = JET2Platform.runTransformOnResource("com.tibco.mdm.trwJetTemplate ",fileRes,variables,monitor);
[Updated on: Tue, 25 May 2010 23:50] Report message to a moderator
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02245 seconds