You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Rick Tyler <ri...@ticketweb.com> on 2000/01/20 02:27:03 UTC
Help! NoClassDefFoundError: TXDocument
I have read all the documentation I have find and followed all
the instructions I have come across and tried every possible
experiment I can think of but Cocoon still isn't happening
for me.
When I try to load http://localhost/servlets/hello.xml (I copied
the hello.{xml|xsl} files from the cocoon\example\hello directory
into my htdocs), I get 500 Internal Server Error and the following
clues appear in my jserv.log:
[19/01/2000 17:02:24:217 PST] org.apache.cocoon.Cocoon: init
[19/01/2000 17:02:25:930 PST]
java.lang.NoClassDefFoundError:com/ibm/xml/parser/TXDocument
at com.kav.xml.DOMReader.createDocument(DOMReader.java)
at com.kav.xsl.ProcessorEnv.<init>(ProcessorEnv.java)
at com.kav.xsl.RuleProcessor.process(RuleProcessor.java,
Compiled Code)
at com.kav.xsl.RuleProcessor.process(RuleProcessor.java)
at com.kav.xsl.XSLProcessor.process(XSLProcessor.java)
at com.kav.xsl.XSLProcessor.process(XSLProcessor.java)
at
org.apache.cocoon.processor.XSLPProcessor.process(XSLPProcessor.java:83)
at org.apache.cocoon.Cocoon.service(Cocoon.java, Compiled Code)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
at
org.apache.jserv.JServConnection.processRequest(JServConnection.java:314)
at
org.apache.jserv.JServConnection.run(JServConnection.java:188)
at java.lang.Thread.run(Thread.java:479)
I am using:
NT 4.0 SP 6
JSDK 2.0
Apache 1.3.9
JServ 1.1b3
My jserv.properties DOES include the following, so please don't
respond by saying that I need to add these lines:
wrapper.classpath=c:\cocoon\bin\cocoon.jar
wrapper.classpath=c:\cocoon\bin\xslp.jar
wrapper.classpath=c:\cocoon\bin\openxml.jar
The .jar files I am using came with the Cocoon_1.1.tar.gz file
which means they may be somewhat old. Could that be the problem?
If so, how would I go about updating the .jar files to newer
versions? Given that the error I am seeing appears to involve
the xml parser, I obviously tried downloading the latest xmlopen
parser from IBM's web site. When I did this, the file arrived
as openxml-1.1.jar and I simply tried renaming it as openxml.jar,
in place of the older version. When I tried that, relaunched
Apache/JServ, and tried to reload hello.xml, I get different
(presumably lower level) errors in jserv.conf which lead me to
believe that my attempt at "upgrading" openxml.jar was not
successful:
[19/01/2000 17:24:02:564 PST] org.apache.cocoon.Cocoon: init
[19/01/2000 17:24:03:045 PST] java.lang.NoClassDefFoundError:
org/openxml/DOMFac
tory
at
org.apache.cocoon.parser.OpenXMLParser.parse(OpenXMLParser.java:69)
at org.apache.cocoon.Cocoon.service(Cocoon.java, Compiled Code)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
at
org.apache.jserv.JServConnection.processRequest(JServConnection.java:314)
at
org.apache.jserv.JServConnection.run(JServConnection.java:188)
at java.lang.Thread.run(Thread.java:479)
Any help would be much appreciated.
- RT
Re: Help! NoClassDefFoundError: TXDocument
Posted by Michael Glenn <mi...@mglenn.com>.
Rick Tyler wrote:
> I have read all the documentation I have find and followed all
> the instructions I have come across and tried every possible
> experiment I can think of but Cocoon still isn't happening
> for me.
>
> When I try to load http://localhost/servlets/hello.xml (I copied
> the hello.{xml|xsl} files from the cocoon\example\hello directory
> into my htdocs), I get 500 Internal Server Error and the following
> clues appear in my jserv.log:
>
> [19/01/2000 17:02:24:217 PST] org.apache.cocoon.Cocoon: init
> [19/01/2000 17:02:25:930 PST]
> java.lang.NoClassDefFoundError:com/ibm/xml/parser/TXDocument
> at com.kav.xml.DOMReader.createDocument(DOMReader.java)
[deletia]
I searched through Cocoon 1.5 and 1.6 source code, the Xerces source,
and the Xalan source but found no code references to TXDocument.
Do you know if you've enabled the IBM XML4J Parser in cocoon.properties?
That would require an additional .jar file from IBM's Alphaworks
http://www.alphaworks.ibm.com/ if this is enabled and you're using
Cocoon 1.5 or older.
>
> I am using:
>
> NT 4.0 SP 6
> JSDK 2.0
> Apache 1.3.9
> JServ 1.1b3
Which version of Cocoon are you running?
[deletia]
> The .jar files I am using came with the Cocoon_1.1.tar.gz file
> which means they may be somewhat old. Could that be the problem?
> If so, how would I go about updating the .jar files to newer
> versions?
If you have referenced the IBM parser, then it's a separate download.
Cocoon 1.1 is rather old. I would suggest giving a newer version a try.
I'm using 1.5 quite successfully but will upgrade to 1.6 very soon or
wait for 1.6.1, which will clear up a few minor problems.
Download from http://xml.apache.org/dist/ to update the default jar
files. Note that you Cocoon 1.5 and 1.6 have files within the single
.jar you download. If you're grabbing 1.6 I believe you'll also need
Xerces and possibly Xalan unless you choose to use Clark's XT XSLT
Processor. See http://xml.apache.org/cocoon/install.html
> ...Given that the error I am seeing appears to involve
> the xml parser, I obviously tried downloading the latest xmlopen
> parser from IBM's web site. When I did this, the file arrived
> as openxml-1.1.jar and I simply tried renaming it as openxml.jar,
> in place of the older version. When I tried that, relaunched
> Apache/JServ, and tried to reload hello.xml, I get different
> (presumably lower level) errors in jserv.conf which lead me to
> believe that my attempt at "upgrading" openxml.jar was not
> successful:
>
> [19/01/2000 17:24:02:564 PST] org.apache.cocoon.Cocoon: init
> [19/01/2000 17:24:03:045 PST] java.lang.NoClassDefFoundError:
> org/openxml/DOMFac
> tory
[deletia]
I don't believe the openxml parser is related to ibm's xml4j parser,
they may have just provided a link. Either way I upgraded to openxml 1.1
but encountered the same problem as classes such as DOMFactory had been
replaced. Rather then re-program my customer producers I simply put the
old openxml jar file back in place. I don't believe this is related to
your first problem.
One other thing to note, I don't see DOMFactory in the Xerces package.
I'll have to snoop but it looks like using that method has gone beyond
deprecated and was eliminated. We'll probably need to keep the old
OpenXML packages around, however you may want to list them after all
other required jars in the classpath to default to the updated classes.
I hope some of this helps. Cocoon, and XML for that matter is being
developed so fast using so many components that it's difficult to keep
all this straight.
--
Michael Glenn, http://www.mglenn.com
Principal and Web Architect
North 49 Design
http://www.north49design.com
Re: Help! NoClassDefFoundError: TXDocument
Posted by Michel Lehon <na...@hotmail.com>.
> > I guess the best you can do is
> >
> > 0°) Forget about your Cocoon 1.1 files
> > 1°) download Cocoon 1.6
>
> On xml.apache.org, under "Cocoon" / "Download", the only thing I see
> which appears to relate to Cocoon 1.6 is Cocoon-1.6.jar, which I tried
> downloading and using to replace my existing cocoon.jar, but that
> doesn't work. When I try that, I get:
>
> [20/01/2000 20:41:47:640] (ERROR) ajp12: Servlet Error:
> ClassNotFoundException: org.apache.cocoon.Cocoon
>
[snip solve this problem first]
Well this seems to be an old problem of the Cocoon distribution.
Cocoon-1.6.jar is NOT cocoon.jar
Cocoon-1.6.jar is the distribution file, you should unjar it (you can rename
it to .zip and unzip it).
You will get a lot of files in a nice directory structure, go to
docs/install.html to get further info for the installation process.
Michel.
Michel.Lehon@Outwares.com
Data Warehousing and Web enablement.