aspose file tools*
The moose likes BEA/Weblogic and the fly likes weblogic.ejbc and ear file. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "weblogic.ejbc and ear file." Watch "weblogic.ejbc and ear file." New topic
Author

weblogic.ejbc and ear file.

R K Singh
Ranch Hand

Joined: Oct 15, 2001
Posts: 5371
Hi
I am newbie to EJB and weblogic 7.0
I am trying to run Edroman samples on Weblogic 7.0
I am having 2 problems
1) When I use ${APPLICATIONS} variable as given below:
<ear earfile="${APPLICATIONS}/HelloWorld.ear" ...
somehow it is not being resolved and I run build, it fails giving this error:
ear_app:
[ear] Building ear: C:\book\EJB20\code\StatelessSession\HelloWorld\${APPLICATIONS}\HelloWorld.ear
BUILD FAILED
I get around this problem by hard coding the APPLICATIONS's value.
But can anyone plese explain me, why is this happening ??
I am using Windows NT and Weblogic 7.0
2) My second problem is, when I run weblogic.ejbc from Ant, everytime it compiles and generates all files. Even that is OK. But its not creating Client-jar file.
Though when I run ant for examples given with Weblogic 7.0, Client-jar is creted and all files do not compiled and generated everytime.
I hope that I have made points clear.
Please ask me if I am not clear.
I searched a lot net but could not found any useful information.
Thanks in advance for your help and time.
PS: build.xml is same as being used by weblogic examples.
Thanks & Regarads
Ravish K
[ February 27, 2003: Message edited by: Ravish Kumar ]

"Thanks to Indian media who has over the period of time swiped out intellectual taste from mass Indian population." - Chetan Parekh
Aaron Mulder
Author
Ranch Hand

Joined: Feb 25, 2003
Posts: 65
You need to declare your APPLICATIONS property in your Ant script before you can use it. Try putting a line line this right before the line where you use the APPLICATIONS varible:

If that at least gets the variable recognized, there's probably a better place in the script to put the property declaration.
On the client JAR front, it appears to be the case that a client JAR will only be generated if the ejb-jar.xml deployment descriptor includes an ejb-client-jar tag.
[ February 27, 2003: Message edited by: Aaron Mulder ]

<a href="http://www.javaranch.com/bookpromo.jsp" target="_blank" rel="nofollow">WebLogic Book Giveaway</a> 2/25-2/27
R K Singh
Ranch Hand

Joined: Oct 15, 2001
Posts: 5371
Hi Author Aaron,
Its really nice to get reply from an Author
Now its generating Client-jar
Now the first problem, I have property file and it is like the one provided by Weblogic examples.
It is accessing other properties defined in prop file.
How can we see the value of property defined in a file.
I tried to echo it but its not printing the value
---------------------
I have one more problem:
When I run build of examples given by Weblogic, while executing ejbc I get this output
[output]
ejbc:
[java] [EJBCompiler] : Recompilation determined unnecessary
[java] [EJBCompiler] : Rmic determined unnecessary
[java] <Feb 28, 2003 4:13:36 AM IST> <Info> <EJB> <010076> <Client-jar "ejb20_basic_statefulSession_client.jar" cre
ated.>
[java] ejbc successful.
[/output]
But when I executed same build for my code it outputs following
[output]
ejbc:
[java] [EJBCompiler] : Recompiling because no previous hashes found
[java] [EJBCompiler] : Compliance Checker said bean was compliant
[java] [parsing started C:\book\EJB20\code\StatelessSession\HelloWorld\ejbcgen\examples\HelloBean_15fz5e_LocalHomeImpl.java]
.
.
. LOT OF OTHER COMPILING AND LOADING statements
.
[java] [EJBCompiler] : Recompilation completed
[java] [EJBCompiler] : Rmic completed
[java] <Feb 28, 2003 2:50:01 PM IST> <Info> <EJB> <010076> <Client-jar "HelloWorld_client.jar" created.>
[java] ejbc successful.
[/output]
Why in my case it is compiling everytime ??
Again thanks a lot for your help and time.
R K Singh
Ranch Hand

Joined: Oct 15, 2001
Posts: 5371
How can we make sure that property file is being read by build file ??
I tried to echo one property of prop file
[echo]
First Echo : "${APPLICATIONS}"
No, I have not used any escape characters to print this.
R K Singh
Ranch Hand

Joined: Oct 15, 2001
Posts: 5371
What is the use of
<sysproperty key="weblogic.home" value="${WL_HOME}/server"/>
in ejbc block of build ??
I mean why & how we should set *weblogic.home* ??
Thanks in advance.
[ February 28, 2003: Message edited by: Ravish Kumar ]
R K Singh
Ranch Hand

Joined: Oct 15, 2001
Posts: 5371
Originally posted by Ravish Kumar:
How can we make sure that property file is being read by build file ??

Simply print the value
I got my error. Initially my file path was :
<property file="{source}/examples.properties"/>
<property name="source" value="."/>

I cheanged it to :
<property file="examples.properties"/>
Now its working fine.
Aaron Mulder
Author
Ranch Hand

Joined: Feb 25, 2003
Posts: 65
Okay, it sounds like you got the property issues worked out.
On the EJBC front, my guess would be that your build script is building a new JAR every time, which has all the basic EJB classes and DDs but not the classes generated by WebLogic. So when ejbc runs, it has to rebuild all the WebLogic classes.
I suspect that the WebLogic example doesn't rebuild the JAR, so all the WebLogic classes stay in the JAR from run to run, and ejbc sees the old ones there, sees that they still match the EJB classes, and doesn't rebuild them.
R K Singh
Ranch Hand

Joined: Oct 15, 2001
Posts: 5371
Hi
First, let me clear this, that my Ant scripts are like Weblogic example script as I copied them and made modifications.
But still I unzip both jar files (one created for weblogic example and one created by my example). Both files contains same files i.e. class files for stub, skeleton, home, remote, bean.
Still I am not able to get why when I use example's build it does not compile everytime but my script(which is same) does compile everytime ??
My second problem is :
What is the use of
<sysproperty key="weblogic.home" value="${WL_HOME}/server"/>
in ejbc block of build ??
I mean why & how we should set *weblogic.home* ??
I went through Weblogic doc, but could not get meaningful information.
Thanks a lot for your time and help.
[ March 04, 2003: Message edited by: Ravish Kumar ]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: weblogic.ejbc and ear file.