Solved

xercess problem

Posted on 2009-07-08
12
190 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
  • 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
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
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…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

830 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