Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » java.lang.IllegalAccessError(Why is this error not produced within eclipse?)
java.lang.IllegalAccessError [message #794228] Thu, 09 February 2012 03:24 Go to next message
wee shark is currently offline wee sharkFriend
Messages: 3
Registered: February 2012
Junior Member
Hi all!
I just signed up with a puzzling problem. I know this problem is not new, there are lots of other post concerning this error. I'm afraid non of them quite fit my problem.
I'm tasked to setup an online tool. I have not developed this tool. I'm on ubuntu 10.04. The tool itself was developed in fedora and the person who develop never encountered this problem. The tool has a html/php webfront for user input. Two small java servers need to be started up for the tool to run. The first server is called the configProvider server and his task is to forward all the configuration details. This works as far as I can tell fine, no problem there.
The second servers task (phyloServer) is to receive the user input and calculating the results which are displayed in the applet. Its doing most of what it is supposed to do. For that its using a java library called jebl which is freely available at sourceforge.

Just google it because this forum wont let me post an URL.

When the user specifies its input he can choose to do an optional bootstrapping analyses. That's when things go wrong. In that case the phyloServer is supposed to start up a program called clustal2w.

Again just google it.

An exception is thrown and clustalw2 is never started up. In that case the bootstrapping analysis runs forever and never finishes. I posted the exception below

Exception in thread "Thread-1" java.lang.IllegalAccessError: tried to access class jebl.evolution.trees.GreedyRootedConsensusTreeBuilder from class nz.auckland.university.bioinformatics.dnas.phylo.TreeBuilder
at nz.auckland.university.bioinformatics.dnas.phylo.TreeBuilder.buildConsensusTree(TreeBuilder.java:227)
at nz.auckland.university.bioinformatics.dnas.phylo.TreeBuilder.buildBootstrappedTree(TreeBuilder.java:128)
at nz.auckland.university.bioinformatics.dnas.phylo.bootstrapanalysis.BootstrapAnalysis.run(BootstrapAnalysis.java:56)
at nz.auckland.university.bioinformatics.dnas.phylo.bootstrapanalysis.BootstrapAnalysisWorker.run(BootstrapAnalysisWorker.java:22)
at java.lang.Thread.run(Thread.java:662)

Neverthless I belief that the code is correct, because when I compile and startup the phyloserver from within an eclipse project the bootstrapping works perfectly. The same sourcecode exported into an executable jar file and it does not work anymore. Looking the error up in the net gives a few hints whats going on. I tried around changing the java versions of the jre (in eclipse and my system) and recompiling the jebl library within eclipse. No change.
Can anyone think of what eclipse is doing different which could be an indication whats going wrong?

Every answer is much appreciated.
Re: java.lang.IllegalAccessError [message #794271 is a reply to message #794228] Thu, 09 February 2012 04:49 Go to previous messageGo to next message
David Wegener is currently offline David WegenerFriend
Messages: 1352
Registered: July 2009
Senior Member
On 02/08/2012 09:24 PM, wee shark wrote:
> Hi all!
> I just signed up with a puzzling problem. I know this problem is not
> new, there are lots of other post concerning this error. I'm afraid non
> of them quite fit my problem. I'm tasked to setup an online tool. I have
> not developed this tool. I'm on ubuntu 10.04. The tool itself was
> developed in fedora and the person who develop never encountered this
> problem. The tool has a html/php webfront for user input. Two small java
> servers need to be started up for the tool to run. The first server is
> called the configProvider server and his task is to forward all the
> configuration details. This works as far as I can tell fine, no problem
> there. The second servers task (phyloServer) is to receive the user
> input and calculating the results which are displayed in the applet. Its
> doing most of what it is supposed to do. For that its using a java
> library called jebl which is freely available at sourceforge.
>
> Just google it because this forum wont let me post an URL.
>
> When the user specifies its input he can choose to do an optional
> bootstrapping analyses. That's when things go wrong. In that case the
> phyloServer is supposed to start up a program called clustal2w.
>
> Again just google it.
>
> An exception is thrown and clustalw2 is never started up. In that case
> the bootstrapping analysis runs forever and never finishes. I posted the
> exception below
>
> Exception in thread "Thread-1" java.lang.IllegalAccessError: tried to
> access class jebl.evolution.trees.GreedyRootedConsensusTreeBuilder from
> class nz.auckland.university.bioinformatics.dnas.phylo.TreeBuilder
> at
> nz.auckland.university.bioinformatics.dnas.phylo.TreeBuilder.buildConsensusTree(TreeBuilder.java:227)
>
> at
> nz.auckland.university.bioinformatics.dnas.phylo.TreeBuilder.buildBootstrappedTree(TreeBuilder.java:128)
>
> at
> nz.auckland.university.bioinformatics.dnas.phylo.bootstrapanalysis.BootstrapAnalysis.run(BootstrapAnalysis.java:56)
>
> at
> nz.auckland.university.bioinformatics.dnas.phylo.bootstrapanalysis.BootstrapAnalysisWorker.run(BootstrapAnalysisWorker.java:22)
>
> at java.lang.Thread.run(Thread.java:662)
>
> Neverthless I belief that the code is correct, because when I compile
> and startup the phyloserver from within an eclipse project the
> bootstrapping works perfectly. The same sourcecode exported into an
> executable jar file and it does not work anymore. Looking the error up
> in the net gives a few hints whats going on. I tried around changing the
> java versions of the jre (in eclipse and my system) and recompiling the
> jebl library within eclipse. No change. Can anyone think of what eclipse
> is doing different which could be an indication whats going wrong?
>
> Every answer is much appreciated.
Its not clear from your question how this relates to Eclipse platform
development or to Eclipse at all. This appears to be an error when
running a third party application outside of Eclipse.

You should try asking someone at Auckland University or post on the jebl
sourceforge project.
Re: java.lang.IllegalAccessError [message #794868 is a reply to message #794271] Thu, 09 February 2012 20:11 Go to previous messageGo to next message
wee shark is currently offline wee sharkFriend
Messages: 3
Registered: February 2012
Junior Member
There is no third party application running outside of eclipse, if that would work I would not ask the question. The question was. Considering this error does not appear when the whole thing is started up from an eclipse project, taking into account that everything else is the same, what is eclipse doing different when it starts up an project in compare to when the compiled jar is started up from terminal? I think this question is very much related to the eclipse platform.

Thanks anyway, maybe I'm totally on the wrong here.

[Updated on: Thu, 09 February 2012 20:16]

Report message to a moderator

Re: java.lang.IllegalAccessError [message #794931 is a reply to message #794868] Thu, 09 February 2012 21:56 Go to previous messageGo to next message
David Wegener is currently offline David WegenerFriend
Messages: 1352
Registered: July 2009
Senior Member
If you open up the Debug perspective, you can select the program you launched. Right click and select properties. This gives you the exact command line that Eclipse uses to launch the program. This will tell you how Eclipse is launching the program. Eclipse doesn't do anything special. It just starts up a java VM using the java executable and passing command line arguments the same way that it is done from the command line.
Re: java.lang.IllegalAccessError [message #794952 is a reply to message #794931] Thu, 09 February 2012 22:32 Go to previous message
wee shark is currently offline wee sharkFriend
Messages: 3
Registered: February 2012
Junior Member
Thanks a lot that's the answer I was looking for.

All the best
Previous Topic:Re: Use "Save and Launch" Dialog for my own Plugin
Next Topic:[eclipse 3.6 WPE] How to control the display order of the category in the Properties view
Goto Forum:
  


Current Time: Sun Dec 21 18:52:37 GMT 2014

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

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