cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Florent MIGNON <fmig...@gmail.com>
Subject Cocoon 2.1.7 CLI fails to work
Date Thu, 28 Apr 2005 09:48:01 GMT
+------------------------------------------------------+
|                                                      |
| Environment:                                         |
|                                                      |
|   OS : Windows XP                                    |
|   VM : jdk1.5.0_01 (idem with j2sdk1.4.2_08)         |
|                                                      |
| Files :                                              |
|                                                      |
|   cocoon-2.1.7-src.zip                               |
|   cli.xconf provided with cocoon-2.1.7-src.zip       |
|                                                      |
+------------------------------------------------------+

I downloaded "cocoon-2.1.7-src.zip" and did a "build.bat" sucessfully.

The command "cocoon.bat servlet" perfectly works but the command
"cocoon.bat cli -x cli.xconf" with the CLI config file provided with
the package doesn't.

Here are all the steps I did in order to run Cocoon CLI :

+------------------------------------------------------+
|                                                      |
|   STEP 1                                             |
|                                                      |
|   D:\java\cocoon-2.1.7>cocoon.bat cli -x cli.xconf   |
|                                                      |
+------------------------------------------------------+

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(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at Loader.invokeMain(Unknown Source)
        at Loader.run(Unknown Source)
        at Loader.main(Unknown Source)
Caused by: java.lang.NoClassDefFoundError:
javax/servlet/http/HttpSessionBindingListener
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        at org.apache.cocoon.components.flow.ContinuationsManagerImpl.configure(ContinuationsManagerImpl.java:155)
        at org.apache.avalon.framework.container.ContainerUtil.configure(ContainerUtil.java:240)
        at org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(DefaultComponentFactory.java:269)
        at org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.initialize(ThreadSafeComponentHandler.java:108)
        at org.apache.avalon.excalibur.component.ExcaliburComponentManager.initialize(ExcaliburComponentManager.java:522)
        at org.apache.cocoon.components.CocoonComponentManager.initialize(CocoonComponentManager.java:561)
        at org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:283)
        at org.apache.cocoon.Cocoon.initialize(Cocoon.java:282)
        at org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:283)
        at org.apache.cocoon.bean.CocoonWrapper.initialize(CocoonWrapper.java:171)
        at org.apache.cocoon.bean.CocoonBean.initialize(CocoonBean.java:98)
        at org.apache.cocoon.Main.main(Main.java:320)
        ... 7 more

ERROR => java.lang.NoClassDefFoundError:
javax/servlet/http/HttpSessionBindingListener
#####

SOLUTION => I copy
########   <cocoon-2.1.7-insall-dir>/lib/core/servlet_2_2.jar in 
           <cocoon-2.1.7-insall-dir>/build/webapp/WEB-INF/lib/servlet_2_2.jar

           as suggested in the article
http://www.mail-archive.com/users@cocoon.apache.org/msg03991.html

+------------------------------------------------------+
|                                                      |
|   STEP 2                                             |
|                                                      |
|   D:\java\cocoon-2.1.7>cocoon.bat cli -x cli.xconf   |
|                                                      |
+------------------------------------------------------+

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(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at Loader.invokeMain(Unknown Source)
        at Loader.run(Unknown Source)
        at Loader.main(Unknown Source)
Caused by: org.apache.avalon.framework.configuration.ConfigurationException:
Could not load class
org.apache.cocoon.components.ExtendedComponentSelector for component
named 'http://java.sun.com/jsf/demo/components' at
file:/D:/java/cocoon-2.1.7/build/webapp/WEB-INF/cocoon.xconf:1785:156
        at org.apache.cocoon.components.ExtendedComponentSelector.configure(ExtendedComponentSelector.java:237)
        at org.apache.avalon.framework.container.ContainerUtil.configure(ContainerUtil.java:240)
        at org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(DefaultComponentFactory.java:269)
        at org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.initialize(ThreadSafeComponentHandler.java:108)
        at org.apache.avalon.excalibur.component.ExcaliburComponentManager.initialize(ExcaliburComponentManager.java:522)
        at org.apache.cocoon.components.CocoonComponentManager.initialize(CocoonComponentManager.java:561)
        at org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:283)
        at org.apache.cocoon.Cocoon.initialize(Cocoon.java:282)
        at org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:283)
        at org.apache.cocoon.bean.CocoonWrapper.initialize(CocoonWrapper.java:171)
        at org.apache.cocoon.bean.CocoonBean.initialize(CocoonBean.java:98)
        at org.apache.cocoon.Main.main(Main.java:320)
        ... 7 more
Caused by: org.apache.avalon.framework.component.ComponentException:
Could not set up Component for hint [ http://java.sun.com/jsf
/demo/components] (key [http://java.sun.com/jsf/demo/components])
        at org.apache.avalon.excalibur.component.ExcaliburComponentSelector.addComponent(ExcaliburComponentSelector.java:721)
        at org.apache.cocoon.components.ExtendedComponentSelector.configure(ExtendedComponentSelector.java:229)
        ... 18 more
Caused by: org.apache.avalon.framework.configuration.ConfigurationException:
Could not load class org.apache.cocoon.faces.samples.
components.taglib.AreaTag for component named 'area' at
file:/D:/java/cocoon-2.1.7/build/webapp/WEB-INF/cocoon.xconf:1786:124
        at org.apache.cocoon.components.ExtendedComponentSelector.configure(ExtendedComponentSelector.java:237)
        at org.apache.avalon.framework.container.ContainerUtil.configure(ContainerUtil.java:240)
        at org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(DefaultComponentFactory.java:269)
        at org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.initialize(ThreadSafeComponentHandler.java:108)
        at org.apache.avalon.excalibur.component.ExcaliburComponentSelector.addComponent(ExcaliburComponentSelector.java:703)
        ... 19 more
Caused by: java.lang.ClassNotFoundException:
org.apache.cocoon.faces.samples.components.taglib.AreaTag
        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:306)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at org.apache.cocoon.components.ExtendedComponentSelector.configure(ExtendedComponentSelector.java:228)
        ... 23 more

ERROR => Could not load class
org.apache.cocoon.components.ExtendedComponentSelector
#####    for component named 'http://java.sun.com/jsf/demo/components' 
         at file:/D:/java/cocoon-2.1.7/build/webapp/WEB-INF/cocoon.xconf:1785:156

         java.lang.ClassNotFoundException:
org.apache.cocoon.faces.samples.components.taglib.AreaTag

SOLUTION => Open the file
"file:/D:/java/cocoon-2.1.7/build/webapp/WEB-INF/cocoon.xconf"
########    Go to the line 1785
            I delete the "CarStore Demo taglib" components and
validator (from line 1785 to line 1795)

+------------------------------------------------------+
|                                                      |
|   STEP 3                                             |
|                                                      |
|   D:\java\cocoon-2.1.7>cocoon.bat cli -x cli.xconf   |
|                                                      |
+------------------------------------------------------+

java.io.FileNotFoundException: D:\java\cocoon-2.1.7\OJB.properties
(The system cannot find the file specified)
        at java.io.FileInputStream.open(Native Method)
        at java.io.FileInputStream.<init>(FileInputStream.java:106)
        at java.io.FileInputStream.<init>(FileInputStream.java:66)
        at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:70)
        at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:161)
        at java.net.URL.openStream(URL.java:1007)
        at org.apache.ojb.broker.util.configuration.impl.ConfigurationAbstractImpl.load(Unknown
Source)
        at org.apache.ojb.broker.util.configuration.impl.OjbConfiguration.load(Unknown
Source)
        at org.apache.ojb.broker.util.configuration.impl.ConfigurationAbstractImpl.<init>(Unknown
Source)
        at org.apache.ojb.broker.util.configuration.impl.OjbConfiguration.<init>(Unknown
Source)
        at org.apache.ojb.broker.util.configuration.impl.OjbConfigurator.<init>(Unknown
Source)
        at org.apache.ojb.broker.util.configuration.impl.OjbConfigurator.<clinit>(Unknown
Source)
        at org.apache.ojb.broker.util.factory.ConfigurableFactory.<init>(Unknown
Source)
        at org.apache.ojb.odmg.OJB.<init>(Unknown Source)
        at org.apache.ojb.odmg.OJB.<clinit>(Unknown Source)
        at org.apache.cocoon.ojb.odmg.components.ODMGImpl.initialize(ODMGImpl.java:53)
        at org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:283)
        at org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(DefaultComponentFactory.java:277)
        at org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.initialize(ThreadSafeComponentHandler.java:108)
        at org.apache.avalon.excalibur.component.ExcaliburComponentManager.initialize(ExcaliburComponentManager.java:522)
        at org.apache.cocoon.components.CocoonComponentManager.initialize(CocoonComponentManager.java:561)
        at org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:283)
        at org.apache.cocoon.Cocoon.initialize(Cocoon.java:282)
        at org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:283)
        at org.apache.cocoon.bean.CocoonWrapper.initialize(CocoonWrapper.java:171)
        at org.apache.cocoon.bean.CocoonBean.initialize(CocoonBean.java:98)
        at org.apache.cocoon.Main.main(Main.java:320)
        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:585)
        at Loader.invokeMain(Unknown Source)
        at Loader.run(Unknown Source)
        at Loader.main(Unknown Source)
- ConfigurableFactory configuration key class for
key'ImplementationClass' does not exist.
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(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at Loader.invokeMain(Unknown Source)
        at Loader.run(Unknown Source)
        at Loader.main(Unknown Source)
Caused by: java.lang.ExceptionInInitializerError
        at org.apache.cocoon.ojb.odmg.components.ODMGImpl.initialize(ODMGImpl.java:53)
        at org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:283)
        at org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(DefaultComponentFactory.java:277)
        at org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.initialize(ThreadSafeComponentHandler.java:108)
        at org.apache.avalon.excalibur.component.ExcaliburComponentManager.initialize(ExcaliburComponentManager.java:522)
        at org.apache.cocoon.components.CocoonComponentManager.initialize(CocoonComponentManager.java:561)
        at org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:283)
        at org.apache.cocoon.Cocoon.initialize(Cocoon.java:282)
        at org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:283)
        at org.apache.cocoon.bean.CocoonWrapper.initialize(CocoonWrapper.java:171)
        at org.apache.cocoon.bean.CocoonBean.initialize(CocoonBean.java:98)
        at org.apache.cocoon.Main.main(Main.java:320)
        ... 7 more
Caused by: org.apache.ojb.broker.PersistenceBrokerException:
ConfigurableFactory configuration key class for
key'ImplementationClass' does not exist.
        at org.apache.ojb.broker.util.factory.ConfigurableFactory.configure(Unknown
Source)
        at org.apache.ojb.broker.util.configuration.impl.OjbConfigurator.configure(Unknown
Source)
        at org.apache.ojb.broker.util.factory.ConfigurableFactory.<init>(Unknown
Source)
        at org.apache.ojb.odmg.OJB.<init>(Unknown Source)
        at org.apache.ojb.odmg.OJB.<clinit>(Unknown Source)
        ... 19 more

ERROR => The configuration file "OJB.properties" not found
#####

SOLUTION => Open the file
"file:/D:/java/cocoon-2.1.7/build/webapp/WEB-INF/cocoon.xconf"
########    I remove all the component related to ojb : "OJB
Connection Factory", "OJB Logger", "ODMG Implementation Interface"

+------------------------------------------------------+
|                                                      |
|   STEP 4                                             |
|                                                      |
|   D:\java\cocoon-2.1.7>cocoon.bat cli -x cli.xconf   |
|                                                      |
+------------------------------------------------------+

OK, now it works !

Is there something I get wrong ?

Florent

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message