You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by Ias <ia...@apache-korea.org> on 2003/06/02 16:54:16 UTC

[REPORT] 2.0 beta 1 and Tomcat 4

The current 2.0 beta 1 distribution doesn't work with Tomcat 4.x. The
error message is
Catalina.start: LifecycleException:  Missing optional package
Extension[junit,
implementationURL=http://www.ibiblio.org/maven/junit/jars/junit-3.8.1.ja
r, implementationVersion=3.8.1]
LifecycleException:  Missing optional package Extension[junit,
implementationURL=http://www.ibiblio.org/maven/junit/jars/junit-3.8.1.ja
r, implementationVersion=3.8.1]
	at
org.apache.catalina.loader.WebappLoader.validatePackages(WebappLoader.ja
va:1244)
	at
org.apache.catalina.loader.WebappLoader.start(WebappLoader.java:645)
	at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1100)
	at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3345
)
	at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
	at
org.apache.catalina.core.StandardHost.start(StandardHost.java:614)
	at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
	at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343)
	at
org.apache.catalina.core.StandardService.start(StandardService.java:388)
	at
org.apache.catalina.core.StandardServer.start(StandardServer.java:506)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:781)
	at
org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
	at
org.apache.catalina.startup.Catalina.process(Catalina.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:324)
	at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)

I looked into the stack trace and found that there needed to be some
modification toward the associated
jars-commons-httpclient-2.0-beta1.jar, junit-3.8.1.jar, and
commons-logging-1.0.jar.

First, Tomcat's org.apache.catalina.loader.Extension.getRequired
distinguishes required libraries by delimiter not "," but " ".
Therefore, 

Extension-List: junit,commons-logging

should be

Extension-List: junit commons-logging

in MANIFEST.MF of httpclient jar.
(http://java.sun.com/j2se/1.4.1/docs/guide/extensions/versioning.html
proves the usage.)

Next, since Tomcat's resolving algorithm for required libraries is quite
strict as implemented in o.a.c.l.WebappLoader.validatePackages(),
Specification-Version and Implementation-Vendor-Id of the extensions
should be defined like this:

junit-Extension-Name: junit
junit-Specification-Version: 3.8.1
junit-Implementation-Vendor-Id: 
junit-Implementation-Version: 3.8.1
junit-Implementation-URL:
http://www.ibiblio.org/maven/junit/jars/junit-3.8.1.jar
commons-logging-Extension-Name: org.apache.commons.logging
commons-logging-Specification-Version: 1.0
commons-logging-Implementation-Vendor-Id: 
commons-logging-Implementation-Version: 1.0.2
commons-logging-Implementation-URL:
http://www.ibiblio.org/maven/commons-logging/jars/commons-logging-1.0.2.
jar

In accordance with the above addition, MANIFEST of junit and
commons-logging also should be updated to comply with
commons-httpclient.

Manifest-Version: 1.0
Created-By: Ant 1.4.1
Extension-Name: junit
Specification-Version: 3.8.1
Implementation-Vendor-Id: 
Implementation-Version: 3.8.1

Manifest-Version: 1.0
Created-By: Apache Ant 1.5.1beta1
Extension-Name: org.apache.commons.logging
Specification-Vendor: Apache Software Foundation
Specification-Version: 1.0
Implementation-Vendor: Apache Software Foundation
Implementation-Vendor-Id: 
Implementation-Version: 1.0.2
Class-Path: log4j.jar log4j-core.jar

Otherwise, you can figure out this conflict by simply removing
Extension-List and its followings. The attached files are completely
updated MANIFESTs. Again, I'd like to remind you that this issue is now
only proved to be relevant with Tomcat and hence am not sure it can
cause a problem under other platforms. (I saw my colleague using
http-client 2.0 beta 1 on his dos prompt without trouble even though his
classpath didn't include junit.jar.)

Thanks for this great work, http-client 2.0,

Ias.

===========================================================
Lee, Changshin (Korean name)
Ias (International name)
               Company Web Site: http://www.tmax.co.kr
               Personal Web Site: http://www.iasandcb.pe.kr
---------------------------------------------------------

Re: [REPORT] 2.0 beta 1 and Tomcat 4

Posted by Adrian Sutton <ad...@intencha.com>.
Mike,
This sounds like a known issue I've seen with maven recently.  I 
believe it's fixed in the latest CVS version of maven, but it's 
probably easier and safer to just fix it by hand.

Adrian.

On Tuesday, June 3, 2003, at 02:42  AM, Michael Becke wrote:

> Ias,
>
> Thank you for submitting this one.  You are quite right, the 
> MANIFEST.MF is not correct.  Not only does it have formatting 
> problems, but junit should not be a runtime dependency.  This jar was 
> generated with Maven so I am guessing the formatting problem is a 
> Maven bug.  I'll remove the junit dependency and rebuild the 
> distribution this evening.
>
> Mike


Re: [REPORT] 2.0 beta 1 and Tomcat 4

Posted by Michael Becke <be...@u.washington.edu>.
Ias,

Thank you for submitting this one.  You are quite right, the MANIFEST.MF 
is not correct.  Not only does it have formatting problems, but junit 
should not be a runtime dependency.  This jar was generated with Maven 
so I am guessing the formatting problem is a Maven bug.  I'll remove the 
junit dependency and rebuild the distribution this evening.

Mike

Ias wrote:
> The current 2.0 beta 1 distribution doesn't work with Tomcat 4.x. The
> error message is
> Catalina.start: LifecycleException:  Missing optional package
> Extension[junit,
> implementationURL=http://www.ibiblio.org/maven/junit/jars/junit-3.8.1.ja
> r, implementationVersion=3.8.1]
> LifecycleException:  Missing optional package Extension[junit,
> implementationURL=http://www.ibiblio.org/maven/junit/jars/junit-3.8.1.ja
> r, implementationVersion=3.8.1]
> 	at
> org.apache.catalina.loader.WebappLoader.validatePackages(WebappLoader.ja
> va:1244)
> 	at
> org.apache.catalina.loader.WebappLoader.start(WebappLoader.java:645)
> 	at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1100)
> 	at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:3345
> )
> 	at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
> 	at
> org.apache.catalina.core.StandardHost.start(StandardHost.java:614)
> 	at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
> 	at
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343)
> 	at
> org.apache.catalina.core.StandardService.start(StandardService.java:388)
> 	at
> org.apache.catalina.core.StandardServer.start(StandardServer.java:506)
> 	at org.apache.catalina.startup.Catalina.start(Catalina.java:781)
> 	at
> org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
> 	at
> org.apache.catalina.startup.Catalina.process(Catalina.java:179)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
> a:39)
> 	at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
> Impl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:324)
> 	at
> org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)
> 
> I looked into the stack trace and found that there needed to be some
> modification toward the associated
> jars-commons-httpclient-2.0-beta1.jar, junit-3.8.1.jar, and
> commons-logging-1.0.jar.
> 
> First, Tomcat's org.apache.catalina.loader.Extension.getRequired
> distinguishes required libraries by delimiter not "," but " ".
> Therefore, 
> 
> Extension-List: junit,commons-logging
> 
> should be
> 
> Extension-List: junit commons-logging
> 
> in MANIFEST.MF of httpclient jar.
> (http://java.sun.com/j2se/1.4.1/docs/guide/extensions/versioning.html
> proves the usage.)
> 
> Next, since Tomcat's resolving algorithm for required libraries is quite
> strict as implemented in o.a.c.l.WebappLoader.validatePackages(),
> Specification-Version and Implementation-Vendor-Id of the extensions
> should be defined like this:
> 
> junit-Extension-Name: junit
> junit-Specification-Version: 3.8.1
> junit-Implementation-Vendor-Id: 
> junit-Implementation-Version: 3.8.1
> junit-Implementation-URL:
> http://www.ibiblio.org/maven/junit/jars/junit-3.8.1.jar
> commons-logging-Extension-Name: org.apache.commons.logging
> commons-logging-Specification-Version: 1.0
> commons-logging-Implementation-Vendor-Id: 
> commons-logging-Implementation-Version: 1.0.2
> commons-logging-Implementation-URL:
> http://www.ibiblio.org/maven/commons-logging/jars/commons-logging-1.0.2.
> jar
> 
> In accordance with the above addition, MANIFEST of junit and
> commons-logging also should be updated to comply with
> commons-httpclient.
> 
> Manifest-Version: 1.0
> Created-By: Ant 1.4.1
> Extension-Name: junit
> Specification-Version: 3.8.1
> Implementation-Vendor-Id: 
> Implementation-Version: 3.8.1
> 
> Manifest-Version: 1.0
> Created-By: Apache Ant 1.5.1beta1
> Extension-Name: org.apache.commons.logging
> Specification-Vendor: Apache Software Foundation
> Specification-Version: 1.0
> Implementation-Vendor: Apache Software Foundation
> Implementation-Vendor-Id: 
> Implementation-Version: 1.0.2
> Class-Path: log4j.jar log4j-core.jar
> 
> Otherwise, you can figure out this conflict by simply removing
> Extension-List and its followings. The attached files are completely
> updated MANIFESTs. Again, I'd like to remind you that this issue is now
> only proved to be relevant with Tomcat and hence am not sure it can
> cause a problem under other platforms. (I saw my colleague using
> http-client 2.0 beta 1 on his dos prompt without trouble even though his
> classpath didn't include junit.jar.)
> 
> Thanks for this great work, http-client 2.0,
> 
> Ias.
> 
> ===========================================================
> Lee, Changshin (Korean name)
> Ias (International name)
>                Company Web Site: http://www.tmax.co.kr
>                Personal Web Site: http://www.iasandcb.pe.kr
> ---------------------------------------------------------
> 
> 
> 
> ------------------------------------------------------------------------
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org


Re: [REPORT] 2.0 beta 1 and Tomcat 4

Posted by Michael Becke <be...@u.washington.edu>.
I have re-published the Beta 1 distribution to the various download  
sites.  This newer version removes the "Extension-List" manifest  
entries for commons-logging and JUnit.  I tested an HttpClient servlet  
with Tomcat 4.1.18 and all seemed well.  The jar on ibiblio has not  
been updated as of yet, but I will keep you posted.

Mike

On Monday, June 2, 2003, at 10:54 AM, Ias wrote:

> The current 2.0 beta 1 distribution doesn't work with Tomcat 4.x. The
> error message is
> Catalina.start: LifecycleException:  Missing optional package
> Extension[junit,
> implementationURL=http://www.ibiblio.org/maven/junit/jars/junit- 
> 3.8.1.ja
> r, implementationVersion=3.8.1]
> LifecycleException:  Missing optional package Extension[junit,
> implementationURL=http://www.ibiblio.org/maven/junit/jars/junit- 
> 3.8.1.ja
> r, implementationVersion=3.8.1]
> 	at
> org.apache.catalina.loader.WebappLoader.validatePackages(WebappLoader.j 
> a
> va:1244)
> 	at
> org.apache.catalina.loader.WebappLoader.start(WebappLoader.java:645)
> 	at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1100)
> 	at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:334 
> 5
> )
> 	at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
> 	at
> org.apache.catalina.core.StandardHost.start(StandardHost.java:614)
> 	at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
> 	at
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343)
> 	at
> org.apache.catalina.core.StandardService.start(StandardService.java:388 
> )
> 	at
> org.apache.catalina.core.StandardServer.start(StandardServer.java:506)
> 	at org.apache.catalina.startup.Catalina.start(Catalina.java:781)
> 	at
> org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
> 	at
> org.apache.catalina.startup.Catalina.process(Catalina.java:179)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.ja 
> v
> a:39)
> 	at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso 
> r
> Impl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:324)
> 	at
> org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)
>
> I looked into the stack trace and found that there needed to be some
> modification toward the associated
> jars-commons-httpclient-2.0-beta1.jar, junit-3.8.1.jar, and
> commons-logging-1.0.jar.
>
> First, Tomcat's org.apache.catalina.loader.Extension.getRequired
> distinguishes required libraries by delimiter not "," but " ".
> Therefore,
>
> Extension-List: junit,commons-logging
>
> should be
>
> Extension-List: junit commons-logging
>
> in MANIFEST.MF of httpclient jar.
> (http://java.sun.com/j2se/1.4.1/docs/guide/extensions/versioning.html
> proves the usage.)
>
> Next, since Tomcat's resolving algorithm for required libraries is  
> quite
> strict as implemented in o.a.c.l.WebappLoader.validatePackages(),
> Specification-Version and Implementation-Vendor-Id of the extensions
> should be defined like this:
>
> junit-Extension-Name: junit
> junit-Specification-Version: 3.8.1
> junit-Implementation-Vendor-Id:
> junit-Implementation-Version: 3.8.1
> junit-Implementation-URL:
> http://www.ibiblio.org/maven/junit/jars/junit-3.8.1.jar
> commons-logging-Extension-Name: org.apache.commons.logging
> commons-logging-Specification-Version: 1.0
> commons-logging-Implementation-Vendor-Id:
> commons-logging-Implementation-Version: 1.0.2
> commons-logging-Implementation-URL:
> http://www.ibiblio.org/maven/commons-logging/jars/commons-logging- 
> 1.0.2.
> jar
>
> In accordance with the above addition, MANIFEST of junit and
> commons-logging also should be updated to comply with
> commons-httpclient.
>
> Manifest-Version: 1.0
> Created-By: Ant 1.4.1
> Extension-Name: junit
> Specification-Version: 3.8.1
> Implementation-Vendor-Id:
> Implementation-Version: 3.8.1
>
> Manifest-Version: 1.0
> Created-By: Apache Ant 1.5.1beta1
> Extension-Name: org.apache.commons.logging
> Specification-Vendor: Apache Software Foundation
> Specification-Version: 1.0
> Implementation-Vendor: Apache Software Foundation
> Implementation-Vendor-Id:
> Implementation-Version: 1.0.2
> Class-Path: log4j.jar log4j-core.jar
>
> Otherwise, you can figure out this conflict by simply removing
> Extension-List and its followings. The attached files are completely
> updated MANIFESTs. Again, I'd like to remind you that this issue is now
> only proved to be relevant with Tomcat and hence am not sure it can
> cause a problem under other platforms. (I saw my colleague using
> http-client 2.0 beta 1 on his dos prompt without trouble even though  
> his
> classpath didn't include junit.jar.)
>
> Thanks for this great work, http-client 2.0,
>
> Ias.
>
> ===========================================================
> Lee, Changshin (Korean name)
> Ias (International name)
>                Company Web Site: http://www.tmax.co.kr
>                Personal Web Site: http://www.iasandcb.pe.kr
> ---------------------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:  
> commons-httpclient-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:  
> commons-httpclient-dev-help@jakarta.apache.org