You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by jo...@axis.com.au on 2001/06/05 02:09:11 UTC
XSP NoClassDefFound (but not sun/tools/javac/Main)
Hi,
There is something funny going on with my cocoon interpreter or
classloader... I am using an xsp page to format data, part of which is
creating a simple bean (so simple that all it has an empty constructor and a
single method that returns some xml... no explicit imports).
The page compiles correctly (so the class is found correctly during
compilation) but then when the page is executed, I get a
java.lang.NoClassDefFound error, referring to my test class.
java.lang.NoClassDefFoundError: framework/test/PretendEJB
at
_opt._www._websites._laetitia._html._test._unitprice._unit_price.populateDoc
ument(_unit_price.java:149)
at
org.apache.cocoon.processor.xsp.XSPPage.getDocument(XSPPage.java:97)
...
The snippet of xml that is causing the problem is:
<xsl:template match="unit-price-matrix2">
<xsp:logic>
framework.test.PretendEJB ejb = new framework.test.PretendEJB();
</xsp:logic>
<xsp:content select="unit-price-matrix">
<xsp:expr>
ejb.getXML()
</xsp:expr>
</xsp:content>
</xsl:template>
I am not sure that this will end up working as I expect, anyway, but not
finding the class is a bit of a showstopper. A JSP page in the same
directory works as expected. I would have thought that the servlet shared
the same class loader as the JSP engine.
Specs:
Cocoon 1.8.2
Tomcat 3.2.2
Apache 1.3.19
JDK 1.3.1
Linux 2.4.2-2 (Redhat 7.1)
--
| John J. Lehmann, johnl@axis.com.au
+ 31. During the service, play with plastic dinosaurs. If someone asks
+ what you're doing, tell them: "These are dinosaurs. They ruled the
+ earth over 65 million years ago."
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: XSP NoClassDefFound (but not sun/tools/javac/Main)
Posted by Frans Thamura <ft...@yahoo.com>.
I have a simple bean, and it is working..
Put your class in WEB-INF classes in cocoon directory, dont' put any other
place.
Frans
----- Original Message -----
From: "Donald Ball" <ba...@webslingerZ.com>
To: <co...@xml.apache.org>
Sent: Tuesday, June 05, 2001 11:42 PM
Subject: Re: XSP NoClassDefFound (but not sun/tools/javac/Main)
> On Tue, 5 Jun 2001 john.lehmann@axis.com.au wrote:
>
> > There is something funny going on with my cocoon interpreter or
> > classloader... I am using an xsp page to format data, part of which is
> > creating a simple bean (so simple that all it has an empty constructor
and a
> > single method that returns some xml... no explicit imports).
> >
> > The page compiles correctly (so the class is found correctly during
> > compilation) but then when the page is executed, I get a
> > java.lang.NoClassDefFound error, referring to my test class.
> >
> > java.lang.NoClassDefFoundError: framework/test/PretendEJB
> > at
> >
_opt._www._websites._laetitia._html._test._unitprice._unit_price.populateDoc
> > ument(_unit_price.java:149)
> > at
> > org.apache.cocoon.processor.xsp.XSPPage.getDocument(XSPPage.java:97)
> > ...
> >
> > The snippet of xml that is causing the problem is:
> >
> > <xsl:template match="unit-price-matrix2">
> > <xsp:logic>
> > framework.test.PretendEJB ejb = new framework.test.PretendEJB();
> > </xsp:logic>
> > <xsp:content select="unit-price-matrix">
> > <xsp:expr>
> > ejb.getXML()
> > </xsp:expr>
> > </xsp:content>
> > </xsl:template>
> >
> > I am not sure that this will end up working as I expect, anyway, but not
> > finding the class is a bit of a showstopper. A JSP page in the same
> > directory works as expected. I would have thought that the servlet
shared
> > the same class loader as the JSP engine.
> >
> > Specs:
> >
> > Cocoon 1.8.2
> > Tomcat 3.2.2
> > Apache 1.3.19
> > JDK 1.3.1
> > Linux 2.4.2-2 (Redhat 7.1)
>
> the xsp class loader is perhaps a bit broken. try putting your lib in the
> tomcat shared lib directory.
>
> - donald
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: XSP NoClassDefFound (but not sun/tools/javac/Main)
Posted by Donald Ball <ba...@webslingerZ.com>.
On Tue, 5 Jun 2001 john.lehmann@axis.com.au wrote:
> There is something funny going on with my cocoon interpreter or
> classloader... I am using an xsp page to format data, part of which is
> creating a simple bean (so simple that all it has an empty constructor and a
> single method that returns some xml... no explicit imports).
>
> The page compiles correctly (so the class is found correctly during
> compilation) but then when the page is executed, I get a
> java.lang.NoClassDefFound error, referring to my test class.
>
> java.lang.NoClassDefFoundError: framework/test/PretendEJB
> at
> _opt._www._websites._laetitia._html._test._unitprice._unit_price.populateDoc
> ument(_unit_price.java:149)
> at
> org.apache.cocoon.processor.xsp.XSPPage.getDocument(XSPPage.java:97)
> ...
>
> The snippet of xml that is causing the problem is:
>
> <xsl:template match="unit-price-matrix2">
> <xsp:logic>
> framework.test.PretendEJB ejb = new framework.test.PretendEJB();
> </xsp:logic>
> <xsp:content select="unit-price-matrix">
> <xsp:expr>
> ejb.getXML()
> </xsp:expr>
> </xsp:content>
> </xsl:template>
>
> I am not sure that this will end up working as I expect, anyway, but not
> finding the class is a bit of a showstopper. A JSP page in the same
> directory works as expected. I would have thought that the servlet shared
> the same class loader as the JSP engine.
>
> Specs:
>
> Cocoon 1.8.2
> Tomcat 3.2.2
> Apache 1.3.19
> JDK 1.3.1
> Linux 2.4.2-2 (Redhat 7.1)
the xsp class loader is perhaps a bit broken. try putting your lib in the
tomcat shared lib directory.
- donald
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>