wood burning stoves 2.0*
The moose likes Servlets and the fly likes BUILD CONFIG ERROR - in Tomcat's 'build' utility Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "BUILD CONFIG ERROR - in Tomcat Watch "BUILD CONFIG ERROR - in Tomcat New topic

BUILD CONFIG ERROR - in Tomcat's 'build' utility

maha anna
Ranch Hand

Joined: Jan 31, 2000
Posts: 1467
I am using Tomcat. The sample jsp and servlet examples come with it are working fine. I was going through the UserGuide and tried to use the 'build' tool in
C:\jakarta-tomcat\doc\appdev\sample directory. This 'build' tool is equivalent to 'makefile' which automatically recompiles the newer source files and copies the latest files to the deployment dir of the server.
I thought it is very good feature during development since we need not manually copy all the latest files to the corresponding deployment dir in the server. But when I tried 'build' at the command prompt in the above 'sample' dir, I am getting the following error.
'BUILD CONFIG ERROR' Can't open config file build.xml due to : org.xml.sax.SAXParseException. Attribute names must not start with "<" characters'
Anybody succeeded in the build? I have all the 5 jars in the classpath. (ant.jar ,jasper.jar, servlet.jar, xml.jar, webserver.jar). I didn't touch the build.xml or build.bat or the build file in the sample dir. Any idea what this error says about?
maha anna

[This message has been edited by maha anna (edited October 01, 2000).]
George Brown
Ranch Hand

Joined: Sep 26, 2000
Posts: 919
that build.xml file has a bug in it.
the first line is:

when it should be:

I had some other problems after that though, looks like the example is a bit dated...
maha anna
Ranch Hand

Joined: Jan 31, 2000
Posts: 1467
Thanks George. I changed the "/>" part. The build passed 1 level. Next "srcdir" not found error came. I figured out the 'lib' dir was not there in sample dir, but the .xml file tried to copy the '/sample/lib' dir to the deployment dir.
So I manually created a 'lib' dir in sample dir. Now I passed the 2nd level. Now comes the next error. The famous 'NoClassFoundError'. I know it is related with the classpath. But still trying how to setup the classpath in the build.xml file. Outside from the Dos prompt javac and java works. The build.xml file part which poses this
'NoClassFoundError sun/tools/javac/Main' error is

Do you remember what you did.
maha anna
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040

see if the tools.jar file is in your classpath or not.
Generally, it is in the JAVA_HOME\lib dir.
- satya

Take a Minute, Donate an Hour, Change a Life
maha anna
Ranch Hand

Joined: Jan 31, 2000
Posts: 1467
Thanks Satya. I just made it work and about to say to George. I did exactly what you said, edited autoexec.bat and put the c:\jdk1.2.2\lib\tools.jar file in the classpath. Now I am able to build,build all,build javadoc, build dist I like the 'ant' utility.
Just make 1 ***.war file of our web application by 'build dist' and upload to internet.

maha anna
[This message has been edited by maha anna (edited October 02, 2000).]
I agree. Here's the link: http://aspose.com/file-tools
subject: BUILD CONFIG ERROR - in Tomcat's 'build' utility
Similar Threads
problem using netbeans web application sample
Ant Undeploy Problem
wsjspc ant task
where to keep .jar file that is called in jsp page
standard CLASSPATH