aspose file tools*
The moose likes BEA/Weblogic and the fly likes Packaging into  EAR Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "Packaging into  EAR " Watch "Packaging into  EAR " New topic
Author

Packaging into EAR

Saket Barve
Ranch Hand

Joined: Dec 19, 2002
Posts: 229
Weblogic 8.1 on Windows XP.

I am unable to create an EAR for my web module. I tried using the Weblogic Builder and also the command line prompt using:

java weblogic.marathon.ddinit.EarInit <MyAppJAR>

No errors are detected, but the EAR is nowhere to be seen. What could I be missing out on?

Saket
Carol Enderlin
drifter
Ranch Hand

Joined: Oct 10, 2000
Posts: 1364
from BEA's WebLogic Server Command Reference:


EarInit
Generate an application.xml and a weblogic-application.xml file for an EAR using this command. Target an existing EAR or a folder containing JAR or WAR files you intend to archive into an EAR file.

java weblogic.marathon.ddinit.EarInit <module>

In WebLogic Builder, EarInit looks recursively at the entire tree under the targeted module. On the command line, you need to already have descriptors for the modules contained in the EAR. application.xml will account for the modules. The generated weblogic-application.xml will be an empty placeholder.

From your post it sounds like you are running the command on a jar instead of on a folder containing jar or war files (or an existing ear).
[ January 23, 2006: Message edited by: Carol Enderlin ]
Saket Barve
Ranch Hand

Joined: Dec 19, 2002
Posts: 229
Thanks for the prompt response, Carol.

I did reference the link prior to posting my message. I somehow got the impression that the ddinit would create the required deployment descriptors as well. This makes sense too, because the WebInit did create web.xml and the like.

Please let me know if I am missing out on something.

Thanks again,
Saket
Carol Enderlin
drifter
Ranch Hand

Joined: Oct 10, 2000
Posts: 1364
EarInit creates the descriptors for the ear, not the ear. It sounds like the same is true for WebLogic Builder.

An ear is just a jar file with a defined structure/contents. You can generate one with the jar command or with the ant "jar" or "ear" tasks.

If you ran the EarInit command on a folder, did you it a directory called META-INF containing application.xml and weblogic-application.xml inside that directory?

If not, what output did it print when you ran it? Please include details about what exactly you are running it on.

BEA seems to be pushing use of an exploded ear making the ear just a folder or directory with defined structure/contents.
[ January 24, 2006: Message edited by: Carol Enderlin ]
Saket Barve
Ranch Hand

Joined: Dec 19, 2002
Posts: 229
I tried to create the EAR on a properly structured folder HelloWorldWebApp. Here is the output, Carol:



Apparently it tried to create an ear but didn't and left it at that since there are no error messages indicating otherwise.

Isn't it strange that one is not able to create an EAR using tools provided by Weblogic itself?

Saket
Carol Enderlin
drifter
Ranch Hand

Joined: Oct 10, 2000
Posts: 1364
It's not supposed to create an ear using the command you are using. It is used to create the deployment descriptors. And based on your output, it says it did that. Did you look for the xml files?

C:\projects>java weblogic.marathon.ddinit.EarInit HelloWorldWebApp

Search for EJB components in C:\projects\HelloWorldWebApp
App was not specifically an EJB app. Will try to create an ear

Search for Web components in C:\projects\HelloWorldWebApp
Found Web components. Initializing descriptors
Found Web module
C:\projects
Saket Barve
Ranch Hand

Joined: Dec 19, 2002
Posts: 229

And based on your output, it says it did that. Did you look for the xml files?


Yes, Carol. The XML files were created by WebInit, which I ran prior to executing EarInit. I went through the Mastering Weblogic Server book; I gather that one uses build files for getting the EAR, contrary to Sun One Application Server where one can explicitly get the EAR from the tools.

Thanks again,
Saket
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Packaging into EAR
 
Similar Threads
config file
EAR Files
New to Weblogic
Removing tab character(^I) and null character Unicode: 0x0 from configuration XML file.
Code changes not reflected after deploying.