You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by Norbert Rieger <nr...@lplusr.de> on 2007/02/27 12:08:09 UTC

Accessing the local interface of an Session EJB from a WAR

Hello,

I try to connect from my web application to an existing Session EJB
(MfcSession) thru it's local interface.
Both, the WAR and the EJB, are running within the same geronimo
installation. When installing the web app I get the following message:

Deployer operation failed: Could not find an EJB for reference MfcSession to
a local session bean that has the home interface
de.lplusr.module.mfc.ejb.MfcSessionLocalHome and the local interface
de.lplusr.module.mfc.ejb.MfcSessionLocal
org.apache.geronimo.common.UnresolvedEJBRefException: Could not find an EJB
for reference MfcSession to a local session bean that has the home interface
de.lplusr.module.mfc.ejb.MfcSessionLocalHome and the local interface
de.lplusr.module.mfc.ejb.MfcSessionLocal

How do I connect to an EJB thru it's local interface, what's wrong with my
configuration ?

Any help or advice is appreciated, thanks a lot in advance.

Norbert


This is my configuration:

Geronimo 1.1.1
JDK 1.5.0_10
Windows XP Prof


web.xml:

 <ejb-local-ref>
        <ejb-ref-name>MfcSession</ejb-ref-name>
        <ejb-ref-type>Session</ejb-ref-type>
        <local-home>de.lplusr.module.mfc.ejb.MfcSessionLocalHome</local-home
>
        <local>de.lplusr.module.mfc.ejb.MfcSessionLocal</local>
        <ejb-link>MfcSession</ejb-link>
 </ejb-local-ref>

geronimo-web.xml:

<?xml version="1.0" encoding="UTF-8"?>

<web-app
	xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1"
  	xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.1"
  	xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.1"
  	xmlns:security="http://geronimo.apache.org/xml/ns/security-1.1">
	<environment xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1">
  		<moduleId>
    		<groupId>lplusr</groupId>
    		<artifactId>sys</artifactId>
    		<version>1.0</version>
  		</moduleId>
  		<dependencies>
  			<dependency>
	   			<groupId>ejb</groupId>
	                  <artifactId>mfc-ejb</artifactId>
	                  <version>1.0</version>
	                  <type>jar</type>
	            </dependency>
	  	</dependencies>
	</environment>
	<context-root>/sys</context-root>
	<ejb-local-ref>
		<ref-name>MfcSession</ref-name>
		<ejb-link>MfcSession</ejb-link>
	</ejb-local-ref>
</web-app>


The EJB descriptor is:

<?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 id="ejb-jar_1">

   <description><![CDATA[mfc-ejb-1.0 generated by eclipse wtp xdoclet
extension.]]></description>
   <display-name>mfc-ejb-1.0</display-name>

   <enterprise-beans>

      <!-- Session Beans -->
      <session id="Session_MfcSession">
         <description><![CDATA[An EJB for remote access of
MFC]]></description>
         <display-name>MfcSession</display-name>

         <ejb-name>MfcSession</ejb-name>

         <home>de.lplusr.module.mfc.ejb.MfcSessionHome</home>
         <remote>de.lplusr.module.mfc.ejb.MfcSession</remote>
         <local-home>de.lplusr.module.mfc.ejb.MfcSessionLocalHome</local-hom
e>
         <local>de.lplusr.module.mfc.ejb.MfcSessionLocal</local>
         <ejb-class>de.lplusr.module.mfc.ejb.MfcSessionSession</ejb-class>
         <session-type>Stateful</session-type>
         <transaction-type>Container</transaction-type>

      </session>

</ejb-jar>


AW: Accessing the local interface of an Session EJB from a WAR

Posted by Norbert Rieger <nr...@lplusr.de>.
Hello,

thanx a lot for your answer.

>try <ejb-ref-name>ejb/MfcSession</ejb-ref-name>
>in web.xml.

I tried this already, got the same exception.

-----Ursprüngliche Nachricht-----
Von: Jack [mailto:vomaringo@yahoo.com]
Gesendet: Dienstag, 27. Februar 2007 15:35
An: user@geronimo.apache.org
Betreff: Re: Accessing the local interface of an Session EJB from a WAR



--- Norbert Rieger <nr...@lplusr.de> wrote:

> Hello,
>
> I try to connect from my web application to an
> existing Session EJB
> (MfcSession) thru it's local interface.
> Both, the WAR and the EJB, are running within the
> same geronimo
> installation. When installing the web app I get the
> following message:
>
> Deployer operation failed: Could not find an EJB for
> reference MfcSession to
> a local session bean that has the home interface
> de.lplusr.module.mfc.ejb.MfcSessionLocalHome and the
> local interface
> de.lplusr.module.mfc.ejb.MfcSessionLocal
>
org.apache.geronimo.common.UnresolvedEJBRefException:
> Could not find an EJB
> for reference MfcSession to a local session bean
> that has the home interface
> de.lplusr.module.mfc.ejb.MfcSessionLocalHome and the
> local interface
> de.lplusr.module.mfc.ejb.MfcSessionLocal
>
> How do I connect to an EJB thru it's local
> interface, what's wrong with my
> configuration ?
>
> Any help or advice is appreciated, thanks a lot in
> advance.
>
> Norbert
>
>
> This is my configuration:
>
> Geronimo 1.1.1
> JDK 1.5.0_10
> Windows XP Prof
>
>
> web.xml:
>
>  <ejb-local-ref>
>         <ejb-ref-name>MfcSession</ejb-ref-name>
>         <ejb-ref-type>Session</ejb-ref-type>
>
>
<local-home>de.lplusr.module.mfc.ejb.MfcSessionLocalHome</local-home
> >
>
>
<local>de.lplusr.module.mfc.ejb.MfcSessionLocal</local>
>         <ejb-link>MfcSession</ejb-link>
>  </ejb-local-ref>
>
> geronimo-web.xml:
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <web-app
>
>
xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1"
>
>
xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.1"
>
>
xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.1"
>
>
xmlns:security="http://geronimo.apache.org/xml/ns/security-1.1">
> 	<environment
>
xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1">
>   		<moduleId>
>     		<groupId>lplusr</groupId>
>     		<artifactId>sys</artifactId>
>     		<version>1.0</version>
>   		</moduleId>
>   		<dependencies>
>   			<dependency>
> 	   			<groupId>ejb</groupId>
> 	                  <artifactId>mfc-ejb</artifactId>
> 	                  <version>1.0</version>
> 	                  <type>jar</type>
> 	            </dependency>
> 	  	</dependencies>
> 	</environment>
> 	<context-root>/sys</context-root>
> 	<ejb-local-ref>
> 		<ref-name>MfcSession</ref-name>
> 		<ejb-link>MfcSession</ejb-link>
> 	</ejb-local-ref>
> </web-app>
>
>
> The EJB descriptor is:
>
> <?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 id="ejb-jar_1">
>
>    <description><![CDATA[mfc-ejb-1.0 generated by
> eclipse wtp xdoclet
> extension.]]></description>
>    <display-name>mfc-ejb-1.0</display-name>
>
>    <enterprise-beans>
>
>       <!-- Session Beans -->
>       <session id="Session_MfcSession">
>          <description><![CDATA[An EJB for remote
> access of
> MFC]]></description>
>          <display-name>MfcSession</display-name>
>
>          <ejb-name>MfcSession</ejb-name>
>
>
> <home>de.lplusr.module.mfc.ejb.MfcSessionHome</home>
>
> <remote>de.lplusr.module.mfc.ejb.MfcSession</remote>
>
>
<local-home>de.lplusr.module.mfc.ejb.MfcSessionLocalHome</local-hom
> e>
>
>
<local>de.lplusr.module.mfc.ejb.MfcSessionLocal</local>
>
>
<ejb-class>de.lplusr.module.mfc.ejb.MfcSessionSession</ejb-class>
>          <session-type>Stateful</session-type>
>
> <transaction-type>Container</transaction-type>
>
>       </session>
>
> </ejb-jar>
>
>

hi,
try <ejb-ref-name>ejb/MfcSession</ejb-ref-name>
in web.xml.
regards,




____________________________________________________________________________
________
The fish are biting.
Get more visitors on your site using Yahoo! Search Marketing.
http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php


Re: Accessing the local interface of an Session EJB from a WAR

Posted by Jack <vo...@yahoo.com>.
--- Norbert Rieger <nr...@lplusr.de> wrote:

> Hello,
> 
> I try to connect from my web application to an
> existing Session EJB
> (MfcSession) thru it's local interface.
> Both, the WAR and the EJB, are running within the
> same geronimo
> installation. When installing the web app I get the
> following message:
> 
> Deployer operation failed: Could not find an EJB for
> reference MfcSession to
> a local session bean that has the home interface
> de.lplusr.module.mfc.ejb.MfcSessionLocalHome and the
> local interface
> de.lplusr.module.mfc.ejb.MfcSessionLocal
>
org.apache.geronimo.common.UnresolvedEJBRefException:
> Could not find an EJB
> for reference MfcSession to a local session bean
> that has the home interface
> de.lplusr.module.mfc.ejb.MfcSessionLocalHome and the
> local interface
> de.lplusr.module.mfc.ejb.MfcSessionLocal
> 
> How do I connect to an EJB thru it's local
> interface, what's wrong with my
> configuration ?
> 
> Any help or advice is appreciated, thanks a lot in
> advance.
> 
> Norbert
> 
> 
> This is my configuration:
> 
> Geronimo 1.1.1
> JDK 1.5.0_10
> Windows XP Prof
> 
> 
> web.xml:
> 
>  <ejb-local-ref>
>         <ejb-ref-name>MfcSession</ejb-ref-name>
>         <ejb-ref-type>Session</ejb-ref-type>
>        
>
<local-home>de.lplusr.module.mfc.ejb.MfcSessionLocalHome</local-home
> >
>        
>
<local>de.lplusr.module.mfc.ejb.MfcSessionLocal</local>
>         <ejb-link>MfcSession</ejb-link>
>  </ejb-local-ref>
> 
> geronimo-web.xml:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> 
> <web-app
> 
>
xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1"
>   
>
xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.1"
>   
>
xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.1"
>   
>
xmlns:security="http://geronimo.apache.org/xml/ns/security-1.1">
> 	<environment
>
xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1">
>   		<moduleId>
>     		<groupId>lplusr</groupId>
>     		<artifactId>sys</artifactId>
>     		<version>1.0</version>
>   		</moduleId>
>   		<dependencies>
>   			<dependency>
> 	   			<groupId>ejb</groupId>
> 	                  <artifactId>mfc-ejb</artifactId>
> 	                  <version>1.0</version>
> 	                  <type>jar</type>
> 	            </dependency>
> 	  	</dependencies>
> 	</environment>
> 	<context-root>/sys</context-root>
> 	<ejb-local-ref>
> 		<ref-name>MfcSession</ref-name>
> 		<ejb-link>MfcSession</ejb-link>
> 	</ejb-local-ref>
> </web-app>
> 
> 
> The EJB descriptor is:
> 
> <?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 id="ejb-jar_1">
> 
>    <description><![CDATA[mfc-ejb-1.0 generated by
> eclipse wtp xdoclet
> extension.]]></description>
>    <display-name>mfc-ejb-1.0</display-name>
> 
>    <enterprise-beans>
> 
>       <!-- Session Beans -->
>       <session id="Session_MfcSession">
>          <description><![CDATA[An EJB for remote
> access of
> MFC]]></description>
>          <display-name>MfcSession</display-name>
> 
>          <ejb-name>MfcSession</ejb-name>
> 
>         
> <home>de.lplusr.module.mfc.ejb.MfcSessionHome</home>
>         
> <remote>de.lplusr.module.mfc.ejb.MfcSession</remote>
>         
>
<local-home>de.lplusr.module.mfc.ejb.MfcSessionLocalHome</local-hom
> e>
>         
>
<local>de.lplusr.module.mfc.ejb.MfcSessionLocal</local>
>         
>
<ejb-class>de.lplusr.module.mfc.ejb.MfcSessionSession</ejb-class>
>          <session-type>Stateful</session-type>
>         
> <transaction-type>Container</transaction-type>
> 
>       </session>
> 
> </ejb-jar>
> 
> 

hi,
try <ejb-ref-name>ejb/MfcSession</ejb-ref-name>
in web.xml.
regards,



 
____________________________________________________________________________________
The fish are biting. 
Get more visitors on your site using Yahoo! Search Marketing.
http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php