Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » QVT-OML » Running QVTo in a web-based application
Running QVTo in a web-based application [message #1419179] Mon, 08 September 2014 08:00 Go to next message
Sama Elrawy is currently offline Sama ElrawyFriend
Messages: 9
Registered: February 2014
Junior Member
Hello,

I have developed a plugin project that includes a QVTo transformation and it worked fine. However, when I tried to run the same transformation inside a java dynamic web application I got this error:


java.lang.ExceptionInInitializerError
	org.eclipse.m2m.qvt.oml.TransformationExecutor.doLoad(TransformationExecutor.java:205)
	org.eclipse.m2m.qvt.oml.TransformationExecutor.loadTransformation(TransformationExecutor.java:108)
	org.eclipse.m2m.qvt.oml.TransformationExecutor.execute(TransformationExecutor.java:137)
	saas.project.testing.doPost(testing.java:107)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:728)


root cause 

java.lang.NullPointerException
	org.eclipse.m2m.internal.qvt.oml.compiler.UnitResolverFactory$Registry$1.readFactories(UnitResolverFactory.java:66)
	org.eclipse.m2m.internal.qvt.oml.compiler.UnitResolverFactory$Registry$1.<init>(UnitResolverFactory.java:44)
	org.eclipse.m2m.internal.qvt.oml.compiler.UnitResolverFactory$Registry.<clinit>(UnitResolverFactory.java:43)
	org.eclipse.m2m.qvt.oml.TransformationExecutor.doLoad(TransformationExecutor.java:205)
	org.eclipse.m2m.qvt.oml.TransformationExecutor.loadTransformation(TransformationExecutor.java:108)
	org.eclipse.m2m.qvt.oml.TransformationExecutor.execute(TransformationExecutor.java:137)
	saas.project.testing.doPost(testing.java:107)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:728)



Any ideas?
Thanks in advance
Re: Running QVTo in a web-based application [message #1419235 is a reply to message #1419179] Mon, 08 September 2014 09:45 Go to previous messageGo to next message
Sama Elrawy is currently offline Sama ElrawyFriend
Messages: 9
Registered: February 2014
Junior Member
The plugin Registry in UnitResolverFactory evaluates to null and that's why I'm getting the mentioned exception.
IExtensionRegistry pluginRegistry = Platform.getExtensionRegistry();	
IExtensionPoint extensionPoint = pluginRegistry.getExtensionPoint(POINT_ID);

How can I solve this ?
Re: Running QVTo in a web-based application [message #1419273 is a reply to message #1419179] Mon, 08 September 2014 11:00 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 5466
Registered: July 2009
Senior Member
Hi

It is pretty certain that you have not initialized something properly.

As always the debugger is your friend and you have a good/bad
implementation to compare so see why the bad version malfunctions, then
you will see what you failed to initialize.

Just looking at UnitResolverFactory.java:66 shows that you are
attempting to use plugin facilities in a non-plugin context.

Try Googling "QVTo standalone"

Regards

Ed Willink


On 08/09/2014 09:00, Sama Elrawy wrote:
> Hello,
> I have developed a plugin project that includes a QVTo transformation
> and it worked fine. However, when I tried to run the same transformation
> inside a java dynamic web application I got this error:
>
>
>
> java.lang.ExceptionInInitializerError
>
org.eclipse.m2m.qvt.oml.TransformationExecutor.doLoad(TransformationExecutor.java:205)
>
org.eclipse.m2m.qvt.oml.TransformationExecutor.loadTransformation(TransformationExecutor.java:108)
>
org.eclipse.m2m.qvt.oml.TransformationExecutor.execute(TransformationExecutor.java:137)
> saas.project.testing.doPost(testing.java:107)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
>
>
> root cause
> java.lang.NullPointerException
>
org.eclipse.m2m.internal.qvt.oml.compiler.UnitResolverFactory$Registry$1.readFactories(UnitResolverFactory.java:66)
>
org.eclipse.m2m.internal.qvt.oml.compiler.UnitResolverFactory$Registry$1.<init>(UnitResolverFactory.java:44)
>
org.eclipse.m2m.internal.qvt.oml.compiler.UnitResolverFactory$Registry.<clinit>(UnitResolverFactory.java:43)
>
org.eclipse.m2m.qvt.oml.TransformationExecutor.doLoad(TransformationExecutor.java:205)
>
org.eclipse.m2m.qvt.oml.TransformationExecutor.loadTransformation(TransformationExecutor.java:108)
>
org.eclipse.m2m.qvt.oml.TransformationExecutor.execute(TransformationExecutor.java:137)
> saas.project.testing.doPost(testing.java:107)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
>
>
>
> Any ideas?
> Thanks in advance
Previous Topic:Dynamic set of input models
Next Topic:Build with Jenkins
Goto Forum:
  


Current Time: Sun Nov 19 03:21:33 GMT 2017

Powered by FUDForum. Page generated in 0.02137 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software