Hello all,

    I'm having a bit of a problem. I have been able to
successfully deploy my EJBs and access them through my
servlets in Resin-EE without a problem. Now I am trying to
port my application over to BEA WebLogic 6.1. I have been
able to package up the EJBs into a .jar (after running ejbc
to generate the stubs and what not). I am using only local
interfaces in the EJBs; no remote interfaces. WebLogic says
that the EJB.jar file is deployed successfully, so I am sure
that the EJBs have been deployed. Now I have a web.war file
which has the JSPs, Servlets, etc. I am trying to access an
EJB from within a servlet using the following:

Context ctx = (Context) new InitialContext();
 ReminderManagerLocalHome home = (ReminderManagerLocalHome)
ctx.lookup("ReminderManager");

I have the following for ReminderManager in
weblogic-ejb-jar.xml:

<weblogic-enterprise-bean>
    <ejb-name>ReminderManager</ejb-name>
    <local-jndi-name>ReminderManager</local-jndi-name>
</weblogic-enterprise-bean>

However, I get the following exception when I try to execute
the servlet:

java.lang.ClassCastException:
era.reminder.ReminderManagerBean_obppyz_LocalHomeI
mpl
        at
era.reminder.ReminderServlet.init(ReminderServlet.java:32)
        at
javax.servlet.GenericServlet.init(GenericServlet.java:258)
        at
weblogic.servlet.internal.ServletStubImpl.createServlet(Serv
letStubIm
pl.java:713)
        at
weblogic.servlet.internal.ServletStubImpl.createInstances(Se
rvletStub
Impl.java:656)
        at
weblogic.servlet.internal.ServletStubImpl.prepareServlet(Ser
vletStubI
mpl.java:601)
        at
weblogic.servlet.internal.WebAppServletContext.preloadServle
t(WebAppS
ervletContext.java:2272)
        at
weblogic.servlet.internal.WebAppServletContext.preloadServle
ts(WebApp
ServletContext.java:2216)
        at
weblogic.servlet.internal.HttpServer.preloadServlets(HttpSer
ver.java:
495)
        at
weblogic.servlet.internal.WebService.preloadServlets(WebServ
ice.java:
450)
        at
weblogic.t3.srvr.ServletInitRunner.run(ServletInitRunner.jav
a:49)
        at java.lang.Thread.run(Thread.java:479)

I am not sure what to do... I have packaged all of the local
component interfaces into the web.war file as well as in the
EJB.jar file. It appears that when I cast the returned
object to ReminderManagerLocalHome WebLogic complains. I am
assuming that the
"era.reminder.ReminderManagerBean_obppyz_LocalHomeI
mpl" is the local home object that WebLogic created for me
(via ejbc) to implement the ReminderManagerLocalHome
interface. Any suggestions would highly be appreciated!

Thanks,

Ryan LeCompte
[EMAIL PROTECTED]
http://www.louisiana.edu/~rml7669

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to