Solved

xercess problem

Posted on 2009-07-08
12
185 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
This video teaches viewers about errors in exception handling.

919 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

21 Experts available now in Live!

Get 1:1 Help Now