You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Carlos Villavieja Prados <cv...@salleURL.edu> on 2000/05/31 01:09:56 UTC

Error calling cocoon on Command Line

 Hello All!

	I get an error with Cocoon 1.7.4 while calling Cocoon from command
line. I get a NullpointerException.

In my classpath I've got all the posible jar's.
I also put the cocoon.properties file, the xml and the output (html).

I execute:

java -cp
/usr/local/jsdk/lib/jsdk.jar:/usr/local/cocoon/bin/cocoon.jar:/usr/loca
l/cocoon/lib/xerces_1_0_3.jar:/usr/local/cocoon/lib/xalan_1_0_1.jar:/usr/local/c
ocoon/lib/fop_0_12_1.jar:/usr/local/cocoon/lib/servlet_2_2.jar
org.apache.cocoo
n.Cocoon -p /usr/local/cocoon/conf/cocoon.properties
/home/cvprados/registro.xml
 pepe.html


The Error:
Exception in thread "main" java.lang.NullPointerException
        at org.apache.cocoon.Engine.handle(Engine.java, Compiled Code)
        at org.apache.cocoon.EngineWrapper.handle(EngineWrapper.java,
Compiled C
ode)
        at org.apache.cocoon.Cocoon.main(Cocoon.java, Compiled Code)


Any idea?

Thanks!!
----------------------------------------------------------------------------
                       Carlos Villavieja Prados 
                          cvprados@salleURL.edu	  
                    http://www.salleURL.edu/~cvprados
----------------------------------------------------------------------------




Re: Error calling cocoon on Command Line

Posted by Roger Vaughn <rv...@seaconinc.com>.
Carlos,

Yes, you're correct.  There are some issues with servlet context handling in the
code.  The attached patch fixes the problem.  (Apply this to
src/org/apache/cocoon/Engine.java and rebuild the jar file.)

Roger Vaughn


Carlos Villavieja Prados wrote:

>  Hello All!
>
>         I get an error with Cocoon 1.7.4 while calling Cocoon from command
> line. I get a NullpointerException.
>
> In my classpath I've got all the posible jar's.
> I also put the cocoon.properties file, the xml and the output (html).
>
> I execute:
>
> java -cp
> /usr/local/jsdk/lib/jsdk.jar:/usr/local/cocoon/bin/cocoon.jar:/usr/loca
> l/cocoon/lib/xerces_1_0_3.jar:/usr/local/cocoon/lib/xalan_1_0_1.jar:/usr/local/c
> ocoon/lib/fop_0_12_1.jar:/usr/local/cocoon/lib/servlet_2_2.jar
> org.apache.cocoo
> n.Cocoon -p /usr/local/cocoon/conf/cocoon.properties
> /home/cvprados/registro.xml
>  pepe.html
>
> The Error:
> Exception in thread "main" java.lang.NullPointerException
>         at org.apache.cocoon.Engine.handle(Engine.java, Compiled Code)
>         at org.apache.cocoon.EngineWrapper.handle(EngineWrapper.java,
> Compiled C
> ode)
>         at org.apache.cocoon.Cocoon.main(Cocoon.java, Compiled Code)
>
> Any idea?
>
> Thanks!!
> ----------------------------------------------------------------------------
>                        Carlos Villavieja Prados
>                           cvprados@salleURL.edu
>                     http://www.salleURL.edu/~cvprados
> ----------------------------------------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org