cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harald Kornfeil <Harald.Kornf...@gmx.at>
Subject [C2] Error Cocoon 2.0a2: not initialized
Date Fri, 01 Sep 2000 15:02:17 GMT
Hello Everybody!

I used Cocoon 1.7.4 so far and it worked fine :-) 

But now I have troubles installing Cocoon2 (it is my first try for C2):
(I attached what I have done so far below)
when I call http://zem.cornfile.local:8080/cocoon/welcome I get the following
Errormessage:
Cocoon 2.0a2: not initialized
Class: org.apache.avalon.ConfigurationException
Message: Cannot load class org.apache.cocoon.components.image.JAIPNGEncoder
@ null

I want to use Cocoon for my thesis and I plan to include a installation
manual (at least in German) that I want to make public - thats why
I have such a exact documentation of what I did :-)

Maybe this helps you - me - us - whomever :-) - I hope you dont fetch
your mail by a cellular phone ;-)


----------------------------------------------------------------------------
-------
My System: RedHat Linux 6.2 + Sun JDK 1.2.2 + Tomcat 3.1 + Cocoon2 from
CVS/yesterday

----------------------------------------------------------------------------
-------
What I did so far:

I removed the Cocoon-1 configuration in {$TOMCAT_HOME}/conf/web.xml
I removed all cocoon.properties
(BTW: C2 does not work with or without that)


[root@zem xml-apache]# mkdir cocoon-2
[root@zem xml-apache]# cd cocoon-2


CVS:
[root@zem cocoon-2]# cvs -d :pserver:anoncvs@xml.apache.org:/home/cvspublic
login 
password: anoncvs

[root@zem cocoon-2]# cvs -d :pserver:anoncvs@xml.apache.org:/home/cvspublic
checkout -r xml-cocoon2 xml-cocoon


[root@zem cocoon-2]# ls
CVS      WARNING    build.xml    lcp.bat    skins     webapp
LICENSE  build.bat  changes.xml  lib        src       xdocs
README   build.sh   index.html   resources  todo.xml

[root@zem cocoon-2]# export JAVA_HOME=/usr/local/jdk1.2.2/

[root@zem cocoon-2]# ./build.sh

Cocoon Build System
-------------------

Building with classpath
lib/AvalonAware.jar:lib/ant.jar:lib/bsf.jar:lib/bsfengin
es.jar:lib/css.jar:lib/dom2.jar:lib/fop_0_14_1-dev.jar:lib/jakarta-regexp-1.
1.ja
r:lib/jstyle.jar:lib/rhino.jar:lib/servlet_2_2.jar:lib/ss_css2.jar:lib/style
book
-1.0-b2.jar:lib/svg-dom.jar:lib/svg.jar:lib/xalan_1_2_D01.jar:lib/xerces_1_1
_3.j
ar:/usr/local/jdk1.2.2//lib/tools.jar:

Starting Ant...
Buildfile: build.xml

init:
------------------- Apache Cocoon 2.0a2 [1999-2000] ----------------

prepare:
    [mkdir] Created dir: /home/httpd/html/xml_apache/cocoon-2/build/cocoon

prepare-src:
    [mkdir] Created dir: /home/httpd/html/xml_apache/cocoon-2/build/cocoon/src
    [mkdir] Created dir:
/home/httpd/html/xml_apache/cocoon-2/build/cocoon/class
es
  [copydir] Copying 127 files to
/home/httpd/html/xml_apache/cocoon-2/build/coco
on/src

compile:
  [copydir] Copying 5 files to
/home/httpd/html/xml_apache/cocoon-2/build/cocoon
/classes
    [javac] Compiling 118 source files to
/home/httpd/html/xml_apache/cocoon-2/b
uild/cocoon/classes
    [javac] Note: 4 files use or override a deprecated API.  Recompile with
"-de
precation" for details.
    [javac] 1 warning

package:
      [jar] Building jar:
/home/httpd/html/xml_apache/cocoon-2/build/cocoon/coco
on.jar

BUILD SUCCESSFUL

Total time: 3 minutes 59 seconds
[root@zem cocoon-2]#

----------------------------------------------------------------------------
------
BTW: I changed build.xml to

    <property name="build.compiler" value="classic"/>
<!--    <property name="build.compiler" value="jikes"/> -->

because of this message:

compile:
    [javac] Compiling 118 source files to
/home/httpd/html/xml_apache/cocoon-2/b
uild/cocoon/classes

BUILD FAILED

build.xml:205: Error running Jikes compiler
java.io.IOException: jikes: not found

----------------------------------------------------------------------------
------


[root@zem cocoon-2]# cd /usr/local/jakarta-tomcat/lib

[root@zem lib]# ls
ant.jar  jasper.jar  servlet.jar  test  webserver.jar  xml.jar

[root@zem lib]# cp /home/httpd/html/xml_apache/cocoon-2/lib/* .
I did not overwrite Ant!

[root@zem lib]# rm servlet_2_2.jar
[root@zem lib]# rm stylebook-1.0-b2.jar

[root@zem lib]# cp
/home/httpd/html/xml_apache/cocoon-2/build/cocoon/cocoon.jar .

[root@zem lib]# ls
AvalonAware.jar  dom2.jar                servlet.jar    xalan_1_2_D01.jar
ant.jar          fop_0_14_1-dev.jar      ss_css2.jar    xerces_1_1_3.jar
bsf.jar          jakarta-regexp-1.1.jar  svg-dom.jar    xml.jar
bsfengines.jar   jasper.jar              svg.jar
cocoon.jar       jstyle.jar              test
css.jar          rhino.jar               webserver.jar
[root@zem lib]#

[root@zem lib]# vi ../bin/tomcat.sh

...

#Cocoon-Klassen und Library-Dateien

CLASSPATH=${CLASSPATH}:${TOMCAT_HOME}/lib/AvalonAware.jar  
CLASSPATH=${CLASSPATH}:${TOMCAT_HOME}/lib/css.jar                 
CLASSPATH=${CLASSPATH}:${TOMCAT_HOME}/lib/jstyle.jar   
CLASSPATH=${CLASSPATH}:${TOMCAT_HOME}/lib/svg.jar
CLASSPATH=${CLASSPATH}:${TOMCAT_HOME}/lib/dom2.jar                
CLASSPATH=${CLASSPATH}:${TOMCAT_HOME}/lib/rhino.jar    
CLASSPATH=${CLASSPATH}:${TOMCAT_HOME}/lib/bsf.jar          
CLASSPATH=${CLASSPATH}:${TOMCAT_HOME}/lib/fop_0_14_1-dev.jar      
CLASSPATH=${CLASSPATH}:${TOMCAT_HOME}/lib/xalan_1_2_D01.jar
CLASSPATH=${CLASSPATH}:${TOMCAT_HOME}/lib/bsfengines.jar   
CLASSPATH=${CLASSPATH}:${TOMCAT_HOME}/lib/jakarta-regexp-1.1.jar  
CLASSPATH=${CLASSPATH}:${TOMCAT_HOME}/lib/ss_css2.jar  
CLASSPATH=${CLASSPATH}:${TOMCAT_HOME}/lib/xerces_1_1_3.jar
CLASSPATH=${CLASSPATH}:${TOMCAT_HOME}/lib/cocoon.jar       
CLASSPATH=${CLASSPATH}:${TOMCAT_HOME}/lib/svg-dom.jar  

...

[root@zem lib]# cd /home/httpd/html/xml_apache/cocoon-2/
[root@zem cocoon-2]# ./build.sh webapp

Cocoon Build System
-------------------

Building with classpath
lib/AvalonAware.jar:lib/ant.jar:lib/bsf.jar:lib/bsfengin
es.jar:lib/css.jar:lib/dom2.jar:lib/fop_0_14_1-dev.jar:lib/jakarta-regexp-1.
1.ja
r:lib/jstyle.jar:lib/rhino.jar:lib/servlet_2_2.jar:lib/ss_css2.jar:lib/style
book
-1.0-b2.jar:lib/svg-dom.jar:lib/svg.jar:lib/xalan_1_2_D01.jar:lib/xerces_1_1
_3.j
ar:/usr/local/jdk1.2.2//lib/tools.jar:

Starting Ant...
Buildfile: build.xml

init:
------------------- Apache Cocoon 2.0a2 [1999-2000] ----------------

prepare:

webapp:
    [mkdir] Created dir:
/home/httpd/html/xml_apache/cocoon-2/build/cocoon/webap
p
  [copydir] Copying 42 files to
/home/httpd/html/xml_apache/cocoon-2/build/cocoo
n/webapp
      [jar] Building jar:
/home/httpd/html/xml_apache/cocoon-2/build/cocoon/coco
on.war

BUILD SUCCESSFUL

Total time: 22 seconds
[root@zem cocoon-2]# cp build/cocoon/cocoon.war /home/httpd/webapps/
[root@zem cocoon-2]# /usr/local/jakarta-tomcat/bin/startup.sh -f
/home/httpd/con
f/server.xml






----------------------------------------------------------------------------
------
when i try to reach: http://zem.cornfile.local:8080/cocoon/
it works perfectly, since it is the index.html that is servered by tomcat 

when i try to reach an URL like: 
http://zem.cornfile.local:8080/xyz123 where xyz123 does not exist i get

>
>Error: 404
>
>Location: /cocoon/xyz123
>
>File Not Found
>/cocoon/xyz123 
>

!!! BUT: when i try to reach
http://zem.cornfile.local:8080/cocoon/[anypath/anyfilename].xml !!!
(its all the same if the path and the .xml-file DOES exist or not!) I get:
>
>Error: 404
>
>Location: /cocoon/webapp/docs/samples/samples.xml

No File Not Found!!!

which leads me to the conclusion that the first error comes from tomcat
(thats clearand 
the second one is generated by someone (Cocoon?) else ...

----------------------------------------------------------------------------
------
when i try to reach a non-.xml-file:
http://zem.cornfile.local:8080/cocoon/welcome
or http://zem.cornfile.local:8080/cocoon/[anypath/anyfile.anyext]

I get:

Cocoon 2.0a2: not initialized

Try to Reload

Class: org.apache.avalon.ConfigurationException
Message: Cannot load class org.apache.cocoon.components.image.JAIPNGEncoder
@ null

org.apache.avalon.ConfigurationException: Cannot load class
org.apache.cocoon.components.image.JAIPNGEncoder @ null
        at org.apache.cocoon.Cocoon.getClass(Cocoon.java:218)
        at org.apache.cocoon.Cocoon.setConfiguration(Cocoon.java:176)
        at org.apache.cocoon.Cocoon.(Cocoon.java:121)
        at org.apache.cocoon.Cocoon.(Cocoon.java:100)
        at
org.apache.cocoon.servlet.CocoonServlet.create(CocoonServlet.java:253)
        at org.apache.cocoon.servlet.CocoonServlet.init(CocoonServlet.java:75)
        at
org.apache.tomcat.core.ServletWrapper.initServlet(ServletWrapper.java:315)
        at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:445)
        at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
        at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:160)
        at
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338)
        at java.lang.Thread.run(Thread.java:475)


----------------------------------------------------------------------------
------

BTW: when I want to build the docs I get a Xerxes-Parser-Error

[root@zem cocoon-2]# ./build.sh docs

Cocoon Build System
-------------------

Building with classpath
lib/AvalonAware.jar:lib/ant.jar:lib/bsf.jar:lib/bsfengin
es.jar:lib/css.jar:lib/dom2.jar:lib/fop_0_14_1-dev.jar:lib/jakarta-regexp-1.
1.ja
r:lib/jstyle.jar:lib/rhino.jar:lib/servlet_2_2.jar:lib/ss_css2.jar:lib/style
book
-1.0-b2.jar:lib/svg-dom.jar:lib/svg.jar:lib/xalan_1_2_D01.jar:lib/xerces_1_1
_3.j
ar:/usr/local/jdk1.2.2//lib/tools.jar:

Starting Ant...
Buildfile: build.xml

init:
------------------- Apache Cocoon 2.0a2 [1999-2000] ----------------

prepare-docs:
  [replace] Replacing ./xdocs/dtd/ --> dtd/
  [replace] Replacing ./xdocs/dtd/ --> dtd/

docs:
    [mkdir] Created dir:
/home/httpd/html/xml_apache/cocoon-2/build/cocoon/docs
     [java] [StyleBook] Overriding targetDirectory="./build/cocoon/docs"
(Old=".
")
     [java] [StyleBook] Project URL: "sbk:/sources/book.xml"
     [java] [BasicEngine] Initializing
     [java] [Loader] Parsing Project file
     [java] [XalanProcessor] Applying XSL sheet
"sbk:/style/stylesheets/book2pro
ject.xsl"
     [java] [XalanProcessor] Applying XSL sheet
"sbk:/style/stylesheets/director
y2project.xsl"
     [java] [XercesParser] String index out of range: 125
     [java] org.apache.stylebook.CreationException: SAXException caught
while pa
rsing
     [java]     at
org.apache.stylebook.parsers.XercesParser.parse(XercesParser.
java:55)
     [java]     at
org.apache.stylebook.parsers.CachingParser.parse(CachingParse
r.java:92)
     [java]     at
org.apache.stylebook.parsers.AbstractParser.parse(AbstractPar
ser.java:28)
     [java]     at
org.apache.stylebook.producers.ParserProducer.produce(ParserP
roducer.java:26)
     [java]     at org.apache.stylebook.Project.processEntry(Project.java:110)
     [java]     at
org.apache.stylebook.Project.processNodeList(Project.java:54)
     [java]     at org.apache.stylebook.Project.<init>(Project.java:42)
     [java]     at org.apache.stylebook.Loader.load(Loader.java:57)
     [java]     at
org.apache.stylebook.StyleBook.getProject(StyleBook.java:124)
     [java]     at org.apache.stylebook.StyleBook.main(StyleBook.java:84)
     [java] [StyleBook] Caught org.apache.stylebook.LoadingException:
Processing
 Entry (SAXException caught while parsing)
     [java] [StyleBook] Error creating project
     [java] Java Result: 1

BUILD SUCCESSFUL

Total time: 32 seconds
[root@zem cocoon-2]#

Mime
View raw message