Hello there,
I am trying to access the orion's demo/ejb/cart ejbeans via servlet or jsp
file. The code is
                try
                {
                        Hashtable env = new Hashtable();
 
env.put(Context.INITIAL_CONTEXT_FACTORY,"com.evermind.server.ApplicationClie
ntInitialContextFactory");
 
env.put(Context.PROVIDER_URL,"ormi://10.1.1.59/ejbsamples");
                        env.put(Context.SECURITY_PRINCIPAL,"admin");
                        env.put(Context.SECURITY_CREDENTIALS,"123");      
                Context context = new InitialContext(env);
                Object homeObject = context.lookup("java:comp/env/MyCart");
                        CartHome home =
(CartHome)PortableRemoteObject.narrow(homeObject, CartHome.class);
                        }
                //Cart cart =
(Cart)PortableRemoteObject.narrow(home.create(), Cart.class);
                 }
                catch(Exception ee){
                                return "Error Becomes ..."+ee;
                } 
I am getting error as,
        java.lang.ClassCastException: CartHome_StatefulSessionHomeWrapper2 

If I access the ejbeans from an application on command prompt, it is working
fine.
I really wonder why the same code is not working in servlet/beans/jsp.
Can anyone help me?

Thanks in advance
Jeya([EMAIL PROTECTED])
=====================================================================
WARNING -This e-mail, including any attachments, is for the 
personal use of the recipient(s) only.
Republication and re-dissemination, including posting to news 
groups or web pages, is strictly prohibited without the express
prior consent of
Thomson Legal & Regulatory Group Asia Pacific Ltd 
ACN 058 914 668
=====================================================================

Reply via email to