You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by BobiatyĆski Wojciech <wb...@uprp.pl> on 2009/07/08 14:20:17 UTC
Cocoon doesn't work with "precompile" and "cli" options.
Hello all
I have downloaded Cocoon-2.1.9 and 2.1.11 from an apache website for precompiling some XSP pages. Errors in those versions are similar, but I will concentrate on version 2.1.11.
Building Cocoon doesn't bring any troubles, such as building "webapp". When I run "build test", this runs during about 2 minutes and ends with:
check-htmlunit-present:
**** HTMLUNIT NOT FOUND!!! *****************************************************
***********************************
To use htmlunit, please install it (see http://htmlunit.sourceforge.net/),
and set htmlunit.home (currently /default-from-build.properties/htmlunit-2.5) i
n your local.build.properties
********************************************************************************
***********************************
BUILD FAILED
C:\Documents and Settings\wbobiatynski\Moje dokumenty\projekty\cocoon-2.1.11\too
ls\targets\test-build.xml:45: htmlunit not present, cannot run tests
Total time: 1 minute 53 seconds
Obviously I have previously copied htmlunit-2.5 folder to my cocoon main folder and cocoon\build folder. Later I can successfully run "cocoon servlet" and get the page http://localhost:8888 but running the cocoon from command line (to precompile pages) with "cli" or "precompile" fails (the stack trace is (in both cases):
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at Loader.invokeMain(Unknown Source)
at Loader.run(Unknown Source)
at Loader.main(Unknown Source)
Caused by: java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest
Wrapper
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
3)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:1618)
at java.lang.Class.getConstructor0(Class.java:1930)
at java.lang.Class.newInstance0(Class.java:278)
at java.lang.Class.newInstance(Class.java:261)
at org.apache.avalon.excalibur.component.DefaultComponentFactory.newInst
ance(DefaultComponentFactory.java:195)
at org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.init
ialize(ThreadSafeComponentHandler.java:108)
at org.apache.avalon.excalibur.component.ExcaliburComponentSelector.addC
omponent(ExcaliburComponentSelector.java:705)
at org.apache.cocoon.components.ExtendedComponentSelector.configure(Exte
ndedComponentSelector.java:229)
at org.apache.avalon.framework.container.ContainerUtil.configure(Contain
erUtil.java:201)
at org.apache.avalon.excalibur.component.DefaultComponentFactory.newInst
ance(DefaultComponentFactory.java:289)
at org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.init
ialize(ThreadSafeComponentHandler.java:108)
at org.apache.avalon.excalibur.component.ExcaliburComponentManager.initi
alize(ExcaliburComponentManager.java:524)
at org.apache.cocoon.components.CocoonComponentManager.initialize(Cocoon
ComponentManager.java:583)
at org.apache.avalon.framework.container.ContainerUtil.initialize(Contai
nerUtil.java:244)
at org.apache.cocoon.Cocoon.initialize(Cocoon.java:345)
at org.apache.avalon.framework.container.ContainerUtil.initialize(Contai
nerUtil.java:244)
at org.apache.cocoon.bean.CocoonWrapper.initialize(CocoonWrapper.java:17
7)
at org.apache.cocoon.bean.CocoonBean.initialize(CocoonBean.java:102)
at org.apache.cocoon.Main.main(Main.java:320)
... 7 more
)
I have already copied the servlet2_2.jar from "lib\core" to "build\webapp\WEB-INF\lib" so that's not the reason. Please, help me to resolve this problem.
Regards
Wojtek