geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Santosh Koti" <Santosh_K...@infosys.com>
Subject RE: EJB trouble
Date Tue, 30 May 2006 06:22:09 GMT

Can u post the stack trace..!!

So , that some1 can go ahead for ur query.



Thanks,

Santosh.

"Don't talk about yourself; it will be done when you leave. "



-----Original Message-----
From: Nirav Mehta [mailto:mehtanirav@gmail.com]
Sent: Tuesday, May 30, 2006 8:01 AM
To: user@geronimo.apache.org
Subject: EJB trouble



Hi all,

I am a newbie at JEE and ave just started trying out EJBs. I managed to
create a stateful session bean and a client JSP program. This works
perfect when I deploy them both in a single EAR. But when I deploy the
bean jar and the client war separately, there are issues. These are my
deployment descriptors:

The Bean -
ejb-jar.xml :

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

<ejb-jar id="ejb-jar_1" xmlns=" http://java.sun.com/xml/ns/j2ee
<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>
http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd" version="2.1">

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

   <enterprise-beans>

      <!-- Session Beans -->
      <session id="Session_HelloWorld">
         <description>A session bean returning HelloWorld></description>

         <display-name>HelloWorld</display-name>

         <ejb-name>HelloWorld</ejb-name>

         <home>helloWorld.HelloWorldHome</home>
         <remote>helloWorld.HelloWorld </remote>
         <local-home>helloWorld.HelloWorldLocalHome</local-home>
         <local>helloWorld.HelloWorldLocal</local>
         <ejb-class>helloWorld.HelloWorldSession</ejb-class>
         <session-type>Stateful</session-type>
         <transaction-type>Container</transaction-type>

      </session>

</ejb-jar>


openejb-jar.xml :

<?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="EJBProj1/EJBProj1">
 <enterprise-beans>
    <entity>
        <ejb-name>ejb/HelloWorld</ejb-name>
        <jndi-name>HelloWorld</jndi-name>
        <local-jndi-name>HelloWorldLocal</local-jndi-name>
    </entity>
 </enterprise-beans>
</openejb-jar>

Client prog -
web.xml :

<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" 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">
    <display-name>EJBClientProj1</display-name>
    <welcome-file-list>
        <welcome-file>Hello.jsp</welcome-file>
    </welcome-file-list>
   
    <ejb-ref>
        <ejb-ref-name>ejb/HelloWorld</ejb-ref-name>
        <ejb-ref-type>Session</ejb-ref-type>
        <home>helloWorld.HelloWorldHome</home>
        <remote>helloWorld.HelloWorld</remote>
    </ejb-ref>
   
    <ejb-local-ref>
        <ejb-ref-name>ejb/HelloWorldLocal</ejb-ref-name>
        <ejb-ref-type>Session</ejb-ref-type>
        <local-home>helloWorld.HelloWorldLocalHome</local-home>
        <local>helloWorld.HelloWorldLocal</local>
        <ejb-link>HelloWorldLocal</ejb-link>
    </ejb-local-ref>

</web-app>

geronimo-web.xml :

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns=" http://geronimo.apache.org/xml/ns/j2ee/web-1.0
<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
<http://geronimo.apache.org/xml/ns/security-1.1> "
xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.0"
configId="EJBClientProj1/EJBClientProj1">
  <context-root>/EJBClientProj1</context-root>
  <context-priority-classloader>false</context-priority-classloader>
  <nam:ejb-ref>
    <nam:ref-name>ejb/HelloWorld</nam:ref-name>

<nam:target-name>geronimo.server:J2EEModule=EJBProj1.jar,J2EEServer=gero
nimo,j2eeType=StatefulSessionBean,name=HelloWorld</nam:target-name>
  </nam:ejb-ref>
</web-app>


Where am I going wrong? Can someone please explain conceptually so that
I dont have to trouble you again?

Regards,
Nirav Mehta



**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the use of
the addressee(s). If you are not the intended recipient, please notify the sender by e-mail
and delete the original message. Further, you are not to copy, disclose, or distribute this
e-mail or its contents to any other person and any such actions are unlawful. This e-mail
may contain viruses. Infosys has taken every reasonable precaution to minimize this risk,
but is not liable for any damage you may sustain as a result of any virus in this e-mail.
You should carry out your own virus checks before opening the e-mail or attachment. Infosys
reserves the right to monitor and review the content of all messages sent to or from this
e-mail address. Messages sent to or from this e-mail address may be stored on the Infosys
e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***
Mime
View raw message