Could not load JET template loader: EMF+JET [message #49585] |
Tue, 16 September 2008 00:28  |
Eclipse User |
|
|
|
Hello,
I am developing an EMF/GMF-based model and wanted to use JET in order to
generate code from instances of the EMF model. Things are mostly working
but there is one problem I am having trouble with.
Right now I have implemented a EMFT plugin (following the IBM tutorial)
which can be called from other plugins in a runtime Eclipse environment
to transform a model file into generated output. But I cannot, in the
original development environment, use a right click > use as JET input.
After quite a few hours of debugging and investigating, I have
discovered the problem is that the plugin adds my generated model
package "org.openiaml.test.uml3" to "required plug-ins" in plugin.xml,
but when use as JET input is run, I get this entirely unhelpful error:
"Could not load JET template loader"
Which through debugging can be traced back to:
"Cannot load "org.eclipse.jet.compiled._jet_transformation" because
the bundle file:C:/foo/bar cannot be resolved."
Without adding the generated EMF package to the required plugins, the
generated code cannot find the import and does not run:
<%@jet imports="org.eclipse.jet.xpath.NodeSet
org.openiaml.test.uml3.model.*" %>
...
<%
Event event = (Event) ((NodeSet)
context.getVariable("event")).toArray()[0];
context.setVariable("to", ((Connection)
event.getConnection().get(0)).getTo());
%>
...
I have tried adding it to project references, imported packages and
build path with no success.
Can anybody provide some suggestions on what I can do to solve this
problem? It still runs fine in a runtime Eclipse environment but I would
like to run it also as an input to JET in my development environment.
I am using Eclipse 3.3/GMF 2.0.1/JET 0.8.2 because Eclipse 3.4/GMF 2.1
is not stable enough yet for me.
Cheers :)
Jevon
|
|
|
Re: Could not load JET template loader: EMF+JET [message #49794 is a reply to message #49585] |
Tue, 16 September 2008 14:28  |
Eclipse User |
|
|
|
Jevon:
This is an intentional limitation of the JET launcher.
When you run a JET transformation that is in your workspace, JET does some
deep majic to dynamically (and temporarily) install the JET project as a
plug-in in your development environment. This is accomplished via the OSGi
framework.) Once the transformation finishes execution, the plug-in is
uninstalled again.
But, JET refuses to look for and install referenced plugins. This was out of
concern for platform stability, but also because of some technical
limitations of dynamic loading a plug-in as a directory rather than a JAR.
Anyhow, I'm not tempted, at this point, to revisit it.
So, that leaves you with two possibilities:
1) continue to test and run your JET transformation/templates in a runtime
workbench
2) install the plug-ins upon which JET depends into your development
environment.
Finally, while I can't comment on Eclipse 3.4/GMF 2.1 stability, I will
point out that JET 0.9.0 has been tested with Eclipse 3.3 - you should be
able to use it in your environment.
Paul
"Jevon Wright" <jevon@jevon.org> wrote in message
news:gancle$5pc$1@build.eclipse.org...
> Hello,
>
> I am developing an EMF/GMF-based model and wanted to use JET in order to
> generate code from instances of the EMF model. Things are mostly working
> but there is one problem I am having trouble with.
>
> Right now I have implemented a EMFT plugin (following the IBM tutorial)
> which can be called from other plugins in a runtime Eclipse environment to
> transform a model file into generated output. But I cannot, in the
> original development environment, use a right click > use as JET input.
>
> After quite a few hours of debugging and investigating, I have discovered
> the problem is that the plugin adds my generated model package
> "org.openiaml.test.uml3" to "required plug-ins" in plugin.xml, but when
> use as JET input is run, I get this entirely unhelpful error:
>
> "Could not load JET template loader"
>
> Which through debugging can be traced back to:
>
> "Cannot load "org.eclipse.jet.compiled._jet_transformation" because the
> bundle file:C:/foo/bar cannot be resolved."
>
> Without adding the generated EMF package to the required plugins, the
> generated code cannot find the import and does not run:
>
> <%@jet imports="org.eclipse.jet.xpath.NodeSet
> org.openiaml.test.uml3.model.*" %>
> ...
> <%
> Event event = (Event) ((NodeSet)
> context.getVariable("event")).toArray()[0];
> context.setVariable("to", ((Connection)
> event.getConnection().get(0)).getTo());
> %>
> ...
>
> I have tried adding it to project references, imported packages and build
> path with no success.
>
> Can anybody provide some suggestions on what I can do to solve this
> problem? It still runs fine in a runtime Eclipse environment but I would
> like to run it also as an input to JET in my development environment.
>
> I am using Eclipse 3.3/GMF 2.0.1/JET 0.8.2 because Eclipse 3.4/GMF 2.1 is
> not stable enough yet for me.
>
> Cheers :)
> Jevon
|
|
|
Powered by
FUDForum. Page generated in 0.02787 seconds