[jboss-dev-forums] [JBoss AS7 Development] - AS 7 Persistence Provider Problem
prinzm
do-not-reply at jboss.com
Mon Jul 25 02:57:28 EDT 2011
prinzm [http://community.jboss.org/people/prinzm] created the discussion
"AS 7 Persistence Provider Problem"
To view the discussion, visit: http://community.jboss.org/message/617308#617308
--------------------------------------------------------------
We wrote our own persistence provider which extends the HibernatePersistence class and used it in the persistence.xml
Unfortunately on server startup the following exception occurrs:
08:32:08,555 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC00001: Failed to start service jboss.deployment.subunit."green-ear.ear"."green-ejb.jar".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.subunit."green-ear.ear"."green-ejb.jar".INSTALL: Failed to process phase INSTALL of subdeployment "green-ejb.jar" of deployment "green-ear.ear"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:121)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1765)
at org.jboss.msc.service.ServiceControllerImpl$ClearTCCLTask.run(ServiceControllerImpl.java:2291)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_25]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_25]
at java.lang.Thread.run(Thread.java:662) [:1.6.0_25]
Caused by: java.lang.NullPointerException
at org.jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.addProviderProperties(PersistenceUnitDeploymentProcessor.java:346)
at org.jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.addPuService(PersistenceUnitDeploymentProcessor.java:253)
at org.jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.handleJarDeployment(PersistenceUnitDeploymentProcessor.java:115)
at org.jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.deploy(PersistenceUnitDeploymentProcessor.java:96)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115)
... 5 more
I looked into the source code and found the following entry in the class JPASubSystemAdd:
PersistenceProviderAdapterRegistry.putPersistenceProviderAdaptor(
"org.hibernate.ejb.HibernatePersistence", new HibernatePersistenceProviderAdaptor());
So Hibernate is set as the default persistence provider, and I could not find any other location in the code, where a persistence provider ist set. Therefore the method call "PersistenceProviderAdapterRegistry.getPersistenceProviderAdaptor(pu.getPersistenceProviderClassName())" in the method addProviderProperties in the class PersistenceUnitDeploymentProcessor always returns null since no other persistence provider than the default one seems to be registered. Or did I miss something? In JBoss AS 6 this worked as expected.
Thanks!
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/617308#617308]
Start a new discussion in JBoss AS7 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2225]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20110725/26036551/attachment.html
More information about the jboss-dev-forums
mailing list