You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Werner Guttmann <We...@morganstanley.com> on 2001/11/15 19:44:19 UTC

Cocoon 2.0rc2 and classloader problems

Hi,

I am using Cocoon 2.0rc2 on Tomcat 4.0.1 on Solaris 2.8, and I am
running into some classloading problems. Here's what I am trying to do.

I've got an XSP page that uses some home-written classes to get some
data from DB2 using Castor as o/r mapping tool. Unfortunately, when
trying to execute that XSP, I am getting a ClassNotFoundException
telling me that it cannot find the jdbc driver class for DB2.

Well, I am a bit puzzled by this as all the 3rd party libraries I am
using reside in $CATALINA_HOME/common/lib (via symlinks) incl. amongst
others castor.jar (Castor's byte code) and db2java.zip (jdbc driver for
DB2).

The stack trace I get (see below for a fragment) seems to indicate that
the compiled XSP successfully finds ..

- some home-written libraries residing in the webapp's lib directory
- Castor's libaries residing in $CATALINA_HOME/common/lib

and does NOT find

- the JDBC driver for DB2 residing in $CATALINA_HOME/common/lib as well.

Any idea what's going wrong here ?

Werner

--- incl stack trace ---
java.lang.ClassNotFoundException: COM.ibm.db2.jdbc.app.DB2Driver
        at
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:1124)

        at
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:989)

        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)

        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:120)
        at
org.exolab.castor.jdo.engine.DatabaseRegistry.loadDatabase(DatabaseRegistry.java:275)

        at org.exolab.castor.jdo.JDO.getDatabase(JDO.java:465)
        at
com.msdw.futopt.infrastructure.persist.Persister.connectToDB(Persister.java:189)

        at
com.msdw.futopt.infrastructure.persist.Persister.begin(Persister.java:225)

        at
com.msdw.futopt.expiry.accounts.AccountNaturePersister.getAccountNatures(AccountNaturePersister.java:45)

        at
com.msdw.futopt.expiry.accounts.AccountNatureManagerImplCastor.getAccountNatures(AccountNatureManagerImplCastor.java:84)

        at
com.msdw.futopt.expiry.view.accounts.AccountNatureManagerDelegateLocal.getAccountNatures(AccountNatureManagerDelegateLocal.java:59)

        at
com.msdw.futopt.expiry.view.accounts.AccountNatureXMLTransformer.<init>(AccountNatureXMLTransformer.java:67)

        at
org.apache.cocoon.www.xml.view_accountNatures_xml.generate(view_accountNatures_xml.java:107)

        at
org.apache.cocoon.generation.ServerPagesGenerator.generate(ServerPagesGenerator.java:200)




---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>