3 Replies Latest reply on Aug 3, 2011 11:27 AM by jaikiran pai

    persistence NullPointerException problem

    ibarash Newbie

      Hello,

       

      I am new to JBoss and just installed AS7.

       

      I use Java 1.6 and Apache OpenJPA 2.1.

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

       

      I managed to define the data-source, and connected it with the right jndi.

      When i try to publish my ear i get the following exception:

       

      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)

                ... 5 more

       

       

       

      This is my persistence.xml file, (located at the META-INF folder):

       

       

      <?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/AdvisorSkeletonDataSource</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>

       

       

      Should I do anything