Hi, i am using Weblogic 6.1 to deploy entity bean having local interface only, i am not providing remote interface. i have a session bean which will aceess this entity bean vai the local interface. for that i have declared local-ref in ejb-jar.xml. but while trying to deploy in weblogic 6.1, i got the following error:
<Oct 15, 2003 3:07:24 PM IST> <Error> <J2EE> <Error deploying application message_test:
<font color="red">Unable to deploy EJB: message_test.jar from message_test.jar:
<br>
The XML parser encountered an error in your deployment descriptor. Please ensure that your deployment descriptor corresponds to the format in the DTD.
<br>
The error was:
org.xml.sax.SAXParseException: Element type "ejb-local-ref" must be declared. </font>
<br>
<br>
Here is the ejb-jar.xml:
<?xml version="1.0"?>
<!DOCTYPE ejb-jar PUBLIC
'-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN'
'http://www.java.sun.com/dtd/ejb-jar_2_0.dtd'>
<ejb-jar>
<enterprise-beans>
<session>
<ejb-name>sessionTest</ejb-name>
<home>test.MessageHandlerHome</home>
<remote>test.MessageHandler</remote>
<ejb-class>test.MessageHandlerEJB</ejb-class>
<session-type>Stateless</session-type>
:
<ejb-local-ref>
<ejb-ref-name>ejb/MessageBean</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<local-home>test.MessageLocalHome</local-home>
<local>test.MessageLocal</local>
</ejb-local-ref>
</session>
<entity>
<ejb-name>MessageEntity</ejb-name>
<local-home>test.MessageLocalHome</local-home>
<local>test.MessageLocal</local>
<ejb-class>test.MessageEJB</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.String</prim-key-class>
<reentrant>False</reentrant>
:
:
</entity>
</enterprise-beans>
:
:
ejb-jar>
-
Problem in deploying EJB 2.0 in Weblogic 6.1 (6 messages)
- Posted by: Manab Sarkar
- Posted on: October 15 2003 05:59 EDT
Threaded Messages (6)
- Problem in deploying EJB 2.0 in Weblogic 6.1 by Paul Strack on October 15 2003 09:44 EDT
- Problem in deploying EJB 2.0 in Weblogic 6.1 by Manab Sarkar on October 15 2003 10:14 EDT
-
Problem in deploying EJB 2.0 in Weblogic 6.1 by Paul Strack on October 15 2003 05:35 EDT
-
Problem in deploying EJB 2.0 in Weblogic 6.1 by Thomas Risberg on October 15 2003 09:08 EDT
-
Problem in deploying EJB 2.0 in Weblogic 6.1 by Manab Sarkar on October 16 2003 12:12 EDT
- Problem in deploying EJB 2.0 in Weblogic 6.1 by Thomas Risberg on October 16 2003 05:11 EDT
-
Problem in deploying EJB 2.0 in Weblogic 6.1 by Manab Sarkar on October 16 2003 12:12 EDT
-
Problem in deploying EJB 2.0 in Weblogic 6.1 by Thomas Risberg on October 15 2003 09:08 EDT
-
Problem in deploying EJB 2.0 in Weblogic 6.1 by Paul Strack on October 15 2003 05:35 EDT
- Problem in deploying EJB 2.0 in Weblogic 6.1 by Manab Sarkar on October 15 2003 10:14 EDT
-
Problem in deploying EJB 2.0 in Weblogic 6.1[ Go to top ]
- Posted by: Paul Strack
- Posted on: October 15 2003 09:44 EDT
- in response to Manab Sarkar
According to your error message, there is something wrong with your XML file, but I don't see anything obvious. Try opening your ejb-jar.xml file in a web browser to see what error messages you get in a different environment. -
Problem in deploying EJB 2.0 in Weblogic 6.1[ Go to top ]
- Posted by: Manab Sarkar
- Posted on: October 15 2003 10:14 EDT
- in response to Paul Strack
i tried by opening ejb-jar.xml in IE, it opens fine, no error message. is there anything in Weblogic 6.1 to enable EJB 2.0? what is the default EJB version in Weblogic 6.1? it is 1.1? It seems to me that Weblogic 6.1 is unable to recognize new XML elements in EJB 2.0.
help/suggesions are welcome. thanks in advance. -
Problem in deploying EJB 2.0 in Weblogic 6.1[ Go to top ]
- Posted by: Paul Strack
- Posted on: October 15 2003 17:35 EDT
- in response to Manab Sarkar
Duh. I am being stupid. Yes, weblogic 6.1 is EJB 1.1, not EJB 2.0, so it won't recognize the newer XML tags. Also, it won't support local interfaces either. Your options are:
1. Upgrade weblogic to a new server.
2. Rewrite your EJBs to be EJB 1.1 compliant. -
Problem in deploying EJB 2.0 in Weblogic 6.1[ Go to top ]
- Posted by: Thomas Risberg
- Posted on: October 15 2003 21:08 EDT
- in response to Paul Strack
Duh. I am being stupid. Yes, weblogic 6.1 is EJB 1.1, not EJB 2.0, so it won't recognize the newer XML tags. Also, it won't support local interfaces either. Your options are:
6.1 came out before EJB 2.0 was final so it did not support all ejb 2.0 features. There is a j2ee12.jar that you can include to get the full ejb 2.0 functionality. I think some of the later 6.1 download include this jar by default. -
Problem in deploying EJB 2.0 in Weblogic 6.1[ Go to top ]
- Posted by: Manab Sarkar
- Posted on: October 16 2003 00:12 EDT
- in response to Thomas Risberg
Hi, i have checked the doc that came with my Weblogic installation, it claims it supports EJB 2.0. Also i have checked j2ee12.jar, it doesn't have new interfaces/classes required for EJB 2.0. But i have found these new classes in Weblogic.jar. What can be the reason? -
Problem in deploying EJB 2.0 in Weblogic 6.1[ Go to top ]
- Posted by: Thomas Risberg
- Posted on: October 16 2003 17:11 EDT
- in response to Manab Sarkar
Your doctype has an EJB 1.1 reference in it - these are the ones I have used for EJB 2.0 in WL61:
ejb-jar.xml:
<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
weblogic-ejb-jar.xml:
<!DOCTYPE weblogic-ejb-jar PUBLIC
'-//BEA Systems, Inc.//DTD WebLogic 6.0.0 EJB//EN'
'http://www.bea.com/servers/wls600/dtd/weblogic-ejb-jar.dtd' >
weblogic-cmp-rdbms-jar.xml:
<!DOCTYPE weblogic-rdbms-jar PUBLIC
'-//BEA Systems, Inc.//DTD WebLogic 6.0.0 EJB RDBMS Persistence//EN'
'http://www.bea.com/servers/wls600/dtd/weblogic-rdbms20-persistence-600.dtd'>