Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Gemini » Gemini Jpa: Cannot use JavaLog with EclipseLink
Gemini Jpa: Cannot use JavaLog with EclipseLink [message #1066911] Fri, 05 July 2013 06:46 Go to next message
Peter Kullmann is currently offline Peter KullmannFriend
Messages: 240
Registered: July 2009
Senior Member
I'm trying to enable JavaLog with EclipseLink and have therefore defined the following property in my persistence.xml:

<property name="eclipselink.logging.logger" value="JavaLogger"/>


The persistence unit will not start due to the following error:

javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.4.1.v20121003-ad44345): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [projectcontrolling] failed.
Internal Exception: Exception [EclipseLink-28006] (Eclipse Persistence Services - 2.4.1.v20121003-ad44345): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: ClassNotFound: [org.eclipse.persistence.logging.JavaLog] specified in [eclipselink.logging.logger] property.
Internal Exception: java.lang.ClassNotFoundException: org/eclipse/persistence/logging/JavaLog
	at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.createPredeployFailedPersistenceException(EntityManagerSetupImpl.java:1541)
	at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:1532)


The error originates from this call:
Class.forName(className, initialize, loader);

where loader is an instance of org.eclipse.gemini.jpa.classloader.CompositeClassLoader. The gemini debugging log says:
Attempting loadClass(org.eclipse.persistence.logging.JavaLog) on org.eclipse.gemini.jpa.classloader.BundleProxyClassLoader@5f0275fa(ch.arenae.projectcontrolling.domain)
Bundle has no classloader so loadClass(org.eclipse.persistence.logging.JavaLog) is returning null


What happens is that the CompositeClassLoader first delgates to the the BundleProxyClassLoader of the persistence bundle. The persistence bundle is in this moment in state INSTALLED. BundleProxyClassLoader returns null and the CompositeClassLoader stops looking for the class.

Would it not be better in BundleProxyClassLoader to throw a ClassNotFoundException when the bundle is not resolved?

I'm using Gemini JPA 1.1.0 and Eclipselink 2.4.1.

Regards,
Peter
Re: Gemini Jpa: Cannot use JavaLog with EclipseLink [message #1067024 is a reply to message #1066911] Fri, 05 July 2013 13:22 Go to previous message
Michael Keith is currently offline Michael KeithFriend
Messages: 243
Registered: July 2009
Senior Member
Yes, indeed. I entered bug 412404 and will fix it for 1.2.0 M2.

Kind of weird that I never ran into this. I think one or two other people have but I could never reproduce it, so I'm glad it happened to you and that you were able to track it down on your own. Thanks very much for reporting this.

-Mike
Previous Topic:Contribution
Next Topic:Gemini JPA: Getting Started?
Goto Forum:
  


Current Time: Thu Apr 25 00:17:50 GMT 2024

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

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

Back to the top