Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [Acceleo] Class not found in invoke()
[Acceleo] Class not found in invoke() [message #814388] Tue, 06 March 2012 11:43 Go to next message
Marin  rli? is currently offline Marin rli?Friend
Messages: 35
Registered: October 2009
Member
Hi,

I have a problem with Acceleo running in standalone Eclipse application (Eclipse product). The M2T templates are packaged in a plugin which also includes the Java class used as a service (invoked in a query). The package containing the class is exported in the MANIFEST.MF of the plugin.

The error reported is:

eclipse.buildId=unknown
java.version=1.6.0_29
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=hr_HR
Command-line arguments:  -os win32 -ws win32 -arch x86


Error
Tue Mar 06 12:41:45 CET 2012
ERROR in (visitOperationCallExp): (Class hr.fer.rasip.remes.simulator.remes2java.util.Util Couldn't be found in the classpath of the bundle containing module generateSimulator.emtl.)

org.eclipse.acceleo.engine.AcceleoEvaluationException: Class hr.fer.rasip.remes.simulator.remes2java.util.Util Couldn't be found in the classpath of the bundle containing module generateSimulator.emtl.
at org.eclipse.acceleo.engine.internal.environment.AcceleoLibraryOperationVisitor.invoke(AcceleoLibraryOperationVisitor.java:905)
at org.eclipse.acceleo.engine.internal.environment.AcceleoLibraryOperationVisitor.callNonStandardOperation(AcceleoLibraryOperationVisitor.java:123)
at org.eclipse.acceleo.engine.internal.environment.AcceleoEvaluationEnvironment.callOperation(AcceleoEvaluationEnvironment.java:177)
at org.eclipse.ocl.ecore.EcoreEvaluationEnvironment.callOperation(EcoreEvaluationEnvironment.java:1)
at org.eclipse.ocl.EvaluationVisitorImpl.visitOperationCallExp(EvaluationVisitorImpl.java:192)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.visitOperationCallExp(AcceleoEvaluationVisitor.java:1100)
at org.eclipse.ocl.ecore.impl.OperationCallExpImpl.accept(OperationCallExpImpl.java:399)
at org.eclipse.ocl.AbstractEvaluationVisitor.visitExpression(AbstractEvaluationVisitor.java:246)
at org.eclipse.ocl.EvaluationVisitorDecorator.visitExpression(EvaluationVisitorDecorator.java:156)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.switchExpression(AcceleoEvaluationVisitor.java:1721)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.visitExpression(AcceleoEvaluationVisitor.java:999)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.visitAcceleoFileBlock(AcceleoEvaluationVisitor.java:396)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.switchExpression(AcceleoEvaluationVisitor.java:1691)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.visitExpression(AcceleoEvaluationVisitor.java:999)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.visitAcceleoTemplate(AcceleoEvaluationVisitor.java:867)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.switchExpression(AcceleoEvaluationVisitor.java:1671)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvaluationVisitor.visitExpression(AcceleoEvaluationVisitor.java:999)
at org.eclipse.ocl.internal.evaluation.QueryImpl.evaluate(QueryImpl.java:152)
at org.eclipse.ocl.ecore.QueryImpl.evaluate(QueryImpl.java:62)
at org.eclipse.acceleo.engine.generation.AcceleoEngine.doEvaluate(AcceleoEngine.java:280)
at org.eclipse.acceleo.engine.generation.AcceleoEngine.evaluate(AcceleoEngine.java:145)
at org.eclipse.acceleo.engine.service.AcceleoService.doGenerateTemplate(AcceleoService.java:869)
at org.eclipse.acceleo.engine.service.AcceleoService.doGenerate(AcceleoService.java:575)
at org.eclipse.acceleo.engine.service.AbstractAcceleoGenerator.generate(AbstractAcceleoGenerator.java:188)
at org.eclipse.acceleo.engine.service.AbstractAcceleoGenerator.doGenerate(AbstractAcceleoGenerator.java:158)
at hr.fer.rasip.remes.simulator.remes2java.files.GenerateSimulator.doGenerate(GenerateSimulator.java:190)
at hr.fer.rasip.remes.converters.Remes2JavaConverter.remes2java(Remes2JavaConverter.java:146)
at hr.fer.rasip.remes.converters.ui.actions.Remes2JavaJob.run(Remes2JavaJob.java:48)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)



This configuration worked fine when launched as an Eclipse application.

On a side note, I have problems with plugin export - the EMTL files are not packaged with the plugin, and I have to add them manually.

Acceleo 3.1.3, Eclipse 3.5

Thanks,
Marin
Re: [Acceleo] Class not found in invoke() [message #817984 is a reply to message #814388] Sun, 11 March 2012 00:28 Go to previous messageGo to next message
Marin  rli? is currently offline Marin rli?Friend
Messages: 35
Registered: October 2009
Member
I found the cause for this - the plugin with the M2T was not zipped, but installed as an unzipped plugin (subdirectory of plugins). When Acceleo tries to resolve the path to the templates, it concludes that the template is running from a workspace project, and not from a plugin. Fails to find the class as it's looking at the wrong place.

Anyway, hope it helps others with similar problems Smile
Re: [Acceleo] Class not found in invoke() [message #818257 is a reply to message #817984] Sun, 11 March 2012 09:43 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 4153
Registered: July 2009
Senior Member
Hi Marin

Please raise a Bugzilla, with the stack trace which is always very
helpful for locating similar problems.

Regards

Ed Willink

On 11/03/2012 00:28, Marin rli? wrote:
> I found the cause for this - the plugin with the M2T was not zipped,
> but installed as an unzipped plugin (subdirectory of plugins). When
> Acceleo tries to resolve the path to the templates, it concludes that
> the template is running from a workspace project, and not from a
> plugin. Fails to find the class as it's looking at the wrong place.
>
> Anyway, hope it helps others with similar problems :)
Re: [Acceleo] Class not found in invoke() [message #820523 is a reply to message #818257] Wed, 14 March 2012 08:34 Go to previous messageGo to next message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1638
Registered: July 2009
Senior Member
Hi Marin,

I'll second Ed; we have yet to observe a bug such as this one, Please raise a bugzilla so that we can keep track of it.

Laurent Goubet
Obeo
Re: [Acceleo] Class not found in invoke() [message #820599 is a reply to message #820523] Wed, 14 March 2012 10:23 Go to previous messageGo to next message
Marin  rli? is currently offline Marin rli?Friend
Messages: 35
Registered: October 2009
Member
Ok, I'll raise a bugzilla in a few days, when I find some time to prepare a sample to reproduce it.

Best,
Marin
Re: [Acceleo] Class not found in invoke() [message #844162 is a reply to message #820599] Fri, 13 April 2012 19:05 Go to previous message
Marin  rli? is currently offline Marin rli?Friend
Messages: 35
Registered: October 2009
Member
I've raised a bugzilla - (https://bugs.eclipse.org/bugs/show_bug.cgi?id=376774)
Previous Topic:[Xpand] Dynamic position of generated text
Next Topic:[Acceleo] Nothing is generated
Goto Forum:
  


Current Time: Wed Nov 26 10:41:56 GMT 2014

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

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