• 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
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

Help me

 
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello everybody,
I am new to ejb, i am using ant to deploy my bean into weblogic container, but i get some error when i try to execute
ant all
since some tags in build.xml has to b changed.
But i am unaware of how to change.
Kindly help me.
the folder i have kept my files is
C:\first
which has 2 folders
1 build
2 dist
3 src
4 build.xml
3.In src folder
3.a
C:\first\src\com\smitha\Hello\ejb folder
where i have kept my beans
Hello.java - Remote Interface
HelloBean.java - Bean
HelloHome.java - Home Interface
3.b
C:\first\src\com\smitha\Hello\ejb\META-INF folder
ejb-jar.xml
weblogic-ejb-jar.xml

4.build.xml
has the following
<project name="first" default="all" basedir=".">
<property name="hw.ejb.dir" value="${basedir}/src/com/smitha/Hello"/>
<property name="hw.dir" value="${basedir}/src/com/smitha/Hello"/>

<!-- Hello start -->
<property name="Hello.ejbjar.name" value="SSP_DS_Hello"/>
<property name="Hello.descriptor.dir" value="${hw.ejb.dir}/ejb/META-INF"/>
<property name="Hello.client.dir" value="${hw.dir}/Hello/client"/>
<!-- Hello end -->

<property name="ear.name" value="${ant.project.name}"/>
<property name="source.dir" value="${basedir}/src"/>
<property name="build.classes.dir" value="${basedir}/build/classes"/>
<property name="lib.dir" value="${basedir}/../../Common/lib"/>
<property name="common.lib.dir" value="${basedir}/../Common/lib"/>
<property name="common.dist.dir" value="${basedir}/../Common/dist"/>
<property name="dist.dir" value="${basedir}/dist"/>

<target name="clean">
<echo message="========================================="/>
<echo message=" Cleansing ${ant.project.name} "/>
<echo message="========================================="/>
<delete file="${dist.dir}/${Hello.ejbjar.name}.jar"/>
<delete file="${dist.dir}/${Hello.ejbjar.name}_Client.jar"/>
<delete file="${dist.dir}/${admin.ejbjar.name}.jar"/>
<delete file="${dist.dir}/${admin.ejbjar.name}_Client.jar"/>
<delete file="${dist.dir}/${ear.name}.ear"/>
<delete dir="${build.classes.dir}"/>
</target>

<path id="classpath_id">
<pathelement location="${build.classes.dir}"/>
<fileset dir="${common.lib.dir}">
<include name="*.jar"/>
</fileset>
</path>
<target name="all" depends="clean, hw-ejb-jar"/>

<target name="banner">
<echo message="========================================================== "/>
<echo message=" Lookup Build Script "/>
<echo message="========================================================== "/>
<echo message="Use 'ant' or 'ant all' rebuild the SSPLookup kit "/>
<echo message="Use 'ant clean' to clean intermediate files "/>
<echo message="Use 'ant lookup-client-jar' to rebuild Lookup EJB client files "/>
<echo message="Use 'ant client' to rebuild lookup/client files "/>
<echo message="========================================================== "/>
</target>
<target name="init" depends="banner">
<echo message="========================================="/>
<echo message=" Preparing ${ant.project.name} "/>
<echo message="========================================="/>
<tstamp/>
<mkdir dir="${build.classes.dir}"/>
<mkdir dir="${dist.dir}"/>
<property name="classpath" refId="classpath_id"/>
<echo message="Using Classpath: ${classpath}" />
</target>

<!-- Hello start -->
<target name="hw-compile" depends="init">
<echo message="========================================="/>
<echo message=" Compiling ${ant.project.name} files "/>
<echo message="========================================="/>
<javac srcdir="${source.dir}"
destdir="${build.classes.dir}"
classpath="${classpath}"
includes="**/Hello/ejb/*.java,**/Hello/client/*.java"/>
</target>

<target name="hw-client-jar" depends="hw-compile">
<echo message="========================================="/>
<echo message="Packaging SSP_DS_Hello_Client.jar"/>
<echo message="========================================="/>
<jar jarfile="${dist.dir}/${Hello.ejbjar.name}_Client.jar">
<fileset dir="${build.classes.dir}">
<include name="**/*Hello.class"/>
<include name="**/*HelloHome.class"/>
</fileset>
</jar>
<echo message="hw-hello-client-jar done"/>
</target>

<target name="hw-ejb-jar" depends="hw-client-jar" >
<echo message="========================================="/>
<echo message=" Building ${ant.project.name} EJB jar "/>
<echo message="========================================="/>
<ejbjar srcdir="${build.classes.dir}"
basejarname="${Hello.ejbjar.name}"
descriptordir="${Hello.descriptor.dir}"
manifest="${Hello.descriptor.dir}/MANIFEST.MF">
<weblogic destdir="${dist.dir}"
wlclasspath="${common.lib.dir}/weblogic.jar:${common.dist.dir}/SSP_DS_Common.jar"
classpath="${classpath}"
ejbcclass="weblogic.ejbc"/>
<support dir="${build.classes.dir}">
<include name="**/Hello/*.class"/>
<include name="**/Hello/ejb/*.class"/>
</support>
<include name="**/ejb-jar.xml"/>
<exclude name="**/weblogic-ejb-jar.xml"/>
</ejbjar>
</target>
<!-- Hello end -->
</project>
 
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And the error you are seeing is...?
 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please paste the error here so that we can analyze it and tell u what might have probably gone wrong
 
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Definitely having the error would help to solve the problem. Maybe include the version of ant which you are using as well.
I thought at first it was odd that you have an empty target as your default and do all of the work via depends, but a simple test shows that is not the issue.
 
author and iconoclast
Posts: 24204
44
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not sure where this goes, but it don't go here. I'm moving this to the "Ant, Mavan, and Other Build Tools" forum for now.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic