Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » problems setting javaagent in glassfish v3 with eclipselink 2.0
problems setting javaagent in glassfish v3 with eclipselink 2.0 [message #643572] Tue, 07 December 2010 13:45 Go to next message
Aaqib  is currently offline Aaqib Friend
Messages: 4
Registered: December 2010
Junior Member
Hi everybody,

My problem is that after i give the JVm option of -javaagent:eclipselink-2.0.0.jar, by giving the full directory path of the jar file,,

the server fails to start. because it cannot find the class PersistenceUnitInfo in the javax.persistence.spi package from the eclipselink jar.

i have checked and found that the class is not present in the spi package.

do I have to use a different eclipselink jar file to be used as agent..

I need help with this.

My basic problem is that I get a communication failure message while tryling to load entities which have sub lists of other entities. it is not working with fetch type of eager or lazy. where as it works for other entities. one entity is giving me this trouble.

then i did some search and found out about the following in the persistence.xml file
<property name="eclipselink.weaving" value="true"/>
<property name="eclipselink.weaving.lazy" value="true"/>

but then the message occured that
Caused by: javax.persistence.PersistenceException: Exception [EclipseLink-28022] (Eclipse Persistence Services - 2.0.0.v20091127-r5931): org.eclipse.persistence.exceptions.EntityManagerSetupExcepti on
Exception Description:Value [true] for the property [eclipselink.weaving] is incorrect when global instrumentation is null, value should either be null or false.

then i came to this forum and learnt about turning javaagent on but rather got stuck in this classnotfoundexception.

Awaiting help.


[Updated on: Tue, 07 December 2010 13:46]

Report message to a moderator

Re: problems setting javaagent in glassfish v3 with eclipselink 2.0 [message #644121 is a reply to message #643572] Thu, 09 December 2010 15:36 Go to previous message
James Sutherland is currently offline James SutherlandFriend
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

When using Glassfish, or any application server you do not need to use an agent on the server, as the server will automatically allow weaving of EJB JPA persistence units.

Are you trying to use the agent on Glassfish, or a Java client?

Please include the communication exception, it does sound like it is related to weaving.

The PersistenceUnitInfo should be in the JPA 2.0 persistence.jar.

James : Wiki : Book : Blog : Twitter
Previous Topic:Option to format generated SQL when output?
Next Topic:BigDecimal correctly persisted but not correctly loaded
Goto Forum:

Current Time: Tue Jun 02 12:19:25 GMT 2020

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

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

Back to the top