geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zan <...@altrosito.it>
Subject problem to deploy an EJB Session and WAR
Date Wed, 08 Feb 2006 16:02:38 GMT
Hi,
probably my question is very stupid and my english is badly. I'm sorry 
:-) (The best way to start a email ^_^).

I have deployed an ejb Stateless in a ejb jar file.
My client application is simply a servlet in a war file in the same 
Application Server. When deploy the two applications (the same problem 
when deploy a ear file) geronimo didn't report a problem. But the client 
throw an "NameNotFoundException" when try to use the ejb.
Probably I make a mistake in the configuration file. We can see my error 
please.

thanks
Matteo Valdina

The openejb-jar.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<openejb-jar
    xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.0"
    xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.0"
    xmlns:pkgen="http://www.openejb.org/xml/ns/pkgen-2.0"
    xmlns:sec="http://geronimo.apache.org/xml/ns/security-1.1"
    xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.0"
    configId="ListCall">
   
<enterprise-beans>
<session>
    <ejb-name>ListCall</ejb-name>
    <jndi-name>ListCallHomeRemote</jndi-name>
</session>
</enterprise-beans>
</openejb-jar>

File: ejb-jar.xml

<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar id="ejb-jar_1" version="2.1" 
xmlns="http://java.sun.com/xml/ns/j2ee" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
    <display-name>ListCall</display-name>
    <enterprise-beans>
        <session>
            <ejb-name>ListCall</ejb-name>
            <home>ejbeans.remote.ListCallHome</home>
            <remote>ejbeans.remote.LC</remote>
            <ejb-class>ejbeans.app.ListCall</ejb-class>
            <session-type>Stateless</session-type>
            <transaction-type>Bean</transaction-type>
        </session>
    </enterprise-beans>
</ejb-jar>

File web.xml only a small part
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="Malquati" version="2.4" 
xmlns="http://java.sun.com/xml/ns/j2ee" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
...
      <ejb-ref>
        <ejb-ref-name>ejb/ListCall</ejb-ref-name>
        <ejb-ref-type>Session</ejb-ref-type>
        <home>ejbeans.remote.ListCallHome</home>
        <remote>ejbeans.remote.LC</remote>
    </ejb-ref>
...

And geronimo-web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.0" 
xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.0" 
xmlns:sec="http://geronimo.apache.org/xml/ns/security-1.1" 
xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.0" 
configId="Malquati">
  <context-root>/Malquati</context-root>
  <context-priority-classloader>false</context-priority-classloader>
    <ejb-ref>
        <ref-name>ejb/ListCall</ref-name> 
<target-name>geronimo.server:EJBModule=ListCall,J2EEApplication=null,J2EEServer=geronimo,j2eeType=StatelessSessionBean,name=ListCall</target-name>
    </ejb-ref>
  <nam:resource-ref>
    <nam:ref-name>jdbc/MyDataSource</nam:ref-name>
    <nam:resource-link>MySQL2</nam:resource-link>
  </nam:resource-ref>
</web-app>

Mime
View raw message