Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMT (Generative Modeling Technologies) » [Epsilon] NoSuchMethodError running EOL from Java
[Epsilon] NoSuchMethodError running EOL from Java [message #383076] Sat, 10 May 2008 08:10 Go to next message
Conrad Hoffmann is currently offline Conrad Hoffmann
Messages: 12
Registered: July 2009
Junior Member
Hi,

I am trying to run an EOL program from within Java. I used the
RunEOLFromJava example from the homepage, which runs fine. I basically did
nothing but copy the code from Main.java into my own program and adjust
filenames for model and metamodel.

When I try to run it, I always get the following exception when calling
module.parse(code):
java.lang.NoSuchMethodError:
org.epsilon.eol.parse.ast.EolAstFactory.setASTNodeClass(Ljav a/lang/Class;)V
at org.epsilon.eol.parse.ast.EolAstFactory.<init>(EolAstFactory.java:23)
at org.epsilon.eol.AbstractModule.parse(AbstractModule.java:62)
at org.epsilon.eol.AbstractModule.parse(AbstractModule.java:56)

I added all required bundles to my manifest, and loading the model seems
to work fine. Also, since the module does not know about the model yet
(see below), I figure it can't be a faulty model. I dumbed the code down
to a single println statement, but it doesn't help either.

Any hints on what's wrong would be very helpful.

Thanks a lot, Conrad Hoffmann

EolModule module = new EolModule();
module.parse(code); <- this line throws the error
module.getContext().getModelRepository().addModel(model);
Re: [Epsilon] NoSuchMethodError running EOL from Java [message #383077 is a reply to message #383076] Sat, 10 May 2008 09:47 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios Kolovos
Messages: 1776
Registered: July 2009
Senior Member
Hi Conrad,

This is strange! The following Java code works in my machine without
problems:

package org.epsilon.eol;

public class EolTest {

public static void main(String[] args) throws Exception {
EolModule module = new EolModule();
module.parse("'hello'.println();");
module.execute();
}

}

I think that the problem should be your ANTLR version (or conflicting
ANTLR versions) or your Java version (1.5+ required). Are you running
Epsilon from CVS? If this is the case, have you followed the
instructions provided in
http://www.eclipse.org/gmt/epsilon/doc/EpsilonCVS.pdf to get the sources
from CVS?

Cheers,
Dimtirios

Conrad Hoffmann wrote:
> Hi,
>
> I am trying to run an EOL program from within Java. I used the
> RunEOLFromJava example from the homepage, which runs fine. I basically
> did nothing but copy the code from Main.java into my own program and
> adjust filenames for model and metamodel.
>
> When I try to run it, I always get the following exception when calling
> module.parse(code):
> java.lang.NoSuchMethodError:
> org.epsilon.eol.parse.ast.EolAstFactory.setASTNodeClass(Ljav a/lang/Class;)V
> at
> org.epsilon.eol.parse.ast.EolAstFactory.<init>(EolAstFactory.java:23)
> at org.epsilon.eol.AbstractModule.parse(AbstractModule.java:62)
> at org.epsilon.eol.AbstractModule.parse(AbstractModule.java:56)
>
> I added all required bundles to my manifest, and loading the model seems
> to work fine. Also, since the module does not know about the model yet
> (see below), I figure it can't be a faulty model. I dumbed the code down
> to a single println statement, but it doesn't help either.
>
> Any hints on what's wrong would be very helpful.
>
> Thanks a lot, Conrad Hoffmann
>
> EolModule module = new EolModule();
> module.parse(code); <- this line throws the error
> module.getContext().getModelRepository().addModel(model);
>
>
Re: [Epsilon] NoSuchMethodError running EOL from Java [message #383078 is a reply to message #383077] Sat, 10 May 2008 10:13 Go to previous messageGo to next message
Conrad Hoffmann is currently offline Conrad Hoffmann
Messages: 12
Registered: July 2009
Junior Member
Dimtirios,

I am using standard 3.3 Eclipse with the plugin installed via update site.
I think ANTLR may be the problem. I am using a project that uses ANTLR, I
am not sure which version. But they use their own copy of the source files
in the project, probably to avoid api changes. This is beyond my control.
Is there any trick to make the two versions get along together?

Thanks a lot,
Conrad
Re: [Epsilon] NoSuchMethodError running EOL from Java [message #383079 is a reply to message #383078] Sat, 10 May 2008 10:33 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios Kolovos
Messages: 1776
Registered: July 2009
Senior Member
Hi Conrad,

Do you need to use EOL in a standard Java project or in a Plug-In
project? The latter would be no problem as different plugins can have
different versions of the same libraries. However, if it is a standard
Java project there is a unique classpath in which there cannot be two
versions of the same library - unless you use a custom classloader or
something :(

Cheers,
Dimitrios

Conrad Hoffmann wrote:
> Dimtirios,
>
> I am using standard 3.3 Eclipse with the plugin installed via update site.
> I think ANTLR may be the problem. I am using a project that uses ANTLR,
> I am not sure which version. But they use their own copy of the source
> files in the project, probably to avoid api changes. This is beyond my
> control. Is there any trick to make the two versions get along together?
>
> Thanks a lot,
> Conrad
>
Re: [Epsilon] NoSuchMethodError running EOL from Java [message #617610 is a reply to message #383076] Sat, 10 May 2008 09:47 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios Kolovos
Messages: 1776
Registered: July 2009
Senior Member
Hi Conrad,

This is strange! The following Java code works in my machine without
problems:

package org.epsilon.eol;

public class EolTest {

public static void main(String[] args) throws Exception {
EolModule module = new EolModule();
module.parse("'hello'.println();");
module.execute();
}

}

I think that the problem should be your ANTLR version (or conflicting
ANTLR versions) or your Java version (1.5+ required). Are you running
Epsilon from CVS? If this is the case, have you followed the
instructions provided in
http://www.eclipse.org/gmt/epsilon/doc/EpsilonCVS.pdf to get the sources
from CVS?

Cheers,
Dimtirios

Conrad Hoffmann wrote:
> Hi,
>
> I am trying to run an EOL program from within Java. I used the
> RunEOLFromJava example from the homepage, which runs fine. I basically
> did nothing but copy the code from Main.java into my own program and
> adjust filenames for model and metamodel.
>
> When I try to run it, I always get the following exception when calling
> module.parse(code):
> java.lang.NoSuchMethodError:
> org.epsilon.eol.parse.ast.EolAstFactory.setASTNodeClass(Ljav a/lang/Class;)V
> at
> org.epsilon.eol.parse.ast.EolAstFactory.<init>(EolAstFactory.java:23)
> at org.epsilon.eol.AbstractModule.parse(AbstractModule.java:62)
> at org.epsilon.eol.AbstractModule.parse(AbstractModule.java:56)
>
> I added all required bundles to my manifest, and loading the model seems
> to work fine. Also, since the module does not know about the model yet
> (see below), I figure it can't be a faulty model. I dumbed the code down
> to a single println statement, but it doesn't help either.
>
> Any hints on what's wrong would be very helpful.
>
> Thanks a lot, Conrad Hoffmann
>
> EolModule module = new EolModule();
> module.parse(code); <- this line throws the error
> module.getContext().getModelRepository().addModel(model);
>
>
Re: [Epsilon] NoSuchMethodError running EOL from Java [message #617613 is a reply to message #383077] Sat, 10 May 2008 10:13 Go to previous message
Conrad Hoffmann is currently offline Conrad Hoffmann
Messages: 12
Registered: July 2009
Junior Member
Dimtirios,

I am using standard 3.3 Eclipse with the plugin installed via update site.
I think ANTLR may be the problem. I am using a project that uses ANTLR, I
am not sure which version. But they use their own copy of the source files
in the project, probably to avoid api changes. This is beyond my control.
Is there any trick to make the two versions get along together?

Thanks a lot,
Conrad
Re: [Epsilon] NoSuchMethodError running EOL from Java [message #617615 is a reply to message #383078] Sat, 10 May 2008 10:33 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios Kolovos
Messages: 1776
Registered: July 2009
Senior Member
Hi Conrad,

Do you need to use EOL in a standard Java project or in a Plug-In
project? The latter would be no problem as different plugins can have
different versions of the same libraries. However, if it is a standard
Java project there is a unique classpath in which there cannot be two
versions of the same library - unless you use a custom classloader or
something :(

Cheers,
Dimitrios

Conrad Hoffmann wrote:
> Dimtirios,
>
> I am using standard 3.3 Eclipse with the plugin installed via update site.
> I think ANTLR may be the problem. I am using a project that uses ANTLR,
> I am not sure which version. But they use their own copy of the source
> files in the project, probably to avoid api changes. This is beyond my
> control. Is there any trick to make the two versions get along together?
>
> Thanks a lot,
> Conrad
>
Previous Topic:[Epsilon] NoSuchMethodError running EOL from Java
Next Topic:[Epsilon] Problem with ECL
Goto Forum:
  


Current Time: Sat Oct 25 10:18:43 GMT 2014

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

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