nikhilkumar
IS-IT--Management
I am trying to invoke an EJB. I do the standard classpath with fileset set to root, and then provide a path to the EJB in the include.
However when I try to comiple the servlet it still gives me a problem..
The classpath: <!-- The compile classpath --> <path id="compile.classpath"> <fileset dir="${dir.base.src}"> <include name="lib/**/*.jar"/> </fileset> <fileset dir="${dir.base.src}"> <include name="com/aptsi/applications/**/*.class"/> <include name="com/aptsi/applications/tsm/ejb/**/*.class"/> </fileset> </path>
<javac srcdir="${web.dir}" destdir="${dir.assemble.warclass}" debug="on" deprecation="on" optimize="off" classpathref="compile.classpath"> </javac>
The properties: dir.src=./src/java/com/aptsi/ dir.lib=src/java/lib dir.buildroot=./build dir.build=${dir.buildroot}/classes dir.build.common=${dir.build}/common dir.build.ejb=${dir.build}/ejb
dir.assemble=${dir.buildroot}/assemble earDir=${dir.assemble}/ear warDir=${dir.assemble}/war ejbDir=${dir.assemble}/ejb jarDir=${dir.assemble}/jars earAppDDDir=${earDir}/META-INF/ dir.assemble.warclass=${warDir}/WEB-INF/classes
dir.dist=dist dir.deploydir=C:/aptsi_home/jboss/jboss-3.2.3/server/default/deploy
applicationName=tsm application.dir=${dir.src}applications/${applicationName} dirs.base=${basedir} java.dir=${basedir}/aptsi
warclassdir=${application.dir}/web/WEB-INF/classes libdir=${application.dir}/web/WEB-INF/lib appDDDir=${application.dir}/META-INF/ warDD=${application.dir}/web/WEB-INF web.dir=${application.dir}/web app-src.dir=com/aptsi/applications/${applicationName} ejb.dir=${application.dir}/ejb common.dir=${application.dir}/common
warFile=${applicationName}.war earFile=${applicationName}.ear jarFile=${applicationName}.jar
dir.base.src=src/java
The buildwar target: <!-- Create the War File --> <target name="buildwar" depends="prepare"> <javac srcdir="${web.dir}" destdir="${dir.assemble.warclass}" debug="on" deprecation="on" optimize="off" classpathref="compile.classpath"> </javac> <copy todir="${warDir}/WEB-INF"> <fileset dir="${warDD}" includes="web.xml" /> </copy> <copy todir="${warDir}"> <fileset dir="${web.dir}" includes="**/*.*" /> </copy> <copy todir="${warDir}/WEB-INF/classes"> <fileset dir="${warclassdir}" includes="**/*.class" /> </copy> <copy todir="${warDir}/WEB-INF/lib"> <fileset dir="${libdir}" includes="**/aptsi.jar" /> </copy> <!-- create war file and place in ear directory --> <jar jarfile="${earDir}/${warFile}" basedir="${warDir}" /> </target>
The error message: buildwar: [javac] Compiling 1 source file to C:\ATSI\Clients\ApTSi\TestingService\demo\testapp\Dev\dev\build\assemble\war\WEB- INF\classes [javac] C:\ATSI\Clients\ApTSi\TestingService\demo\testapp\Dev\dev\src\java\com\aptsi\applications\tsm\web\servlets\f rontcontroller\RegLogout.java:16: package com.aptsi.applications.tsm.ejb does not exist [javac] import com.aptsi.applications.tsm.ejb.*; [javac] ^ [javac] 1 error
However when I try to comiple the servlet it still gives me a problem..
The classpath: <!-- The compile classpath --> <path id="compile.classpath"> <fileset dir="${dir.base.src}"> <include name="lib/**/*.jar"/> </fileset> <fileset dir="${dir.base.src}"> <include name="com/aptsi/applications/**/*.class"/> <include name="com/aptsi/applications/tsm/ejb/**/*.class"/> </fileset> </path>
<javac srcdir="${web.dir}" destdir="${dir.assemble.warclass}" debug="on" deprecation="on" optimize="off" classpathref="compile.classpath"> </javac>
The properties: dir.src=./src/java/com/aptsi/ dir.lib=src/java/lib dir.buildroot=./build dir.build=${dir.buildroot}/classes dir.build.common=${dir.build}/common dir.build.ejb=${dir.build}/ejb
dir.assemble=${dir.buildroot}/assemble earDir=${dir.assemble}/ear warDir=${dir.assemble}/war ejbDir=${dir.assemble}/ejb jarDir=${dir.assemble}/jars earAppDDDir=${earDir}/META-INF/ dir.assemble.warclass=${warDir}/WEB-INF/classes
dir.dist=dist dir.deploydir=C:/aptsi_home/jboss/jboss-3.2.3/server/default/deploy
applicationName=tsm application.dir=${dir.src}applications/${applicationName} dirs.base=${basedir} java.dir=${basedir}/aptsi
warclassdir=${application.dir}/web/WEB-INF/classes libdir=${application.dir}/web/WEB-INF/lib appDDDir=${application.dir}/META-INF/ warDD=${application.dir}/web/WEB-INF web.dir=${application.dir}/web app-src.dir=com/aptsi/applications/${applicationName} ejb.dir=${application.dir}/ejb common.dir=${application.dir}/common
warFile=${applicationName}.war earFile=${applicationName}.ear jarFile=${applicationName}.jar
dir.base.src=src/java
The buildwar target: <!-- Create the War File --> <target name="buildwar" depends="prepare"> <javac srcdir="${web.dir}" destdir="${dir.assemble.warclass}" debug="on" deprecation="on" optimize="off" classpathref="compile.classpath"> </javac> <copy todir="${warDir}/WEB-INF"> <fileset dir="${warDD}" includes="web.xml" /> </copy> <copy todir="${warDir}"> <fileset dir="${web.dir}" includes="**/*.*" /> </copy> <copy todir="${warDir}/WEB-INF/classes"> <fileset dir="${warclassdir}" includes="**/*.class" /> </copy> <copy todir="${warDir}/WEB-INF/lib"> <fileset dir="${libdir}" includes="**/aptsi.jar" /> </copy> <!-- create war file and place in ear directory --> <jar jarfile="${earDir}/${warFile}" basedir="${warDir}" /> </target>
The error message: buildwar: [javac] Compiling 1 source file to C:\ATSI\Clients\ApTSi\TestingService\demo\testapp\Dev\dev\build\assemble\war\WEB- INF\classes [javac] C:\ATSI\Clients\ApTSi\TestingService\demo\testapp\Dev\dev\src\java\com\aptsi\applications\tsm\web\servlets\f rontcontroller\RegLogout.java:16: package com.aptsi.applications.tsm.ejb does not exist [javac] import com.aptsi.applications.tsm.ejb.*; [javac] ^ [javac] 1 error