Problem Deploying Ear with internal War to Weblogic 8.1

I just added a Web app to my j2ee app, put together the code, and built the Ear using IntelliJ Rebuild Project (IntelliJ 5.1). Note that the Web app includes JSF (MyFaces, 1.1).

The exploded output seems to be correct, but when I try to deploy it to Weblogic (8.1sp4), I get this output:

java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at org.apache.commons.beanutils.MethodUtils.]]>(MethodUtils.java:103)
at org.apache.commons.digester.CallMethodRule.end(CallMethodRule.java:505)
at org.apache.commons.digester.Rule.end(Rule.java:276)
...

You might think that the commons logging jar is missing, but I checked in the exploded WEB-INF directory, and it is there, along with log4j.jar for good measure.

Is there something else I need to configure?

Thanks,
ken

3 comments

Hello Ken,

Which source do you use to deploy your application - an ear or an exploded
directory (see Run Configuration | "Deployment" tab | "Deployment source"
combobox)?

Please check your deployment source. It must have the following structure:

your_j2ee_app.ear/
...
your_web_module.war/
...
Web-inf/
lib/
commons-logging.jar
commons-beanutils.jar
...

Then try to deploy your application by using WebLogic Server console.

I just added a Web app to my j2ee app, put together the code, and
built the Ear using IntelliJ Rebuild Project (IntelliJ 5.1). Note
that the Web app includes JSF (MyFaces, 1.1).

The exploded output seems to be correct, but when I try to deploy it
to Weblogic (8.1sp4), I get this output:

java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at
org.apache.commons.beanutils.MethodUtils.<clinit>(MethodUtils.java:103
)
at
org.apache.commons.digester.CallMethodRule.end(CallMethodRule.java:505
)
at org.apache.commons.digester.Rule.end(Rule.java:276)
..
You might think that the commons logging jar is missing, but I checked
in the exploded WEB-INF directory, and it is there, along with
log4j.jar for good measure.

Is there something else I need to configure?

Thanks,
ken

---
Nikolay Chashnikov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


0

I have tried both exploded and jar form. The exploded build has some issues (see my other posts) but nothing that should cause this problem.

In both cases, the structure is correct. The ear contains the war, the war contains WEB-INF, WEB-INF contains lib, and lib contains commons-logging.jar. It also contains beanutils and everything else that the JSF MyFaces 1.1 zip had in it.

I did deploy using the WL console.

Also, I turned on verbose:class in the server and have validated that org.apache.commons.logging.LogFactory does in fact load -- long before the exception is thrown.

The last few loaded classes before the exception are:










(Digester.java:1072) - End event threw error
java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at org.apache.commons.beanutils.MethodUtils.]]>(MethodUtils.java:103)
at org.apache.commons.digester.CallMethodRule.end(CallMethodRule.java:585)
at org.apache.commons.digester.Rule.end(Rule.java:228)
at org.apache.commons.digester.Digester.endElement(Digester.java:1067)
at weblogic.apache.xerces.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:585)
at weblogic.apache.xerces.impl.xs.XMLSchemaValidator.endElement(XMLSchemaValidator.java:710)

0

I resolved this issue after much headbanging.

Please see my response to a similar post on BEA's forums:

http://forums.bea.com/bea/message.jspa?messageID=600022281&tstart=0

0

Please sign in to leave a comment.