-
Tomcat and JAVA: No Class Def Found Error.
I implemented a Java Servlet to read data from a XML file. I am using Tomcat
4.0.1. When I am trying to execute the servlet it gave me the following error:
"java.lang.NoClassDefFoundError:com/sun/xml/tree/XmlDocument"
I have the same servlet implemented as Java Application and it runs properly.
But the servlet version using the same functions does not.
Can anyone help me on this? Thanks in advance.
-
Re: Tomcat and JAVA: No Class Def Found Error.
please try this
On Windows systems, if you have installed the JDK or Java 2 SDK in D:\java:
C:\> set PATH=D:\java\bin;%PATH%
C:\> set JAVA_HOME=D:\java
"Jose Rodz" <rodriguezj.orion@afwtf.navy.mil> wrote:
>
>I implemented a Java Servlet to read data from a XML file. I am using Tomcat
>4.0.1. When I am trying to execute the servlet it gave me the following
error:
>
>"java.lang.NoClassDefFoundError:com/sun/xml/tree/XmlDocument"
>
>I have the same servlet implemented as Java Application and it runs properly.
>But the servlet version using the same functions does not.
>
>Can anyone help me on this? Thanks in advance.
-
Re: Tomcat and JAVA: No Class Def Found Error.
Thanks...
I don't have problem with the other java classes. The PATH and JAVA HOME
variables are correctly set. The problem is with XMLDocument class that is
not standard class of JDK. This class is part of the XML.JAR file that I
downloaded. I set the CLASSPATH to include this JAR file and as a Java Standalone
Application it works properly. But when I implemented the class as a Servlet
it gave the error. In my opinion is that Tomcat does not have the path for
this JAR file. How I can define this path? Or where I can put the JAR file
so can it be accessed by Tomcat. Thanks in advance
"Ravi" <ravis@etlsys.com> wrote:
>
>please try this
>
> On Windows systems, if you have installed the JDK or Java 2 SDK in D:\java:
> C:\> set PATH=D:\java\bin;%PATH%
> C:\> set JAVA_HOME=D:\java
>
>
>
>
>
>
>"Jose Rodz" <rodriguezj.orion@afwtf.navy.mil> wrote:
>>
>>I implemented a Java Servlet to read data from a XML file. I am using Tomcat
>>4.0.1. When I am trying to execute the servlet it gave me the following
>error:
>>
>>"java.lang.NoClassDefFoundError:com/sun/xml/tree/XmlDocument"
>>
>>I have the same servlet implemented as Java Application and it runs properly.
>>But the servlet version using the same functions does not.
>>
>>Can anyone help me on this? Thanks in advance.
>
-
Re: Tomcat and JAVA: No Class Def Found Error.
I am trying to send you the info that you asked me, but it keep send me back
with an undeliverable message. I will try again later on.
"Ravi" <ravis@etlsys.com> wrote:
>
>please try this
>
> On Windows systems, if you have installed the JDK or Java 2 SDK in D:\java:
> C:\> set PATH=D:\java\bin;%PATH%
> C:\> set JAVA_HOME=D:\java
>
>
>
>
>
>
>"Jose Rodz" <rodriguezj.orion@afwtf.navy.mil> wrote:
>>
>>I implemented a Java Servlet to read data from a XML file. I am using Tomcat
>>4.0.1. When I am trying to execute the servlet it gave me the following
>error:
>>
>>"java.lang.NoClassDefFoundError:com/sun/xml/tree/XmlDocument"
>>
>>I have the same servlet implemented as Java Application and it runs properly.
>>But the servlet version using the same functions does not.
>>
>>Can anyone help me on this? Thanks in advance.
>
-
Re: Tomcat and JAVA: No Class Def Found Error.
Dear Jose
Thanks a lot for your efforts. Please check your mail.
"Jose Rodz" <rodriguezj.orion@afwtf.navy.mil> wrote:
>
>I am trying to send you the info that you asked me, but it keep send me
back
>with an undeliverable message. I will try again later on.
>"Ravi" <ravis@etlsys.com> wrote:
>>
>>please try this
>>
>> On Windows systems, if you have installed the JDK or Java 2 SDK in D:\java:
>> C:\> set PATH=D:\java\bin;%PATH%
>> C:\> set JAVA_HOME=D:\java
>>
>>
>>
>>
>>
>>
>>"Jose Rodz" <rodriguezj.orion@afwtf.navy.mil> wrote:
>>>
>>>I implemented a Java Servlet to read data from a XML file. I am using
Tomcat
>>>4.0.1. When I am trying to execute the servlet it gave me the following
>>error:
>>>
>>>"java.lang.NoClassDefFoundError:com/sun/xml/tree/XmlDocument"
>>>
>>>I have the same servlet implemented as Java Application and it runs properly.
>>>But the servlet version using the same functions does not.
>>>
>>>Can anyone help me on this? Thanks in advance.
>>
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks