users@glassfish.java.net

ear/lib folder in glassfish 3

From: Rodrigo Pereira <rodpereira_rj_at_yahoo.com.br>
Date: Wed, 16 Nov 2011 00:14:56 -0800 (PST)

Hi,

is there a way to ship hibernate 3 and log4j jars in ear/lib folder? If I copy them to glassfish/lib it works beautiful.

I am getting a log4j error when I add the hibernate 3 jars. If I take them off, logs start appearing.



[#|2011-11-16T09:06:01.783+0100|SEVERE|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=24;_ThreadName=Thread-2;|log4j:ERROR
 A "org.apache.log4j.ConsoleAppender" object is not assignable to a
"org.apache.log4j.Appender" variable.|#]



[#|2011-11-16T09:06:01.783+0100|SEVERE|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=24;_ThreadName=Thread-2;|log4j:ERROR
 The class "org.apache.log4j.Appender" was loaded by |#]



[#|2011-11-16T09:06:01.784+0100|SEVERE|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=24;_ThreadName=Thread-2;|log4j:ERROR
 [EarLibClassLoader :

urlSet = [URLEntry :
file:/home/rpereira/tools/glassfish-3.1.1/glassfish/domains/domain1/applications/helloear-1.0-SNAPSHOT/lib/commons-collections-3.1.jar,
 URLEntry :
file:/home/rpereira/tools/glassfish-3.1.1/glassfish/domains/domain1/applications/helloear-1.0-SNAPSHOT/lib/hibernate-commons-annotations-3.2.0.Final.jar,
 URLEntry :
file:/home/rpereira/tools/glassfish-3.1.1/glassfish/domains/domain1/applications/helloear-1.0-SNAPSHOT/lib/hibernate-core-3.6.6.Final.jar,
 URLEntry :
file:/home/rpereira/tools/glassfish-3.1.1/glassfish/domains/domain1/applications/helloear-1.0-SNAPSHOT/lib/hibernate-entitymanager-3.6.6.Final.jar,
 URLEntry :
file:/home/rpereira/tools/glassfish-3.1.1/glassfish/domains/domain1/applications/helloear-1.0-SNAPSHOT/lib/antlr-2.7.6.jar,
 URLEntry :
file:/home/rpereira/tools/glassfish-3.1.1/glassfish/domains/domain1/applications/helloear-1.0-SNAPSHOT/lib/slf4j-api-1.6.2.jar,
 URLEntry :
file:/home/rpereira/tools/glassfish-3.1.1/glassfish/domains/domain1/applications/helloear-1.0-SNAPSHOT/lib/hibernate-jpa-2.0-api-1.0.1.Final.jar,
 URLEntry :
file:/home/rpereira/tools/glassfish-3.1.1/glassfish/domains/domain1/applications/helloear-1.0-SNAPSHOT/lib/cglib-2.2.jar,
 URLEntry :
file:/home/rpereira/tools/glassfish-3.1.1/glassfish/domains/domain1/applications/helloear-1.0-SNAPSHOT/lib/slf4j-log4j12-1.6.2.jar,
 URLEntry :
file:/home/rpereira/tools/glassfish-3.1.1/glassfish/domains/domain1/applications/helloear-1.0-SNAPSHOT/lib/log4j-1.2.16.jar,
 URLEntry :
file:/home/rpereira/tools/glassfish-3.1.1/glassfish/domains/domain1/applications/helloear-1.0-SNAPSHOT/lib/asm-3.1.jar,
 URLEntry :
file:/home/rpereira/tools/glassfish-3.1.1/glassfish/domains/domain1/applications/helloear-1.0-SNAPSHOT/lib/dom4j-1.6.1.jar,
 URLEntry :
file:/home/rpereira/tools/glassfish-3.1.1/glassfish/domains/domain1/applications/helloear-1.0-SNAPSHOT/lib/javassist-3.12.0.GA.jar,
 URLEntry :
file:/home/rpereira/tools/glassfish-3.1.1/glassfish/domains/domain1/applications/helloear-1.0-SNAPSHOT/lib/jta-1.1.jar]

doneCalled = false

 Parent -> org.glassfish.internal.api.DelegatingClassLoader_at_7039bb6d

] whereas object of type |#]



[#|2011-11-16T09:06:01.785+0100|SEVERE|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=24;_ThreadName=Thread-2;|log4j:ERROR
 "org.apache.log4j.ConsoleAppender" was loaded by [EarLibClassLoader :

urlSet = [URLEntry :
file:/home/rpereira/tools/glassfish-3.1.1/glassfish/domains/domain1/applications/helloear-1.0-SNAPSHOT/lib/commons-collections-3.1.jar,
 URLEntry :
file:/home/rpereira/tools/glassfish-3.1.1/glassfish/domains/domain1/applications/helloear-1.0-SNAPSHOT/lib/hibernate-commons-annotations-3.2.0.Final.jar,
 URLEntry :
file:/home/rpereira/tools/glassfish-3.1.1/glassfish/domains/domain1/applications/helloear-1.0-SNAPSHOT/lib/hibernate-core-3.6.6.Final.jar,
 URLEntry :
file:/home/rpereira/tools/glassfish-3.1.1/glassfish/domains/domain1/applications/helloear-1.0-SNAPSHOT/lib/hibernate-entitymanager-3.6.6.Final.jar,
 URLEntry :
file:/home/rpereira/tools/glassfish-3.1.1/glassfish/domains/domain1/applications/helloear-1.0-SNAPSHOT/lib/antlr-2.7.6.jar,
 URLEntry :
file:/home/rpereira/tools/glassfish-3.1.1/glassfish/domains/domain1/applications/helloear-1.0-SNAPSHOT/lib/slf4j-api-1.6.2.jar,
 URLEntry :
file:/home/rpereira/tools/glassfish-3.1.1/glassfish/domains/domain1/applications/helloear-1.0-SNAPSHOT/lib/hibernate-jpa-2.0-api-1.0.1.Final.jar,
 URLEntry :
file:/home/rpereira/tools/glassfish-3.1.1/glassfish/domains/domain1/applications/helloear-1.0-SNAPSHOT/lib/cglib-2.2.jar,
 URLEntry :
file:/home/rpereira/tools/glassfish-3.1.1/glassfish/domains/domain1/applications/helloear-1.0-SNAPSHOT/lib/slf4j-log4j12-1.6.2.jar,
 URLEntry :
file:/home/rpereira/tools/glassfish-3.1.1/glassfish/domains/domain1/applications/helloear-1.0-SNAPSHOT/lib/log4j-1.2.16.jar,
 URLEntry :
file:/home/rpereira/tools/glassfish-3.1.1/glassfish/domains/domain1/applications/helloear-1.0-SNAPSHOT/lib/asm-3.1.jar,
 URLEntry :
file:/home/rpereira/tools/glassfish-3.1.1/glassfish/domains/domain1/applications/helloear-1.0-SNAPSHOT/lib/dom4j-1.6.1.jar,
 URLEntry :
file:/home/rpereira/tools/glassfish-3.1.1/glassfish/domains/domain1/applications/helloear-1.0-SNAPSHOT/lib/javassist-3.12.0.GA.jar,
 URLEntry :
file:/home/rpereira/tools/glassfish-3.1.1/glassfish/domains/domain1/applications/helloear-1.0-SNAPSHOT/lib/jta-1.1.jar]

doneCalled = false

 Parent -> org.glassfish.internal.api.DelegatingClassLoader_at_79b5459e

].|#]



[#|2011-11-16T09:06:01.785+0100|SEVERE|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=24;_ThreadName=Thread-2;|log4j:ERROR
 Could not instantiate appender named "Stdout".|#]



[#|2011-11-16T09:06:02.110+0100|SEVERE|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=24;_ThreadName=Thread-2;|log4j:WARN
 No appenders could be found for logger
(org.hibernate.annotations.common.Version).|#]



[#|2011-11-16T09:06:02.111+0100|SEVERE|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=24;_ThreadName=Thread-2;|log4j:WARN
 Please initialize the log4j system properly.|#]



[#|2011-11-16T09:06:02.111+0100|SEVERE|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=24;_ThreadName=Thread-2;|log4j:WARN
 See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more
info.|#]





Regards,

Rodrigo Pereira