• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Please help on deployment descriptors

 
Ranch Hand
Posts: 295
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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,
 
Author
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Gurpreet Saini
Ranch Hand
Posts: 295
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 295
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic