Solved

xercess problem

Posted on 2009-07-08
12
194 Views
Last Modified: 2013-11-23
hi all ,
when I'm trying  to install xercess I'm facing trouble would you please help me in that

[root@localhost xerces-2_9_1]# export PATH="/usr/share/java/bin":"/bin":"/sbin":"/opt/lampp/bin":$PATH;
[root@localhost xerces-2_9_1]# export JAVA_HOME="/usr/share/java";
[root@localhost xerces-2_9_1]# export JRE_HOME="/usr/share/java/jre";
[root@localhost xerces-2_9_1]# ./build.sh all

Xerces-Java Build System
------------------------

Building with classpath /usr/share/java/lib/tools.jar:/usr/share/java/lib/classes.zip:./tools/ant.jar:./tools/ant-nodeps.jar:./tools/xml-apis.jar:./tools/xercesImpl.jar:./tools/bin/xjavac.jar
Starting Ant...

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/tools/ant/Main
thanks in advance
best regards
hatem gamal
0
Comment
Question by:hatem_from_mesr
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 3
  • +1
12 Comments
 
LVL 20

Expert Comment

by:ChristoferDutz
ID: 24801705
You are missing apache Ant for building. Add the ant.jat to your classpath
0
 
LVL 20

Expert Comment

by:ChristoferDutz
ID: 24801721
I have just had a look ... normally there is a tools sub-directory and this contains Ant. as the reference to the libs are made by statements like "./tools/ant.jar" you can't call the build script from another directory. You have to change to the direactory and call "./build.sh all" from there.
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 24801737
Please post output of
ls -l ./tools/ant.jar
 
jar tf ./tools/ant.jar | grep Main

Open in new window

0
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

 

Author Comment

by:hatem_from_mesr
ID: 24801801
I added it but it's the same does it nead to be installed separately
[root@localhost xerces-2_9_1]#
export CLASSPATH=.:"/hatem/install/jsp_servlet/tomcat/tomcat/common/lib/servlet-api.jar":"/hatem/install/jsp_servlet/tomcat/tomcat/common/lib/mysql-connector-java-5.1.7-bin.jar":"/usr/share/java1.4.2/ant.jar";
[root@localhost xerces-2_9_1]# ./build.sh all

Xerces-Java Build System
------------------------

Building with classpath /usr/share/java/lib/tools.jar:/usr/share/java/lib/classes.zip:./tools/ant.jar:./tools/ant-nodeps.jar:./tools/xml-apis.jar:./tools/xercesImpl.jar:./tools/bin/xjavac.jar
Starting Ant...

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/tools/ant/Main
please help
best regards
hatem gamal
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 24801816
All  you've posted is what your posted before essentially and not what i asked you to post
0
 
LVL 92

Expert Comment

by:objects
ID: 24802035
Why are you building it?  There are binary distributions available, you only need to build from source if you want to change something.
0
 
LVL 92

Expert Comment

by:objects
ID: 24802137
To build it you need to have xerces tool installed as well as the source release
0
 

Author Comment

by:hatem_from_mesr
ID: 24802692
CEHJ,
>>>ls -l ./tools/ant.jar
 I don't have directory called tools

>>>>jar tf ./tools/ant.jar | grep Main
[root@localhost xerces-2_9_1]# jar tf ./tools/ant.jar | grep Main
java.io.FileNotFoundException: ./tools/ant.jar (No such file or directory)
        at java.io.FileInputStream.open(Native Method)
        at java.io.FileInputStream.<init>(FileInputStream.java:106)
        at java.io.FileInputStream.<init>(FileInputStream.java:66)
        at sun.tools.jar.Main.run(Main.java:185)
        at sun.tools.jar.Main.main(Main.java:904)
0
 
LVL 92

Expert Comment

by:objects
ID: 24802733
as I mentioned above you need to install xerces tools, you can download it where you got the source
0
 

Author Comment

by:hatem_from_mesr
ID: 24802742
hi all,
ant.jar is link to ant-1.6.5,jar there is no tools directory
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 24802832
>>I don't have directory called tools

Hence your problem. You need to have the tools jars in the classpath. What are you trying to do with xerces that you need to build it?
0
 
LVL 92

Accepted Solution

by:
objects earned 500 total points
ID: 24803028
> ant.jar is link to ant-1.6.5,jar there is no tools directory

for the 3rd time :) install xerces tools, its required to build from source
or just download the binary distribution thats already built for you
0

Featured Post

Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

Question has a verified solution.

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

In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

729 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