I am having problem in building server.jar file using Ant. I am using EJB jar file in my web application, this jar file is called remotely from server to client. Client.jar file working correctly but the server.jar file contains error which is given below:
15:30:47,296 WARN [verifier] EJB spec violation:
Bean : Server
Section: 22.2
Warning: The Bean Provider must specify the fully-qualified name of the Java cla
ss that implements the enterprise bean's business methods in the <ejb-class> ele
ment.
Info : Class not found on 'com.ejb.ServerBean': No ClassLoaders found for: com.ejb.ServerBean
15:30:47,296 ERROR [MainDeployer] Could not create deployment: file:/C:/jboss-4.0.4.GA/server/default/deploy/server.jar
org.jboss.deployment.DeploymentException: Verification of Enterprise Beans failed, see above for error messages.
In above error, "Class not found on 'com.ejb.ServerBean' " is given. Will there be all the classes of EJB jar file in server.jar ? I think only the interface class file i.e. Server.class and serverHome.class must be included, am I correct or not?
Also the build.xml which I am using for creating server.jar is given below:
<project name="ServerEJB" default="make_server_jar" basedir=".">
<!-- Initialization variables -->
<property environment="env" />
<property name="app.name" value="${ant.project.name}"/>
<property name="source.dir" value="ejbModule"/>
<property name="build.dir" value="build"/>
<property name="classes.dir" value="${build.dir}/classes"/>
<property name="distribution.dir" value="dist"/>
<property name="server.ejb.jar.name" value="server.jar"/>
<target name="clean" description="Deletes compiled and generated code">
<delete dir="${build.dir}"/>
</target>
<target name="make_server_jar" depends="" description="Builds a server.jar with stubs for apps to use">
<mkdir dir="${distribution.dir}" />
<jar destfile="${distribution.dir}/${server.ejb.jar.name}" basedir="${classes.dir}">
<exclude name="**/*Bean.class"/>
</jar>
</target>
</project>
--------------------------------------------------------------------------------
I am using server.jar file in server as interface which will remotely call client.jar which will be kept at client location.
Anybody, can you provide me with the solution for this problem?...
Thank you.
[Message sent by forum member 'nicenepal' (nicenepal)]
http://forums.java.net/jive/thread.jspa?messageID=274205