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

    Null pointer exception for entityManager



      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"/>



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

      Can someone help me resolving the issue?