WebSphere Application Server - [ANT] Problems generating an ear with ant outside wsad

This is Interesting: Free IT Magazines  
Home > Archive > WebSphere Application Server > May 2004 > [ANT] Problems generating an ear with ant outside wsad





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author [ANT] Problems generating an ear with ant outside wsad
Katerine

2004-05-27, 4:34 pm

Hi all, it's still me coming with new "ant" problems,

Since fix packs seem to be unavailable for WSAD (5.1.1), i gave up the
idea to build my ear (and generate deploy code) outside WSAD using the
baseV5 test server embedded with WSAD and not in the headles mode.

However I managed to write and run a script that works with a WAS
5.0.2 installed on a Win2000 platform. Well, when i say "that works",
i mean that the build is successful but i can't have the ear run under
my server.

First, I noticed that the build only works if the server is stopped,
unless I have some rt.jar not found exception (!) or other (very)
strange exception.

If i stop the server then the build go til the end. My build process
contains a WsEjbDeploy task, this should generate the stub and
skeletons classes , i think it does but it also generates strange java
file which are not compiled in the output jar! For example in the ejb
directory of a bean called Soucription I have:

EJSLocalStatelessSouscriptionHome_408b06
5e.java <---
EJSLocalStatelessSouscription_408b065e.java
EJSRemoteStatelessSouscriptionHome_12ae2
a92.class
EJSRemoteStatelessSouscriptionHome_408b0
65e.java <---
EJSRemoteStatelessSouscription_12ae2a92.class
EJSRemoteStatelessSouscription_408b065e.java <---
EJSStatelessSouscriptionHomeBean_12ae2a9
2.class
EJSStatelessSouscriptionHomeBean_408b065
e.java <---
Souscription.class
EJSLocalStatelessSouscriptionHome_408b06
5e.java <---
EJSLocalStatelessSouscription_408b065e.java <---
EJSRemoteStatelessSouscriptionHome_12ae2
a92.class
EJSRemoteStatelessSouscriptionHome_408b0
65e.java <---
EJSRemoteStatelessSouscription_12ae2a92.class
EJSRemoteStatelessSouscription_408b065e.java <---
EJSStatelessSouscriptionHomeBean_12ae2a9
2.class
EJSStatelessSouscriptionHomeBean_408b065
e.java <---
Souscription.class



Well why not after all...

Why not? Here is what WAS tells me when I want to start the
application (in the SystemOut.log):

/05/04 17:59:23:431 CEST] 64de46c8 BeanMetaData E CNTR0075E: La
classe fournie par l'utilisateur
"com.enterprise.appli.engine.souscription.ejb. EJSStatelessSouscriptionHomeBean_408b065
e"
demandée par le bean enterprise n'a pas pu être détectée ou chargée.
[26/05/04 17:59:23:501 CEST] 64de46c8 EJBContainerI E WSVR0209E:
Impossible de préparer le jar EJB appliEJB.jar [class
com.ibm.ws.runtime.component.DeployedModuleImpl], bean enterprise
com.ibm.etools.ejb.impl.SessionImpl(Souscription) (transactionType:
Bean, sessionType: Stateless)
java.lang.ClassNotFoundException:
com.enterprise.appli.engine.souscription.ejb. EJSStatelessSouscriptionHomeBean_408b065
e
at com.ibm.ws.classloader.CompoundClassLoader.findClass(CompoundClassLoader.java(Compiled
Code))
at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java(Compiled
Code))
at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code))
at com.ibm.ws.classloader.ReloadableClassLoader.loadClass(ReloadableClassLoader.java:76)
....



What can I do, delete the Java file, ok... still get the same error...
the problem is that wsejbdeploy task output is a jar file I can't
compile Java files that are inside...?
But the real problem is rather the fact that IBM gave no instructions
to use these "wsanttask", no doc or examples are available, my ant
script works but is it the correct sequence, no idea... Here is the
sequence of task i use in my build file, is someone able to help me
???

<target name="ejbCompile" description="Compiles the ejb classes before
deployment code generation" depends="init">
<javac srcdir="${ejb.src}"
excludes="META-INF/** , org/**"
destdir="${classes.ejb}"
classpathref="appli.ejb.classpath"/>
</target>

<target name="ejbJar" description="Jars the ejb module"
depends="ejbCompile">
<copy todir="${classes.ejb}/properties">
<fileset dir="${ejb.src}/properties"/>
</copy>
<copy todir="${classes.ejb}/META-INF">
<fileset dir="${ejb.src}/META-INF"/>
</copy>
<jar jarfile="${output.dir}/${project.ejb}-nodeploy.jar"
basedir="${classes.ejb}" manifest="${ejb.src}/META-INF/MANIFEST.MF">
</jar>
</target>

<target name="ejbDeploy" description="Generates ejb deployment code "
depends="ejbJar">
<taskdef name="wsejbdeploy"
classname="com.ibm.websphere.ant.tasks.WsEjbDeploy" />
<wsejbdeploy
inputJar="${output.dir}/${project.ejb}-nodeploy.jar"
workingDirectory="${temp.dir.deploy}"
outputJar="${output.dir}/${project.ejb}.jar"
classpathref="s3p.ejb.classpath"
codegen="${codegen}"
keepGenerated="${keepGenerated}"
quiet="${quiet}"
noValidate="${noValidate}"
noWarnings="${noWarnings}"
noInform="${noInform}"
trace="${trace}"
failonerror="${failonerror}"
/>
</target>

</project>

thanx a lot...
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com