2 Replies Latest reply on Feb 9, 2016 10:00 PM by Mahesh Kumar

    Null pointer exception for entityManager

    punit bangade Newbie

      Hi

      I am getting error as :

      Caused by: java.lang.IllegalArgumentException: JBAS011470: Persistence unitName was not specified and there are 15 persistence unit definitions in application deployment deployment xyz.war".  Either change the application deployment to have only one persistence unit definition or specify the unitName for each reference to a persistence unit.

       

      For workaround i have commented following lines in my standalone.xml

      <subsystem xmlns="urn:jboss:domain:jpa:1.1">

                  <jpa default-datasource="" default-extended-persistence-inheritance="DEEP"/>

              </subsystem>

       

      But my application got deployed without exception.And now i am getting null pointer exception for EntityManager.

      Can someone help me resolving the issue?

       

       

      Thanks