You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Thomas Haditsch <th...@thomminator.de> on 2003/02/09 17:50:17 UTC

cocoon classloader problem

while trying to get the cocoon command line interface to work, i stumbled
across this odd problem:

Object o = 
Class.forName("org.apache.avalon.excalibur.xml.JaxpParser").newInstance();
org.apache.cocoon.util.ClassUtils.loadClass("org.apache.avalon.excalibur.xml.JaxpParser").newInstance();

the JaxpParser class obviously is in the class path, since the first line 
gets executed without
problems... but when trying to use the cocoon class loader, i get this:

java.lang.ClassNotFoundException: org.apache.avalon.excalibur.xml.JaxpParser
         at java.net.URLClassLoader$1.run(URLClassLoader.java:198)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
         at 
org.netbeans.core.modules.ProxyClassLoader.loadInOrder(ProxyClassLoader.java:472)
         at 
org.netbeans.core.modules.ProxyClassLoader.smartLoadClass(ProxyClassLoader.java:452)
         at 
org.netbeans.core.modules.ProxyClassLoader.loadClass(ProxyClassLoader.java:124)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
         at org.apache.cocoon.util.ClassUtils.loadClass(ClassUtils.java:88)
         at com.rauser_ag.website.tests.Spool.main(Spool.java:24)
         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:324)
         at 
org.openide.execution.ThreadExecutor.executeClass(ThreadExecutor.java:117)
         at 
org.openide.execution.ThreadExecutor$TERunnable.run(ThreadExecutor.java:184)
         at 
org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:119)

anybody got a clue why it can't find a class that's available in the 
classpath? i'm wondering
because the build script for the docs seems to manage this, while this code 
doesn't.

thanks in advance.


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

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