You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@xml.apache.org by Szymon Drejewicz <dr...@idea.net.pl> on 2002/10/06 12:35:37 UTC

JasperException and ServletException

[ 1 ]

When I'm clicking "Visit" in SOAP-Admin I have java exception:
    javax.servlet.ServletException: Error allocating a servlet instance.
with root cause
    java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet.

[ 2 ]

When I'm clicking "Run>List" in SOAP-Admin, I have another exception:
     JasperException: javax/servlet/http/HttpServlet
with root cause
     javax.servlet.ServletException: javax/servlet/http/HttpServlet

[ 3 ]

- Windows 2000 with SP3 (working :-)
- Tomcat  4.1 (working)
- soap 2.3 (NOT working)
and
- cocoon 2.0.3 (working)
- bsf 2.2
- rhino 1.5R3

I have tested all of Tomcat's servlet examples and them work fine.

[ 4 ] I think that some of jar files are incompatibile with another. I'm
newbie to Java, so I don't know if am I right and how to solve it.

Szymon

ps. I need to write simple SOAP client in Java to comunicate with Cocoon,
but soap doesn't want to work. It is a part of my school project. We have
real working DB with students, their marks, payments and other information.
We want to use Cocoon to manage and generate HTML, PDF documents and we want
to use SOAP to comunicate with Cocoon.


--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>


Re: Jasper and Exception SOLVED PARTIALLY

Posted by Scott Nichol <sn...@scottnichol.com>.
soap.jar in %JAVA_HOME%\jre\lib\ext is a very bad idea.  This has been
the cause of problems for many, many people.  If you look at Tomcat's
class loader information at
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html,
you will find that jars in lib/ext are loaded by the bootstrap class
loader.  This creates problems because classes in soap.jar have
dependencies on classes, such as javax.http.HttpServlet, that need to be
loaded from loaders upstream in the class loader chain (that class is in
servlet.jar, which is handled by the common class loader).  I don't
pretend to know whether Tomcat implements its class loaders "correctly";
I just know what the docs say and what users are experiencing.

In the case of Apache SOAP, by putting soap.war in Tomcat's webapps
directory, Tomcat has access to all Apache SOAP classes (all those in
soap.jar and all samples).

You may also want to consult Sun's docs on the extension mechanism
http://java.sun.com/j2se/1.4/docs/guide/extensions/spec.html.  They
intend the lib\ext directory to be used for what used to be called
"standard extensions", basically jar files with javax.* classes.  It is
not a place to dump jars to avoid specifying them in your classpath.

Scott Nichol

----- Original Message -----
From: "Szymon Drejewicz" <dr...@idea.net.pl>
To: <so...@xml.apache.org>
Sent: Sunday, October 06, 2002 7:13 AM
Subject: Re: Jasper and Exception SOLVED PARTIALLY


> I have solved the problem by installing Sun's JWSDP (Java Web Services
> Development Pack 1.0.01). It consists Tomcat, Ant and others. After
that I
> have just installed soap 2.3 WAR file in %JWSDP%\webapps folder and
soap.jar
> in %JAVA_HOME%\jre\lib\ext.
>
> It is a partially solution because of I am not sure if JWSDP Tomcat
works
> exactly like standalone Tomcat. But for now I am happy.
>
> Szymon Drejewicz
>
>
> --
> To unsubscribe, e-mail:
<ma...@xml.apache.org>
> For additional commands, e-mail:
<ma...@xml.apache.org>
>
>


Re: Jasper and Exception SOLVED PARTIALLY

Posted by Scott Nichol <sn...@scottnichol.com>.
soap.jar in %JAVA_HOME%\jre\lib\ext is a very bad idea.  This has been
the cause of problems for many, many people.  If you look at Tomcat's
class loader information at
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html,
you will find that jars in lib/ext are loaded by the bootstrap class
loader.  This creates problems because classes in soap.jar have
dependencies on classes, such as javax.http.HttpServlet, that need to be
loaded from loaders upstream in the class loader chain (that class is in
servlet.jar, which is handled by the common class loader).  I don't
pretend to know whether Tomcat implements its class loaders "correctly";
I just know what the docs say and what users are experiencing.

In the case of Apache SOAP, by putting soap.war in Tomcat's webapps
directory, Tomcat has access to all Apache SOAP classes (all those in
soap.jar and all samples).

You may also want to consult Sun's docs on the extension mechanism
http://java.sun.com/j2se/1.4/docs/guide/extensions/spec.html.  They
intend the lib\ext directory to be used for what used to be called
"standard extensions", basically jar files with javax.* classes.  It is
not a place to dump jars to avoid specifying them in your classpath.

Scott Nichol

----- Original Message -----
From: "Szymon Drejewicz" <dr...@idea.net.pl>
To: <so...@xml.apache.org>
Sent: Sunday, October 06, 2002 7:13 AM
Subject: Re: Jasper and Exception SOLVED PARTIALLY


> I have solved the problem by installing Sun's JWSDP (Java Web Services
> Development Pack 1.0.01). It consists Tomcat, Ant and others. After
that I
> have just installed soap 2.3 WAR file in %JWSDP%\webapps folder and
soap.jar
> in %JAVA_HOME%\jre\lib\ext.
>
> It is a partially solution because of I am not sure if JWSDP Tomcat
works
> exactly like standalone Tomcat. But for now I am happy.
>
> Szymon Drejewicz
>
>
> --
> To unsubscribe, e-mail:
<ma...@xml.apache.org>
> For additional commands, e-mail:
<ma...@xml.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>


Re: Jasper and Exception SOLVED PARTIALLY

Posted by Szymon Drejewicz <dr...@idea.net.pl>.
I have solved the problem by installing Sun's JWSDP (Java Web Services
Development Pack 1.0.01). It consists Tomcat, Ant and others. After that I
have just installed soap 2.3 WAR file in %JWSDP%\webapps folder and soap.jar
in %JAVA_HOME%\jre\lib\ext.

It is a partially solution because of I am not sure if JWSDP Tomcat works
exactly like standalone Tomcat. But for now I am happy.

Szymon Drejewicz


--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>


Re: JasperException and ServletException

Posted by Scott Nichol <sn...@scottnichol.com>.
Also, be certain you do not have a copy of soap.jar in
%JAVA_HOME%/jre/lib/ext.

Scott Nichol

----- Original Message -----
From: "Scott Nichol" <sn...@scottnichol.com>
To: <so...@xml.apache.org>
Sent: Sunday, October 06, 2002 11:33 AM
Subject: Re: JasperException and ServletException


> What instructions did you follow to install Apache SOAP?  With Tomcat
4,
> the best instructions I know of are
>
http://cvs.apache.org/viewcvs.cgi/*checkout*/xml-soap/java/docs/install/
> tomcat.html?rev=1.13.  Pretty much all you do is drop soap.war into
> %TOMCAT_HOME%\webapps.  If you played around with any classpath in
> catalina.bat, I suggest you undo that change and try again.
>
> Scott Nichol
>
> ----- Original Message -----
> From: "Szymon Drejewicz" <dr...@idea.net.pl>
> To: <so...@xml.apache.org>
> Sent: Sunday, October 06, 2002 6:35 AM
> Subject: JasperException and ServletException
>
>
> > [ 1 ]
> >
> > When I'm clicking "Visit" in SOAP-Admin I have java exception:
> >     javax.servlet.ServletException: Error allocating a servlet
> instance.
> > with root cause
> >     java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet.
> >
> > [ 2 ]
> >
> > When I'm clicking "Run>List" in SOAP-Admin, I have another
exception:
> >      JasperException: javax/servlet/http/HttpServlet
> > with root cause
> >      javax.servlet.ServletException: javax/servlet/http/HttpServlet
> >
> > [ 3 ]
> >
> > - Windows 2000 with SP3 (working :-)
> > - Tomcat  4.1 (working)
> > - soap 2.3 (NOT working)
> > and
> > - cocoon 2.0.3 (working)
> > - bsf 2.2
> > - rhino 1.5R3
> >
> > I have tested all of Tomcat's servlet examples and them work fine.
> >
> > [ 4 ] I think that some of jar files are incompatibile with another.
> I'm
> > newbie to Java, so I don't know if am I right and how to solve it.
> >
> > Szymon
> >
> > ps. I need to write simple SOAP client in Java to comunicate with
> Cocoon,
> > but soap doesn't want to work. It is a part of my school project. We
> have
> > real working DB with students, their marks, payments and other
> information.
> > We want to use Cocoon to manage and generate HTML, PDF documents and
> we want
> > to use SOAP to comunicate with Cocoon.
> >
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@xml.apache.org>
> > For additional commands, e-mail:
> <ma...@xml.apache.org>
> >
> >
>
>
> --
> To unsubscribe, e-mail:
<ma...@xml.apache.org>
> For additional commands, e-mail:
<ma...@xml.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>


Re: JasperException and ServletException

Posted by Scott Nichol <sn...@scottnichol.com>.
Also, be certain you do not have a copy of soap.jar in
%JAVA_HOME%/jre/lib/ext.

Scott Nichol

----- Original Message -----
From: "Scott Nichol" <sn...@scottnichol.com>
To: <so...@xml.apache.org>
Sent: Sunday, October 06, 2002 11:33 AM
Subject: Re: JasperException and ServletException


> What instructions did you follow to install Apache SOAP?  With Tomcat
4,
> the best instructions I know of are
>
http://cvs.apache.org/viewcvs.cgi/*checkout*/xml-soap/java/docs/install/
> tomcat.html?rev=1.13.  Pretty much all you do is drop soap.war into
> %TOMCAT_HOME%\webapps.  If you played around with any classpath in
> catalina.bat, I suggest you undo that change and try again.
>
> Scott Nichol
>
> ----- Original Message -----
> From: "Szymon Drejewicz" <dr...@idea.net.pl>
> To: <so...@xml.apache.org>
> Sent: Sunday, October 06, 2002 6:35 AM
> Subject: JasperException and ServletException
>
>
> > [ 1 ]
> >
> > When I'm clicking "Visit" in SOAP-Admin I have java exception:
> >     javax.servlet.ServletException: Error allocating a servlet
> instance.
> > with root cause
> >     java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet.
> >
> > [ 2 ]
> >
> > When I'm clicking "Run>List" in SOAP-Admin, I have another
exception:
> >      JasperException: javax/servlet/http/HttpServlet
> > with root cause
> >      javax.servlet.ServletException: javax/servlet/http/HttpServlet
> >
> > [ 3 ]
> >
> > - Windows 2000 with SP3 (working :-)
> > - Tomcat  4.1 (working)
> > - soap 2.3 (NOT working)
> > and
> > - cocoon 2.0.3 (working)
> > - bsf 2.2
> > - rhino 1.5R3
> >
> > I have tested all of Tomcat's servlet examples and them work fine.
> >
> > [ 4 ] I think that some of jar files are incompatibile with another.
> I'm
> > newbie to Java, so I don't know if am I right and how to solve it.
> >
> > Szymon
> >
> > ps. I need to write simple SOAP client in Java to comunicate with
> Cocoon,
> > but soap doesn't want to work. It is a part of my school project. We
> have
> > real working DB with students, their marks, payments and other
> information.
> > We want to use Cocoon to manage and generate HTML, PDF documents and
> we want
> > to use SOAP to comunicate with Cocoon.
> >
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@xml.apache.org>
> > For additional commands, e-mail:
> <ma...@xml.apache.org>
> >
> >
>
>
> --
> To unsubscribe, e-mail:
<ma...@xml.apache.org>
> For additional commands, e-mail:
<ma...@xml.apache.org>
>
>


Re: JasperException and ServletException

Posted by Scott Nichol <sn...@scottnichol.com>.
What instructions did you follow to install Apache SOAP?  With Tomcat 4,
the best instructions I know of are
http://cvs.apache.org/viewcvs.cgi/*checkout*/xml-soap/java/docs/install/
tomcat.html?rev=1.13.  Pretty much all you do is drop soap.war into
%TOMCAT_HOME%\webapps.  If you played around with any classpath in
catalina.bat, I suggest you undo that change and try again.

Scott Nichol

----- Original Message -----
From: "Szymon Drejewicz" <dr...@idea.net.pl>
To: <so...@xml.apache.org>
Sent: Sunday, October 06, 2002 6:35 AM
Subject: JasperException and ServletException


> [ 1 ]
>
> When I'm clicking "Visit" in SOAP-Admin I have java exception:
>     javax.servlet.ServletException: Error allocating a servlet
instance.
> with root cause
>     java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet.
>
> [ 2 ]
>
> When I'm clicking "Run>List" in SOAP-Admin, I have another exception:
>      JasperException: javax/servlet/http/HttpServlet
> with root cause
>      javax.servlet.ServletException: javax/servlet/http/HttpServlet
>
> [ 3 ]
>
> - Windows 2000 with SP3 (working :-)
> - Tomcat  4.1 (working)
> - soap 2.3 (NOT working)
> and
> - cocoon 2.0.3 (working)
> - bsf 2.2
> - rhino 1.5R3
>
> I have tested all of Tomcat's servlet examples and them work fine.
>
> [ 4 ] I think that some of jar files are incompatibile with another.
I'm
> newbie to Java, so I don't know if am I right and how to solve it.
>
> Szymon
>
> ps. I need to write simple SOAP client in Java to comunicate with
Cocoon,
> but soap doesn't want to work. It is a part of my school project. We
have
> real working DB with students, their marks, payments and other
information.
> We want to use Cocoon to manage and generate HTML, PDF documents and
we want
> to use SOAP to comunicate with Cocoon.
>
>
> --
> To unsubscribe, e-mail:
<ma...@xml.apache.org>
> For additional commands, e-mail:
<ma...@xml.apache.org>
>
>


Re: Jasper and Exception SOLVED PARTIALLY

Posted by Szymon Drejewicz <dr...@idea.net.pl>.
I have solved the problem by installing Sun's JWSDP (Java Web Services
Development Pack 1.0.01). It consists Tomcat, Ant and others. After that I
have just installed soap 2.3 WAR file in %JWSDP%\webapps folder and soap.jar
in %JAVA_HOME%\jre\lib\ext.

It is a partially solution because of I am not sure if JWSDP Tomcat works
exactly like standalone Tomcat. But for now I am happy.

Szymon Drejewicz


Re: JasperException and ServletException

Posted by Scott Nichol <sn...@scottnichol.com>.
What instructions did you follow to install Apache SOAP?  With Tomcat 4,
the best instructions I know of are
http://cvs.apache.org/viewcvs.cgi/*checkout*/xml-soap/java/docs/install/
tomcat.html?rev=1.13.  Pretty much all you do is drop soap.war into
%TOMCAT_HOME%\webapps.  If you played around with any classpath in
catalina.bat, I suggest you undo that change and try again.

Scott Nichol

----- Original Message -----
From: "Szymon Drejewicz" <dr...@idea.net.pl>
To: <so...@xml.apache.org>
Sent: Sunday, October 06, 2002 6:35 AM
Subject: JasperException and ServletException


> [ 1 ]
>
> When I'm clicking "Visit" in SOAP-Admin I have java exception:
>     javax.servlet.ServletException: Error allocating a servlet
instance.
> with root cause
>     java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet.
>
> [ 2 ]
>
> When I'm clicking "Run>List" in SOAP-Admin, I have another exception:
>      JasperException: javax/servlet/http/HttpServlet
> with root cause
>      javax.servlet.ServletException: javax/servlet/http/HttpServlet
>
> [ 3 ]
>
> - Windows 2000 with SP3 (working :-)
> - Tomcat  4.1 (working)
> - soap 2.3 (NOT working)
> and
> - cocoon 2.0.3 (working)
> - bsf 2.2
> - rhino 1.5R3
>
> I have tested all of Tomcat's servlet examples and them work fine.
>
> [ 4 ] I think that some of jar files are incompatibile with another.
I'm
> newbie to Java, so I don't know if am I right and how to solve it.
>
> Szymon
>
> ps. I need to write simple SOAP client in Java to comunicate with
Cocoon,
> but soap doesn't want to work. It is a part of my school project. We
have
> real working DB with students, their marks, payments and other
information.
> We want to use Cocoon to manage and generate HTML, PDF documents and
we want
> to use SOAP to comunicate with Cocoon.
>
>
> --
> To unsubscribe, e-mail:
<ma...@xml.apache.org>
> For additional commands, e-mail:
<ma...@xml.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>