Skip to main content



      Home
Home » Archived » Visual Editor (VE) » VE and Java Web Start (or: does JARing VE work?)
VE and Java Web Start (or: does JARing VE work?) [message #132207] Wed, 11 October 2006 13:51 Go to next message
Eclipse UserFriend
Originally posted by: f-l.gmx.net

Hello guys,

we're deploying an RCP application also containing the VE via JWS. The VE
plugins get JARed for this reason.
When running the application locally (i.e. without JWS deployment),
everything is fine.
When running the deployed application, we run in the NPE shown below. It
happens when adding widgets to the base component. The generated Java source
code is then lacking the usual "get" method for this widget.

Question: code inspection makes me understand that java.io.File is used to
load JET templates in code related and called by the exception source (have
a look at TemplateObjectFactory.getTemplate(...) ). Most probably method
template files are read from the "templates" folder in the
"org.eclipse.ve.java.core" plugin. As far as I know, accessing files in JARs
is not that easy...? Or do you know the reason of this exception?

Thank you in advance,
Fedor


Stacktrace:
********************************************************
java.lang.NullPointerException

at

org.eclipse.ve.internal.java.codegen.util.AbstractMethodText Generator.generateMethod(AbstractMethodTextGenerator.java:11 9)

at

org.eclipse.ve.internal.java.codegen.java.BeanPartFactory.ge nerateInitMethod(BeanPartFactory.java:239)

at

org.eclipse.ve.internal.java.codegen.java.BeanPartFactory.cr eateFromJVEModel(BeanPartFactory.java:603)

at

org.eclipse.ve.internal.java.codegen.model.BeanDeclModel.laz yCreateBeanInstance(BeanDeclModel.java:279)

at

org.eclipse.ve.internal.java.codegen.model.BeanDeclModel.get ABean(BeanDeclModel.java:298)

at

org.eclipse.ve.internal.jfc.codegen.ContainerAddDecoderHelpe r.generate(ContainerAddDecoderHelper.java:901)

at

org.eclipse.ve.internal.java.codegen.java.AbstractExpression Decoder.generate(AbstractExpressionDecoder.java:196)

at

org.eclipse.ve.internal.java.codegen.model.CodeExpressionRef .generateSource(CodeExpressionRef.java:359)

at

org.eclipse.ve.internal.java.codegen.java.ExpressionRefFacto ry.createFromJVEModel(ExpressionRefFactory.java:102)

at

org.eclipse.ve.internal.java.codegen.java.BeanDecoderAdapter .addElement(BeanDecoderAdapter.java:398)

at

org.eclipse.ve.internal.java.codegen.java.BeanDecoderAdapter .notifyChanged(BeanDecoderAdapter.java:455)

at

org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify (BasicNotifierImpl.java:229)
Re: VE and Java Web Start (or: does JARing VE work?) [message #132220 is a reply to message #132207] Mon, 16 October 2006 06:36 Go to previous message
Eclipse UserFriend
Greetings.

I've worked with Fedor in solving this problem. After some debugging I
found the reason and a workaround. When compiling the generated
templates for the getter and setter methods, the compiler wouldn't find
the ITemplateMethod interface inside org.eclipse.ve.java.core. The
weird thing, the plugin was loaded and available, and I guess I wouldn't
even be able to run the Visual Editor if this plugin's classes weren't
available. It seems that the manifest is written in such a way, that
when jaring the whole plugin, the classes included in codegen.jar are
not exposed in the class path. I decompressed the three internal jars
of the plugin to the root of the plugin, jar'ed up the whole thing again
and then, the classes were made available.

The weird thing, I don't see anything wrong with the manifest of
org.eclipse.ve.java.core that wouldn't make some classes available. In
the meanwhile, this workaround works and the visual editor can be made
web-startable.

Thanks.
Re: VE and Java Web Start (or: does JARing VE work?) [message #614710 is a reply to message #132207] Mon, 16 October 2006 06:36 Go to previous message
Eclipse UserFriend
Greetings.

I've worked with Fedor in solving this problem. After some debugging I
found the reason and a workaround. When compiling the generated
templates for the getter and setter methods, the compiler wouldn't find
the ITemplateMethod interface inside org.eclipse.ve.java.core. The
weird thing, the plugin was loaded and available, and I guess I wouldn't
even be able to run the Visual Editor if this plugin's classes weren't
available. It seems that the manifest is written in such a way, that
when jaring the whole plugin, the classes included in codegen.jar are
not exposed in the class path. I decompressed the three internal jars
of the plugin to the root of the plugin, jar'ed up the whole thing again
and then, the classes were made available.

The weird thing, I don't see anything wrong with the manifest of
org.eclipse.ve.java.core that wouldn't make some classes available. In
the meanwhile, this workaround works and the visual editor can be made
web-startable.

Thanks.
Previous Topic:VE and Java Web Start (or: does JARing VE work?)
Next Topic:Component visualization in VE
Goto Forum:
  


Current Time: Tue May 13 07:54:57 EDT 2025

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

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

Back to the top