ANT & Building an EJB with the JAR task: ClassNotFoundException
Just a quick note. I was trying to build my EJB using ANT and the JAR task and when it ran, I was getting ClassNotFoundExceptions for my utility jars that should have been on the classpath.
<jar jarfile="${ejb-classes.dir}/EJB.jar"
basedir="${ejb-classes.dir}"" />
The reason is that the manifest file that existed in the directory was being overwritten by ANT. You need to specify the
manifest
attribute:
<jar jarfile="${ejb-classes.dir}/LoggingEJB.jar"
basedir="${ejb-classes.dir}"
manifest="${ejb-classes.dir}/META-INF/MANIFEST.MF" />
Related Posts
- WebSphere 6.1 and Jakarta Commons Logging (JCL) using Log4J in an EJB
- IBM Client Application For JMS - Put JMS messages in queues
- How to emit a Common Base Event in Java
- XML Schema (XSD) to Database Definition Language (DDL) Generator?
- Rational Application Developer Web Project Basic Authentication Configuration: Security Editor
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply