Accessing WebLogic EJBs from Tomcat 3.2

Has anyone out there tried to access EJBs in a WebLogic 5.10 SP6 app
server from a servlet in Tomcat 3.2? I'm operating under Win2K. When I
try to create the initial naming context, the following exception is
thrown:
java.lang.NoClassDefFoundError: COM/rsa/jsafe/JSAFE_InvalidUseException
at weblogic.security.WLMessageDigest.getInstance
(WLMessageDigest.java:52)
at weblogic.security.MD5RandomBitsSource.seed
(MD5RandomBitsSource.java:56)
at weblogic.rjvm.LocalRJVM.<init>(LocalRJVM.java:108)
at weblogic.rjvm.LocalRJVM.getLocalRJVM(LocalRJVM.java:85)
at weblogic.rjvm.RJVMManager.getLocalRJVM(RJVMManager.java:89)
at weblogic.rjvm.RJVMManager.initialize(RJVMManager.java:78)
at weblogic.kernel.Kernel.ensureInitialized(Kernel.java:137)
at weblogic.rjvm.ServerURL.findOrCreateRJVM(ServerURL.java:182)
at
weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(
WLInitialContextFactoryDelegate.java, Compiled Code)
at
weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(
WLInitialContextFactoryDelegate.java:148)
at weblogic.jndi.WLInitialContextFactory.getInitialContext(
WLInitialContextFactory.java:123)
at javax.naming.spi.NamingManager.getInitialContext(
NamingManager.java:771)
at javax.naming.InitialContext.getDefaultInitCtx(
InitialContext.java:169)
at javax.naming.InitialContext.<init>(InitialContext.java:146)
From poking around in the WebLogic server directories, in appears that
the RSA-related classes are implemented as native methods in jsafe.dll.
Should I be trying to install this dll in Tomcat somehow? If so, where
should I be looking for information on how to do this?
-- Erik

"Erik Horstkotte" <[email protected]> wrote in message news:[email protected]...
Has anyone out there tried to access EJBs in a WebLogic 5.10 SP6 app
server from a servlet in Tomcat 3.2? I'm operating under Win2K. When I
try to create the initial naming context, the following exception is
thrown:[Sigh. I know it's bad form to follow up your own posts, but...]
Ignore the exact problem description above. I wasn't including
\weblogic\classes and \weblogic\lib\weblogicaux.jar in Tomcat's
classpath. Now the same code connects to the app server:
Connected successfully using http to JIMBO/172.16.1.4:7001
But immediately after connecting, I get a new exception:
java.lang.NoSuchMethodError: java.lang.NoSuchMethodException:
getNameInNamespace
at weblogic.jndi.toolkit.BasicWLContext_WLStub.ensureInitialized
(BasicWLContext_WLStub.java:127)
at weblogic.jndi.toolkit.BasicWLContext_WLStub.<init>
(BasicWLContext_WLStub.java:146)
at java.lang.reflect.Constructor.newInstance(Native Method)
at weblogic.common.internal.ClassTableEntry.newInstance
(ClassTableEntry.java:86)
at weblogic.common.internal.WLObjectInputStreamBase.readLeftover
(WLObjectInputStreamBase.java:248)
at weblogic.common.internal.WLObjectInputStreamBase
.readObjectBody (WLObjectInputStreamBase.java:202)
at weblogic.common.internal.WLObjectInputStreamBase.readObject
(WLObjectInputStreamBase.java:949)
at weblogic.common.internal.WLObjectInputStreamBase.readObjectWL
(WLObjectInputStreamBase.java:308)
at weblogic.jndi.toolkit.WLContextStub.readExternal
(WLContextStub.java:79)
at weblogic.common.internal.WLObjectInputStreamBase
.readPublicSerializable(WLObjectInputStreamBase.java:269)
at weblogic.common.internal.WLObjectInputStreamBase.readLeftover
(WLObjectInputStreamBase.java:254)
at weblogic.common.internal.WLObjectInputStreamBase.readObjectBody
(WLObjectInputStreamBase.java:202)
at weblogic.common.internal.WLObjectInputStreamBase.readObject
(WLObjectInputStreamBase.java:949)
at weblogic.common.internal.WLObjectInputStreamBase.readObjectWL
(WLObjectInputStreamBase.java:308)
at weblogic.rmi.extensions.AbstractInputStream2.readObject
(AbstractInputStream2.java:25)
at weblogic.jndi.internal.RemoteContextFactoryImpl_WLStub
.getContext(RemoteContextFactoryImpl_WLStub.java:99)
at weblogic.jndi.WLInitialContextFactoryDelegate
.newRemoteContext(WLInitialContextFactoryDelegate.java:316)
at weblogic.jndi.WLInitialContextFactoryDelegate.newContext
(WLInitialContextFactoryDelegate.java:242)
at weblogic.jndi.WLInitialContextFactoryDelegate
.getInitialContext(WLInitialContextFactoryDelegate.java, Compiled
Code)
at weblogic.jndi.WLInitialContextFactoryDelegate
.getInitialContext(WLInitialContextFactoryDelegate.java:148)
at weblogic.jndi.WLInitialContextFactory.getInitialContext
(WLInitialContextFactory.java:123)
at javax.naming.spi.NamingManager.getInitialContext
(NamingManager.java:771)
at javax.naming.InitialContext.getDefaultInitCtx
(InitialContext.java:169)
at javax.naming.InitialContext.<init>(InitialContext.java:146)
getNameInNamespace isn't a method in any of my EJB's (that I wrote, at
least - it could be generated by weblogic.ejbc), and it's not a method
I'm calling directly. Presumably, something in the remote session bean
creation is calling this method (of what class?)
Am still I missing classpath entries in Tomcat? If so, which ones?
If you've successfully referenced EJBs in a WebLogic Server from a
Tomcat servlet, what setup changes did you have to make to Tomcat and
WLS to make it fly?
-- Erik

Similar Messages

  • Help Needed: Accessing Weblogic EJB in Tomcat

    Hi all, I'm trying to access some EJB residing in weblogic7.0 server. Does anyone have any information/idea on how to do a JNDI connection to Weblogic Server and what are the necessary configuration on the Tomcat Server?
    Thank you.
    Celte

    Hashtable ht = new Hashtable();
    ht.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    ht.put(Context.PROVIDER_URL, "t3://"+appSrvIp+":7001");
    ht.put(Context.SECURITY_PRINCIPAL, "user");
    ht.put(Context.SECURITY_CREDENTIALS, "passsword");
    initCtx = new InitialContext(ht);
    You will need weblogic.jar in your Tomcat classpath

  • Exception looking up weblogic ejb from tomcat

    i have a servlet in tomcat 4.0 doing a remote lookup on an ejb in
    weblogic 6.1. the code works from a standalone client, but not in tomcat.
    so i assume it is something to do with jaas. do i have to configure jaas
    differently? and how?? i do not need to do anything with a standalone
    client to work.
    the code is
    Properties p = new Properties();
    p.put(Context.INITIAL_CONTEXT_FACTORY,
    "weblogic.jndi.WLInitialContextFactory");
    p.put(Context.PROVIDER_URL, "t3://192.168.254.3:7001");
    p.put(Context.SECURITY_PRINCIPAL, "user");
    p.put(Context.SECURITY_CREDENTIALS, "password");
    InitialContext ctx = new InitialContext(p);
    the exception is
    javax.servlet.ServletException: javax.naming.AuthenticationException
    [Root exception is java.lang.SecurityException: attempting to add an
    object which is not an instance of java.security.Principal to a
    Subject's Principal Set]
         at
    org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:457)
         at
    org.apache.jsp.test_0002dremote$jsp._jspService(test_0002dremote$jsp.java:71)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at
    org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
         at
    org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
         at
    org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at
    org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
         at
    org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at
    org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
         at
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at
    org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at
    org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
         at
    org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
         at
    org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at
    org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
         at
    org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at
    org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at
    org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
         at
    org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
         at java.lang.Thread.run(Thread.java:536)
    root cause
    com.realty.remoteservice.RemoteServiceException:
    javax.naming.AuthenticationException [Root exception is
    java.lang.SecurityException: attempting to add an object which is not an
    instance of java.security.Principal to a Subject's Principal Set]
         at com.realty.remoteservice.EjbService.addListingAgent(EjbService.java:43)
         at com.realty.remoteservice.EjbService.main(EjbService.java:23)
         at
    org.apache.jsp.test_0002dremote$jsp._jspService(test_0002dremote$jsp.java:61)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at
    org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
         at
    org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
         at
    org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at
    org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
         at
    org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at
    org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
         at
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at
    org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at
    org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
         at
    org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
         at
    org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at
    org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
         at
    org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at
    org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at
    org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
         at
    org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
         at java.lang.Thread.run(Thread.java:536)
    nested exception is:
    javax.naming.AuthenticationException. Root exception is
    java.lang.SecurityException: attempting to add an object which is not an
    instance of java.security.Principal to a Subject's Principal Set
         at javax.security.auth.Subject$SecureSet.add(Subject.java:1071)
         at
    weblogic.common.internal.BootServicesStub.writeUserInfoToSubject(BootServicesStub.java:72)
         at
    weblogic.common.internal.BootServicesStub.authenticate(BootServicesStub.java:80)
         at weblogic.security.acl.internal.Security.authenticate(Security.java:108)
         at
    weblogic.jndi.WLInitialContextFactoryDelegate.pushUser(WLInitialContextFactoryDelegate.java:461)
         at
    weblogic.jndi.WLInitialContextFactoryDelegate.newContext(WLInitialContextFactoryDelegate.java:316)
         at
    weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:288)
         at
    weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:203)
         at
    weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:124)
         at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
         at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
         at javax.naming.InitialContext.init(InitialContext.java:219)
         at javax.naming.InitialContext.(InitialContext.java:195)
         at
    com.realty.util.RealtyContextFactory.create(RealtyContextFactory.java:25)
         at com.realty.remoteservice.EjbService.addListingAgent(EjbService.java:36)
         at com.realty.remoteservice.EjbService.main(EjbService.java:23)
         at
    org.apache.jsp.test_0002dremote$jsp._jspService(test_0002dremote$jsp.java:61)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at
    org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
         at
    org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
         at
    org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at
    org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
         at
    org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at
    org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
         at
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at
    org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at
    org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
         at
    org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
         at
    org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at
    org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
         at
    org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at
    org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at
    org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
         at
    org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
         at java.lang.Thread.run(Thread.java:536)

    Did you try placing weblogic.jar in front of the classpath?
    Or use WebLogic servlet container instead ;-)
    "Simon Evans" <[email protected]> wrote in message
    news:[email protected]...
    any solution? tomcat also uses jaas so i cant remove them.
    Dimitri I. Rakitine wrote:
    Happened to me once - as far as I remember it was caused by non-WL jaas
    classes in the
    classpath.
    "Simon Evans" <[email protected]> wrote in message
    news:[email protected]...
    i have a servlet in tomcat 4.0 doing a remote lookup on an ejb in
    weblogic 6.1. the code works from a standalone client, but not in
    tomcat.
    so i assume it is something to do with jaas. do i have to configure jaas
    differently? and how?? i do not need to do anything with a standalone
    client to work.
    the code is
    Properties p = new Properties();
    p.put(Context.INITIAL_CONTEXT_FACTORY,
    "weblogic.jndi.WLInitialContextFactory");
    p.put(Context.PROVIDER_URL, "t3://192.168.254.3:7001");
    p.put(Context.SECURITY_PRINCIPAL, "user");
    p.put(Context.SECURITY_CREDENTIALS, "password");
    InitialContext ctx = new InitialContext(p);
    the exception is
    javax.servlet.ServletException: javax.naming.AuthenticationException
    [Root exception is java.lang.SecurityException: attempting to add an
    object which is not an instance of java.security.Principal to a
    Subject's Principal Set]
    at
    org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
    l.java:457)
    at
    org.apache.jsp.test_0002dremote$jsp._jspService(test_0002dremote$jsp.java:71
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at
    org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
    va:201)
    atorg.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
    FilterChain.java:247)
    at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
    ain.java:193)
    at
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
    va:243)
    at
    org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
    66)
    at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    >>
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
    va:190)
    at
    org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
    66)
    at
    org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2
    46)
    at
    org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
    64)
    at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    >>
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at
    org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
    at
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
    at
    org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
    66)
    at
    org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
    java:170)
    at
    org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
    64)
    at
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170
    at
    org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
    64)
    at
    org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
    at
    org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
    64)
    at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    >>
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
    :174)
    at
    org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
    66)
    at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    >>
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at
    org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
    1027)
    at
    org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125
    at java.lang.Thread.run(Thread.java:536)
    root cause
    com.realty.remoteservice.RemoteServiceException:
    javax.naming.AuthenticationException [Root exception is
    java.lang.SecurityException: attempting to add an object which is not an
    instance of java.security.Principal to a Subject's Principal Set]
    at
    com.realty.remoteservice.EjbService.addListingAgent(EjbService.java:43)
    at com.realty.remoteservice.EjbService.main(EjbService.java:23)
    at
    org.apache.jsp.test_0002dremote$jsp._jspService(test_0002dremote$jsp.java:61
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at
    org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
    va:201)
    atorg.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
    FilterChain.java:247)
    at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
    ain.java:193)
    at
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
    va:243)
    at
    org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
    66)
    at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    >>
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
    va:190)
    at
    org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
    66)
    at
    org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2
    46)
    at
    org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
    64)
    at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    >>
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at
    org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
    at
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
    at
    org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
    66)
    at
    org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
    java:170)
    at
    org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
    64)
    at
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170
    at
    org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
    64)
    at
    org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
    at
    org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
    64)
    at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    >>
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
    :174)
    at
    org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
    66)
    at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    >>
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at
    org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
    1027)
    at
    org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125
    at java.lang.Thread.run(Thread.java:536)
    nested exception is:
    javax.naming.AuthenticationException. Root exception is
    java.lang.SecurityException: attempting to add an object which is not an
    instance of java.security.Principal to a Subject's Principal Set
    at javax.security.auth.Subject$SecureSet.add(Subject.java:1071)
    at
    weblogic.common.internal.BootServicesStub.writeUserInfoToSubject(BootService
    sStub.java:72)
    at
    weblogic.common.internal.BootServicesStub.authenticate(BootServicesStub.java
    :80)
    at
    weblogic.security.acl.internal.Security.authenticate(Security.java:108)
    at
    weblogic.jndi.WLInitialContextFactoryDelegate.pushUser(WLInitialContextFacto
    ryDelegate.java:461)
    at
    weblogic.jndi.WLInitialContextFactoryDelegate.newContext(WLInitialContextFac
    toryDelegate.java:316)
    at
    weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialCon
    textFactoryDelegate.java:288)
    at
    weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialCon
    textFactoryDelegate.java:203)
    at
    weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFact
    ory.java:124)
    atjavax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
    at
    javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
    at javax.naming.InitialContext.init(InitialContext.java:219)
    at javax.naming.InitialContext.(InitialContext.java:195)
    at
    com.realty.util.RealtyContextFactory.create(RealtyContextFactory.java:25)
    at
    com.realty.remoteservice.EjbService.addListingAgent(EjbService.java:36)
    at com.realty.remoteservice.EjbService.main(EjbService.java:23)
    at
    org.apache.jsp.test_0002dremote$jsp._jspService(test_0002dremote$jsp.java:61
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at
    org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
    va:201)
    atorg.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
    FilterChain.java:247)
    at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
    ain.java:193)
    at
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
    va:243)
    at
    org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
    66)
    at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    >>
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
    va:190)
    at
    org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
    66)
    at
    org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2
    46)
    at
    org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
    64)
    at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    >>
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at
    org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
    at
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
    at
    org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
    66)
    at
    org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
    java:170)
    at
    org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
    64)
    at
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170
    at
    org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
    64)
    at
    org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
    at
    org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
    64)
    at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    >>
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
    :174)
    at
    org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
    66)
    at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    >>
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at
    org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
    1027)
    at
    org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125
    at java.lang.Thread.run(Thread.java:536)
    Dimitri
    Dimitri

  • How can one invoke a WebLogic EJB from a BPEL Server hosted on OC4J?

    How can one invoke a WebLogic EJB from a BPEL Server hosted on OC4J?
    Reason I ask is I keep getting this error:
    javax.naming.NoInitialContextException: Cannot instantiate cla
    ss: weblogic.jndi.WLInitialContextFactory [Root exception is java.lang.ClassNotF
    oundException: weblogic.jndi.WLInitialContextFactory]
    Note: I am using <bpelx:exec> as a way to execute some java program.
    Essentially my java client (essentially an EJB client hosted on Oc4J) needs access to wlclient.jar since it needs access to weblogic.jndi.WLInitialContextFactory. I have a EJB client running on BPEL server hosted on Oc4J that needs to access some EJBs hosted on weblogic.
    Where do I place this wlclient.jar so that BPEL PM can start peacefully and at runtime discover the InitialContextFactory classes?
    Placing it in the j2ee/home/applib doesn't solve the problem. The server fails to start up if I do this
    I tried placing it in BPEL-INF\lib directory ...
    I still get the same exception...see below for exception dump
    I verified the BPEL suitcase, and it in fact does contain the jar file wlclient.jar
    integration\orabpel\domains\default\deploy contains the bpel_BPELProcess2_1.0.jar file and snapshot of that is as follows:
    <PRE>
    &#9474; bpel.xml
    &#9474; BPELProcess2.bpel
    &#9474; BPELProcess2.jpr
    &#9474; BPELProcess2.wsdl
    &#9474; bpel_BPELProcess2_1.0.jar
    &#9474; build.xml
    &#9474; buildxml.copy
    &#9474; graphics.xml
    &#9474;
    &#9500;&#9472;&#9472;&#9472;BPEL-INF
    &#9474; &#9492;&#9472;&#9472;&#9472;lib
    &#9474; myEJB.jar
    &#9474; wlclient.jar
    &#9474;
    &#9500;&#9472;&#9472;&#9472;META-INF
    &#9474; MANIFEST.MF
    &#9474;
    &#9492;&#9472;&#9472;&#9472;output
    bpel_BPELProcess2_1.0.jar
    </PRE>
    I tried using the BPEL-INF\jar directory...Is this something the obant automatically detects? or do I have to modify the build.xml? I created this directory and let Jdev deploy to local BPEL server->default domain handle it
    #####################3
    I even tried copying the wlclient.jar to
    integration\orabpel\system\classes but this doesn't help since the BPEL PM fails to start if I explode this jar into this directory.
    In short,where do I place the wlclient.jar so that this exception can be contained.
    I edited the build.xml to point to the jar, that too didn't work, unless I made some mistake in the file
    <bpelc classpath="${basedir}/BPEL-INF/classes;${home}/system/classes;${home}/lib/j2ee_1.3.01.jar;${basedir}/BPEL-INF/jar/wlclient.jar" input="${basedir}/bpel.xml" rev="${rev}" deploy="${deploy}" />
    </target>
    </project>
    DETAILS on ERROR
    I get the following error
    Process "BPELProcess2" (revision "1.0") successfully compiled.
    <2005-12-14 09:17:55,770> <INFO> <default.collaxa.cube.engine.deployment> Proces
    s "BPELProcess2" (revision "1.0") successfully loaded.
    05/12/14 09:18:36 weblogic.jndi.WLInitialContextFactory
    javax.naming.NoInitialContextException: Cannot instantiate cla
    ss: weblogic.jndi.WLInitialContextFactory [Root exception is java.lang.ClassNotF
    oundException: weblogic.jndi.WLInitialContextFactory]
    05/12/14 09:18:36 at javax.naming.spi.NamingManager.getInitialContext(Nami
    ngManager.java:652)
    05/12/14 09:18:36 at javax.naming.InitialContext.getDefaultInitCtx(Initial
    Context.java:243)
    05/12/14 09:18:36 at javax.naming.InitialContext.init(InitialContext.java:
    219)
    05/12/14 09:18:36 at javax.naming.InitialContext.<init>(InitialContext.jav
    a:195)
    05/12/14 09:18:36 at com.ejb.test.MapFinder.getDefaultMapName(Map
    Finder.java:37)
    ##################3
    with the bpelx all I have is two lines of code that creates a java object and calls a method on it.
    The method does this:
        private String initialContextFactory = "weblogic.jndi.WLInitialContextFactory";
        private String providerUrl = "t3://localhost:7001";
        private String urlPkgPrefixes = "";
        private String mapEjbJndiName = "ejb/mycompany/Redlands";
        public String getDefaultMapName() {
          try {
              Hashtable env = new Hashtable();
              env.put(Context.INITIAL_CONTEXT_FACTORY, getInitialContextFactory());
              env.put(Context.PROVIDER_URL, getProviderUrl());
              if (getUrlPkgPrefixes() != null && !getUrlPkgPrefixes().equals(""))
                  env.put(Context.URL_PKG_PREFIXES, getUrlPkgPrefixes());
              System.out.println("    " + getInitialContextFactory());
              System.out.println("    " + getProviderUrl());
              System.out.println("    " + getUrlPkgPrefixes());
              System.out.println("    " + getEjbName());
              // Get a naming context
              context = new InitialContext(env);
               Object ms  = context.lookup(getEjbName());
              MyEJBHome home = (MyEJBHome ) PortableRemoteObject.narrow(ms, MyEJBHome.class);
              myEjb = home.create();
              return myEjb.getDefaultName();
          } catch (RemoteException re){
              System.out.println(re.getCause().getMessage());
          catch (Exception ex) {
              ex.printStackTrace();
          return null; //if unable to resolve the context factory etc...
        }

    I did exactly as you suggested. I edited the application.xml and added this
    <library path="C:\ArcGIS\test\bea\wlclient.jar"/>
    I didn't add weblogic because the needed classes were all in wlclient.jar
    I also edited the BASE_OB_CLASSPATH to include this jar.
    Here is the result when I just start BPEL PM Server. Somehow BPEL PM doesn't like to have wlclient.jar in its classpath during startup.
    Failed to create "worker" bean; exception reported is: "javax.naming.NameNotFoun
    dException: remaining name: env
    at weblogic.j2eeclient.SimpleContext.lookup(SimpleContext.java:49)
    at weblogic.j2eeclient.SimpleContext.lookup(SimpleContext.java:57)
    at weblogic.j2eeclient.SimpleContext.lookup(SimpleContext.java:62)
    at javax.naming.InitialContext.lookup(InitialContext.java:347)
    at com.collaxa.cube.engine.ejb.impl.WorkerBean.ejbCreate(WorkerBean.java
    :49)
    at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at com.evermind.server.ejb.MessageDrivenHome.getInstance(MessageDrivenHo
    me.java:1235)
    at com.evermind.server.ejb.MessageDrivenHome$2.run(MessageDrivenHome.jav
    a:1150)
    at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(Relea
    sableResourcePooledExecutor.java:186)
    at java.lang.Thread.run(Thread.java:534)
    <2005-12-29 13:39:05,281> <ERROR> <collaxa> <ServerManager::loadAllDomains>
    ORABPEL START-UP ERROR!!!!!!!!
    OraBPEL run-time system failed to start due to exception:
    Could not initialize jms connection pool.
    Could not initialize connection pool for connection factory "java:comp/env/jms/
    ollaxa/BPELInvokerQueueFactory"; the reason is remaining name: env/jms/collaxa/
    PELInvokerQueueFactory.
    Note: So what I did was to removed the entry from application.xml and tried with just obsetenv.bat having the wlclient.jar added to it. This too failed!!
    Here is a snapshot of the error I got.
    Process "BPELProcess2" (revision "1.0") successfully compiled.
    <2005-12-29 13:53:11,207> <INFO> <default.collaxa.cube.engine.deployment> Proces
    s "BPELProcess2" (revision "1.0") successfully loaded.
    05/12/29 13:53:32 Cannot instantiate class: weblogic.jndi.WLInitialContextFactor
    y
    05/12/29 13:53:32 javax.naming.NoInitialContextException: Cannot instantiate cla
    ss: weblogic.jndi.WLInitialContextFactory [Root exception is java.lang.ClassNotF
    oundException: weblogic.jndi.WLInitialContextFactory]
    05/12/29 13:53:32 at javax.naming.spi.NamingManager.getInitialContext(Nami
    ngManager.java:652)
    05/12/29 13:53:32 at javax.naming.InitialContext.getDefaultInitCtx(Initial
    Context.java:243)
    05/12/29 13:53:32 at javax.naming.InitialContext.init(InitialContext.java:
    219)
    05/12/29 13:53:32 at javax.naming.InitialContext.<init>(InitialContext.jav
    a:195)
    05/12/29 13:53:32 at com.esri.adf.ejb.test.MapFinder.getDefaultMapName(Map
    Finder.java:57)
    05/12/29 13:53:32 at bpel.p0.ExecLetBxExe1.execute(ExecLetBxExe1.java:62)
    05/12/29 13:53:32 at com.collaxa.cube.engine.ext.wmp.BPELXExecWMP.__execut
    eStatements(BPELXExecWMP.java:49)
    05/12/29 13:53:32 at com.collaxa.cube.engine.ext.wmp.BPELActivityWMP.perfo
    rm(BPELActivityWMP.java:185)
    05/12/29 13:53:32 at com.collaxa.cube.engine.CubeEngine.performActivity(Cu
    beEngine.java:3398)
    05/12/29 13:53:32 at com.collaxa.cube.engine.CubeEngine.handleWorkItem(Cub
    eEngine.java:1905)
    05/12/29 13:53:32 at com.collaxa.cube.engine.dispatch.message.instance.Per
    formMessageHandler.handleLocal(PerformMessageHandler.java:75)
    05/12/29 13:53:32 at com.collaxa.cube.engine.dispatch.DispatchHelper.handl
    eLocalMessage(DispatchHelper.java:100)
    05/12/29 13:53:32 at com.collaxa.cube.engine.dispatch.DispatchHelper.sendM

  • How can i access the EJB from a Webdynpro

    Dear all,
    How can i access the ejb , from a webdynpro?.
    Is there any way to do that?.
    I want to write the entire code (business functions) within the EJB and i wan to access the entire methods from a WebDynpro Application.This is the situation.
    Please help me to , resolve this problem.(Here im using JDBC Connection .. etc.).
    I want to do the basic connection setting's and data retrieval part within the EJB and use that within the WebDynpro..
    how can i seperate this two(i mean, i want to seperate the JDBC connections and WebDynpro,i dont want to hard code any connection parameters within the webdynpro code)
    So that i want use that saet of particular function's in many webdynpro applications..
    (i dont need any help regarding webservice way.)
    If anyone can , please help me..
    I tried that javabean class , manifest file , that way (importing javabean model).
    but im getting errors.
    I cant properly utilize that..
    So please help me with steps regarding that,,
    for javabean
    and if any , for EJB also..
    with regards
    Kishor.G

    HI,
    Since webdynpros follows Model View Controller Architecture You can access EJBs in webdynpro(views/frontend) infact to connec to database uding JDBC you have to utilise EJB ( opening connection to database closing, and other Business functionality).See this link
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/unkown/web dynpro tutorial and sample applications.faq#q-7
    <b>How to access the Car Rental Web Service?</b>
    Regards,
    RK

  • Using Weblogic ACL from Tomcat in Servlet/SJP

    Hi all,
    I'm trying to use weblogic ACL from a servlet in a remote Servlet/JSP
    container (Tomcat). I've managed to log a user as decribed is the
    "examples.security.acl.Client exemple" but what i need now is to be able to
    get back the user group and/or permissions. Does anyone have done this
    before ? I've look in the Weblogic documentation center but I did not manage
    to found any exemple.
    Thank you in advance.
    Frederic

    Sorry, but I believe you are going to be limited to the information
    available through the JNDI interface and the interfaces of the EJB's that
    you deploy to the weblogic EJB container. The ACL information is intended
    for use only within the scope of the server environment. So, even though you
    are running as a Servlet/JSP you're running in the Tomcat container which is
    actually outside the weblogic Servlet/JSP or EJB container(s), in essance
    you're running under the same access limitiations as an EJB client app.
    BTW, you do realize that the weblogic 6.0 server does include a very nice
    Servlet/JSP container?
    Alfred Wallace <[email protected]> wrote in message
    news:3a9fbc66$[email protected]..
    Hi all,
    I'm trying to use weblogic ACL from a servlet in a remote Servlet/JSP
    container (Tomcat). I've managed to log a user as decribed is the
    "examples.security.acl.Client exemple" but what i need now is to be ableto
    get back the user group and/or permissions. Does anyone have done this
    before ? I've look in the Weblogic documentation center but I did notmanage
    to found any exemple.
    Thank you in advance.
    Frederic

  • How to access an EJB from a web application deployed in the same server

    Hey All,
    I deployed an EJB named EventServerBean to Sun Application Server 9.0, and put the client side jar file (named eventserver.jar which is generated by Sun Application Server) to C:\Sun\AppServer\lib. Now, I have a web application which is a simple jave file -- lookup EventServer EJB and invoke a remote method in this EJB. However, the web application always throws an exception "java.lang.NoClassDefFoundError: eventserver/EventServerRemoteHome"
    Here is my java class that access the ejb:
    public class Post_Event {
        public HashMap<String, String> getEventInfo(String event_name, String site) {
            System.out.println("Post_Event, the class path: " + System.getProperty("java.class.path"));       
            System.out.println("Post_Event, user.dir: " + System.getProperty("user.dir"));
            System.out.println("Post_Event, java.library.path: " + System.getProperty("java.library.path"));
            HashMap<String, String> result = null;
            EventServerRemote remote = null;
            StringTokenizer st, st2;
            // here get the event information from host
            try {
                String lookupStr = "corbaname:iiop:" + site + ":3700#ejb/EventServerBean";
                InitialContext initialContext = new InitialContext();
                EventServerRemoteHome remoteHome = (EventServerRemoteHome) javax.rmi.PortableRemoteObject.narrow(initialContext.lookup(lookupStr), EventServerRemoteHome.class);
                if (remoteHome != null) {
                    remote = remoteHome.create();
            } catch (javax.naming.NamingException ne) {
                ne.printStackTrace();
                return null;
            } catch (javax.ejb.CreateException ce) {
                ce.printStackTrace();
                return null;
            } catch (java.rmi.RemoteException re) {
                re.printStackTrace();
                return null;
            } catch (java.io.IOException ioe) {
                ioe.printStackTrace();
                return null;
            System.out.println("look up remote event server successfully.");
         result = remote.getEvent(event_name);
            return result;
        } I output the class path in this java file, and the class path DOES include the path C:\Sun\AppServer\lib where eventserver\EventServerRemoteHome.class is.
    Does anyone know why it happens? Why a java class can't find a class that is in its class path?
    appreciate any help!

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Wael Abbas ([email protected]):
    Thank you for your great topic.
    I think you need to copy the snippet code and past it to every application, applet, servlet or JSP every time you need to use your EJB.
    Its better to include this snippet code in a simple JavaBean and use this bean as a bridge to your EJB, you may include a connect method in your JavaBean or but the connection code in the constructor and include a setters, getters and other methods to encapsulate your EJB methods.
    You can use your JavaBean in any application, applet, servlet or JSP just create an object form it and call its methods.
    Its just an idea
    I hope it will be useful.
    <HR></BLOCKQUOTE>
    null

  • Accessing an ejb from a servlet gives resource not allowed exception

    hi friends,
    i deployed a bean in weblogic server calling from within a servlet. this bean is used to retrieve a database connection and returns to the servlet. i have done all the resource references lookups everything and also the bean is deployed successfully, but when i run the servlet i didn't get even the println messages. it gives resource not allowed message.
    here is the deployment descriptor is correct ? if anything wrong or missed, please mention and try to give me the solution.
    web.xml
    <web-app>
    <servlet>
    <servlet-name>TestConnection</servlet-name>
    <display-name>TestConnection</display-name>
    <servlet-class>tms.com.ejb.TestConnection</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>TestConnection</servlet-name>
    <url-pattern>TestConnection</url-pattern>
    </servlet-mapping>
    <resource-ref>
    <res-ref-name>tmsPool</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    <env-entry>
    <env-entry-name>tmsDataSource</env-entry-name>
    <env-entry-value>tmsPool</env-entry-value>
    <env-entry-type>java.lang.String</env-entry-type>
    </env-entry>
    <env-entry>
    <env-entry-name>TMS_DBConnectionBean</env-entry-name>
    <env-entry-value>java:comp/env/ejb/TMS_DBConnectionBean</env-entry-value>
    <env-entry-type>java.lang.String</env-entry-type>
    </env-entry>
    <ejb-ref>
    <ejb-ref-name>ejb/TMS_DBConnectionBean</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <home>tms.com.ejb.TMS_DBConnectionHome</home>
    <remote>tms.com.ejb.TMS_DBConnection</remote>
    <ejb-link>TMS_DBConnectionBean</ejb-link>
    </ejb-ref>
    </web-app>
    Ejb jar is
    <enterprise-beans>
    <session>
    <display-name>ConnectionBean</display-name>
    <ejb-name>TMS_DBConnectionBean</ejb-name>
    <home>tms.com.ejb.TMS_DBConnectionHome</home>
    <remote>tms.com.ejb.TMS_DBConnection</remote>
    <ejb-class>tms.com.ejb.TMS_DBConnectionBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    <env-entry>
    <env-entry-name>tmsDataSource</env-entry-name>
    <env-entry-type>java.lang.String</env-entry-type>
    <env-entry-value>tmsPool</env-entry-value>
    </env-entry>
    <security-identity>
    <description></description>
    <use-caller-identity></use-caller-identity>
    </security-identity>
    <resource-ref>
    <res-ref-name>tmsPool</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    <!--<res-sharing-scope>Shareable</res-sharing-scope>-->
    </resource-ref>
    </session>
    </enterprise-beans>
    <weblogic-ejb-jar>
    weblogic ejb jar file is the following content.
    <weblogic-enterprise-bean>
    <ejb-name>TMS_DBConnectionBean</ejb-name>
    <stateless-session-descriptor>
    <pool>
         <max-beans-in-free-pool>1</max-beans-in-free-pool>
    </pool>
    </stateless-session-descriptor>
    <jndi-name>TMS_DBConnectionBean</jndi-name>
    </weblogic-enterprise-bean>
    thanx in advance..

    hi
    i tried the same but still i'm getting the same problem, the value i mentioned in the servlet lookup is java:comp/env/TMS_DBConnectionBean.
    then the value returned by the lookup would be java:comp/env/ejb/TMS_DBConnectionBean. right. Anyway i tried the same as u mentioned. that same problem resource not allowed is displayed in the browser. is there any other alternative to solve this?
    thanks

  • Can't access weblogic server from internet but can from intranet

    Hopefully this isn't the wrong place to post but I've searched through many many
    newsgroups to figure out where to post this but can't find a specific enough one.
    I've recently run into a problem with my weblogic server in that it can not be
    accessed from the internet now. This was all working several weeks ago, when
    I had the wl server listening for SSL communications on port 7002. I could access
    the server from both within our corporate intranet (kind of) as well as access
    it from the internet. I say kind of for the intranet in that when I chose to
    setup SSL on the the wl server, I couldn't get port 7002 to communicate through
    our proxy server. After a little research I determined that it would be best
    to communicate on the default SSL port of 443. After switching to 443, I didn't
    need to bypass the proxy any longer, when accessing from within intranet, but
    now couldn't access the server from the internet. The wl server is behind a firewall,
    but I had the network administrators open up port 443 on the firewall. They ran
    a network sniffer and determined that the wl server is sending a TCP FIN packet
    immediately following the last ACK packet in a TCP session establishment. I don't
    really understand what that all means, but it seems really strange that everything
    works great when inside the intranet and I don't get any TCP FIN packets sent
    from the server, but when you try to communcate through the firewall you do.
    Does anyone have any insight into this issue? something else I could look at.
    The network administrators are basically saying it's the webserver that needs
    configuration (even though it worked great in the past when listening on port
    7002 instead of 443). PLEASE HELP!!!

    Got it.  This thread helped!
    Thanks!
    https://discussions.apple.com/thread/3193444?tstart=60

  • ClassCastException when I access an EJB from a remote EJB in WL 8.1

    I am using WebLogic 8.1 and am trying to lookup the home interface for an EJB (_ejbRemote_)
    from another EJB (_ejbCurrent_). They are deployed in seperate EARs. When I bundle
    the home and remote interfaces for ejbRemote in the EAR file that ejbCurrent
    is deployed in, everything works fine. But I need to be able to configure ejbRemote
    at run time and my customers don't want to have to bundle their classes in my
    EAR. So I invoke a custom classloader (of type java.net.URLClassLoader) that will
    load the home and remote interface classes for ejbRemote from a configurable
    location at runtime. This finds the classes no problem, and the InitialContext.lookup()
    returns a stub, but I get a 'java.lang.ClassCastException: Cannot narrow remote
    object' error when I call PortableRemoteObject.narrow(home, homeClass);
    The code looks like:
    // Assume EJBHomeStr = "com.foo.TestHome" in this case
    // Load the home interface class. This works.
    Class homeClass = urlClassLoader.loadClass(EJBHomeStr);
    // Lookup the home interface. This works.
    Object lookedUpHomeObject = initialContext.lookup(JNDIName);
    // This fails.
    Object homeObject = PortableRemoteObject.narrow(lookedUpHomeObject, homeClass);
    And the weblogic error looks like
    ... ; nested exception is:
    java.lang.ClassCastException: Cannot narrow remote object to com.foo.TestHome
    at weblogic.iiop.PortableRemoteObjectDelegateImpl.narrow(PortableRemoteO
    bjectDelegateImpl.java:219)
    at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:134)
    at ...[the rest is just my application code stack...]
    When I log the ClassLoaders for the affected objects, using getClass().getClassLoader(),
    I get:
    <snippet from log follows>
    getClass().getClassLoader(): weblogic.utils.classloaders.GenericClassLoader@667da1
    finder:
    weblogic.utils.classloaders.MultiClassFinder@db9199 annotation: myEJBApp@
    homeClass.getName(): com.foo.TestHome classloader = java.net.URLClassLoader@4f1707
    lookedUpHomeObject.getClass().getName(): com.foo.Test_EJB_kx82zy_HomeImpl_810_WLStub
    classloader = weblogic.utils.classloaders.GenericClassLoader@667da1
    finder: weblogic.utils.classloaders.MultiClassFinder@db9199 annotation: myEJBApp@
    <end snippet from log>
    So it appears that since the looked up Stub was loaded by the WebLogic classloader
    and the actual Home class was loaded by my URLClassLoader, the narrow() can't
    reconcile the two. I have tried both rmic and the Weblogic appc command to pre-generate
    the stubs, which I put in the same JAR as my home and remote interface classes
    and load with my custom classloader. But the standard stub (generated by either
    rmic or appc) is named TestHomeStub.class and Weblogic is ignoring those and
    making a class with the name Test_EJB_kx82zy_HomeImpl_810_WLStub, as shown above.
    I have also tried to put the remote interface classes and stubs in the System
    classpath using the -classpath option when I start WebLogic, but same result.
    The question is, Is there a way in WebLogic to communicate with a remote EJB in
    a seperate EAR without bundling anything about that remote EAR in my EAR? Or is
    there something I've missed? I need to keep my application J2EE compliant, meaning
    I can't hardcode any AppServer-specific code in my application.
    Thanks.

    Hi Jon,
    Glad to hear that.
    Regards,
    Slava Imeshev
    "Jon Sutula" <[email protected]> wrote in message news:[email protected]...
    >
    I fixed the problem. It turns out I didn't need to use a custom classloader at
    all, I just use Reflection directly on the classes ruturned from my JNDI lookup.
    So when I lookup the home class, I don't need to narrow or cast it, I just use
    Reflection to invoke the "create" method. Then I use the object that I get from
    create and directly invoke whatever method on it I need, again using Reflection.
    And that works.
    "Slava Imeshev" <[email protected]> wrote:
    Hi Jon,
    The problem is, this class is not available for the classloader
    running your "main code".
    You can try to hack the into the thread context class loader:
    Thread thread = Thread.currentThread();
    ContextClassLoader originalClassLoader = thread.getContextClassLoader();
    try {
    YourURLClassloader yourClassLoader = new
    YourURLClassloader(originalClassLoader);
    thread.setContextClassLoader(yourClassLoader );
    // your code goes here
    } finally {
    // Don't forget to restore it !!!
    thread.setContextClassLoader(originalClassLoader);
    Be very cautious. If you fail to restore the original context class loader,
    you will likely have to restart the server.
    Hope this helps.
    Regards,
    Slava Imeshev
    "Jon Sutula" <[email protected]> wrote in message news:[email protected]...
    I am using WebLogic 8.1 and am trying to lookup the home interfacefor an EJB (_ejbRemote_)
    from another EJB (_ejbCurrent_). They are deployed in seperate EARs.When I bundle
    the home and remote interfaces for ejbRemote in the EAR file that
    ejbCurrent
    is deployed in, everything works fine. But I need to be able to configure
    ejbRemote
    at run time and my customers don't want to have to bundle their classesin my
    EAR. So I invoke a custom classloader (of type java.net.URLClassLoader)that will
    load the home and remote interface classes for ejbRemote from a configurable
    location at runtime. This finds the classes no problem, and the InitialContext.lookup()
    returns a stub, but I get a 'java.lang.ClassCastException: Cannot narrowremote
    object' error when I call PortableRemoteObject.narrow(home, homeClass);
    The code looks like:
    // Assume EJBHomeStr = "com.foo.TestHome" in this case
    // Load the home interface class. This works.
    Class homeClass = urlClassLoader.loadClass(EJBHomeStr);
    // Lookup the home interface. This works.
    Object lookedUpHomeObject = initialContext.lookup(JNDIName);
    // This fails.
    Object homeObject = PortableRemoteObject.narrow(lookedUpHomeObject,homeClass);
    And the weblogic error looks like
    ... ; nested exception is:
    java.lang.ClassCastException: Cannot narrow remote object tocom.foo.TestHome
    at weblogic.iiop.PortableRemoteObjectDelegateImpl.narrow(PortableRemoteO
    bjectDelegateImpl.java:219)
    at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:134)
    at ...[the rest is just my application code stack...]
    When I log the ClassLoaders for the affected objects, using getClass().getClassLoader(),
    I get:
    <snippet from log follows>
    getClass().getClassLoader(): weblogic.utils.classloaders.GenericClassLoader@667da1
    finder:
    weblogic.utils.classloaders.MultiClassFinder@db9199 annotation: myEJBApp@
    homeClass.getName(): com.foo.TestHome classloader = java.net.URLClassLoader@4f1707
    lookedUpHomeObject.getClass().getName(): com.foo.Test_EJB_kx82zy_HomeImpl_810_WLStub
    classloader = weblogic.utils.classloaders.GenericClassLoader@667da1
    finder: weblogic.utils.classloaders.MultiClassFinder@db9199 annotation:myEJBApp@
    <end snippet from log>
    So it appears that since the looked up Stub was loaded by the WebLogicclassloader
    and the actual Home class was loaded by my URLClassLoader, the narrow()can't
    reconcile the two. I have tried both rmic and the Weblogic appc commandto pre-generate
    the stubs, which I put in the same JAR as my home and remote interfaceclasses
    and load with my custom classloader. But the standard stub (generatedby either
    rmic or appc) is named TestHomeStub.class and Weblogic is ignoringthose and
    making a class with the name Test_EJB_kx82zy_HomeImpl_810_WLStub, asshown above.
    I have also tried to put the remote interface classes and stubs inthe System
    classpath using the -classpath option when I start WebLogic, but sameresult.
    The question is, Is there a way in WebLogic to communicate with a remoteEJB in
    a seperate EAR without bundling anything about that remote EAR in myEAR? Or is
    there something I've missed? I need to keep my application J2EE compliant,meaning
    I can't hardcode any AppServer-specific code in my application.
    Thanks.

  • Invoke a WebLogic EJB from a BPEL hosted on OC4J

    We are trying to invoke a simple Session EJB running on Weblogic 8.1.6 from a BPEL running on OC4J (10.1.3.4).
    but we constantly get NullPointerException :-(
    Could you please advise us (or point to a document) how to implement the invocation?
    (we are following the instructions in
    http://www.oracle.com/technology/pub/articles/bpel_cookbook/juric.html )
    (the invokation succeeds from a simple standalone client, meaning that the jndi names, credentials etc. are correct)
    thanx in advance
    ydes

    maybe if I post the exception someone could help
    <2009-04-10 01:04:43,203> <DEBUG> <default.collaxa.cube.ws> <WSInvocationManager::invoke> def is file:/C:/projects/Cosmoline/technical/CosmoteApp/CosmoteEJBSample/src/TestSessionBeanService.wsdl
    <2009-04-10 01:04:43,203> <DEBUG> <default.collaxa.cube.ws> <WSIFInvocationHandler::invoke> opName=sayHello, parnterLink=<partnerLink name="TestSessionBean" partnerLinkType="{urn:TestSessionBeanService}TestSessionBeanLT">
    <myRole name="TestSessionBeanService">
    <ServiceName>{urn:TestSessionBeanService}TestSessionBeanPT</ServiceName>
    <PortType>{urn:TestSessionBeanService}TestSessionBeanPT</PortType>
    <Address>http://myserver:7777/orabpel/default/MyEJBSample/1.0/TestSessionBean/TestSessionBeanService</Address>
    </myRole>
    <partnerRole name="TestSessionBeanService">
    <ServiceName>{urn:TestSessionBeanService}TestSessionBeanPT</ServiceName>
    <PortType>{urn:TestSessionBeanService}TestSessionBeanPT</PortType>
    <Address>null</Address>
    </partnerRole>
    <conversationId>bpel://localhost/default/CosmoteEJBSample~1.0/140001-BpInv0-BpSeq0.3-3</conversationId>
    <properties>{}</properties>
    </partnerLink>
    <2009-04-10 01:04:43,203> <DEBUG> <default.collaxa.cube.ws> <WSIFInvocationHandler::doShortCut> Parner Property optShortCut
    <2009-04-10 01:04:43,218> <DEBUG> <default.collaxa.cube.engine.deployment> <LockManager::acquire> Acquired read lock for CosmoteEJBSample-1.0
    <2009-04-10 01:04:43,218> <DEBUG> <default.collaxa.cube.engine.deployment> <LockManager::release> Released lock for CosmoteEJBSample-1.0
    <2009-04-10 01:04:48,046> <DEBUG> <default.collaxa.cube.ws> <WSIFInvocationHandler::createOperation> Failed to createOperation for op sayHello
    org.collaxa.thirdparty.apache.wsif.WSIFException: Failed to lookup EJB home using JNDI name 'ejb.TestSessionBeanRemoteHome'; nested exception is:
         java.lang.NullPointerException
         at com.collaxa.cube.ws.wsif.providers.ejb.WSIFPort_EJB.getEjbHome(WSIFPort_EJB.java:285)
         at com.collaxa.cube.ws.wsif.providers.ejb.WSIFPort_EJB.getEjbObject(WSIFPort_EJB.java:298)
         at com.collaxa.cube.ws.wsif.providers.ejb.WSIFOperation_EJB.<init>(WSIFOperation_EJB.java:191)
         at com.collaxa.cube.ws.wsif.providers.ejb.WSIFPort_EJB.getDynamicWSIFOperation(WSIFPort_EJB.java:150)
         at com.collaxa.cube.ws.wsif.providers.ejb.WSIFPort_EJB.createOperation(WSIFPort_EJB.java:376)
         at com.collaxa.cube.ws.wsif.providers.ejb.WSIFPort_EJB.createOperation(WSIFPort_EJB.java:365)
         at com.collaxa.cube.ws.WSIFInvocationHandler.createOperation(WSIFInvocationHandler.java:881)
         at com.collaxa.cube.ws.WSIFInvocationHandler.invoke(WSIFInvocationHandler.java:297)
         at com.collaxa.cube.ws.WSInvocationManager.invoke2(WSInvocationManager.java:511)
         at com.collaxa.cube.ws.WSInvocationManager.invoke(WSInvocationManager.java:268)
         at com.collaxa.cube.engine.ext.wmp.BPELInvokeWMP.__invoke(BPELInvokeWMP.java:835)
         at com.collaxa.cube.engine.ext.wmp.BPELInvokeWMP.__executeStatements(BPELInvokeWMP.java:402)
         at com.collaxa.cube.engine.ext.wmp.BPELActivityWMP.perform(BPELActivityWMP.java:199)
         at com.collaxa.cube.engine.CubeEngine.performActivity(CubeEngine.java:3704)
         at com.collaxa.cube.engine.CubeEngine.handleWorkItem(CubeEngine.java:1656)
         at com.collaxa.cube.engine.dispatch.message.instance.PerformMessageHandler.handleLocal(PerformMessageHandler.java:75)
         at com.collaxa.cube.engine.dispatch.DispatchHelper.handleLocalMessage(DispatchHelper.java:220)
         at com.collaxa.cube.engine.dispatch.DispatchHelper.sendMemory(DispatchHelper.java:317)
         at com.collaxa.cube.engine.CubeEngine.endRequest(CubeEngine.java:5777)
         at com.collaxa.cube.engine.CubeEngine.createAndInvoke(CubeEngine.java:1088)
         at com.collaxa.cube.engine.ejb.impl.CubeEngineBean.__createAndInvoke(CubeEngineBean.java:125)
         at com.collaxa.cube.engine.ejb.impl.CubeEngineBean.createAndInvoke(CubeEngineBean.java:168)
         at com.collaxa.cube.engine.ejb.impl.CubeEngineBean.syncCreateAndInvoke(CubeEngineBean.java:188)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.JAASInterceptor$1.run(JAASInterceptor.java:31)
         at com.evermind.server.ThreadState.runAs(ThreadState.java:693)
         at com.evermind.server.ejb.interceptor.system.JAASInterceptor.invoke(JAASInterceptor.java:34)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.TxRequiresNewInterceptor.invoke(TxRequiresNewInterceptor.java:52)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:55)
         at com.evermind.server.ejb.StatelessSessionEJBObject.OC4J_invokeMethod(StatelessSessionEJBObject.java:87)
         at CubeEngineBean_LocalProxy_4bin6i8.syncCreateAndInvoke(Unknown Source)
         at com.collaxa.cube.engine.delivery.DeliveryHandler.initialRequestAnyType(DeliveryHandler.java:549)
         at com.collaxa.cube.engine.delivery.DeliveryHandler.initialRequest(DeliveryHandler.java:465)
         at com.collaxa.cube.engine.delivery.DeliveryHandler.request(DeliveryHandler.java:134)
         at com.collaxa.cube.ejb.impl.DeliveryBean.request(DeliveryBean.java:95)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.JAASInterceptor$1.run(JAASInterceptor.java:31)
         at com.evermind.server.ThreadState.runAs(ThreadState.java:693)
         at com.evermind.server.ejb.interceptor.system.JAASInterceptor.invoke(JAASInterceptor.java:34)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.TxRequiredInterceptor.invoke(TxRequiredInterceptor.java:50)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:55)
         at com.evermind.server.ejb.StatelessSessionEJBObject.OC4J_invokeMethod(StatelessSessionEJBObject.java:87)
         at DeliveryBean_RemoteProxy_4bin6i8.request(Unknown Source)
         at com.collaxa.cube.ws.soap.oc4j.SOAPRequestProvider.processNormalOperation(SOAPRequestProvider.java:451)
         at com.collaxa.cube.ws.soap.oc4j.SOAPRequestProvider.processBPELMessage(SOAPRequestProvider.java:274)
         at com.collaxa.cube.ws.soap.oc4j.SOAPRequestProvider.processMessage(SOAPRequestProvider.java:120)
         at oracle.j2ee.ws.server.provider.ProviderProcessor.doEndpointProcessing(ProviderProcessor.java:956)
         at oracle.j2ee.ws.server.WebServiceProcessor.invokeEndpointImplementation(WebServiceProcessor.java:349)
         at oracle.j2ee.ws.server.provider.ProviderProcessor.doRequestProcessing(ProviderProcessor.java:466)
         at oracle.j2ee.ws.server.WebServiceProcessor.processRequest(WebServiceProcessor.java:114)
         at oracle.j2ee.ws.server.WebServiceProcessor.doService(WebServiceProcessor.java:96)
         at oracle.j2ee.ws.server.WebServiceServlet.doPost(WebServiceServlet.java:194)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
         at oracle.security.jazn.oc4j.JAZNFilter$1.run(JAZNFilter.java:400)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:414)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:623)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:313)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:199)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    Caused by: java.lang.NullPointerException
         at java.lang.Class.isAssignableFrom(Native Method)
         at com.collaxa.cube.ws.wsif.providers.ejb.WSIFPort_EJB.getEjbHome(WSIFPort_EJB.java:267)
         ... 89 more
    <2009-04-10 01:04:48,046> <DEBUG> <default.collaxa.cube.ws> <WSIFInvocationHandler::invoke> invoke failed
    org.collaxa.thirdparty.apache.wsif.WSIFException: Failed to lookup EJB home using JNDI name 'ejb.TestSessionBeanRemoteHome'; nested exception is:
         java.lang.NullPointerException
         at com.collaxa.cube.ws.WSIFInvocationHandler.createOperation(WSIFInvocationHandler.java:906)
         at com.collaxa.cube.ws.WSIFInvocationHandler.invoke(WSIFInvocationHandler.java:297)
         at com.collaxa.cube.ws.WSInvocationManager.invoke2(WSInvocationManager.java:511)
         at com.collaxa.cube.ws.WSInvocationManager.invoke(WSInvocationManager.java:268)
         at com.collaxa.cube.engine.ext.wmp.BPELInvokeWMP.__invoke(BPELInvokeWMP.java:835)
         at com.coll

  • Accessing a EJB from a JSP

              A scenario from some one new to web server, server application development.
              I have downloaded and installed an evaluation copy of WebLogic 7.x and successfully
              installed it (W2K version). The product starts up without error and I can connect
              to is successfully. I have created a simple java bean (actually an EJB) and have
              been able to deploy it successfully without any errors.
              I have a simple JSP invoked from a simple HTML page that contains a simple form.
              The JSP is attempting to instaniate the bean via the jsp:useBean tag however,
              all I am able to get back is an error that tells me that my class "could not be
              loaded". Here is the stack trace:
              weblogic.servlet.jsp.JspException: (line 3): class 'USDataworks.MICRworks.MICRworksBean'
              could not be loaded
                   at weblogic.servlet.jsp.JspLexer.jspException(JspLexer.java:710)
                   at weblogic.servlet.jsp.JspLexer.processBeanTag(JspLexer.java:1372)
                   at weblogic.servlet.jsp.JspLexer.mXML_OPEN_USEBEAN(JspLexer.java:3612)
                   at weblogic.servlet.jsp.JspLexer.mXML_THING(JspLexer.java:1924)
                   at weblogic.servlet.jsp.JspLexer.mTOKEN(JspLexer.java:1817)
                   at weblogic.servlet.jsp.JspLexer.nextToken(JspLexer.java:1745)
                   at weblogic.servlet.jsp.JspLexer.parse(JspLexer.java:959)
                   at weblogic.servlet.jsp.JspParser.doit(JspParser.java:90)
                   at weblogic.servlet.jsp.JspParser.parse(JspParser.java:213)
                   at weblogic.servlet.jsp.Jsp2Java.outputs(Jsp2Java.java:119)
                   at weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:258)
                   at weblogic.servlet.jsp.JspStub.compilePage(JspStub.java:353)
                   at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:211)
                   at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:164)
                   at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:517)
                   at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:351)
                   at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:306)
                   at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:5445)
                   at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:780)
                   at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3105)
                   at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2588)
                   at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:213)
                   at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:189)
              If I leave out the jsp:useBean tag I am able to return a simple HTML page based
              on information sent to the server, so I know some of the environment is properly
              set up.
              I have browsed through some of the WebLogic site and have been referred to any
              number of configuration files (*.properties) which do not appear to exist. I
              am frustrated and confused and would appreciate any help in getting this to work.
              Thank you.
              

              In the Weblogic 7.0.2 instalation, there is a tool for creating taglibrary to wrap
              an ejb cals to jsp tags. The tool names simply ejb2jsp and is described in document
              : "Programming Weblogic JSP" (pdf). My problem is: when I try to load my ejb ...jar
              file, the tool throws this Null pointer exception: (below).
              Have anybody some experience with this? It's the same for gui and cmd-line version.
              Could you advice me?
              Thank you.
              D:\SRC\jbproject\TestEntity>java weblogic.servlet.ejb2jsp.gui.Main
              error occurred: java.lang.NullPointerException
              java.lang.NullPointerException
              at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:287)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:250)
              at weblogic.servlet.ejb2jsp.Utils.createBeanDescriptor(Utils.java:343)
              at weblogic.servlet.ejb2jsp.Utils.createDefaultDescriptor(Utils.java:314
              at weblogic.servlet.ejb2jsp.Utils.createDefaultDescriptor(Utils.java:266
              at weblogic.servlet.ejb2jsp.gui.Main.loadFromPaths(Main.java:391)
              at weblogic.servlet.ejb2jsp.gui.Main.doNew(Main.java:378)
              at weblogic.servlet.ejb2jsp.gui.Main$5.run(Main.java:575)
              at weblogic.servlet.ejb2jsp.gui.MainWorker.run(Main.java:757)
              at java.lang.Thread.run(Thread.java:479)
              error occurred: java.lang.NullPointerException
              java.lang.NullPointerException
              at weblogic.servlet.ejb2jsp.gui.Main.doNew(Main.java:379)
              at weblogic.servlet.ejb2jsp.gui.Main$5.run(Main.java:575)
              at weblogic.servlet.ejb2jsp.gui.MainWorker.run(Main.java:757)
              at java.lang.Thread.run(Thread.java:479)
              "Xiang Rao" <[email protected]> wrote:
              >
              >EJB and Java Bean are two different things. I don't think you can use
              >useBean tag
              >for EJB. On the other hand, you can write a Java Bean to wrap your EJB
              >and use
              >useBean tag.
              >
              >"Marek Kossak" <[email protected]> wrote:
              >>
              >>A scenario from some one new to web server, server application development.
              >>
              >>I have downloaded and installed an evaluation copy of WebLogic 7.x and
              >>successfully
              >>installed it (W2K version). The product starts up without error and
              >>I can connect
              >>to is successfully. I have created a simple java bean (actually an
              >EJB)
              >>and have
              >>been able to deploy it successfully without any errors.
              >>
              >>I have a simple JSP invoked from a simple HTML page that contains a
              >simple
              >>form.
              >> The JSP is attempting to instaniate the bean via the jsp:useBean tag
              >>however,
              >>all I am able to get back is an error that tells me that my class "could
              >>not be
              >>loaded". Here is the stack trace:
              >>
              >>weblogic.servlet.jsp.JspException: (line 3): class 'USDataworks.MICRworks.MICRworksBean'
              >>could not be loaded
              >>     at weblogic.servlet.jsp.JspLexer.jspException(JspLexer.java:710)
              >>     at weblogic.servlet.jsp.JspLexer.processBeanTag(JspLexer.java:1372)
              >>     at weblogic.servlet.jsp.JspLexer.mXML_OPEN_USEBEAN(JspLexer.java:3612)
              >>     at weblogic.servlet.jsp.JspLexer.mXML_THING(JspLexer.java:1924)
              >>     at weblogic.servlet.jsp.JspLexer.mTOKEN(JspLexer.java:1817)
              >>     at weblogic.servlet.jsp.JspLexer.nextToken(JspLexer.java:1745)
              >>     at weblogic.servlet.jsp.JspLexer.parse(JspLexer.java:959)
              >>     at weblogic.servlet.jsp.JspParser.doit(JspParser.java:90)
              >>     at weblogic.servlet.jsp.JspParser.parse(JspParser.java:213)
              >>     at weblogic.servlet.jsp.Jsp2Java.outputs(Jsp2Java.java:119)
              >>     at weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:258)
              >>     at weblogic.servlet.jsp.JspStub.compilePage(JspStub.java:353)
              >>     at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:211)
              >>     at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:164)
              >>     at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:517)
              >>     at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:351)
              >>     at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:306)
              >>     at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:5445)
              >>     at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:780)
              >>     at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3105)
              >>     at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2588)
              >>     at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:213)
              >>     at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:189)
              >>
              >>If I leave out the jsp:useBean tag I am able to return a simple HTML
              >>page based
              >>on information sent to the server, so I know some of the environment
              >>is properly
              >>set up.
              >>
              >>I have browsed through some of the WebLogic site and have been referred
              >>to any
              >>number of configuration files (*.properties) which do not appear to
              >exist.
              >> I
              >>am frustrated and confused and would appreciate any help in getting
              >this
              >>to work.
              >>
              >>Thank you.
              >
              

  • How to access same ejb from different applications

    Hi
    I have two applications (.ear). Each application has 4 EJBs. These EJBs are same in both applications including their names. JNDI names are also same in each application.
    in detail
    ApplicationA (appA.ear) contains
    web1.war
    ejb1.jar
    ejb2.jar
    ejb3.jar
    ejb4.jar
    and
    ApplicationB (appB.ear) contains
    web2.war
    ejb1.jar
    ejb2.jar
    ejb3.jar
    ejb4.jar
    both web1.war and web2.war has same JNDI references to these EJBs.
    The problem:
    If you access the applicationA, works fine. But if you access applicationB, it throws ClassCast Exception
    After restarting.....
    If you access the applicationB, works fine. But if you access applicationA, it throws ClassCast Exception
    Both the applications are not working same time.
    I suspect that It is because both applications have same ejbs and with same JNDI names.
    Please validate.
    Thanks
    Srinivas

    Hi Timo,
    Very sorry for reply so late!
    My case is that accessing a task flow(MaintainJobInstanceTaskFlow) through NevigationBean of UI Shell. please see the coding as following:
    taskFlowId_SubNavigation =
    "/WEB-INF/oracle/apps/pas/shell/ui/flow/SystemSetupTabFlow.xml#SystemSetupTabFlow";
    taskFlowId_TaskListNavigation =
    "/WEB-INF/oracle/apps/pas/shell/ui/flow/SystemSetupTaskListFlow.xml#SystemSetupTaskListFlow";
    taskFlowId_QuickSearch =
    "/WEB-INF/oracle/apps/pas/shell/ui/flow/SystemSetupQuickSearchFlow.xml#SystemSetupQuickSearchFlow";
    taskFlowId_LocalArea =
    "/WEB-INF/oracle/apps/pas/transactions/ui/flow/MaintainJobInstanceTaskFlow.xml#MaintainJobInstanceTaskFlow";
    break;
    In my case, how to transfer parameters to MaintainJobInstanceTaskFlow in java?
    Thanks!
    Susan

  • Access weblogic roles from external application

    Hi all. In my scenario, the user and roles are stored in the WebLogic server. Then, there is an external application (not deployed on this WebLogic server) which needs to access these users/roles. Can someone tell me if there is an API provided by WebLogic through which the external application can access them? A sample code/documentation link for this would be icing on the cake.
    Thanks for reading this post.
    Vishal Singh.

    The embedded LDAP server that comes with WLS is not intended to be used by other applications and scale up to a large amount of users. Oracle recommends using an enterprise class identity management solution for use cases like that such as Oracle Internet Directory or Oracle Directory Server Enterprise Edition.
    However, if you want to see how to embedded LDAP, this link shows you how to use a standard LDAP browser:
    http://download.oracle.com/docs/cd/E14571_01/web.1111/e13707/ldap.htm#i1102166
    So by using a Java LDAP api with the settings as described in the docs, your external app may be able to access users/roles.
    I think you can find WLST examples for that somewhere too.

  • Accessing weblogic controls from pojo classes problem

    Hi,
    I'm planning to use DAO class as a wrapper over the beehive controls , and all of this will be part of the workshop utility project.
    When I try using this way the controls never gets instantiated by the container and end up getting NullPointerException.
    For this to work do I need to sort the programmatic control invocation ? If yes are there samples available ?
    Can you also suggest if this is the right approach?
    Are we stuck with using JPF for invoking beehive controls?
    Thanks,
    Chris

    It is possible for some controls. See http://beehive.apache.org/docs/1.0.2/controls/programming.html#Programmatic+Instantiation, which has some sample code.
    Greg

Maybe you are looking for

  • Externalizing users

    I installed EAS, Essbase, Shared services. I could conned via EAS with admin, password. I then set up a user in Shared Services, "testuser" I externalized users from EAS, Synced Native Directories from within Shared Services, when I try to connect vi

  • How to persist URL parameters in OAM portal inserts?

    Hi, We have a requirement to redirect the users to different XSLs based on the containers configured in OID (ou=employees,ou=customers). We have configured different style directories (employees and customers) in OAM. For Identity Administration acti

  • Error in merge modules CR XI R2?

    Hi,     I downloads for two times the "merge modules" for Crystal Report XI R2 and I would like to know if in the files: CrystalReports11_5_RDC_Reportengine.msm and CrystalReports11_5_RDC_License.msm, is there any error when was created. I receive an

  • Box2D not working on iOS?

    Anyone know how to get BOX2D physics engine working on iOS? It seems to work on the adl tester but not when I actually test it on the device.

  • CRM to XI Connection

    Hi All, I need to send some BP updated details to Oracle from CRM. It is a new implimentation, So please suggest. Please suggest me what adapter to use for sending data from CRM to XI. What is XIF Adapter? Which Adapter is better to use (Idoc,XIF). T