ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "KULKARNI, VIKRAM" <vikram.kulka...@hp.com>
Subject RE: running Weblogic ejbgen and ejbc: dependency on preshipped Ant version
Date Mon, 12 Jul 2004 12:51:57 GMT
I don't set it at all. When using ant1.5.3, although it complains about it; it goes on and
runs the task successfully.
Now, if i set my path not to point to preshipped weblogic's ant.bat and instead make it to
point to my independent weblogic installation's ant.bat, it complains the same way and additionally
complains about weblogic/utils/FileUtils.

I learnt that this message "weblogic.home not defined, compilation may not find weblogic classes"
could be iggnored.

-Vikram

-----Original Message-----
From: Jan.Materne@rzf.fin-nrw.de [mailto:Jan.Materne@rzf.fin-nrw.de]
Sent: Monday, July 12, 2004 6:16 PM
To: user@ant.apache.org
Subject: AW: running Weblogic ejbgen and ejbc: dependency on preshipped
Ant version


   [ejbGen] weblogic.home not defined, compilation may not find weblogic
classes

Where do you set this value?


Jan


> -----Urspr√ľngliche Nachricht-----
> Von: KULKARNI, VIKRAM [mailto:vikram.kulkarni@hp.com]
> Gesendet am: Montag, 12. Juli 2004 14:43
> An: user@ant.apache.org
> Betreff: running Weblogic ejbgen and ejbc: dependency on 
> preshipped Ant
> version
> 
> Hi ant-users,
>   I'm using Apache Ant version 1.5.3 compiled on August 13 
> 2003 which comes preshipped with Weblogic 8.1
> I have the following task to perform ejbgen which is a 
> weblogic specific task to generate EJB sources. I then use 
> the ejbc task to compile and create EJB jar file out of the sources.
> 
> Unfortunately, these task only works with Ant version 1.5.3 
> which comes preshipped with Weblogic (bea\weblogic81\server\bin)
> I'm unable to make the same tasks to work using ant 
> 1.6.1(independent ant installation). ant is unable load the 
> classes and complains as shown below:
> 
> ejbgen:
>      [echo] Building to temporary directory 
> D:\BeaProjects\smartER\build/wlw_sma
> rtEREJB_build...
>      [echo] Running EJBGen...
>      [echo] Using EJBC CLASSPATH      = 
> D:\bea\weblogic81\common\lib\log4j.jar;D
> :\bea\weblogic81\server\lib\weblogic.jar;D:\bea\weblogic81\wor
> kshop\extensions\w
> ls.jar
>    [ejbGen] weblogic.home not defined, compilation may not 
> find weblogic classes
> 
> 
> BUILD FAILED
> java.lang.NoClassDefFoundError: weblogic/utils/FileUtils
> 
> Here's my build.xml snippet:
> 
> 	<property name="project.name"  	value="smartEREJB"/>
> 	<property name="ejb.outputJar" 	value="${project.name}.jar"/>
> 
> 	<!-- Create the EJBC class path -->
> 	<path id="ejbc.classpath">
> 		<fileset dir="${WL_HOME}">
> 			<include name="workshop/extensions/wls.jar"/>
> 			<include name="server/lib/weblogic.jar"/>
> 			<include name="common/lib/log4j.jar"/>
> 		</fileset>
> 	</path>
>  	<property name="ejbc.classpathString" refid="ejbc.classpath"/>
> 
>  	<taskdef name="ejbc" classname="weblogic.ant.taskdefs.j2ee.Ejbc"
>    		classpathref="ejbc.classpath"/>
>    		
>  	<taskdef name="ejbGen" classname="com.bea.wls.build.Ejbgen"
>    		classpathref="ejbc.classpath"/>
>    		
> 	<target name="ejbgen" depends="check-env, clean-ejb, common-jar"
> 		description="Build EJB Jar" >
>    		<echo message="Building to temporary directory 
> ${ejb.build.path}..."/>
> 
>    		<echo message="Running EJBGen..."/>
>    		<echo message="Using EJBC CLASSPATH      = 
> ${ejbc.classpathString} "/>
>    		<ejbGen keepgenerated="false" 
>    				tmpdir="${ejb.build.path}"	/>
>    		
>    		<!-- don't continue with build if no EJBs, but 
> don't fail either -->
>    		<antcall target="post-ejbgen"/>
>  	</target>
>  
>  	<target name="post-ejbgen" >
>    		<echo message="EJBGen ok.  Compiling..."/>
>    		<echo message="Using PROJECT CLASSPATH         
> = ${classpathString} "/>
>    		<javac srcdir="${ejb.src.dir};${ejb.build.path}" 
>    			destdir="${ejb.build.path}"
>    		 	includes="**/*.java" 
>    		 	compiler="${java.compiler}" 
>    		 	debug="${ejb.debug}"
>         	deprecation="${deprecation}" >
>    		 	<classpath>
> 				<path refid="project.classpath"/>
> 			   	<pathelement 
> location="${ejb.build.path}"/>
> 			</classpath>
>     	</javac>
> 
>     	<echo message="All files compiled.   Running ejbc..."/>
>    		<echo message="Using PROJECT CLASSPATH         
> = ${classpathString} "/>
>     	<ejbc source="${ejb.build.path}" 
>     		target="${ejb.build.path}"
>      		compiler="javac" 
>      		keepgenerated="true" 
>      		debug="${ejb.debug}"
>      		disableHotCodeGen="${ejb.debug}" >
> 	 		<classpath>
> 				<path refid="project.classpath"/>
> 		   		<pathelement 
> location="${build.dir}/common.jar"/>
> 			</classpath>
> 		</ejbc>
> 
> Although the class weblogic/utils/FileUtils is present inside 
> weblogic.jar as displayed by my echo message "Using EJBC 
> CLASSPATH ......", ant still doesn't load it.
> 
> Resolution: I was able to solve this problem by copying 
> wls.jar and weblogic.jar into lib directory of my ant 
> installation. In addition, I also had to copy 
> bea\weblogic81\server\lib\persistence directory which the 
> ejbc task expects.
> 
> I thought that this(copying jars to Ant's lib directory) is a 
> wrong way and would like to avoid doing so. Also, I was 
> curious to know why Weblogic Workshop looks for this 
> persistence.install file. 
> 
> Ideally, I would like the ejbc task to run using an 
> independent ant installation (and not the one preshipped with 
> weblogic)
> Any hints to resolve this problem?
> 
> Thanks & regards,
> Vikram
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message