Cocoon 2.0b1 in tomcat 3.2.2 on Linux 7.1
I am trying to write an action for use in my site map. When c2 executes
the sitemap java file I notice it is throwing the following exception
(from cooocon.log):
When C2 tries to do its thing with sitemap_xml.java
WARN 27991 [cocoon ] (Thread-39): LoginAction
java.lang.ClassNotFoundException: LoginAction
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
at org.apache.cocoon.util.ClassUtils.loadClass(ClassUtils.java:46)
at
org.apache.cocoon.sitemap.AbstractSitemap.load_component(AbstractSitemap.java:136)
at
org.apache.cocoon.www.mmsc.sitemap_xmap$Configurer.configActions(sitemap_xmap.java:211)
The class file (I also tried a jar file) is in a jar file in a folder
inside cocoon:
...tomcat/cocoon/out/mmsc.class (contains LoginAction.java)
I added the following to web.xml:
<init-param>
<param-name>extra-classpath</param-name>
<param-value>/usr/local/tomcat/webapps/cocoon/mmsc/out/mmsc.jar</param-value>
In the cocoon.log (Using the ParanoidServlet) I found the Classpath:
DEBUG 609 [cocoon ] (Thread-10): Classpath =
/usr/local/tomcat/webapps/cocoon/WEB-INF/classes:....(bits removed)
:/usr/local/tomcat/webapps/cocoon/mmsc/out/mmsc.jar
Which is the correct path. If I try to access the Action from the
command line with 'java' it executes. But once it is running Cocoon
can't seem to find it. is it because they are in different threads?
I noticed somewhere in the docs that I can include my actions in the
cocoon.war by adding them to the build, but I would rather not.
So I have three questions:
1. What am I doing wrong?
2. Is there a prescribed way for me to let cocoon compile the
LoginAction.java file on the fly like it does with everything else? I
currently just compile the file from the command line.
3. Can actions be written using xsp?
Thanks,
Mark Miller
Web Architect
Logica
---------------------------------------------------------------------
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: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>