users@glassfish.java.net

commons-logging classloading problem in v2-b41 ?

From: <glassfish_at_javadesktop.org>
Date: Wed, 04 Apr 2007 03:29:13 PDT

Hi,

I'm trying to deploy a self-written application skeleton to Glassfish-v2 b41 which uses Spring2 and Hibernate JPA. My application is packaged in a war file and all needed libraries are included in WEB-INF/lib (including commons-logging and log4j, which I'd like to use through commons-logging).

The first deploy after each server restart is always successful, every upcoming redeploys end up quickly with this error:

Caused by: java.lang.NullPointerException
        at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:202)

which is clearly coming from this code part:
private static Log log = LogFactory.getLog( Ejb3Configuration.class );
...
log.debug( "Look up for persistence unit: " + persistenceUnitName ); // nullpointerexception

So it looks irrevelant to both hibernate entitymanager and the spring framework and looks like a glassfish vs commons-logging problem to me. Still, after looking around all related parties' forums and mailing lists, I tried the following:
- added <class-loader delegate="false"/> to sun-web.xml
- tried to place log4j and commons-logging to the glassfish domain lib dir

None of them helped, the problem is the same. The problem also existed in v2-b33 which I was using before hitting this issue.

I hope someone can help me soon with this issue, as I'd love to develop this application using glassfish as both a development and production platform (instead of falling back to other open source appservers available).

Thanks much in advance,
Kristof Jozsa
[Message sent by forum member 'kjozsa' (kjozsa)]

http://forums.java.net/jive/thread.jspa?messageID=211231