Hello all,
I have created a custom realm that I can use with glassfish and I have no problems. But when I add Hibernate to my realm I get a stack trace throwing an error when I try to
Session s = HibernateUtil.getSession();
Caused by: java.lang.ExceptionInInitializerError
at dbUtil.HibernateUtil.<clinit>(HibernateUtil.java:35)
at tkc.WebCopCustomRealm.init(WebCopCustomRealm.java:44)
at com.sun.enterprise.security.auth.realm.Realm.doInstantiate(Realm.java:233)
at com.sun.enterprise.security.auth.realm.Realm.instantiate(Realm.java:165)
at com.sun.enterprise.security.RealmConfig.createRealms(RealmConfig.java:93)
at com.sun.enterprise.security.RealmConfig.createRealms(RealmConfig.java:163)
at com.sun.enterprise.security.SecurityLifecycle.onInitialization(SecurityLifecycle.java:113)
at com.sun.enterprise.server.ApplicationServer.onInitialization(ApplicationServer.java:262)
at com.sun.enterprise.server.ondemand.OnDemandServer.onInitialization(OnDemandServer.java:101)
at com.sun.enterprise.server.PEMain.run(PEMain.java:401)
at com.sun.enterprise.server.PEMain.main(PEMain.java:338)
... 5 more
Caused by: java.lang.ExceptionInInitializerError
at dbUtil.HibernateUtil.<clinit>(HibernateUtil.java:26)
... 15 more
Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: java.lang.NullPointerException (Caused by java.lang.NullPointerException) (Caused by org.apache.commons.logging.LogConfigurationException: java.lang.NullPointerException (Caused by java.lang.NullPointerException))
at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:543)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:209)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
at org.hibernate.cfg.Configuration.<clinit>(Configuration.java:120)
... 16 more
Caused by: org.apache.commons.logging.LogConfigurationException: java.lang.NullPointerException (Caused by java.lang.NullPointerException)
at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:397)
at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529)
... 20 more
Caused by: java.lang.NullPointerException
at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:374)
... 21 more
|#]
Anyone have any ideas?
[Message sent by forum member 'kenbarnesjr' (kenbarnesjr)]
http://forums.java.net/jive/thread.jspa?messageID=279483