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 13:07:36 GMT
Here's what I mean....the task succeeds even thouogh ejbGen complains about weblogic.home not
being set.

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\workshop\extensions\w
ls.jar
   [ejbGen] weblogic.home not defined, compilation may not find weblogic classes

     [null] Loading source file D:\BeaProjects\smartER\build/wlw_smartEREJB_buil
d/smartEREJB\com\hp\eservices\smarter\ejb\Company.java...
     [null] Loading source file D:\BeaProjects\smartER\build/wlw_smartEREJB_buil
d/smartEREJB\com\hp\eservices\smarter\ejb\EmployeeMaintenance.java...
     [null] Loading source file D:\BeaProjects\smartER\build/wlw_smartEREJB_buil
d/smartEREJB\com\hp\eservices\smarter\ejb\EmployeeManager.java...

...
<snip>
<snip>
...
     [null] Constructing Javadoc information...
     [null] EJBGen 2.16
     [null] D:\BeaProjects\smartER\build\wlw_smartEREJB_build\smartEREJB\com\hp\
eservices\smarter\ejb\Company.java:70: Warning: No JNDI name was found.
     [null] D:\BeaProjects\smartER\build\wlw_smartEREJB_build\smartEREJB\com\hp\
eservices\smarter\ejb\ReportApprover.java:67: Warning: No JNDI name was found.
     [null] D:\BeaProjects\smartER\build\wlw_smartEREJB_build\smartEREJB\com\hp\
eservices\smarter\ejb\ReportApprover.java:67: Warning: This EJB is declared loca
l but doesn't have any local methods.
     [null] D:\BeaProjects\smartER\build\wlw_smartEREJB_build\smartEREJB\com\hp\
eservices\smarter\ejb\CompanyManager.java:62: Warning: No JNDI name was found.
     [null] [Info:]  Creating D:\BeaProjects\smartER\build/wlw_smartEREJB_build\
META-INF\weblogic-ejb-jar.xml
     [null] [Info:]  Creating D:\BeaProjects\smartER\build/wlw_smartEREJB_build\
META-INF\weblogic-cmp-rdbms-jar.xml
     [null] [Info:]  Creating D:\BeaProjects\smartER\build/wlw_smartEREJB_build\
ejbgen-build.xml100 warnings

post-ejbgen:
     [echo] EJBGen ok.  Compiling...
     [echo] Using PROJECT CLASSPATH         = D:\BeaProjects\smartER\build\WEB-I
NF\classes;D:\bea\weblogic81\common\lib\log4j.jar;D:\BeaProjects\smartER\smartER
Web\WEB-INF\lib\commons-beanutils.jar;D:\BeaProjects\smartER\smartERWeb\WEB-INF\
lib\commons-collections.jar;D:\BeaProjects\smartER\smartERWeb\WEB-INF\lib\common
s-digester.jar;D:\BeaProjects\smartER\smartERWeb\WEB-INF\lib\commons-fileupload.
jar;D:\BeaProjects\smartER\smartERWeb\WEB-INF\lib\commons-lang-2.0.jar;D:\BeaPro
jects\smartER\smartERWeb\WEB-INF\lib\commons-logging.jar;D:\BeaProjects\smartER\
smartERWeb\WEB-INF\lib\commons-validator.jar;D:\BeaProjects\smartER\smartERWeb\W
EB-INF\lib\displaytag-1.0-b2.jar;D:\BeaProjects\smartER\smartERWeb\WEB-INF\lib\l
og4j-1.2.8.jar;D:\BeaProjects\smartER\smartERWeb\WEB-INF\lib\struts.jar;D:\BeaPr
ojects\smartER\smartERWeb\WEB-INF\lib\aspectjrt-1.1.1.jar;D:\BeaProjects\smartER
\smartERWeb\WEB-INF\lib\cactus-1.6.1.jar;D:\BeaProjects\smartER\smartERWeb\WEB-I
NF\lib\cactus-ant-1.6.1.jar;D:\BeaProjects\smartER\smartERWeb\WEB-INF\lib\common
s-httpclient-2.0.jar;D:\bea\weblogic81\server\lib\weblogic.jar;D:\bea\JDK141~1\l
ib\tools.jar
    [javac] Compiling 75 source files to D:\BeaProjects\smartER\build\wlw_smartE
REJB_build
     [echo] All files compiled.   Running ejbc...
     [echo] Using PROJECT CLASSPATH         = D:\BeaProjects\smartER\build\WEB-I
NF\classes;D:\bea\weblogic81\common\lib\log4j.jar;D:\BeaProjects\smartER\smartER
Web\WEB-INF\lib\commons-beanutils.jar;D:\BeaProjects\smartER\smartERWeb\WEB-INF\
lib\commons-collections.jar;D:\BeaProjects\smartER\smartERWeb\WEB-INF\lib\common
s-digester.jar;D:\BeaProjects\smartER\smartERWeb\WEB-INF\lib\commons-fileupload.
jar;D:\BeaProjects\smartER\smartERWeb\WEB-INF\lib\commons-lang-2.0.jar;D:\BeaPro
jects\smartER\smartERWeb\WEB-INF\lib\commons-logging.jar;D:\BeaProjects\smartER\
smartERWeb\WEB-INF\lib\commons-validator.jar;D:\BeaProjects\smartER\smartERWeb\W
EB-INF\lib\displaytag-1.0-b2.jar;D:\BeaProjects\smartER\smartERWeb\WEB-INF\lib\l
og4j-1.2.8.jar;D:\BeaProjects\smartER\smartERWeb\WEB-INF\lib\struts.jar;D:\BeaPr
ojects\smartER\smartERWeb\WEB-INF\lib\aspectjrt-1.1.1.jar;D:\BeaProjects\smartER
\smartERWeb\WEB-INF\lib\cactus-1.6.1.jar;D:\BeaProjects\smartER\smartERWeb\WEB-I
NF\lib\cactus-ant-1.6.1.jar;D:\BeaProjects\smartER\smartERWeb\WEB-INF\lib\common
s-httpclient-2.0.jar;D:\bea\weblogic81\server\lib\weblogic.jar;D:\bea\JDK141~1\l
ib\tools.jar
...
...
<snip>
<snip>
...
...
     [ejbc] <Jul 12, 2004 6:25:05 PM IST> <Warning> <EJB> <BEA-010202>
<Call-by-
reference is not enabled for the EJB 'ProcessMaintenance'. The server will have
better performance if it is enabled. To enable call-by-reference, set the enable
-call-by-reference element to True in the weblogic-ejb-jar.xml deployment descri
ptor for this EJB.>
     [ejbc] <Jul 12, 2004 6:25:05 PM IST> <Warning> <EJB> <BEA-010202>
<Call-by-
reference is not enabled for the EJB 'PerDiem'. The server will have better perf
ormance if it is enabled. To enable call-by-reference, set the enable-call-by-re
ference element to True in the weblogic-ejb-jar.xml deployment descriptor for th
is EJB.>
     [ejbc] ejbc successful.
     [echo] ejbc ok.  Running zip...
      [jar] Building jar: D:\BeaProjects\smartER\build\smartEREJB.jar

BUILD SUCCESSFUL
Total time: 33 seconds









































































-----Original Message-----
From: KULKARNI, VIKRAM 
Sent: Monday, July 12, 2004 6:22 PM
To: Ant Users List
Subject: RE: running Weblogic ejbgen and ejbc: dependency on preshipped
Ant version


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


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


Mime
View raw message