Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Maven errors question
Maven errors question [message #1060731] Tue, 28 May 2013 09:30 Go to next message
Mårten Carlzon is currently offline Mårten CarlzonFriend
Messages: 60
Registered: March 2013
Location: Sweden
Member

Hello folks

I was wondering if I could get some help with my maven setup?
I have been using this example as my base for building my maven setup, but since I only need the jar file and not a compilation I have modded the mydsl pom file.

When I extract it in eclipse as runnable jar with the option "Package required libraries into generated Jar" everything works fine, but when I build and run the jar with maven I get the following errors:

----------------------ERROR--------------------------------------
log4j:WARN No appenders could be found for logger (org.eclipse.xtext.parser.antlr.AbstractInternalAntlrParser).
log4j:WARN Please initialize the log4j system properly.


Exception in thread "main" org.eclipse.emf.common.util.WrappedException: java.lang.StringIndexOutOfBoundsException:
String index out of range: 369
at org.eclipse.xtext.linking.lazy.LazyLinkingResource.getEObject(LazyLinkingResource.java:182)
at org.eclipse.xtext.linking.lazy.LazyLinkingResource.resolveLazyCrossReference(LazyLinkingResource.java:135
)
at org.eclipse.xtext.linking.lazy.LazyLinkingResource.resolveLazyCrossReferences(LazyLinkingResource.java:11
4)
at org.eclipse.xtext.EcoreUtil2.resolveLazyCrossReferences(EcoreUtil2.java:510)
at org.eclipse.xtext.validation.ResourceValidatorImpl.resolveProxies(ResourceValidatorImpl.java:154)
at org.eclipse.xtext.validation.ResourceValidatorImpl.validate(ResourceValidatorImpl.java:67)
at idainfront.iipax.dsl.generator.Generator.runGenerator(Generator.java:42)
at idainfront.iipax.dsl.generator.Main.main(Main.java:32)
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: 369
at java.lang.String.substring(Unknown Source)
at org.eclipse.xtext.nodemodel.impl.AbstractNode.getText(AbstractNode.java:95)
at org.eclipse.xtext.nodemodel.util.NodeModelUtils.getTokenText(NodeModelUtils.java:373)
at org.eclipse.xtext.linking.impl.LinkingHelper.getCrossRefNodeAsString(LinkingHelper.java:51)
at org.eclipse.xtext.linking.impl.DefaultLinkingService.getCrossRefNodeAsString(DefaultLinkingService.java:1
39)
at org.eclipse.xtext.linking.impl.DefaultLinkingService.getLinkedObjects(DefaultLinkingService.java:115)
at org.eclipse.xtext.linking.lazy.LazyLinkingResource.getEObject(LazyLinkingResource.java:198)
at org.eclipse.xtext.linking.lazy.LazyLinkingResource.getEObject(LazyLinkingResource.java:175)
... 7 more

I don't really know what files may help you I thought atleast I might post the pom for this file and the mydsl (which is iidsl for me) projects.

Generator pom

IiDSL pom



Hmm... might as well ask, but since I only want to compile a jar file from my main class which turns my dsl file into an xml file by using the generator, do I need to build all the projects they have in the xtext-maven-example or can I simplify it?
(Cinda new to maven Smile )

Thanks for any help

Write you later / Mårten
Re: Maven errors question [message #1060735 is a reply to message #1060731] Tue, 28 May 2013 09:40 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 6534
Registered: July 2009
Senior Member
Hi,

did you make sure you did not stumbe over http://www.eclipse.org/forums/index.php/m/1022283/?srch=xtext-maven-examples#msg_1022283
Re: Maven errors question [message #1060737 is a reply to message #1060735] Tue, 28 May 2013 09:49 Go to previous messageGo to next message
Mårten Carlzon is currently offline Mårten CarlzonFriend
Messages: 60
Registered: March 2013
Location: Sweden
Member

Hi,

I should probably have mentioned it. But I did stumble over it, fell quite hard and no wiser when I got up Smile
I tried to remove the log4j and repackage them in the standalone but it didn't seem to help.
I guess I missed something so will look into it again.

Well, sorry for taking your time if the answer already was here Smile
Write you later / Mårten
Re: Maven errors question [message #1060740 is a reply to message #1060737] Tue, 28 May 2013 10:02 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 6534
Registered: July 2009
Senior Member
HI,

i fear you have to do some further digging on that place
Re: Maven errors question [message #1060741 is a reply to message #1060740] Tue, 28 May 2013 10:09 Go to previous message
Mårten Carlzon is currently offline Mårten CarlzonFriend
Messages: 60
Registered: March 2013
Location: Sweden
Member

Hi,

meh! Sorry for taking up your time. Seems I forgot to fix in the repackage.xml file.
Now I only have the log4j warning but... since it compiles I will take that when I have more time Smile

Sorry again, its like when you ask the teacher about something and just as you ask you find the answer.
Well, at least people here have good patience with me Very Happy

Have a good day

Write you later / Mårten
Previous Topic:Scoping specific GMF elements in xtext grammar
Next Topic:New Target Language
Goto Forum:
  


Current Time: Thu Dec 18 00:57:40 GMT 2014

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

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