Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Texo] Errors while generating model code
[Texo] Errors while generating model code [message #1003978] Tue, 22 January 2013 10:58 Go to next message
Bastian Wagenfeld is currently offline Bastian Wagenfeld
Messages: 162
Registered: January 2013
Senior Member
Hi!

I'm trying to generate JPA annotated model code via the texo generator. The generation fails after most of the classes are generated. Unfortunately there are no details in the error log. It only says "Error occurred during artifact generation". Three classes are missing after this error, one of them is the "ModelPackage" class.
So I tried to generate an annotationsmodel. That fails too, but throws an interesting error message which contains the whole ModelPackage class. The error itself is like that:
Errors occurred during the build.
Errors running builder 'Texo Code Generator Builder' on project 'de.test.texo.model'.
java.lang.IllegalStateException: package de.test.texo.model;

Then follows the class and another error at the bottom line:
884: Syntax error on token ".", delete this token

This line is contained in the initialize method. All referenced model packages are initialized. The generated code around the mentioned line looks like the following:
de.test.texo.identifiable.FirstModelPackage.initialize();
        de.test.texo.second.SecondModelPackage.initialize();
        de.test.texo.third.ThirdModelPackage.initialize();
        .initialize();
        de.test.texo.fourth.FourthModelPackage.initialize();


So I assume this is the same error that happens during the code generation as well.

Since I now have the ModelPackage code, I could try and write the two missing classes by myself. However, I'd rather know what creates the error and solve it. Maybe anyone got an idea?

Thanks
Bastian
Re: [Texo] Errors while generating model code [message #1003996 is a reply to message #1003978] Tue, 22 January 2013 11:40 Go to previous messageGo to next message
Martin Taal is currently offline Martin Taal
Messages: 5339
Registered: July 2009
Senior Member
Hi Bastian,
Can you remove the line in the source (so the one with .initialize())? Or remove the complete generate ModelPackage
file. Does that help?

If not can you send me your model (you can send it directly)?

It seems to fail somewhere in the dependencies between epackages, so it creates a wrong source line.

gr.

On 01/22/2013 11:58 AM, Bastian Wagenfeld wrote:
> Hi!
>
> I'm trying to generate JPA annotated model code via the texo generator. The generation fails after most of the classes
> are generated. Unfortunately there are no details in the error log. It only says "Error occurred during artifact
> generation". Three classes are missing after this error, one of them is the "ModelPackage" class.
> So I tried to generate an annotationsmodel. That fails too, but throws an interesting error message which contains the
> whole ModelPackage class. The error itself is like that:
> Errors occurred during the build.
> Errors running builder 'Texo Code Generator Builder' on project 'de.test.texo.model'.
> java.lang.IllegalStateException: package de.test.texo.model;
> Then follows the class and another error at the bottom line:
> 884: Syntax error on token ".", delete this token
> This line is contained in the initialize method. All referenced model packages are initialized. The generated code
> around the mentioned line looks like the following:
> de.test.texo.identifiable.FirstModelPackage.initialize();
> de.test.texo.second.SecondModelPackage.initialize();
> de.test.texo.third.ThirdModelPackage.initialize();
> .initialize();
> de.test.texo.fourth.FourthModelPackage.initialize();
>
> So I assume this is the same error that happens during the code generation as well.
>
> Since I now have the ModelPackage code, I could try and write the two missing classes by myself. However, I'd rather
> know what creates the error and solve it. Maybe anyone got an idea?
>
> Thanks
> Bastian


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
Re: [Texo] Errors while generating model code [message #1004004 is a reply to message #1003996] Tue, 22 January 2013 12:07 Go to previous messageGo to next message
Erdal Karaca is currently offline Erdal Karaca
Messages: 750
Registered: July 2009
Senior Member
Maybe, some "incomplete" packages in your ecore files? - For example without name...
Re: [Texo] Errors while generating model code [message #1004007 is a reply to message #1003996] Tue, 22 January 2013 12:14 Go to previous messageGo to next message
Bastian Wagenfeld is currently offline Bastian Wagenfeld
Messages: 162
Registered: January 2013
Senior Member
Hi Martin,

I can't remove this line, since the java class itself isn't generated. The source of the ModelPackage class only shows in the error message that occures when I generate the annotations model.
Thank you so much for your help! I'd like to send the ecore models directly to you, but I can't see your email or something else!?

Bastian
Re: [Texo] Errors while generating model code [message #1004034 is a reply to message #1004007] Tue, 22 January 2013 13:28 Go to previous messageGo to next message
Martin Taal is currently offline Martin Taal
Messages: 5339
Registered: July 2009
Senior Member
Hi Bastian,
My email address is mtaal at elver.org

gr. Martin

On 01/22/2013 01:14 PM, Bastian Wagenfeld wrote:
> Hi Martin,
>
> I can't remove this line, since the java class itself isn't generated. The source of the ModelPackage class only shows
> in the error message that occures when I generate the annotations model.
> Thank you so much for your help! I'd like to send the ecore models directly to you, but I can't see your email or
> something else!?
>
> Bastian


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
Re: [Texo] Errors while generating model code [message #1004414 is a reply to message #1004007] Wed, 23 January 2013 07:26 Go to previous messageGo to next message
Martin Taal is currently offline Martin Taal
Messages: 5339
Registered: July 2009
Senior Member
Hi Bastian,
This was a bug. I published a new build which should solve this. Can you check if it helped?

gr. Martin

On 01/22/2013 01:14 PM, Bastian Wagenfeld wrote:
> Hi Martin,
>
> I can't remove this line, since the java class itself isn't generated. The source of the ModelPackage class only shows
> in the error message that occures when I generate the annotations model.
> Thank you so much for your help! I'd like to send the ecore models directly to you, but I can't see your email or
> something else!?
>
> Bastian


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
icon14.gif  Re: [Texo] Errors while generating model code [message #1004440 is a reply to message #1004414] Wed, 23 January 2013 08:37 Go to previous message
Bastian Wagenfeld is currently offline Bastian Wagenfeld
Messages: 162
Registered: January 2013
Senior Member
Hi Martin,

thank you so much. All classes are generated correctly, now.

Best regards
Bastian
Previous Topic:Eclipse Link tenant property lost on cascading delete
Next Topic:Deletion of existing classes in same package
Goto Forum:
  


Current Time: Sat Oct 25 14:52:16 GMT 2014

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

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