• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 1467
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
regds
maha anna

[This message has been edited by maha anna (edited October 01, 2000).]
 
Ranch Hand
Posts: 919
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 1467
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
regds
maha anna
 
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

maha:
see if the tools.jar file is in your classpath or not.
Generally, it is in the JAVA_HOME\lib dir.
HTH.
Regds.
- satya
 
maha anna
Ranch Hand
Posts: 1467
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

regds
maha anna
[This message has been edited by maha anna (edited October 02, 2000).]
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic