Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » eclipse 1.0M6 to 1.0: IllegalAccessError
eclipse 1.0M6 to 1.0: IllegalAccessError [message #376377] Sun, 20 July 2008 07:06 Go to next message
Tom Eugelink is currently offline Tom EugelinkFriend
Messages: 807
Registered: July 2009
Senior Member
I've follow the Toplink JPA implementation from the essentials all the way to now EclipseLink. Currently my system is using EclipseLink 1.0M6 and works fine. Yesterday I did a memory profile of my application and found that a 400 MB memory dump was loaded for almost 50% with EclipseLink classes. This does not seem to be right, so I'm investigating. As a first step I decided to upgrade to 1.0 to make sure it is not a beta-release problem. I downloaded the 1.0 release and replace the jar and started the application:

Caused by: java.lang.IllegalAccessError: tried to access method org.eclipse.persistence.internal.jpa.EntityManagerFactoryPro vider.mergeMaps(Ljava/util/Map;Ljava/util/Map;)Ljava/util/Ma p; from class org.eclipse.persistence.internal.jpa.deployment.JPAInitializ er
at org.eclipse.persistence.internal.jpa.deployment.JPAInitializ er.callPredeploy(JPAInitializer.java:85)
at org.eclipse.persistence.internal.jpa.deployment.JPAInitializ er.initPersistenceUnits(JPAInitializer.java:149)
at org.eclipse.persistence.internal.jpa.deployment.JPAInitializ er.initialize(JPAInitializer.java:135)
at org.eclipse.persistence.internal.jpa.deployment.JavaSECMPIni tializer.initializeFromAgent(JavaSECMPInitializer.java:145)
... 12 more

The exception comes immediately on startup. Any suggestions?

Tom
Re: eclipse 1.0M6 to 1.0: IllegalAccessError [message #376880 is a reply to message #376377] Mon, 21 July 2008 14:28 Go to previous messageGo to next message
James is currently offline JamesFriend
Messages: 272
Registered: July 2009
Senior Member
We do not get this error is any of our test environments.

It seems to be some kind of classpath or class loader issue. Are you sure
you don't have an old version of the code on the classpath? What
environment are you testing in exactly? (server, jvm, spring, etc.)
Re: eclipse 1.0M6 to 1.0: IllegalAccessError [message #376881 is a reply to message #376880] Tue, 22 July 2008 06:55 Go to previous messageGo to next message
Tom Eugelink is currently offline Tom EugelinkFriend
Messages: 807
Registered: July 2009
Senior Member
James wrote:
> We do not get this error is any of our test environments.
>
> It seems to be some kind of classpath or class loader issue. Are you
> sure you don't have an old version of the code on the classpath? What
> environment are you testing in exactly? (server, jvm, spring, etc.)
>
>


I'm using it stand-alone. Eclipse 3.3, JDK 1.6.0u10_debug. I removed the old jar from the classpath in Eclipse, added the new, and altered the vm agent argument to use the new jar... That should do it, right?
Re: eclipse 1.0M6 to 1.0: IllegalAccessError [message #376882 is a reply to message #376881] Tue, 22 July 2008 13:41 Go to previous messageGo to next message
James is currently offline JamesFriend
Messages: 272
Registered: July 2009
Senior Member
Ensure you removed the old jar completely. There should not be any
classpath issues using stand-alone other than classpath, so this is very
odd. You could try debugging it.

Also try removing the agent, and see if you still get the error.

You could also try running outside of Eclipse where you may have more
control over what is on your classpath.

In general the mergeMaps method is public, so you should not be getting an
access error, unless you have and older version of the class on the
classpath that had the method as not public.

-- James
Re: eclipse 1.0M6 to 1.0: IllegalAccessError [message #376884 is a reply to message #376882] Tue, 22 July 2008 15:06 Go to previous message
Tom Eugelink is currently offline Tom EugelinkFriend
Messages: 807
Registered: July 2009
Senior Member
Ah, I forgot that another project was included and it also had the eclipselink jar. Now it works; only some minor changes in the programmatic configuration.

Thanks.

Tom
Previous Topic:StaticWeavingAntTask didn't weave my classes
Next Topic:JBoss Seam: FlushModeType.MANUAL for EclipseLink/TopLink
Goto Forum:
  


Current Time: Sun Dec 21 05:27:40 GMT 2014

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

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