• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Please help !!!!!!!!!!!!

 
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 reader,
I had developed one entity and stateless session bean. Now, I want to deploy on weblogic server. But when I deploy I get the following error:
weblogic.xml.process.XMLParsingException: The content of element type "method" m
ust match "(description?,ejb-name,method-intf?,method-name,method-params?)". - w
ith nested exception:
[org.xml.sax.SAXParseException: The content of element type "method" must match
"(description?,ejb-name,method-intf?,method-name,method-params?)".]
File: ejb-jar.xml Line: 58 Column: 14
at weblogic.xml.process.ProcessorDriver.process(ProcessorDriver.java:135
)
Could you please help me on this what exactly I am missing :
Here I copy paste the ejb-jar.xml file:
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN"
"c://sun/weblogic/ejb20/dd/xml/ejb20-jar.dtd">
<ejb-jar>
<enterprise-beans>
<entity>
<description>
This cabin enterprise bean entity represents a cabin on
a cruise ship.
</description>
<ejb-name>cabinBean</ejb-name>
<home>cabin.CabinHome</home>
<remote>cabin.Cabin</remote>
<ejb-class>cabin.CabinBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>cabin.CabinPK</prim-key-class>
<reentrant>False</reentrant>
<cmp-field><field-name>id</field-name></cmp-field>
<cmp-field><field-name>name</field-name></cmp-field>
<cmp-field><field-name>deckLevel</field-name></cmp-field>
<cmp-field><field-name>ship</field-name></cmp-field>
<cmp-field><field-name>bedCount</field-name></cmp-field>

</entity>
<session>
<ejb-name>suiteBean</ejb-name>
<home>suite.SuiteHome</home>
<remote>suite.Suite</remote>
<ejb-class>suite.SuitBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
<ejb-ref>
<description> Stateless bean </description>
<ejb-ref-name>sun.cabin.CabinHome</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<home>cabin.CabinHome</home>
<remote>cabin.Cabin</remote>
</ejb-ref>
</session>
</enterprise-beans>
<assembly-descriptor>

<method-permission>
<role-name>everyone</role-name>
<method>
<description> hi </description>
<ejb-name>cabinBean</ejb-name>
<ejb-name>suiteBean</ejb-name>
<method-name>*</method-name>
</method>
</method-permission>
<container-transaction>
<method>
<ejb-name>cabinBean</ejb-name>
<method-name>*</method-name>
<ejb-name>suiteBean</ejb-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>

Do I need to also write any other elements in weblogic-ejb-jar.xml and weblogic-cmp-rdbms-jar.xml files.
Please write as soon as possible.
thank you,
 
Ranch Hand
Posts: 2713
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Your xml does not validate against the DTD. I suggest you get a copy of a EJB that goes into the details of how to properly write deployment descriptors.
Invalid:

Valid:
 
Ranch Hand
Posts: 1871
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Gurpreet ,
One suggestion, Please use a valid topic subject. Entering "Please Help!!!" does not help a person decide on whether he can sort and help you out in this problem.
I nearly ignored this post!!!
 
please buy this thing and then I get a fat cut of the action:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic