Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [Acceleo] NullPointer while launching a transformation via API
[Acceleo] NullPointer while launching a transformation via API [message #500061] Tue, 24 November 2009 19:57 Go to next message
Timothy Marc is currently offline Timothy Marc
Messages: 547
Registered: July 2009
Senior Member
Hi all,

i figured out a NullPointerException, while i try to run a
transformation via API from an export wizard. A weird thing is, that
running the transformation from within the eclipse test application (run
as -> eclipse application), it works properly, but after the
installition of the builded plugins via update manager, i get the
following stack trace:

-----------------
java.lang.NullPointerException
at
org.eclipse.core.internal.runtime.Activator.getURLConverter( Activator.java:313)
at org.eclipse.core.runtime.FileLocator.toFileURL(FileLocator.j ava:205)
at
de.fraunhofer.fokus.testing.m2t.xml.modelplex.sap.files.Gene rateTestCase. <init>(GenerateTestCase.java:133)
at
de.fraunhofer.fokus.testing.mbttool.export.sap.wizards.SAPTe stScriptExportWizard.performFinish(SAPTestScriptExportWizard .java:90)
at
org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDi alog.java:752)
-----------------

The code snippet looks like this:

if (EMFPlugin.IS_ECLIPSE_RUNNING) {
templateURL =
FileLocator.toFileURL(GenerateTestCase.class.getResource(MOD ULE_FILE_NAME
+ ".emtl"));
.....


I'm pretty sure, that this is a Acceleo related problem, since the
exception occurs in a generated code snippet of Acceleo.

So, what's wrong with the transformation?!

Cheers Timothy
Re: [Acceleo] NullPointer while launching a transformation via API [message #500176 is a reply to message #500061] Wed, 25 November 2009 09:23 Go to previous message
Laurent Goubet is currently offline Laurent Goubet
Messages: 1628
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------070402060100060404080701
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Hi Timothy,

We currently have problems with headless builds; in short, the jdt java
compiler deletes all emtl files and we cannot recompile them anew
_after_ its passage.

Using the "export as => deployable plugins and fragment" wizard should
work as expected, yet headless builds won't work atm.

How do you export your generator projects as plugins? And could you
raise a bug with a project that presents this bug (more test cases are
always welcome)?

Laurent Goubet
Obeo

Timothy Marc wrote:
> Hi all,
>
> i figured out a NullPointerException, while i try to run a
> transformation via API from an export wizard. A weird thing is, that
> running the transformation from within the eclipse test application (run
> as -> eclipse application), it works properly, but after the
> installition of the builded plugins via update manager, i get the
> following stack trace:
>
> -----------------
> java.lang.NullPointerException
> at
> org.eclipse.core.internal.runtime.Activator.getURLConverter( Activator.java:313)
>
> at org.eclipse.core.runtime.FileLocator.toFileURL(FileLocator.j ava:205)
> at
> de.fraunhofer.fokus.testing.m2t.xml.modelplex.sap.files.Gene rateTestCase. <init>(GenerateTestCase.java:133)
>
> at
> de.fraunhofer.fokus.testing.mbttool.export.sap.wizards.SAPTe stScriptExportWizard.performFinish(SAPTestScriptExportWizard .java:90)
>
> at
> org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDi alog.java:752)
> -----------------
>
> The code snippet looks like this:
>
> if (EMFPlugin.IS_ECLIPSE_RUNNING) {
> templateURL =
> FileLocator.toFileURL(GenerateTestCase.class.getResource(MOD ULE_FILE_NAME
> + ".emtl"));
> ....
>
>
> I'm pretty sure, that this is a Acceleo related problem, since the
> exception occurs in a generated code snippet of Acceleo.
>
> So, what's wrong with the transformation?!
>
> Cheers Timothy
>


--------------070402060100060404080701
Content-Type: text/x-vcard; charset=utf-8;
name="laurent_goubet.vcf"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="laurent_goubet.vcf"

begin:vcard
fn:Laurent Goubet
n:Goubet;Laurent
org:<a href="http://www.obeo.fr">Obeo</a>
email;internet:laurent.goubet@obeo.fr
url:http://www.obeo.fr
version:2.1
end:vcard


--------------070402060100060404080701--
Previous Topic:[XPAND] Reader does not find UML Profile Package
Next Topic:[Acceleo] eInverse() and other functions
Goto Forum:
  


Current Time: Thu Oct 02 16:49:12 GMT 2014

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

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