4 Replies Latest reply on Sep 18, 2008 10:30 AM by Mangesh Phadnis

    Sudden unexplainable problem w/ persistence unit

    tsar_bomba Newbie

      I really don't know how to explain what's happening here. I have a straight-forward enterprise app that I've been deploying to JBoss 4.0.5 all day...and have not had a problem until now.

      The error is complaining about the persistence unit in the .ear - but that file hasn't changed in *months* - I just checked the svn history on it.

      I can't deploy now and I don't know why...here's the exception I'm getting:

      16:51:08,302 WARN [ServiceController] Problem starting service persistence.units:ear=myEAR.ear,jar=myEJB.jar,unitName=myPU
      java.lang.NullPointerException
       at org.hibernate.cfg.OneToOneSecondPass.doSecondPass(OneToOneSecondPass.java:135)
       at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1054)
       at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:297)
       at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1039)
       at org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:1211)
       at org.hibernate.ejb.EventListenerConfigurator.configure(EventListenerConfigurator.java:154)
       at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:847)
       at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:385)
       at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:126)
       at org.jboss.ejb3.entity.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:264)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
      
      ...........................................later down the list.....
      
      16:48:32,362 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
      
      --- MBeans waiting for other MBeans ---
      ObjectName: persistence.units:ear=myEAR.ear,jar=myEJB.jar,unitName=myPU
       State: FAILED
       Reason: java.lang.NullPointerException
       I Depend On:
       jboss.jca:service=DataSourceBinding,name=myDS
       Depends On Me:
       jboss.j2ee:ear=myEAR.ear,jar=myEJB.jar,name=CustomerBean,service=EJB3
       jboss.j2ee:ear=myEAR.ear,jar=myEJB.jar,name=OrderBean,service=EJB3
       jboss.j2ee:ear=myEAR.ear,jar=myEJB.jar,name=RegionBean,service=EJB3
       jboss.j2ee:ear=myEAR.ear,jar=myEJB.jar,name=VendorBean,service=EJB3
      
      ObjectName: jboss.j2ee:ear=myEAR.ear,jar=myEJB.jar,name=CustomerBean,service=EJB3
       State: NOTYETINSTALLED
       I Depend On:
       persistence.units:ear=myEAR.ear,jar=myEJB.jar,unitName=myPU
      
      ObjectName: jboss.j2ee:ear=myEAR.ear,jar=myEJB.jar,name=OrderBean,service=EJB3
       State: NOTYETINSTALLED
       I Depend On:
       persistence.units:ear=myEAR.ear,jar=myEJB.jar,unitName=myPU
      
      ObjectName: jboss.j2ee:ear=myEAR.ear,jar=myEJB.jar,name=RegionBean,service=EJB3
       State: NOTYETINSTALLED
       I Depend On:
       persistence.units:ear=myEAR.ear,jar=myEJB.jar,unitName=myPU
      
      ObjectName: jboss.j2ee:ear=myEAR.ear,jar=myEJB.jar,name=VendorBean,service=EJB3
       State: NOTYETINSTALLED
       I Depend On:
       persistence.units:ear=myEAR.ear,jar=myEJB.jar,unitName=myPU
      
      --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
      ObjectName: persistence.units:ear=myEAR.ear,jar=myEJB.jar,unitName=myPU
       State: FAILED
       Reason: java.lang.NullPointerException
       I Depend On:
       jboss.jca:service=DataSourceBinding,name=myDS
       Depends On Me:
       jboss.j2ee:ear=myEAR.ear,jar=myEJB.jar,name=CustomerBean,service=EJB3
       jboss.j2ee:ear=myEAR.ear,jar=myEJB.jar,name=OrderBean,service=EJB3
       jboss.j2ee:ear=myEAR.ear,jar=myEJB.jar,name=RegionBean,service=EJB3
       jboss.j2ee:ear=myEAR.ear,jar=myEJB.jar,name=VendorBean,service=EJB3
      


      I don't understand, what's NULL?? Clearly there's another problem but there's no indication as to what it might be. I've tried restarting jboss, I've even restarted my PC...I just can't deploy this app anymore.

      Could someone please provide some insight on this?

      Thanks!