2 Replies Latest reply on Aug 5, 2011 5:56 AM by jaikiran pai

    persistence unit Exception while publishing (Jboss AS7 and OpenJPA)

    ibarash Newbie

      Hello,

       

      I am new to JBoss, and I just installed the new AS7.

      I am using Java 1.6, and OpenJPA 2.1

       

       

      I managed to define my data-source, connected it with my jndi, everything looks fine.

       

      When I try to publish, I get the following exeption:

       

      16:27:32,333 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-6) MSC00001: Failed to start service jboss.deployment.unit."advisor-server.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."advisor-server.war".INSTALL: Failed to process phase INSTALL of deployment "advisor-server.war"

                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_24]

                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_24]

                at java.lang.Thread.run(Thread.java:662) [:1.6.0_24]

      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.handleWarDeployment(PersistenceUnitDeploymentProcessor.java:164)

                at org.jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.deploy(PersistenceUnitDeploymentProcessor.java:94)

                at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115)

       

       

       

       

      I put openjpa-all-2.1.0.jar in standalone\lib folder.

       

      my persistence.xml (located at the META-INF):

       

      <?xml version="1.0" encoding="UTF-8"?>

      <persistence 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_2_0.xsd"

                   version="2.0">

                <persistence-unit name="advisor-domain-pu" transaction-type="JTA">

                          <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>

                          <jta-data-source>jdbc/asDataSource</jta-data-source>

       

                          <properties>

                                    <property name="openjpa.TransactionMode" value="managed" />

                                    <property name="openjpa.ConnectionFactoryMode" value="managed" />

                               <property name="openjpa.jdbc.EagerFetchMode" value="join" />

                                    <property name="openjpa.jdbc.SubclassFetchMode" value="join" />

                          </properties>

       

                </persistence-unit>

       

      </persistence>

       

       

       

       

      Can you please help me?