You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by neilac333 <ch...@centechgroup.com> on 2007/03/11 03:47:05 UTC

Tomcat 5.5.23 Will Not Unpackage Application

I am attempting to deploy a proof-of-concept JSF application to Tomcat
5.5.23.  I am using Ant to generate my WAR file, whose format is as follows:

META-INF/
META-INF/MANIFEST.MF
index.html
index.xhtml
result.xhtml
WEB-INF/
WEB-INF/classes/
WEB-INF/classes/test/
WEB-INF/classes/test/PersonBean.class
WEB-INF/faces-config.xml
WEB-INF/web.xml
WEB-INF/lib/
WEB-INF/lib/jsf-facelets.jar
WEB-INF/lib/myfaces-api-1.1.5.jar
WEB-INF/lib/myfaces-impl-1.1.5.jar
WEB-INF/lib/tomahawk-1.1.3.jar
WEB-INF/lib/commons-beanutils-1.7.0.jar
WEB-INF/lib/commons-codec-1.3.jar
WEB-INF/lib/commons-collections-3.1.jar
WEB-INF/lib/commons-digester-1.6.jar   (KEEP THIS ONE IN MIND!!)
WEB-INF/lib/commons-el-1.0.jar
WEB-INF/lib/commons-lang-2.1.jar
WEB-INF/lib/commons-logging-1.0.4.jar

--------------------------

However, Tomcat does not deploy the application and reports the following:

ERROR main
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/myfaces] -
Exception sending context initialized event to listener instance of class
org.apache.myfaces.webapp.StartupServletContextListener
 java.lang.NoClassDefFoundError: org/apache/commons/digester/Digester
    at
org.apache.myfaces.config.impl.digester.DigesterFacesConfigUnmarshallerImpl.<init>(DigesterFacesConfigUnmarshallerImpl.java:45)
    at
org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:123)
    at
org.apache.myfaces.webapp.StartupServletContextListener.initFaces(StartupServletContextListener.java:68)
    at
org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:51)
    at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764)
    at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
    at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
    at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
    at
org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
    at
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
    at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
    at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
    at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
    at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
    at
org.apache.catalina.core.StandardService.start(StandardService.java:448)
    at
org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
ERROR main
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/myfaces] -
Exception sending context initialized event to listener instance of class
org.apache.myfaces.webapp.StartupServletContextListener
 java.lang.NoClassDefFoundError: org/apache/commons/digester/Digester
    at
org.apache.myfaces.config.impl.digester.DigesterFacesConfigUnmarshallerImpl.<init>(DigesterFacesConfigUnmarshallerImpl.java:45)
    at
org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:123)
    at
org.apache.myfaces.webapp.StartupServletContextListener.initFaces(StartupServletContextListener.java:68)
    at
org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:51)
    at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764)
    at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
    at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
    at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
    at
org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
    at
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
    at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
    at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
    at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
    at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
    at
org.apache.catalina.core.StandardService.start(StandardService.java:448)
    at
org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)

---------------------------------

I have no idea why Digester isn't found by the class loader since, as you
saw, it is included in the WAR file.  Any insight into the nature of this
problem is very much appreciated.

Thanks very much.
-- 
View this message in context: http://www.nabble.com/Tomcat-5.5.23-Will-Not-Unpackage-Application-tf3383274.html#a9417174
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Tomcat 5.5.23 Will Not Unpackage Application

Posted by neilac333 <ch...@centechgroup.com>.
I put commons-el.jar back in common/lib and removed the corresponding jar
from my WAR file.  I still got the same result.

FYI, here is the latest WAR file:

META-INF/
META-INF/MANIFEST.MF
index.html
index.xhtml
result.xhtml
WEB-INF/
WEB-INF/classes/
WEB-INF/classes/test/
WEB-INF/classes/test/PersonBean.class
WEB-INF/faces-config.xml
WEB-INF/web.xml
WEB-INF/lib/
WEB-INF/lib/jsf-facelets.jar
WEB-INF/lib/myfaces-api-1.1.5.jar
WEB-INF/lib/myfaces-impl-1.1.5.jar
WEB-INF/lib/tomahawk-1.1.3.jar
WEB-INF/lib/commons-beanutils-1.7.0.jar
WEB-INF/lib/commons-codec-1.3.jar
WEB-INF/lib/commons-collections-3.1.jar
WEB-INF/lib/commons-digester-1.6.jar
WEB-INF/lib/commons-lang-2.1.jar
WEB-INF/lib/commons-logging-1.0.4.jar
WEB-INF/lib/commons-validator-1.3.1.jar

I have also attached the file for your perusal.
http://www.nabble.com/file/7135/myfaces.war myfaces.war 
Neil



Caldarale, Charles R wrote:
> 
>> From: neilac333 [mailto:chaudhurin@centechgroup.com] 
>> Subject: RE: Tomcat 5.5.23 Will Not Unpackage Application
>> 
>> I did, however, find commons-el.jar in common/lib.
>> I removed it, but I continue to get the same result.
> 
> Don't remove things from common/lib - Tomcat itself needs what's in
> there.  Remove duplicate classes and jars from your webapp instead.
> 
>  - Chuck
> 
> 
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you
> received this in error, please contact the sender and delete the e-mail
> and its attachments from all computers.
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Tomcat-5.5.23-Will-Not-Unpackage-Application-tf3383274.html#a9456480
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Tomcat 5.5.23 Will Not Unpackage Application

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: neilac333 [mailto:chaudhurin@centechgroup.com] 
> Subject: RE: Tomcat 5.5.23 Will Not Unpackage Application
> 
> I did, however, find commons-el.jar in common/lib.
> I removed it, but I continue to get the same result.

Don't remove things from common/lib - Tomcat itself needs what's in
there.  Remove duplicate classes and jars from your webapp instead.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Tomcat 5.5.23 Will Not Unpackage Application

Posted by neilac333 <ch...@centechgroup.com>.
There is nothing in shared/lib.  I did, however, find commons-el.jar in
common/lib.  I removed it, but I continue to get the same result.

Here are the remaining contents of common/lib:

commons-logging.jar
jasper-compiler-jdt.jar
jasper-compiler.jar
jasper-runtime.jar
jsp-api.jar
log4j-1.2.14.jar
naming-factory-dbcp.jar
naming-factory.jar
naming-resources.jar
servlet-api.jar

Off the top of your head, do you know any others I should consider removing?

Neil


Caldarale, Charles R wrote:
> 
>> From: neilac333 [mailto:chaudhurin@centechgroup.com] 
>> Subject: Re: [OT] Tomcat 5.5.23 Will Not Unpackage Application
>> 
>> That is a good thought, but I have included all the Commons 
>> files in my WAR file as you can see.
> 
> Which will be a problem if they're already in the common/lib or
> shared/lib.  A given class must not appear in more than one place in a
> given class loader branch, or you will get NCDFE problems.
> 
> Take a look at:
> http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html
> 
>  - Chuck
> 
> 
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you
> received this in error, please contact the sender and delete the e-mail
> and its attachments from all computers.
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Tomcat-5.5.23-Will-Not-Unpackage-Application-tf3383274.html#a9454484
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: [OT] Tomcat 5.5.23 Will Not Unpackage Application

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: neilac333 [mailto:chaudhurin@centechgroup.com] 
> Subject: Re: [OT] Tomcat 5.5.23 Will Not Unpackage Application
> 
> That is a good thought, but I have included all the Commons 
> files in my WAR file as you can see.

Which will be a problem if they're already in the common/lib or
shared/lib.  A given class must not appear in more than one place in a
given class loader branch, or you will get NCDFE problems.

Take a look at:
http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: [OT] Tomcat 5.5.23 Will Not Unpackage Application

Posted by neilac333 <ch...@centechgroup.com>.
That is a good thought, but I have included all the Commons files in my WAR
file as you can see.  According to the documentation, Digester has a
dependency on Collections, and that JAR is in WEB-INF/lib
(commons-collections-3.1.jar).

Any other suggestions?

Neil



Pierre Goupil wrote:
> 
> Hello !
> 
> NoClassDefFoundError is not the same thing as ClassNotFoundError. The
> second
> one eventually means that the JVM can't find your class (and hence, your
> .jar). But NoClassDefFoundError means that it does found it, but that
> then,
> some resource needed by it is not found.
> 
> Maybe you should check Common Digester's dependencies ?
> 
> 
> HTH,
> 
> 
> 
> Pierre
> 
> -- 
> "Sans ami était le grand Maître des mondes,
> Eprouvait manque - ce pour quoi il créa des esprits
> Miroirs bienheureux de sa béatitude !
> L'être suprême ne trouva au vrai aucun égal,
> Du calice du royaume total des âmes
> Ecume jusqu'à lui - l'Infinité."
> 
> (Schiller, poète allemand : "L'amitié")
> 
> 

-- 
View this message in context: http://www.nabble.com/Tomcat-5.5.23-Will-Not-Unpackage-Application-tf3383274.html#a9445322
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat 5.5.23 Will Not Unpackage Application

Posted by Pierre Goupil <go...@gmail.com>.
Hello !

NoClassDefFoundError is not the same thing as ClassNotFoundError. The second
one eventually means that the JVM can't find your class (and hence, your
.jar). But NoClassDefFoundError means that it does found it, but that then,
some resource needed by it is not found.

Maybe you should check Common Digester's dependencies ?


HTH,



Pierre

-- 
"Sans ami était le grand Maître des mondes,
Eprouvait manque - ce pour quoi il créa des esprits
Miroirs bienheureux de sa béatitude !
L'être suprême ne trouva au vrai aucun égal,
Du calice du royaume total des âmes
Ecume jusqu'à lui - l'Infinité."

(Schiller, poète allemand : "L'amitié")