Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » question on ClassNotFoundException: org.eclipse.persistence.sdo.SDOResolvable
question on ClassNotFoundException: org.eclipse.persistence.sdo.SDOResolvable [message #389414] Tue, 09 June 2009 08:53 Go to next message
EugeneChung is currently offline EugeneChung
Messages: 3
Registered: July 2009
Junior Member
Hi, I'm using EclipseLink JPA provider only (eclipselink.jar) and I need
to use

org.eclipse.persistence.jpa.PersistenceProvider.createContai nerEntityManagerFactory

for some reasons. I'm implementing sorts of server services, so I can't
use persistence.xml because of conflict with applications.

But while calling
org.eclipse.persistence.jpa.PersistenceProvider.createContai nerEntityManagerFactory,

I met this excetion from it,


javax.persistence.PersistenceException: Exception [EclipseLink-28018]
(Eclipse Persistence Services - 1.1.1.v20090430-r4097):
org.eclipse.persistence.exceptions.EntityManagerSetupExcepti on
Exception Description: Predeployment of PersistenceUnit
[ejbTimerServiceForLocalTx] failed.
Internal Exception: Exception [EclipseLink-30007] (Eclipse Persistence
Services - 1.1.1.v20090430-r4097):
org.eclipse.persistence.exceptions.PersistenceUnitLoadingExc eption
Exception Description: An exception was thrown while loading class:
org.eclipse.persistence.sdo.SDOResolvable to check whether it implements
@Entity, @Embeddable, or @MappedSuperclass.
Internal Exception: java.lang.ClassNotFoundException:
org.eclipse.persistence.sdo.SDOResolvable
at
org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl. predeploy(EntityManagerSetupImpl.java:878)
at
org.eclipse.persistence.jpa.PersistenceProvider.createContai nerEntityManagerFactory(PersistenceProvider.java:216)
..........
Caused by: Exception [EclipseLink-28018] (Eclipse Persistence Services -
1.1.1.v20090430-r4097):
org.eclipse.persistence.exceptions.EntityManagerSetupExcepti on
Exception Description: Predeployment of PersistenceUnit
[ejbTimerServiceForLocalTx] failed.
Internal Exception: Exception [EclipseLink-30007] (Eclipse Persistence
Services - 1.1.1.v20090430-r4097):
org.eclipse.persistence.exceptions.PersistenceUnitLoadingExc eption
Exception Description: An exception was thrown while loading class:
org.eclipse.persistence.sdo.SDOResolvable to check whether it implements
@Entity, @Embeddable, or @MappedSuperclass.
Internal Exception: java.lang.ClassNotFoundException:
org.eclipse.persistence.sdo.SDOResolvable
at
org.eclipse.persistence.exceptions.EntityManagerSetupExcepti on.predeployFailed(EntityManagerSetupException.java:210)
... 9 more
Caused by: Exception [EclipseLink-30007] (Eclipse Persistence Services -
1.1.1.v20090430-r4097):
org.eclipse.persistence.exceptions.PersistenceUnitLoadingExc eption
Exception Description: An exception was thrown while loading class:
org.eclipse.persistence.sdo.SDOResolvable to check whether it implements
@Entity, @Embeddable, or @MappedSuperclass.
Internal Exception: java.lang.ClassNotFoundException:
org.eclipse.persistence.sdo.SDOResolvable
at
org.eclipse.persistence.exceptions.PersistenceUnitLoadingExc eption.exceptionLoadingClassWhileLookingForAnnotations(Persi stenceUnitLoadingException.java:138)
at
org.eclipse.persistence.internal.jpa.deployment.PersistenceU nitProcessor.loadClass(PersistenceUnitProcessor.java:264)
at
org.eclipse.persistence.internal.jpa.metadata.MetadataProces sor.initPersistenceUnitClasses(MetadataProcessor.java:249)
at
org.eclipse.persistence.internal.jpa.metadata.MetadataProces sor.processEntityMappings(MetadataProcessor.java:425)
at
org.eclipse.persistence.internal.jpa.deployment.PersistenceU nitProcessor.processORMetadata(PersistenceUnitProcessor.java :299)
at
org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl. predeploy(EntityManagerSetupImpl.java:838)
... 8 more
Caused by: java.lang.ClassNotFoundException:
org.eclipse.persistence.sdo.SDOResolvable
..........
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at
org.eclipse.persistence.internal.jpa.deployment.PersistenceU nitProcessor.loadClass(PersistenceUnitProcessor.java:261)
... 12 more


I guess PersistenceProvider.createContainerEntityManagerFactory presumes
there exist SDO libraries. (maybe moxy libs, too)

But I don't need SDO... and it may be a burden to add SDO libraries only
for this...

Is there any property started with "eclipselink." to turn off sdo library
search?
Re: question on ClassNotFoundException: org.eclipse.persistence.sdo.SDOResolvable [message #389419 is a reply to message #389414] Tue, 09 June 2009 10:04 Go to previous messageGo to next message
James Sutherland is currently offline James Sutherland
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

That is odd, it looks like it is trying to load
org.eclipse.persistence.sdo.SDOResolvable to see if it is an Entity. Did
you add this class in your persistence.xml, or did you include the
eclipselink.jar in your persistence.xml? That is incorrect, the jars tag
in the persistence.xml is only for your application classes, it should not
include libraries of eclipselink.jar.

Please include your persistence.xml if still having issues.

---
James
http://www.nabble.com/EclipseLink---Users-f26658.html


James : Wiki : Book : Blog : Twitter
Re: question on ClassNotFoundException: org.eclipse.persistence.sdo.SDOResolvabl [message #389424 is a reply to message #389414] Tue, 09 June 2009 10:13 Go to previous messageGo to next message
EugeneChung is currently offline EugeneChung
Messages: 3
Registered: July 2009
Junior Member
Sorry, I need more investigation on this.
Re: question on ClassNotFoundException: org.eclipse.persistence.sdo.SDOResolvable [message #389431 is a reply to message #389419] Tue, 09 June 2009 22:20 Go to previous messageGo to next message
EugeneChung is currently offline EugeneChung
Messages: 3
Registered: July 2009
Junior Member
Thank you for your reply.

As I said, I'm using programmatic EntityManagerFactory creation with
javax.persistence.spi.PersistenceProvider#createContainerEnt ityManagerFactory,
not using persistence.xml.

I found a cause of my problem.
I made my
javax.persistence.spi.PersistenceUnitInfo#excludeUnlistedCla sses()
implementation return 'true'
and then exception had disappeared.
Re: question on ClassNotFoundException: org.eclipse.persistence.sdo.SDOResolvable [message #389470 is a reply to message #389431] Tue, 16 June 2009 17:13 Go to previous message
Michael OBrien is currently offline Michael OBrien
Messages: 34
Registered: July 2009
Member
Eugene,
That solution will work, but it looks like you may be including the
eclipselink jar in your EAR where the EMF will search for entities without
the [excludeUnlistedClasses] override (it defaults to false on an EE
container) - it may be searching the entire implementation jar. I would
verify where you are placing the EclipseLink library on your classpath and
recommend putting it higher outside of your EAR on the server's shared
library folder.
thank you
/michael
Previous Topic:No Cache Option
Next Topic:Diffrence of parameter format
Goto Forum:
  


Current Time: Sat Aug 30 12:29:51 EDT 2014

Powered by FUDForum. Page generated in 0.04094 seconds