Solved

xercess problem

Posted on 2009-07-08
12
183 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
 

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
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
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 will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
The viewer will learn how to implement Singleton Design Pattern in Java.

746 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