Discussion:
localhome doesnot appear on the jndi tree on weblogic 8.1 after deployment
(too old to reply)
Murteza Salemi
2005-02-10 14:50:20 UTC
Permalink
I am upgrading my application from weblogic6.1 to weblogic 8.1 sp3.

I have a stateless session bean with local interfaces. when I deploy the bean to the weblogic 8.1 server, everything seems to be fine and no error occurs. but when I view the JNDI tree, the localhome is not there and the local interface has just the Bind Name and no stub, no object hash code, no object class and no object to string appears. Trying to test the EJB in the console I get the following error:

"The EJB MeldePersonDatabaseFacadeBean has not been tested successfully. There was a problem determining the JNDI Name of the given bean."

what's wrong? why does not local interfaces deploy correctly on weblogic 8.1?

my descriptors are as follows:

ejb-jar.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
<ejb-jar>
<display-name>MeldePersonDatabaseEJB</display-name>
<enterprise-beans>
<session>
<display-name>MeldePersonDatabaseFacadeBean</display-name>
<ejb-name>MeldePersonDatabaseFacadeBean</ejb-name>
<local-home>aetat.amelding.meldepersondatabase.facade.ejb.MeldePersonDatabaseFacadeLocalHome</local-home>
<local>aetat.amelding.meldepersondatabase.facade.ejb.MeldePersonDatabaseFacadeLocal</local>
<ejb-class>aetat.amelding.meldepersondatabase.facade.ejb.MeldePersonDatabaseFacadeBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>MeldePersonDatabaseFacadeBean</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
---------------------------------------------------
weblogic-ejb-jar.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE weblogic-ejb-jar PUBLIC "-//BEA Systems, Inc.//DTD WebLogic 8.1.0 EJB//EN" "http://www.bea.com/servers/wls810/dtd/weblogic-ejb-jar.dtd">
<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>MeldePersonDatabaseFacadeBean</ejb-name>
<local-jndi-name>MeldePersonDatabaseFacadeBeanLocal</local-jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
--------------------
Rob Woollen
2005-02-11 01:56:36 UTC
Permalink
I believe the console only supports testing of remote ejbs.

I didn't see anything obviously wrong with your app. I'm guessing that
it's working fine. I'd just write a Servlet that hits the local ejb.
That should prove whether it's working or not.

-- Rob
Post by Murteza Salemi
I am upgrading my application from weblogic6.1 to weblogic 8.1 sp3.
"The EJB MeldePersonDatabaseFacadeBean has not been tested successfully. There was a problem determining the JNDI Name of the given bean."
what's wrong? why does not local interfaces deploy correctly on weblogic 8.1?
ejb-jar.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
<ejb-jar>
<display-name>MeldePersonDatabaseEJB</display-name>
<enterprise-beans>
<session>
<display-name>MeldePersonDatabaseFacadeBean</display-name>
<ejb-name>MeldePersonDatabaseFacadeBean</ejb-name>
<local-home>aetat.amelding.meldepersondatabase.facade.ejb.MeldePersonDatabaseFacadeLocalHome</local-home>
<local>aetat.amelding.meldepersondatabase.facade.ejb.MeldePersonDatabaseFacadeLocal</local>
<ejb-class>aetat.amelding.meldepersondatabase.facade.ejb.MeldePersonDatabaseFacadeBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>MeldePersonDatabaseFacadeBean</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
---------------------------------------------------
weblogic-ejb-jar.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE weblogic-ejb-jar PUBLIC "-//BEA Systems, Inc.//DTD WebLogic 8.1.0 EJB//EN" "http://www.bea.com/servers/wls810/dtd/weblogic-ejb-jar.dtd">
<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>MeldePersonDatabaseFacadeBean</ejb-name>
<local-jndi-name>MeldePersonDatabaseFacadeBeanLocal</local-jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
--------------------
Murteza.Salemi@capgemini.no
2005-02-14 12:07:52 UTC
Permalink
When a session bean or entity bean has local interfaces you have to put them with their clients together inside an ear file in order to make them work. If you doploy the jar files and war files or the client for the beans, that whatever it might be, individually to the server and try to test them you will get LinkedException.
It seems WebLogic 8.1 does not understand that jar files +war applications are running under the same JVM unless you put them inside a ear file.

After deployment of ear file, when you look at the JNDI tree you will not find localhome object there but just local interface with the property "bind name" and this is correct.

andy

Loading...