Hi there!

I'm working on a framework that uses its own URL scheme
("protocol": oan://host/file...) by extension of
java.net.URLStreamHandler. It also uses its own content
handlers by extension of java.net.ContentHandler.

Using Sun's default resolution mechanisms, their respective
packages are appended to the "java.protocol.handler.pkgs" and
"java.content.handler.pkgs" System properties.

Everything works fine, until I try to use my protocol and
content handlers in a webapp deployed on Tomcat 5.5.17/MacOSX...



[1] From what I could gather from the documentation and forums,
    the jars containing my classes should be placed in
    $CATALINA_HOME/common/endorsed/. Is it correct?

Indeed, they are not considered by Tomcat's class loader if they
are copied to $CATALINA_HOME/mywebapp/WEB-INF/lib/. I tried
$CATALINA_HOME/common/lib/ too, without success.



[2] Apparently, all the dependencies (.jars) required by my
handlers jars should also be placed in $CATALINA_HOME/common/endorsed/
or the classes cannot be instantiated by mines. Still correct?



[3] One of those dependencies itself depends on
    apache-commons-logging.jar.

[3a] If I put this jar in $CATALINA_HOME/common/endorsed/, Tomcat
     refuses to launch. Does it happen due to a collision with
     $CATALINA_HOME/bin/commons-logging-api.jar?

-------------------------------------------------------------------------------------
Exception in thread "main" java.lang.ExceptionInInitializerError
Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: java.lang.NullPointerException (Caused by java.lang.NullPointerException)) at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:543) at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235) at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:209)
    at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
    at org.apache.catalina.startup.Bootstrap.<clinit>(Bootstrap.java:53)
Caused by: org.apache.commons.logging.LogConfigurationException: java.lang.NullPointerException (Caused by java.lang.NullPointerEx at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:397) at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529)
    ... 4 more
Caused by: java.lang.NullPointerException
at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:374)
    ... 5 more
-------------------------------------------------------------------------------------



[3b] If I remove apache-commons-logging.jar. from
     $CATALINA_HOME/common/endorsed/, then I get a
     NoClassDefFoundError for org.apache.commons.logging.LogFactory



Using java -verbose... I could check that my classes are properly
loaded, as well as org.apache.commons.logging.LogFactory by the System,
but this loading fails when requested through my code's dependencies.



Thanks in advance for all the wisdom you will poor into my inbox!

Best wishes,

  --javier

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to