Hi all!
I am new to Cocoon, step by step following the
"Java and XML" book.
I am using Cocoon 1.8 , It seems OK, All XML / XSLT / FOs
works correctly , except the XSP compilation error!
I followed the "Java and XML" book (Oreilly) , and
downloaded all the sample code from the Oreilly website,
and key-in the simpleXSP.xml (because the filesize is zero
in the sample code, It seems an Oreilly's error).
But it can't start in my server. The error message is as
follows:
Error found handling the request.
java.lang.Exception: XSP Java Compiler: Compilation failed for _simpleXSP.java
12: Package org.apache.cocoon.parser not found in import.
import org.apache.cocoon.parser.*;
^
13: Package org.apache.cocoon.producer not found in import.
import org.apache.cocoon.producer.*;
^
14: Package org.apache.cocoon.framework not found in import.
import org.apache.cocoon.framework.*;
^
16: Package org.apache.cocoon.processor.xsp not found in import.
import org.apache.cocoon.processor.xsp.*;
^
17: Package org.apache.cocoon.processor.xsp.library not found in import.
import org.apache.cocoon.processor.xsp.library.*;
I am using RedHat 7.1 + Resin 1.2.7 , the resin.conf (cocoon part) is as follows:
<web-app id="/cocoon" app-dir="/usr/local/cocoon">
<classpath id='bin/cocoon.jar' />
<classpath id='lib/xerces_1_2.jar' />
<classpath id='lib/xalan_1_2_D02.jar' />
<classpath id='lib/fop_0_13_0.jar' />
<classpath id='lib/turbine-pool.jar' />
<servlet>
<servlet-name>org.apache.cocoon.Cocoon</servlet-name>
<servlet-class>org.apache.cocoon.Cocoon</servlet-class>
<init-param>
<param-name>properties</param-name>
<param-value>conf/cocoon.properties</param-value>
</init-param>
</servlet>
<servlet-mapping servlet-name="org.apache.cocoon.Cocoon" url-pattern="*.xml" />
</web-app>
It seems a classpath problem. But I check the classpath, all seems OK!
I rebuild the cocoon.jar , and find that
there does exist cocoon/build/src/org/xml/apache/parser,producer,..., directories. They DOES exist!
And the newly build /build/cocoon.jar is identical to cocoon/bin/cocoon.jar (both 244389 bytes)
But why can't I run XSP files ? Where goes wrong ? Please tell me , Thank you in advance!