Sure, here it is...

BTW, I used the same kind of code to call EJBs in Oracle JVM and in
Websphere and it always worked...

try
{
    Hashtable oEnv = new Hashtable(5); // Max needed + 1

    oEnv.put(Context.INITIAL_CONTEXT_FACTORY,
             "com.evermind.server.ApplicationClientInitialContextFactory");
    oEnv.put(Context.PROVIDER_URL, "ormi://saturne:23791/Demo");
    oEnv.put(Context.SECURITY_PRINCIPAL, "admin");
    oEnv.put(Context.SECURITY_CREDENTIALS, "admin");

    InitialContext oContext = new InitialContext(oEnv);

    U2007ML_UsersHome oHome;

    // This is where I get the ClassCastException...
    oHome = (U2007ML_UsersHome) oContext.lookup("U2007ML_UsersRemote");

    ...
}
catch(Exception ex)
{
    ex.printStackTrace();
}

Thanks for your help!


-----Message d'origine-----
De : Lin, Zhongwu [mailto:[EMAIL PROTECTED]]
Envoy� : 10 septembre, 2001 16:27
� : '[EMAIL PROTECTED]'
Objet : RE: Call EJB in OC4J from Tomcat


Can you show us how you make call to ejb? otherwise on one can help you

zlin

> -----Original Message-----
> From: Ghislain Gadbois [SMTP:[EMAIL PROTECTED]]
> Sent: Monday, September 10, 2001 3:25 PM
> To:   Tomcat-User list (E-mail)
> Subject:      Call EJB in OC4J from Tomcat
>
> Hi,
>
> I have a servlet deployed in Tomcat 3.2.1 on SunOS 5.6.  My servlet works
> fine.
>
> I have EJB components deployed in Oracle Containers for J2EE (OC4J) which
> are J2EE compliant containers.  I can call my EJB components from my
> servlet
> if I run my servlet from my IDE (Oracle JDeveloper 3.2.2), but, when I try
> to call my EJB components from the servlet runn in Tomcat, I have a
> ClassCastException (java.lang.ClassCastException: __Proxy5).
>
> Can anyone help me on this one?
>
> What is going on?
>
> Why can't I call my EJB components when my servlet runs in Tomcat?
>
> Thanks for your help

Reply via email to