Hi all,

I'm new to resin (I started to use it yesterday), I really love it 
because it is fast and easy to configure (unlike JBoss which I was 
previously using). This is for a school project.

However, I've got an issue, I cannot get the remote EJB 3.0 work with 
resin 3.1 and hessian.

Here is my config (web.xml of my webapps):

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://caucho.com/ns/resin";>
   <display-name>restaurant</display-name>

   <jndi-link jndi-name="java:comp/env/ejb">
     <factory>com.caucho.ejb.hessian.HessianContextFactory</factory>
     <init-param 
java.naming.provider.url="http://localhost:8080/restaurant/hessian"/>
   </jndi-link>
   <servlet>
     <servlet-name>hello</servlet-name>
     <servlet-class>com.caucho.hessian.server.HessianServlet</servlet-class>
     <init-param>
       <param-name>home-class</param-name>
       <param-value>webService.HelloWorldService</param-value>
     </init-param>
     <init-param>
       <param-name>home-api</param-name>
       <param-value>webService.HelloWorld</param-value>
     </init-param>
   </servlet>
   <servlet-mapping>
     <servlet-name>hello</servlet-name>
     <url-pattern>/hello</url-pattern>
   </servlet-mapping>

   <ejb-stateless-bean class="sessionBeanServer.RestaurantBean"/>
   <servlet>
     <servlet-name>EJBServlet</servlet-name>
     <servlet-class>com.caucho.ejb.hessian.EJBServlet</servlet-class>
   </servlet>
   <servlet-mapping>
     <servlet-name>EJBServlet</servlet-name>
     <url-pattern>/hessian/*</url-pattern>
   </servlet-mapping>
</web-app>


- The "hello" servlet is a EJB 3.0 client through the Business Delegate
- There is also the EJB 3.0 implementation in the same project
- They should communicate using remote hessian (because later the 
BusinessDelegate is meant to be moved to other machines)


The hello servlet calls my BusinessDelegate, which itself does :


        public static CarteItemSerial getCarteItemById(long id) throws 
SessionBeanException {
                try {
                        System.out.println("debug: start composition");
                Context context = (Context) new 
InitialContext().lookup("java:comp/env");
System.out.println("debug: start composition 2");


                Restaurant beanRemote = (Restaurant)
                context.lookup("ejb/RestaurantBean"); // crashes here !
System.out.println("debug: bean = " + beanRemote);
        
        
                return beanRemote.getCarteItemById(id);
                }
                catch (Exception e) {
                        e.printStackTrace();
                        throw new SessionBeanException(e.getMessage());
                }
        }
        


And my EJB 3.0 is :

import sessionBeanCommon.*;

import javax.ejb.Stateless;
import javax.ejb.Remote;

@Stateless
@Remote
public class RestaurantBean implements Restaurant {
  .. method of Restaurant including getCarteItemById(long id) ..
}



When I call my business' delegate method, this is what I get :

debug: start composition
debug: start composition 2
[05:36:30.140] {http--8080-12} javax.servlet.ServletException: Can't 
load skelet
on for '/?null'
[05:36:30.140] {http--8080-12}  at 
com.caucho.ejb.EJBServlet.service(EJBServlet.
java:217)
[05:36:30.140] {http--8080-12}  at 
com.caucho.server.dispatch.ServletFilterChain
.doFilter(ServletFilterChain.java:103)
[05:36:30.140] {http--8080-12}  at 
com.caucho.server.webapp.WebAppFilterChain.do
Filter(WebAppFilterChain.java:181)
[05:36:30.140] {http--8080-12}  at 
com.caucho.server.dispatch.ServletInvocation.
service(ServletInvocation.java:266)



I've got no idea why I get this error.
How to fix it ?

Thanks a lot !

Regards,
  Dinesh Bolkensteyn


_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

Reply via email to