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

Please help on deployment descriptors

Gurpreet Saini
Ranch Hand

Joined: Jun 09, 2002
Posts: 295
Hi there,
I am using weblogic 6.1 server. And I had read from specification that ejb-jar.xml , weblogic-ejb-jar.xml and weblogic-cmp-rdbms-jar.xml are required to be in jar file. In my case I had done so but still server gives me the following error:
Unable to deploy EJB: cabin.jar from cabin.jar:
An error occurred while reading the deployment descriptor. The error was:
java.io.FileNotFoundException: META-INF/weblogic-ejb-jar.xml not found in jar file.
I want to use CMP services. Please tell where is the problem ?. Also, tell me what I am supposed to write in deployment descriptors in order to establish connection with data source of Ms Access. It would be of great help to me if you kindly write me in brief especially about deployment descriptors.
Waiting for your response.
thank you,
Aaron Mulder
Author
Ranch Hand

Joined: Feb 25, 2003
Posts: 65
Please run "jar -tf (your EJB JAR file)" and post the output here. Then we'll be able to see if the files are laid out correctly in your EJB JAR.


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

Joined: Jun 09, 2002
Posts: 295
Hi Aaron,
This is the output generated after entering this command on console: jar tf cabin.jar
The output is :META-INF/
META-INF/MANIFEST.MF
cabin/
cabin/Cabin.class
cabin/CabinPK.class
cabin/CabinBean.class
cabin/CabinHome.class
META-INF/ejb-jar.xml
weblogic-ejb-jar.xml
weblogic-cmp-rdbms-jar.xml
After, viewing this output I realized my mistake and after correcting it this was the following output:
META-INF/
META-INF/MANIFEST.MF
cabin/
cabin/Cabin.class
cabin/CabinPK.class
cabin/CabinBean.class
cabin/CabinHome.class
META-INF/ejb-jar.xml
META-INF/weblogic-ejb-jar.xml
META-INF/weblogic-cmp-rdbms-jar.xml
Since, my prevoius error has gone but now a new one has taken birth and that is:
Error processing file 'META-INF/weblogic-ejb-jar.xml'. weblogic.xml.process.XMLP
rocessingException: XML document does not appear to contain a properly formed DO
CTYPE header - with nested exception:
[weblogic.xml.process.ProcessorFactoryException: XML document does not appear to
contain a properly formed DOCTYPE header]
I had deployed a blank weblogic-ejb-jar.xml
file in META-INF directory. Now, I want to use CMP services. Could you please write me what exactly I had to document in weblogic-ejb-jar.xml file. I had documented ejb-jar xml file. And also tell me about what to write in weblogic-cmp-rdbms-jar.xml file.
Waiting for your reply.
gurpreet
Aaron Mulder
Author
Ranch Hand

Joined: Feb 25, 2003
Posts: 65
Give a man a fish... Oh, never mind.
Anyway, you'll need to learn how to write these yourself, or at least get up to speed with a tool that will do so for you, and I can't really tell you the specific content without knowing more about your EJB anyway. But to get started, you can look at the CMP entity bean examples included with WebLogic (as long as you didn't deselect the examples when you installed the product). There are lots of examples, but one EJB 2.0 CMP example is under weblogic70/samples/server/src/examples/ejb20/basic/containerManaged/
There's also a couple of tools that might be helpful. DDinit will create started DDs for you, and ejbgen lets you put extra JavaDoc tags in your bean implementation class and it will generate the proper bean interfaces and deployment descriptors for you. There's an ejbgen example at weblogic70/samples/server/src/examples/ejb20/ejbgen/bands/
The BEA documentation has a lot of information on EJBs, including CMP and the tools I mentioned above, here. I could also recommend a good book that covers the tools as well as manual CMP configuration in detail...
But in general, the weblogic-ejb-jar.xml has some general info on each bean such as its JNDI name and where the CMP settings are stored (namely, the file name of the weblogic-cmp-rdbms-jar.xml DD). The CMP DD has information such as the JNDI name of the data source to use for CMP, the table name and column names for each entity, CMR mappings to specific tables and columns, etc.
[ February 28, 2003: Message edited by: Aaron Mulder ]
Gurpreet Saini
Ranch Hand

Joined: Jun 09, 2002
Posts: 295
Hi mulder,
I must tell you that I love to drink java and not fish. Your java was bitter and high flighted but anyway, I thank you for your cup of java.
gurpreet
Vidhya Ka
Greenhorn

Joined: Mar 05, 2003
Posts: 1
Hello,
I have some doubts with respect to deployment descriptors in Weblogic version 6.1.
I am trying to see when the ejbPassivate()is being called in the case of a stateful session bean.
where and how is the property for limiting the number of beans in free pool for stateful session beans set?
I tried setting the property for max beans in cache in stateful session descriptor and it doesn't seemto be working!
The server/container simply created a new instance for evry client call!.
Please help...
Rgds,
Vidhya
 
wood burning stoves
 
subject: Please help on deployment descriptors