groovy - Grails - trying to deploy a nojars application into glassfish 3.0.1 -


because of memory constraint trying build grails app smaller memory footprint. build war argument "--nojars". created war file without jar , when deploy within glassfish encounter error

exception while loading app : java.lang.exception: java.lang.illegalstateexception: containerbase.addchild: start: org.apache.catalina.lifecycleexception: java.lang.illegalargumentexception: java.lang.classnotfoundexception: org.codehaus.groovy.grails.web.util.log4jconfiglistener

it seems application fail find jar file.

i had indicates path library before deploying application in glassfish.

did miss out somethinng?

it commonly recommended use glassfish's common classloader. means putting shared jars $domain-dir/lib folder (but not subfolder of that).

you're trying use application classloader asadmin deploy --libraries command. more complicated , error-prone. if don't need different versions of same jars different web applications, should go common classloader specified above.

also see the classloader hierarchy reference.


edit updated per questioner's comment:

the domain/domain1/lib folder works (i've tested that). validate that, put log4j.jar folder , add test.jsp domain1/applications/$applicationname, contains:

<% out.println(     org.apache.log4j.logger.getlogger(this.getclass())); %> 

if works other code not, there may point consider: using log4j's logger.getlogger(..) or apache commons' logfactory.getinstance(..) in code?

see article taxonomy of class loader problems encountered when using jakarta commons logging related issues. - i'd advise post complete stacktrace.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -