Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Problem deploying - cannot find class org.eclipse.persistence.jpa.EntityManagerFactoryProvider

Hi Tom,
The nightly build worked.  Thanks!
-Ellen

Tom Ware wrote:

Hi Ellen,

  Could you try a more recent nightly build?

A fix that could solve this problem was checked in after the last milestone build.

-Tom

Ellen Kraffmiller wrote:

Hi Doug,.
I changed my persistence.xml provider, and now I'm getting another error deploying my persistence unit. Here is the stack trace. I am also attaching my persistence.xml
Thanks for your help,
Ellen

Exception Description: Predeployment of PersistenceUnit [VDCNet-ejbPU] failed.
Internal Exception: java.lang.NullPointerException
javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 1.0 (Build SNAPSHOT - 20080207)): org.eclipse.persistence.exceptions.EntityManagerSetupException Exception Description: Predeployment of PersistenceUnit [VDCNet-ejbPU] failed.
Internal Exception: java.lang.NullPointerException
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:806) at org.eclipse.persistence.jpa.PersistenceProvider.createContainerEntityManagerFactory(PersistenceProvider.java:155) at com.sun.enterprise.server.PersistenceUnitLoaderImpl.load(PersistenceUnitLoaderImpl.java:149) at com.sun.enterprise.server.PersistenceUnitLoaderImpl.load(PersistenceUnitLoaderImpl.java:84) at com.sun.enterprise.server.AbstractLoader.loadPersistenceUnits(AbstractLoader.java:898) at com.sun.enterprise.server.ApplicationLoader.doLoad(ApplicationLoader.java:184) at com.sun.enterprise.server.TomcatApplicationLoader.doLoad(TomcatApplicationLoader.java:126) at com.sun.enterprise.server.AbstractLoader.load(AbstractLoader.java:244) at com.sun.enterprise.server.ApplicationManager.applicationDeployed(ApplicationManager.java:336) at com.sun.enterprise.server.ApplicationManager.applicationDeployed(ApplicationManager.java:210) at com.sun.enterprise.server.ApplicationManager.applicationDeployed(ApplicationManager.java:645) at com.sun.enterprise.admin.event.AdminEventMulticaster.invokeApplicationDeployEventListener(AdminEventMulticaster.java:928) at com.sun.enterprise.admin.event.AdminEventMulticaster.handleApplicationDeployEvent(AdminEventMulticaster.java:912) at com.sun.enterprise.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:461) at com.sun.enterprise.admin.event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:176) at com.sun.enterprise.admin.server.core.DeploymentNotificationHelper.multicastEvent(DeploymentNotificationHelper.java:308) at com.sun.enterprise.deployment.phasing.DeploymentServiceUtils.multicastEvent(DeploymentServiceUtils.java:226) at com.sun.enterprise.deployment.phasing.ServerDeploymentTarget.sendStartEvent(ServerDeploymentTarget.java:298) at com.sun.enterprise.deployment.phasing.ApplicationStartPhase.runPhase(ApplicationStartPhase.java:132) at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:108) at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:919) at com.sun.enterprise.deployment.phasing.PEDeploymentService.start(PEDeploymentService.java:591) at com.sun.enterprise.deployment.phasing.PEDeploymentService.start(PEDeploymentService.java:635) at com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.start(ApplicationsConfigMBean.java:744)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:375) at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:358) at com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:464) at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:213)
   at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:220)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:815) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:784)
   at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:90)
   at $Proxy1.invoke(Unknown Source)
at com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:304) at com.sun.enterprise.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:174) at com.sun.enterprise.deployment.client.DeploymentClientUtils.startApplication(DeploymentClientUtils.java:145) at com.sun.enterprise.deployment.client.DeployAction.run(DeployAction.java:537)
   at java.lang.Thread.run(Thread.java:595)
Caused by: Exception [EclipseLink-28018] (Eclipse Persistence Services - 1.0 (Build SNAPSHOT - 20080207)): org.eclipse.persistence.exceptions.EntityManagerSetupException Exception Description: Predeployment of PersistenceUnit [VDCNet-ejbPU] failed.
Internal Exception: java.lang.NullPointerException
at org.eclipse.persistence.exceptions.EntityManagerSetupException.predeployFailed(EntityManagerSetupException.java:203)
   ... 45 more
Caused by: java.lang.NullPointerException
at org.eclipse.persistence.internal.jpa.metadata.xml.XMLPersistenceUnitMetadata.hasDefaultListeners(XMLPersistenceUnitMetadata.java:117) at org.eclipse.persistence.internal.jpa.metadata.xml.XMLEntityMappings.processPersistenceUnitMetadata(XMLEntityMappings.java:481) at org.eclipse.persistence.internal.jpa.metadata.MetadataProcessor.processEntityMappings(MetadataProcessor.java:281) at org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.processORMetadata(PersistenceUnitProcessor.java:258) at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:763)
   ... 44 more
|#]

Doug Clarke wrote:

Ellen,

Looks like we have an addition to make to our package renamed. Can you file a bug?

https://bugs.eclipse.org/bugs/enter_bug.cgi?product=EPS%28EclipseLink%29

I believe all you need to do is to edit the provider in your persistence.xml:

<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>

I hope this works for you. Please keep us posted on your progress and results.

Doug

-----Original Message-----
From: eclipselink-users-bounces@xxxxxxxxxxx
[mailto:eclipselink-users-bounces@xxxxxxxxxxx]On Behalf Of Ellen
Kraffmiller
Sent: Tuesday, February 26, 2008 4:09 PM
To: eclipselink-users@xxxxxxxxxxx
Subject: [eclipselink-users] Problem deploying - cannot find class
org.eclipse.persistence.jpa.EntityManagerFactoryProvider


Hi,
I am deploying EclipseLink to a Glassfish application server (replacing
TopLink Essentials). I ran packageRename to update my persistence.xml file,
and when I deploy the application I get
java.lang.ClassNotFoundException:
org.eclipse.persistence.jpa.EntityManagerFactoryProvider
   at
com.sun.enterprise.server.PersistenceUnitLoaderImpl.load(PersistenceUnitLoaderImpl.java:143)

I looked at the contents of eclipselink.jar, and I don't find an
EntityManagerFactoryProvider in the location specified in
persistence.xml.  I did find a class in another package -
org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider, but
when I use this in persistence.xml, I get another exception on startup:
java.lang.ClassCastException
   at java.lang.Class.cast(Class.java:2951)
   at
com.sun.enterprise.server.PersistenceUnitLoaderImpl.load(PersistenceUnitLoaderImpl.java:137)
   at
com.sun.enterprise.server.PersistenceUnitLoaderImpl.load(PersistenceUnitLoaderImpl.java:84)
   at
com.sun.enterprise.server.AbstractLoader.loadPersistenceUnits(AbstractLoader.java:898)
   at
com.sun.enterprise.server.ApplicationLoader.doLoad(ApplicationLoader.java:184)
   at
com.sun.enterprise.server.TomcatApplicationLoader.doLoad(TomcatApplicationLoader.java:126)
...etc

Any hints as to what I'm doing wrong here?
Thanks,
Ellen

_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users

_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users



------------------------------------------------------------------------

<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd";>
 <persistence-unit name="VDCNet-ejbPU" transaction-type="JTA">
    <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
    <jta-data-source>jdbc/VDCNetDS</jta-data-source>
    <properties>
         <!--property name="eclipselink.logging.level" value="FINER"/-->
<property name="eclipselink.ddl-generation" value="create-tables"/>
    </properties>
  </persistence-unit>
<persistence-unit name="VDCNet-appPU" transaction-type="JTA">
    <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
    <jta-data-source>jdbc/vdcApp</jta-data-source>
    <properties>
<property name="eclipselink.ddl-generation" value="create-tables"/>
    </properties>
  </persistence-unit>
</persistence>


------------------------------------------------------------------------

_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users

_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users




Back to the top