org.hibernate.engine.jndi.JndiException: Error performing unbind [modelSessionFactory]

GitHub | wildfly-ci | 1 year ago
  1. 0

    GitHub comment 8361#152614810

    GitHub | 1 year ago | wildfly-ci
    org.hibernate.engine.jndi.JndiException: Error performing unbind [modelSessionFactory]
  2. 0

    GitHub comment 8361#152617682

    GitHub | 1 year ago | wildfly-ci
    org.hibernate.engine.jndi.JndiException: Error performing unbind [modelSessionFactory]
  3. 0

    If when The persistence Unit is started the JNDI binding failed, then either 1) It should not attempt to unbind() at all during shutdown. Maybe it will unbind() somebody elses instance by mistake, not the instance it things it owns? 2) If it must attempt to unbind() anyway, it should more silently emit a log message, indicating failure but also that bind() never completed during startup. At the moment it throws an exception noisily for a condition that is expected in the situation. But no such exception is thrown during startup, even through that is a more major concern. That expected configuration option requested could not be enforced during startup. So it seems a bit backwards, you'd expect a startup failure Exception and a quietness on shutdown. Since it was shutting down anyway! During Deploy. 09:03:12,802 DEBUG [org.hibernate.service.jndi.internal.JndiServiceImpl] (ServerService Thread Pool -- 69) Bound name: java:/jboss/com.domain.jpa 09:03:12,802 INFO [org.hibernate.internal.SessionFactoryRegistry] (ServerService Thread Pool -- 69) HHH000094: Bound factory to JNDI name: java:/jboss/com.domain.jpa 09:03:12,803 DEBUG [org.hibernate.internal.SessionFactoryRegistry] (ServerService Thread Pool -- 69) HHH000127: Could not bind JNDI listener During Undeploy: 09:04:22,974 WARN [org.hibernate.internal.SessionFactoryRegistry] (ServerService Thread Pool -- 70) HHH000374: Could not unbind factory from JNDI: org.hibernate.service.jndi.JndiException: Error performing unbind [java:/jboss/com.domain.jpa] at org.hibernate.service.jndi.internal.JndiServiceImpl.unbind(JndiServiceImpl.java:181) at org.hibernate.internal.SessionFactoryRegistry.removeSessionFactory(SessionFactoryRegistry.java:117) at org.hibernate.internal.SessionFactoryImpl.close(SessionFactoryImpl.java:1389) at org.hibernate.ejb.EntityManagerFactoryImpl.close(EntityManagerFactoryImpl.java:194) at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$2.run(PersistenceUnitServiceImpl.java:124) [jboss-as-jpa-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_17] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_17] at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_17] at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.1.0.Final.jar:2.1.0.Final] Caused by: javax.naming.NamingException: JBAS011836: Could not resolve service service jboss.naming.context.java.jboss."com.domain.jpa" at org.jboss.as.naming.WritableServiceBasedNamingStore.unbind(WritableServiceBasedNamingStore.java:121) [jboss-as-naming-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4] at org.jboss.as.naming.WritableServiceBasedNamingStore.unbind(WritableServiceBasedNamingStore.java:112) [jboss-as-naming-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4] at org.jboss.as.naming.NamingContext.unbind(NamingContext.java:286) [jboss-as-naming-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4] at org.jboss.as.naming.InitialContext.unbind(InitialContext.java:165) [jboss-as-naming-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4] at javax.naming.InitialContext.unbind(InitialContext.java:439) [rt.jar:1.7.0_17] at org.hibernate.service.jndi.internal.JndiServiceImpl.unbind(JndiServiceImpl.java:178) ... 8 more

    Hibernate JIRA | 4 years ago | Darryl Miles
    org.hibernate.service.jndi.JndiException: Error performing unbind [java:/jboss/com.domain.jpa]
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    If when The persistence Unit is started the JNDI binding failed, then either 1) It should not attempt to unbind() at all during shutdown. Maybe it will unbind() somebody elses instance by mistake, not the instance it things it owns? 2) If it must attempt to unbind() anyway, it should more silently emit a log message, indicating failure but also that bind() never completed during startup. At the moment it throws an exception noisily for a condition that is expected in the situation. But no such exception is thrown during startup, even through that is a more major concern. That expected configuration option requested could not be enforced during startup. So it seems a bit backwards, you'd expect a startup failure Exception and a quietness on shutdown. Since it was shutting down anyway! During Deploy. 09:03:12,802 DEBUG [org.hibernate.service.jndi.internal.JndiServiceImpl] (ServerService Thread Pool -- 69) Bound name: java:/jboss/com.domain.jpa 09:03:12,802 INFO [org.hibernate.internal.SessionFactoryRegistry] (ServerService Thread Pool -- 69) HHH000094: Bound factory to JNDI name: java:/jboss/com.domain.jpa 09:03:12,803 DEBUG [org.hibernate.internal.SessionFactoryRegistry] (ServerService Thread Pool -- 69) HHH000127: Could not bind JNDI listener During Undeploy: 09:04:22,974 WARN [org.hibernate.internal.SessionFactoryRegistry] (ServerService Thread Pool -- 70) HHH000374: Could not unbind factory from JNDI: org.hibernate.service.jndi.JndiException: Error performing unbind [java:/jboss/com.domain.jpa] at org.hibernate.service.jndi.internal.JndiServiceImpl.unbind(JndiServiceImpl.java:181) at org.hibernate.internal.SessionFactoryRegistry.removeSessionFactory(SessionFactoryRegistry.java:117) at org.hibernate.internal.SessionFactoryImpl.close(SessionFactoryImpl.java:1389) at org.hibernate.ejb.EntityManagerFactoryImpl.close(EntityManagerFactoryImpl.java:194) at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$2.run(PersistenceUnitServiceImpl.java:124) [jboss-as-jpa-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_17] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_17] at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_17] at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.1.0.Final.jar:2.1.0.Final] Caused by: javax.naming.NamingException: JBAS011836: Could not resolve service service jboss.naming.context.java.jboss."com.domain.jpa" at org.jboss.as.naming.WritableServiceBasedNamingStore.unbind(WritableServiceBasedNamingStore.java:121) [jboss-as-naming-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4] at org.jboss.as.naming.WritableServiceBasedNamingStore.unbind(WritableServiceBasedNamingStore.java:112) [jboss-as-naming-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4] at org.jboss.as.naming.NamingContext.unbind(NamingContext.java:286) [jboss-as-naming-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4] at org.jboss.as.naming.InitialContext.unbind(InitialContext.java:165) [jboss-as-naming-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4] at javax.naming.InitialContext.unbind(InitialContext.java:439) [rt.jar:1.7.0_17] at org.hibernate.service.jndi.internal.JndiServiceImpl.unbind(JndiServiceImpl.java:178) ... 8 more

    Hibernate JIRA | 4 years ago | Darryl Miles
    org.hibernate.service.jndi.JndiException: Error performing unbind [java:/jboss/com.domain.jpa]
  6. 0

    JNDI lookup of application name from embeddable Glassfish

    Oracle Community | 6 years ago | atomicknight
    javax.naming.NamingException: Lookup failed for 'java:app/AppName' in SerialContext[targetHost=null,targetPort=null [Root exception is javax.naming.NamingException: Could not resolve java:app/AppName]

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. javax.naming.NamingException

      WFLYNAM0020: Could not resolve service service jboss.naming.context.java.modelSessionFactory

      at org.jboss.as.naming.WritableServiceBasedNamingStore.unbind()
    2. JBoss Application Server: Naming Subsystem
      InitialContext$DefaultInitialContext.unbind
      1. org.jboss.as.naming.WritableServiceBasedNamingStore.unbind(WritableServiceBasedNamingStore.java:136)
      2. org.jboss.as.naming.NamingContext.unbind(NamingContext.java:318)
      3. org.jboss.as.naming.InitialContext$DefaultInitialContext.unbind(InitialContext.java:280)
      3 frames
    3. Java RT
      InitialContext.unbind
      1. javax.naming.InitialContext.unbind(InitialContext.java:445)
      2. javax.naming.InitialContext.unbind(InitialContext.java:445)
      2 frames
    4. org.hibernate.engine
      JndiServiceImpl.unbind
      1. org.hibernate.engine.jndi.internal.JndiServiceImpl.unbind(JndiServiceImpl.java:210)
      1 frame
    5. Hibernate
      SessionFactoryImpl.close
      1. org.hibernate.internal.SessionFactoryRegistry.removeSessionFactory(SessionFactoryRegistry.java:124)
      2. org.hibernate.internal.SessionFactoryImpl.close(SessionFactoryImpl.java:1077)
      2 frames
    6. org.hibernate.jpa
      EntityManagerFactoryImpl.close
      1. org.hibernate.jpa.internal.EntityManagerFactoryImpl.close(EntityManagerFactoryImpl.java:339)
      1 frame
    7. JPA
      PersistenceUnitServiceImpl$2$1.run
      1. org.jboss.as.jpa.service.PersistenceUnitServiceImpl$2$1.run(PersistenceUnitServiceImpl.java:220)
      2. org.jboss.as.jpa.service.PersistenceUnitServiceImpl$2$1.run(PersistenceUnitServiceImpl.java:206)
      2 frames
    8. WildFly Security Manager
      WildFlySecurityManager.doChecked
      1. org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:667)
      1 frame
    9. JPA
      PersistenceUnitServiceImpl$2.run
      1. org.jboss.as.jpa.service.PersistenceUnitServiceImpl$2.run(PersistenceUnitServiceImpl.java:239)
      1 frame
    10. Java RT
      Thread.run
      1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      3. java.lang.Thread.run(Thread.java:745)
      3 frames
    11. JBoss Threads
      JBossThread.run
      1. org.jboss.threads.JBossThread.run(JBossThread.java:320)
      1 frame