Hi,

it seems like you've got to clean up your environment variables.

java.lang.NoClassDefFoundError generally means that the ClassLoader couldn't
find the correct jar files (ie the classpath is wrong).

Standard practice by java applications is set a JAVA_HOME variable which
points to the root directory of your installation.

On your machine it seems to be 'C:\java1.3.1_02.

However you also referenced a difference installation at the same
'C:/Program Files/JavaSoft/JRE/1.2.1_02. This isn't consistent.

Furthermore it is also general practice to set a TOMCAT_HOME when using
Tomcat. One well known trick with Tomcat is that it loads the jars in its
lib directory alphabetically, and different versions of a XML Parser
conflict. Usually you only use the Xerces parser, but this would be the last
one that gets loaded. It often helps to move it up the list by prefixing the
file name with a "A" for example. (Advanced users please cast a blind eye).

Please note, this kind of question has little relevance to this list. Please
consult docs about setting environment variables, the installation guide for
Tomcat, and the Tomcat users list first.

Hope I was of help

cheers

Ben

----- Original Message -----
From: "Irene Van Winkel" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Thursday, February 21, 2002 9:16 AM
Subject: RE: Tomcat4.02 and Addressbook example


> Hello,
>
> I'm still stuck with the Addressbook Example.
>
> I tried JWhich (neat program, thanks Mark!), and these are the results:
>
> Exception: javax.servlet.ServletException: Invoker service() exception
> JWhich found 'javax.servlet.ServletException in:
> 'C:/Tomcat/common/lib/servlet.jar!/javax/servlet/ServletException.class'
>
> Root cause: java.lang.NoClassDefFoundError:
> javax/xml/transform/TransformerException
> JWhich found 'javax/xml/transform/TransformerException in:
>
'C:/Xindice/java/lib/xalan-2.0.1.jar!javax/xml/transform/TransformerExceptio
> n.class'
>
> I have Xindice 1.0rc1 (DarkHorse) and Tomcat/4.0.2. Both jar files are
> 'official' tomcat and xindice files, surely I have the latest version? I
> found JAXP.jar, but it's still not working (Tomcat put that in the
> 'tomcat/common/lib/' directory.
>
> I wondered where java.lang.NoClassDefFoundError comes from, and JWhich
found
> it in 'C:/Program Files/JavaSoft/JRE/1.2.1_02/lib/rt.jar'. I wonder where
> JavaSoft comes from, I haven't knowingly installed this, and the date is
> different from the JDK installation date. I tried to rename the directory,
> but couldn't. So I put 'C:\java1.3.1_02\jre\lib\rt.jar' in the beginning
of
> my CLASSPATH, right after the '.'. But it still goes to 'C:/Program
> Files/JavaSoft/JRE/1.2.1_02/lib/rt.jar'. Could this be a problem? I guess
> the version is right, maybe the space in 'Program Files' screws thing up?
>
> Then maybe a very stupid question: I don't have any reference to java in
> CLASSPATH, only in PATH: 'C:\jdk1.3.1_02\bin', is that correct?
>
> Luckily it's time to pick up my daughter, and go to the playground. That
> keeps me from going insane ;)
>
> Greetings,
>
> Irene
>
> -----Original Message-----
> From: Mark J. Stang [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, February 20, 2002 3:17 PM
> To: [email protected]
> Subject: Re: Tomcat4.02 and Addressbook example
>
>
> Sounds like you don't have the "right" jar.   Either Tomcat has an older
one
> then Xindice needs or java does or it isn't there at all.
>
> Since the class isn't found, then that means that all of the jars that
java
> has
> and all the jars that tomcat has don't have your class.   So, while I am
> trying
> to explain how to figure this out, it occurred to me that I know where the
> file is.   There is a utility called JWhich.java that if you run it:
>
> java JWhich javax.xml.transform.TransformerException
>
> it will find the class in your classpath.   What do you do if you it isn't
> in
> your
> classpath?   Simplest way is to build a class path with every jar you have
> and then run JWhich against it.   That will tell you which jar you need.
> Turns
>
> out that my dbXML/Xindice environment runs, so it is in my classpath, so
> your problem is that jaxp.jar isn't in a classpath that tomcat is using!
> Tomcat
> has some directory to drop in third-party jars and it will automatically
add
> the
> jars
> to it.   I don't know the name of the directory, but put the JAXP.jar in
it
> :-).
>
> HTH,
>
> Mark
>
> Irene Van Winkel wrote:
>
> > Hello,
> >
> > I tried to do the Addressbook example as well, and got almost the same
> > error. When I add an address, and submit the data, I get an error page,
> but
> > the address information is put in the database. When I search, and the
> name
> > doesn't exist, there is no problem, but when the name exists, I get an
> > error. So I can access the database, write to the database, but the data
> > can't find its way back to the browser.
> >
> > This is the errormessage I get:
> >
> > Exception
> > javax.servlet.ServletException: Servlet execution threw an exception
> >   --lots of errors--
> >
> > Root cause
> > java.lang.NoClassDefFoundError: javax/xml/transform/TransformerException
> >   --lots of errors--
> >
> > Does this mean a servlet couldn't be executed because I'm missing a
class?
> > I'm just starting with JAVA, JSP and Servlets, can somebody point me out
> > where to look? I think the rest of the errormessages where the same as
> > Jane's.
> >
> > Thanks,
> >
> > Irene
> >
> > -----Original Message-----
> > From: Jane Riese [mailto:[EMAIL PROTECTED]
> > Sent: Friday, February 15, 2002 3:29 AM
> > To: [email protected]
> > Subject: Tomcat4.02 and Addressbook example
> >
> > I downloaded Xindice yesterday and Tomcat4.02 and have been trying to
> > get the Addressbook example to work. The index page appears, but when
> > I try to list contacts ( I placed the address docs in the database
> > collection /db/addressbook using
> > the command-line tool) I get the error listed below. I also cannot add a
> > contact.
> > I thought I faithfully followed all the steps in the README.
> >
> > I have this working on earlier
> > versions of dbXML and tomcat3.2.
> >
> > Has anyone run into this error? Are there any steps I am forgetting
> > to allow Tomcat to find Xindice - in some config file or some corba
> > setup?
> >
> > Thanks for your help.
> >
> > Jane Riese
> >
>

Reply via email to