Solved

rt.jar?? what is this?

Posted on 2003-10-28
9
995 Views
Last Modified: 2012-08-14
i am running(testing) eclipse with my strust 1.1 but i found this error at the first place.

Exception during startup processing
java.lang.reflect.InvocationTargetException: java.lang.NoClassDefFoundError: org/xml/sax/helpers/DefaultHandler
      at java.lang.ClassLoader.defineClass0(Native Method)
      at java.lang.ClassLoader.defineClass(Unknown Source)
      at java.security.SecureClassLoader.defineClass(Unknown Source)
      at java.net.URLClassLoader.defineClass(Unknown Source)
      at java.net.URLClassLoader.access$100(Unknown Source)
      at java.net.URLClassLoader$1.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)

Then the ClassLoader.class come up from the IDE and telling me the Source Not Found. Then i click the Change Attached Source, then it's asking me to located the rt.jar.

But what is this rt.jar? If i am running eclipse 3.0 with Tomcat 4.1.27, can it be run? This is because most of the sample struts application i downloaded can not be run in this enviornment.

What do you think?
Thank you.
0
Comment
Question by:alorsetar2000
  • 5
  • 3
9 Comments
 
LVL 15

Accepted Solution

by:
dualsoul earned 150 total points
ID: 9633567
rt.jar - is the stands for run time :) it's the main library, which contains all classes from SDK.
ClassLoader - is the class, which loads classes from .class files.
in your case, you don't have JAXP package in your classpath (or even installed on system), so try to install it and add to your classpath
0
 
LVL 15

Expert Comment

by:dualsoul
ID: 9633575
you can download Xerces4J to get JAXP classes, for instance
0
 

Author Comment

by:alorsetar2000
ID: 9637914
how to set my classpath to point to my runtime?

in my system, i have already set this:

JAVA_HOME                    C:\jdk1.3.1_07
CLASSPATH                    C:\jt400\jt400.jar
CATALINA_HOME            C:\Program Files\Apache Group\Tomcat 4.1

is that i need to add this in?

CLASSPATH                     C:\jdk1.3.1_07  ??
0
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
LVL 19

Expert Comment

by:Kuldeepchaturvedi
ID: 9639472
You don't have to set your class path to your run time.. its already done when you specify JAVA_HOME parameter.
As dualsoul said above, you are missing JAXP package ( which is XML parser classes) in your system...  Go to http://xml.apache.org/xerces2-j/index.html and download xrecs to your system and try again..

Hope this helps
0
 
LVL 15

Expert Comment

by:dualsoul
ID: 9639728
if you want Xerces, to be installed standalone, somewhere on your file system, just set:

CLASSPATH=C:\jt400\jt400.jar;path_to_xerces_jar_file

but, i recommend you to download and install JAXP package from java.sun.com
0
 

Author Comment

by:alorsetar2000
ID: 9639841
dualsoul, i have downloaded the files you recomanded into C:\Xerces-J-bin.2.5.0\xerces-2_5_0

and i have set my classpath to point to that folder,
CLASSPATH   =C:\Xerces-J-bin.2.5.0\xerces-2_5_0

but i am still getting the problem.

Anyway, do you think you can provide me the link for this JAXP package location in the java.sun.com?

And this is the same error i am getting when i start my Tomcat appserver in eclipse environment
Exception during startup processing
java.lang.reflect.InvocationTargetException: java.lang.NoClassDefFoundError: org/xml/sax/helpers/DefaultHandler
      at java.lang.ClassLoader.defineClass0(Native Method)
      at java.lang.ClassLoader.defineClass(Unknown Source)
      at java.security.SecureClassLoader.defineClass(Unknown Source)
      at java.net.URLClassLoader.defineClass(Unknown Source)
      at java.net.URLClassLoader.access$100(Unknown Source)
      at java.net.URLClassLoader$1.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:941)
      at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:857)
      at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:941)
      at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:857)
      at java.lang.ClassLoader.loadClassInternal(Unknown Source)
      at org.apache.catalina.startup.Catalina.createStartDigester(Catalina.java:280)
      at org.apache.catalina.startup.Catalina.start(Catalina.java:441)
      at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
      at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)

But when I start my appserver OUTSIDE the eclipse, things are working just fine......
0
 
LVL 15

Expert Comment

by:dualsoul
ID: 9640060
>CLASSPATH   =C:\Xerces-J-bin.2.5.0\xerces-2_5_0
you should point classpath to .jar files, which contain classes you need, not directory
use some zip tool to view contens of .jar files, and find which contains org/xml/sax/helpers/DefaultHandler
or even better, include all .jar from your Xerces:

CLASSPATH   =C:\Xerces-J-bin.2.5.0\xerces-2_5_0\lib\some.jar;C:\Xerces-J-bin.2.5.0\xerces-2_5_0\lib\some2.jar
and so on...

Start search JAXP from here:
http://java.sun.com/xml/jaxp/index.html
0
 
LVL 15

Expert Comment

by:dualsoul
ID: 9640064
>But when I start my appserver OUTSIDE the eclipse, things are working just fine......

hm...may be eclipse ignore system CLASSPATH setting, and use it's own.
Try to search, where to set up CLASSPATH in Eclipse
0
 

Author Comment

by:alorsetar2000
ID: 9640142
OK....
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
jason format for rest webservices and sub resourcing 1 89
tomcat users xml 7 117
doubleChar java challenge 7 106
how to hide hide popup page refresh second time? 10 122
Learn how the use of a bunch of disparate tools requiring a lot of manual attention led to a series of unfortunate backup events for one company.
For months I had no idea how to 'discover' the IP address of the other end of a link (without asking someone who knows), and it drove me batty. Think about it. You can't use Cisco Discovery Protocol (CDP) because it's not implemented on the ASAs.…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

816 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now