Getting Tomcat 4.1 to call EJBs in WLS 8.1

I know this is not necessarily a new topic, but we're upgrading our Tomcat
4.1 -> WLS 5.1 to a Tomcat 4.1 -> WLS 8.1 configuration.
Firstly, has ANYONE got Tomcat 4.1.x to work with a post 5.1 container at
all? Ever?
We are using the T3 protocol to talk to our beans, and the goal, of course,
is that our Tomcat based client code will ideally not have to change.
Our beans are all EJB 1.1, and I have them loaded into a running WLS 8.1
container. They appear to work.
The way I tested to see if I could talk to WLS was by using a simple client
that I had that gets an InitialContext, and then grabs a bean.
I now have a simple JSP that essentially does the same thing. I've bundled
this jsp into a properly formatted WAR file.
Within this WAR file in the WEB-INF/classes directory are the Session bean
Home and the Session Bean Remote interface classes.
Within the WEB-INF/lib directory is the
c:\bea\weblogic81\server\lib\weblogic.jar, slightly modified.
After the first attempt to load this, Tomcat would complain because the
weblogic.jar contains the javax.servlet package, so I exploded the
weblogic.jar file, renamed javax/servlet to javax/servlet.x, and then
rejarred the file. This file was placed into the WEB-INF/lib directory.
This is otherwise a default Tomcat 4.1.18 binary package.
Here's the WAR file contents:
./META-INF/MANIFEST.MF
./WEB-INF/classes/com/pfizer/ecms/as/CustomizationSession.class
./WEB-INF/classes/com/pfizer/ecms/as/CustomizationSessionHome.class
./WEB-INF/lib/wlsx.jar <-- Edited weblogic.jar
./WEB-INF/web.xml
./test.jsp
This is the contents of the test.jsp:
<%@ page language="java" %>
<%@ page import="javax.naming.*" %>
<%@ page import="com.pfizer.ecms.as.*" %>
<%
try{
System.setProperty(Context.INITIAL_CONTEXT_FACTORY,
"weblogic.jndi.WLInitialContextFactory");
System.setProperty(Context.PROVIDER_URL, "t3://localhost:7001");
InitialContext ctx = new InitialContext();
CustomizationSessionHome csth = (CustomizationSessionHome)
ctx.lookup("CustomizationSession");
CustomizationSession cst = csth.create();
catch (Throwable t) {
System.out.println(">>>t = " + t);
t.printStackTrace(System.out);
%>
<HTML>
<BODY>
This is the jsp.
</BODY>
</HTML>
Similar code to this has been working for us for 3 years so far.
When I try and load the JSP, it dumps a stack trace. Here's the relevant
bits up to the Tomcat container:
t = java.lang.NoClassDefFoundError: weblogic/rmi/extensions/server/Stubjava.lang.NoClassDefFoundError: weblogic/rmi/extensions/server/Stub
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at
weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLo
ader.java:431)
at
weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.
java:169)
at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:217)
at
weblogic.utils.classfile.utils.CodeGenerator.generateClass(CodeGenerator.jav
a:71)
at weblogic.rmi.internal.StubGenerator.getStubClass(StubGenerator.java:672)
at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:712)
at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:699)
at weblogic.rmi.extensions.StubFactory.getStub(StubFactory.java:76)
at
weblogic.jndi.WLInitialContextFactoryDelegate.newRootNamingNodeStub(WLInitia
lContextFactoryDelegate.java:486)
at
weblogic.jndi.WLInitialContextFactoryDelegate.newRemoteContext(WLInitialCont
extFactoryDelegate.java:449)
at
weblogic.jndi.WLInitialContextFactoryDelegate.newContext(WLInitialContextFac
toryDelegate.java:345)
at
weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialCon
textFactoryDelegate.java:308)
at
weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialCon
textFactoryDelegate.java:234)
at
weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFact
ory.java:135)
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.<init>(InitialContext.java:175)
at org.apache.jsp.test_jsp._jspService(test_jsp.java:51)
What is interesting about this is that the system could "see"
weblogic.utils.classloaders.GenericClassLoader, but THAT class could not
find weblogic.rmi.extension.server.Stub, even though they are, ideally, at
the same level within the Tomcat imposed hierarchy of classloaders.
Unfortunately, we don't quite know where in that hierarchy each class is
placed.
Now, the culprit may well be java.security.SecureClassLoader (or, actually,
the java.lang.ClassLoader.defineClass0), which is very high up in the
hierarchy trying to load a the result of the StubGenerator, only to find
that an associated class, weblogic.rmi.extensions.server.Stub, was "not
found" because it only existed deep in the Tomcat hierarchy.
One way that I tried to get around this was to start taking selective bits
of of weblogic.jar and put them on the system CLASSPATH used by Tomcat when
it starts up.
This gets us farther along, in that more classes seem to load without
getting the ClassDefNotFound error, but it finally leads us into this
exception:
The error is, with a small bit of stack dump:
weblogic.utils.AssertionError: ***** ASSERTION FAILED *****[ Environment not
found on thread ]
at
weblogic.jndi.internal.NamingNodeReplicaHandler.<init>(NamingNodeReplicaHand
ler.java:150)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcces
sorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstruc
torAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at java.lang.Class.newInstance0(Class.java:306)
at java.lang.Class.newInstance(Class.java:259)
at
weblogic.common.internal.ChunkedObjectInputStream.readObject(ChunkedObjectIn
putStream.java:90)
snip
The relevant starting point is toward the middle of the stack trace:
at
weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:106
at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:125)
at
com.pfizer.ecms.as.DataImporterSession_aiw0oz_HomeImpl_810_WLStub.create(Unk
nown Source)
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:324)
at com.pfizer.ecms.com.AppServer.createInstance(AppServer.java:163)
at com.pfizer.ecms.com.AppServer.getDataImporterSession(AppServer.java:231)
at
com.pfizer.ecms.ws.ECMSActionServlet.testBeans(ECMSActionServlet.java:1662)
at
com.pfizer.ecms.ws.ECMSActionServlet.initOther(ECMSActionServlet.java:62)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:472)
Now, according to the Weblogic documentation, the AssertionError exception
"is impossible". Well, that's my job they say, doing the impossible.
Minimally, it's a meaningless message to me and pretty much stops me cold.
I have seen other discussions about Tomcat and how it's not J2EE, etc, and
perhaps my expectations that this will work are too high. My concern with
that is simply that in our case, Tomcat is a Fat Client no different from
"any other Java application". We just use Tomcat to talk to beans rather
than a custom client. The difficulty, it seems, is in the complexities of
the Tomcat class loaders interoperating with the expectations of Weblogics
classes et al.
I've got a small application that does exactly what Tomcat wants to do, so
"weblogic works", except of course, in Tomcat.
So, in the end, I'm curious if others have some data on getting these two
system cooperating. If anyone has any other ideas on how to use Tomcat as a
client of Weblogic 8 that utilizes techniques besides replacing Tomcat
(which is not an option at the moment) I'd like to hear those as well. I
have been fighting this for days, and tried several things, but nothing
"obvious" seems to help.
Weblogic 8 has a "thin client" jar, but it's only useful for RMI rather than
T3, plus it's still not clear how we'd go about rewriting the interfaces to
support that versus the standard EJB interfaces already created for the
beans.
Any assistance greatly appreciated.
Regards,
Will Hartung
([email protected])

Of course I feel obliged to first recommend that you run your webapps
and EJBs in WLS. There's significant performance advantages and it
greatly simpifies your life since you don't have to deal with another
remote failure case.
That being said, I believe it should be possible especially with 8.1 to
make Tomcat a WLS client.
Answers inline.
Will Hartung wrote:
I know this is not necessarily a new topic, but we're upgrading our Tomcat
4.1 -> WLS 5.1 to a Tomcat 4.1 -> WLS 8.1 configuration.
Firstly, has ANYONE got Tomcat 4.1.x to work with a post 5.1 container at
all? Ever?
We are using the T3 protocol to talk to our beans, and the goal, of course,
is that our Tomcat based client code will ideally not have to change.
Our beans are all EJB 1.1, and I have them loaded into a running WLS 8.1
container. They appear to work.
The way I tested to see if I could talk to WLS was by using a simple client
that I had that gets an InitialContext, and then grabs a bean.
I now have a simple JSP that essentially does the same thing. I've bundled
this jsp into a properly formatted WAR file.
Within this WAR file in the WEB-INF/classes directory are the Session bean
Home and the Session Bean Remote interface classes.
Within the WEB-INF/lib directory is the
c:\bea\weblogic81\server\lib\weblogic.jar, slightly modified.My suggestion is to ditch the weblogic.jar and the joys of trying to
modify it. I'd instead check out 8.1's thin client support:
http://e-docs.bea.com/wls/docs81/rmi_iiop/rmiiiop2.html#1071450
>
After the first attempt to load this, Tomcat would complain because the
weblogic.jar contains the javax.servlet package, so I exploded the
weblogic.jar file, renamed javax/servlet to javax/servlet.x, and then
rejarred the file. This file was placed into the WEB-INF/lib directory.
This is otherwise a default Tomcat 4.1.18 binary package.
Here's the WAR file contents:
./META-INF/MANIFEST.MF
./WEB-INF/classes/com/pfizer/ecms/as/CustomizationSession.class
./WEB-INF/classes/com/pfizer/ecms/as/CustomizationSessionHome.class
./WEB-INF/lib/wlsx.jar <-- Edited weblogic.jar
./WEB-INF/web.xml
./test.jsp
This is the contents of the test.jsp:
<%@ page language="java" %>
<%@ page import="javax.naming.*" %>
<%@ page import="com.pfizer.ecms.as.*" %>
<%
try{
System.setProperty(Context.INITIAL_CONTEXT_FACTORY,
"weblogic.jndi.WLInitialContextFactory");
System.setProperty(Context.PROVIDER_URL, "t3://localhost:7001");
InitialContext ctx = new InitialContext();
CustomizationSessionHome csth = (CustomizationSessionHome)
ctx.lookup("CustomizationSession");
CustomizationSession cst = csth.create();
catch (Throwable t) {
System.out.println(">>>t = " + t);
t.printStackTrace(System.out);
%>
<HTML>
<BODY>
This is the jsp.
</BODY>
</HTML>
Similar code to this has been working for us for 3 years so far.
When I try and load the JSP, it dumps a stack trace. Here's the relevant
bits up to the Tomcat container:
t = java.lang.NoClassDefFoundError: weblogic/rmi/extensions/server/Stubjava.lang.NoClassDefFoundError: weblogic/rmi/extensions/server/Stub
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at
weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLo
ader.java:431)
at
weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.
java:169)
at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:217)
at
weblogic.utils.classfile.utils.CodeGenerator.generateClass(CodeGenerator.jav
a:71)
at weblogic.rmi.internal.StubGenerator.getStubClass(StubGenerator.java:672)
at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:712)
at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:699)
at weblogic.rmi.extensions.StubFactory.getStub(StubFactory.java:76)
at
weblogic.jndi.WLInitialContextFactoryDelegate.newRootNamingNodeStub(WLInitia
lContextFactoryDelegate.java:486)
at
weblogic.jndi.WLInitialContextFactoryDelegate.newRemoteContext(WLInitialCont
extFactoryDelegate.java:449)
at
weblogic.jndi.WLInitialContextFactoryDelegate.newContext(WLInitialContextFac
toryDelegate.java:345)
at
weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialCon
textFactoryDelegate.java:308)
at
weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialCon
textFactoryDelegate.java:234)
at
weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFact
ory.java:135)
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.<init>(InitialContext.java:175)
at org.apache.jsp.test_jsp._jspService(test_jsp.java:51)
What is interesting about this is that the system could "see"
weblogic.utils.classloaders.GenericClassLoader, but THAT class could not
find weblogic.rmi.extension.server.Stub, even though they are, ideally, at
the same level within the Tomcat imposed hierarchy of classloaders.
Unfortunately, we don't quite know where in that hierarchy each class is
placed.
Now, the culprit may well be java.security.SecureClassLoader (or, actually,
the java.lang.ClassLoader.defineClass0), which is very high up in the
hierarchy trying to load a the result of the StubGenerator, only to find
that an associated class, weblogic.rmi.extensions.server.Stub, was "not
found" because it only existed deep in the Tomcat hierarchy.
One way that I tried to get around this was to start taking selective bits
of of weblogic.jar and put them on the system CLASSPATH used by Tomcat when
it starts up.
This gets us farther along, in that more classes seem to load without
getting the ClassDefNotFound error, but it finally leads us into this
exception:
The error is, with a small bit of stack dump:
weblogic.utils.AssertionError: ***** ASSERTION FAILED *****[ Environment not
found on thread ]
at
weblogic.jndi.internal.NamingNodeReplicaHandler.<init>(NamingNodeReplicaHand
ler.java:150)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcces
sorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstruc
torAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at java.lang.Class.newInstance0(Class.java:306)
at java.lang.Class.newInstance(Class.java:259)
at
weblogic.common.internal.ChunkedObjectInputStream.readObject(ChunkedObjectIn
putStream.java:90)
snip
The relevant starting point is toward the middle of the stack trace:
at
weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:106
at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:125)
at
com.pfizer.ecms.as.DataImporterSession_aiw0oz_HomeImpl_810_WLStub.create(Unk
nown Source)
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:324)
at com.pfizer.ecms.com.AppServer.createInstance(AppServer.java:163)
at com.pfizer.ecms.com.AppServer.getDataImporterSession(AppServer.java:231)
at
com.pfizer.ecms.ws.ECMSActionServlet.testBeans(ECMSActionServlet.java:1662)
at
com.pfizer.ecms.ws.ECMSActionServlet.initOther(ECMSActionServlet.java:62)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:472)
Now, according to the Weblogic documentation, the AssertionError exception
"is impossible". Well, that's my job they say, doing the impossible.
Minimally, it's a meaningless message to me and pretty much stops me cold.
Right, it's not really meant to be meaningful because customers "should"
never see these assertions.
I have seen other discussions about Tomcat and how it's not J2EE, etc, and
perhaps my expectations that this will work are too high. My concern with
that is simply that in our case, Tomcat is a Fat Client no different from
"any other Java application". We just use Tomcat to talk to beans rather
than a custom client. The difficulty, it seems, is in the complexities of
the Tomcat class loaders interoperating with the expectations of Weblogics
classes et al.
I've got a small application that does exactly what Tomcat wants to do, so
"weblogic works", except of course, in Tomcat.
So, in the end, I'm curious if others have some data on getting these two
system cooperating. If anyone has any other ideas on how to use Tomcat as a
client of Weblogic 8 that utilizes techniques besides replacing Tomcat
(which is not an option at the moment) I'd like to hear those as well. I
have been fighting this for days, and tried several things, but nothing
"obvious" seems to help.
Weblogic 8 has a "thin client" jar, but it's only useful for RMI rather than
T3, plus it's still not clear how we'd go about rewriting the interfaces to
support that versus the standard EJB interfaces already created for the
beans.I'm not sure I follow you here. You always write to RMI interfaces.
The question is what protocol (eg T3, JRMP, IIOP) will actually run RMI.
By default WLS uses its own protocol (t3), but most customer apps
should run without change over IIOP.
I'd really recommend going the thin client route. Otherwise I fear
you'll end up with a heavily modified weblogic.jar and headaches when
you try to install a service pack etc.
-- Rob
>
Any assistance greatly appreciated.
Regards,
Will Hartung
([email protected])

Similar Messages

  • Call EJB in WLS 7.0SP2 from WLS 5.1 SP13

    Hello,
    I am trying to call an EJB deployed on WLS 7.0SP2 from a WLS 5.1 SP13.
    There are issues from 19 Dec 2002 in "weblogic.developer.interest.rmi-iiop" newsgroup
    that are supossed to established a summary on this interoperability. The solution
    seems to be the same as the interoperability between WLS 6.1SP2 and WLS5.1SP12
    with I have been working for several months. I have followed the steps (EJB generated
    with "weblogic.ejbc -iiop" in WLS 7.0 and client classes generated with "weblogic.ejbc
    -iiop -clienteJar" in WLS5.1) but the only result I obtain is the following exception.
    Has anybody really invoked EJBs between this two WLS versions with IIOP?.
    javax.naming.NamingException: Unhandled error in lookup. Root exception is java.lang.NullPointerException
    at javax.naming.NameImpl.<init>(NameImpl.java:250) at javax.naming.CompositeName.<init>(CompositeName.java:223)
    at weblogic.iiop.IIOPInvocationHandlerImpl.getClusteredStub(IIOPInvocationHandlerImpl.java:150)
    at weblogic.iiop.IIOPInvocationHandlerImpl.resolveObject(IIOPInvocationHandlerImpl.java:114)
    at weblogic.iiop.IIOPReplacer.resolveObject(IIOPReplacer.java:375) at weblogic.iiop.AbstractMsgInput.readRemote(AbstractMsgInput.java:185)
    at weblogic.iiop.AbstractMsgInput.readObject(AbstractMsgInput.java:156) at weblogic.cos.naming.NamingContext_WLStub.resolve(NamingContext_WLStub.java:122)
    at weblogic.jndi.cosnaming.IIOPInitialContextServer.lookup(IIOPInitialContextServer.java:109)
    at javax.naming.InitialContext.lookup(InitialContext.java:345) at jsp_servlet._jsp.__test._jspService(__test.java:108)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:27) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:120)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:138)
    at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:946)
    at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:910)
    at weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContextManager.java:277)
    at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:403)
    at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:285)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:130)
    Thanks for any help,
    Rosa

    Hello,
    I am trying to call an EJB deployed on WLS 7.0SP2 from a WLS 5.1 SP13.
    There are issues from 19 Dec 2002 in "weblogic.developer.interest.rmi-iiop" newsgroup
    that are supossed to established a summary on this interoperability. The solution
    seems to be the same as the interoperability between WLS 6.1SP2 and WLS5.1SP12
    with I have been working for several months. I have followed the steps (EJB generated
    with "weblogic.ejbc -iiop" in WLS 7.0 and client classes generated with "weblogic.ejbc
    -iiop -clienteJar" in WLS5.1) but the only result I obtain is the following exception.
    Has anybody really invoked EJBs between this two WLS versions with IIOP?.
    javax.naming.NamingException: Unhandled error in lookup. Root exception is java.lang.NullPointerException
    at javax.naming.NameImpl.<init>(NameImpl.java:250) at javax.naming.CompositeName.<init>(CompositeName.java:223)
    at weblogic.iiop.IIOPInvocationHandlerImpl.getClusteredStub(IIOPInvocationHandlerImpl.java:150)
    at weblogic.iiop.IIOPInvocationHandlerImpl.resolveObject(IIOPInvocationHandlerImpl.java:114)
    at weblogic.iiop.IIOPReplacer.resolveObject(IIOPReplacer.java:375) at weblogic.iiop.AbstractMsgInput.readRemote(AbstractMsgInput.java:185)
    at weblogic.iiop.AbstractMsgInput.readObject(AbstractMsgInput.java:156) at weblogic.cos.naming.NamingContext_WLStub.resolve(NamingContext_WLStub.java:122)
    at weblogic.jndi.cosnaming.IIOPInitialContextServer.lookup(IIOPInitialContextServer.java:109)
    at javax.naming.InitialContext.lookup(InitialContext.java:345) at jsp_servlet._jsp.__test._jspService(__test.java:108)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:27) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:120)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:138)
    at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:946)
    at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:910)
    at weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContextManager.java:277)
    at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:403)
    at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:285)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:130)
    Thanks for any help,
    Rosa

  • New To Iplanet app server.Can some one help me getting started by delpoying and calling one of each of these:JSP,Servlet,EJB.Tried with iplanet docs..didnt quite get it. thanx

     

    Hi,
    What is that you are trying to accomplish ? Is it deployment or
    trying to develop applications ? Are you getting any errors ? If so,
    please post them to help you. I think the documentation is the best place
    for you to begin with.
    Regards & Happy New Year
    Raj
    Arif Khan wrote:
    New To Iplanet app server.Can some one help me getting started by
    delpoying and calling one of each of these:JSP,Servlet,EJB.Tried with
    iplanet docs..didnt quite get it. thanx
    Try our New Web Based Forum at http://softwareforum.sun.com
    Includes Access to our Product Knowledge Base!

  • Error while calling ejb service call from BPM service

    Hi,
    We are using the Oracle 11.1.1.5.0
    We are calling ejb service call from BPM service to update the data to Oracle database.
    We are getting the below error when we executing the ejb service call from BPM Service.
    <Error> <EJB> <BEA-010026> <Exception occurred du
    ring commit of transaction Name=[EJB oracle.bpm.bpmn.engine.ejb.impl.BPMNDeliver
    yBean.handleCallback(java.lang.String,java.lang.String,java.lang.String,int,bool
    ean)],Xid=BEA1-45B91984D57960994897(30845116),Status=Rolled back. [Reason=javax.
    transaction.xa.XAException: JDBC driver does not support XA, hence cannot be a p
    articipant in two-phase commit. To force this participation, set the GlobalTrans
    actionsProtocol attribute to LoggingLastResource (recommended) or EmulateTwoPhas
    eCommit for the Data Source = EBSConnection],numRepliesOwedMe=0,numRepliesOwedOt
    hers=0,seconds since begin=1,seconds left=60,XAServerResourceInfo[SOADataSource_
    base_domain]=(ServerResourceInfo[SOADataSource_base_domain]=(state=rolledback,as
    signed=soa_server1),xar=SOADataSource,re-Registered = false),XAServerResourceInf
    o[ArCnTaskForms@EBSConnection@EBSConnection_base_domain]=(ServerResourceInfo[ArC
    nTaskForms@EBSConnection@EBSConnection_base_domain]=(state=rolledback,assigned=s
    oa_server1),xar=weblogic.jdbc.wrapper.JTSEmulateXAResourceImpl@fa5476,re-Registe
    red = false),SCInfo[base_domain+soa_server1]=(state=rolledback),properties=({web
    logic.jdbc.remote.EBSConnection=t3://192.168.10.114:8001, weblogic.transaction.n
    ame=[EJB oracle.bpm.bpmn.engine.ejb.impl.BPMNDeliveryBean.handleCallback(java.la
    ng.String,java.lang.String,java.lang.String,int,boolean)]}),local properties=({w
    eblogic.jdbc.jta.SOADataSource=[ No XAConnection is attached to this TxInfo ]}),
    OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=soa
    server1+192.168.10.114:8001+basedomain+t3+, XAResources={eis/tibjms/Queue, eis
    /activemq/Queue, WLStore_base_domain_BPMJMSFileStore, WLStore_base_domain__WLS_s
    oa_server1, eis/fioranomq/Topic, eis/jbossmq/Queue, eis/Apps/Apps, eis/websphere
    mq/Queue, eis/AQ/aqSample, WLStore_base_domain_SOAJMSFileStore, eis/aqjms/Queue,
    WSATGatewayRM_soa_server1_base_domain, eis/sunmq/Queue, eis/pramati/Queue, SSCo
    nnectionDS_base_domain, eis/tibjms/Topic, eis/tibjmsDirect/Queue, eis/wls/Queue,
    eis/tibjmsDirect/Topic, EDNDataSource_base_domain, eis/wls/Topic, eis/aqjms/Top
    ic, RL3TST_base_domain, ArCnTaskForms@EBSConnection@EBSConnection_base_domain, S
    OADataSource_base_domain, WLStore_base_domain_UMSJMSFileStore_auto_2},NonXAResou
    rces={})],CoordinatorURL=soa_server1+192.168.10.114:8001+base_domain+t3+): weblo
    gic.transaction.RollbackException: Could not prepare resource 'ArCnTaskForms@EBS
    Connection@EBSConnection_base_domain
    JDBC driver does not support XA, hence cannot be a participant in two-phase comm
    it. To force this participation, set the GlobalTransactionsProtocol attribute to
    LoggingLastResource (recommended) or EmulateTwoPhaseCommit for the Data Source
    = EBSConnection
    at weblogic.transaction.internal.TransactionImpl.throwRollbackException(
    TransactionImpl.java:1881)
    at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(Se
    rverTransactionImpl.java:345)
    at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTran
    sactionImpl.java:239)
    at weblogic.ejb.container.internal.BaseLocalObject.postInvoke1(BaseLocal
    Object.java:622)
    at weblogic.ejb.container.internal.BaseLocalObject.__WL_postInvokeTxRetr
    y(BaseLocalObject.java:455)
    at weblogic.ejb.container.internal.SessionLocalMethodInvoker.invoke(Sess
    ionLocalMethodInvoker.java:52)
    at oracle.bpm.bpmn.engine.ejb.impl.BPMNDeliveryBean_of8dk6_ICubeDelivery
    LocalBeanImpl.handleCallback(Unknown Source)
    at com.collaxa.cube.engine.dispatch.message.instance.CallbackDeliveryMes
    sageHandler.handle(CallbackDeliveryMessageHandler.java:47)
    at com.collaxa.cube.engine.dispatch.DispatchHelper.handleMessage(Dispatc
    hHelper.java:140)
    at com.collaxa.cube.engine.dispatch.BaseDispatchTask.process(BaseDispatc
    hTask.java:88)
    at com.collaxa.cube.engine.dispatch.BaseDispatchTask.run(BaseDispatchTas
    k.java:64)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
    utor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
    .java:908)
    at java.lang.Thread.run(Thread.java:662)
    Caused by: javax.transaction.xa.XAException: JDBC driver does not support XA, he
    nce cannot be a participant in two-phase commit. To force this participation, se
    t the GlobalTransactionsProtocol attribute to LoggingLastResource (recommended)
    or EmulateTwoPhaseCommit for the Data Source = EBSConnection
    at weblogic.jdbc.wrapper.JTSXAResourceImpl.prepare(JTSXAResourceImpl.jav
    a:83)
    at weblogic.transaction.internal.XAServerResourceInfo.prepare(XAServerRe
    sourceInfo.java:1327)
    at weblogic.transaction.internal.XAServerResourceInfo.prepare(XAServerRe
    sourceInfo.java:513)
    at weblogic.transaction.internal.ServerSCInfo$1.run(ServerSCInfo.java:36
    8)
    at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTunin
    gWorkManagerImpl.java:528)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    .>
    <12 Oct, 2012 12:34:40 PM IST> <Error> <oracle.soa.bpel.engine.dispatch> <BEA-00
    0000> <failed to handle message
    javax.transaction.xa.XAException: JDBC driver does not support XA, hence cannot
    be a participant in two-phase commit. To force this participation, set the Globa
    lTransactionsProtocol attribute to LoggingLastResource (recommended) or EmulateT
    woPhaseCommit for the Data Source = EBSConnection
    at weblogic.jdbc.wrapper.JTSXAResourceImpl.prepare(JTSXAResourceImpl.jav
    a:83)
    at weblogic.transaction.internal.XAServerResourceInfo.prepare(XAServerRe
    sourceInfo.java:1327)
    at weblogic.transaction.internal.XAServerResourceInfo.prepare(XAServerRe
    sourceInfo.java:513)
    at weblogic.transaction.internal.ServerSCInfo$1.run(ServerSCInfo.java:36
    8)
    at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTunin
    gWorkManagerImpl.java:528)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    >
    <12 Oct, 2012 12:34:40 PM IST> <Error> <oracle.soa.bpel.engine.dispatch> <BEA-00
    0000> <Failed to handle dispatch message ... exception ORABPEL-05002
    Message handle error.
    error while attempting to process the message "com.collaxa.cube.engine.dispatch.
    message.instance.CallbackDeliveryMessage"; the reported exception is: Error comm
    itting transaction:; nested exception is: javax.transaction.xa.XAException: JDBC
    driver does not support XA, hence cannot be a participant in two-phase commit.
    To force this participation, set the GlobalTransactionsProtocol attribute to Log
    gingLastResource (recommended) or EmulateTwoPhaseCommit for the Data Source = EB
    SConnection
    This error contained an exception thrown by the message handler.
    Check the exception trace in the log (with logging level set to debug mode).
    ORABPEL-05002
    Message handle error.
    error while attempting to process the message "com.collaxa.cube.engine.dispatch.
    message.instance.CallbackDeliveryMessage"; the reported exception is: Error comm
    itting transaction:; nested exception is: javax.transaction.xa.XAException: JDBC
    driver does not support XA, hence cannot be a participant in two-phase commit.
    To force this participation, set the GlobalTransactionsProtocol attribute to Log
    gingLastResource (recommended) or EmulateTwoPhaseCommit for the Data Source = EB
    SConnection
    This error contained an exception thrown by the message handler.
    Check the exception trace in the log (with logging level set to debug mode).
    at com.collaxa.cube.engine.dispatch.DispatchHelper.handleMessage(Dispatc
    hHelper.java:207)
    at com.collaxa.cube.engine.dispatch.BaseDispatchTask.process(BaseDispatc
    hTask.java:88)
    at com.collaxa.cube.engine.dispatch.BaseDispatchTask.run(BaseDispatchTas
    k.java:64)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
    utor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
    .java:908)
    at java.lang.Thread.run(Thread.java:662)
    >
    Could any body help on this issue.It is little bit urgent for us to resolve.
    Thanks in advance.

    Thanks Sudipto Desmukh,
    The link is helpful me to resolve this issue.
    Thanks,
    Narasimha E

  • Thread hang during call EJB 3.0 with Weblogic 10.3 (Urgent)

    Hello,
    We have a java client application call Weblogic Appserver 10.3, EJB 3.0 Service. Occasionally, client application, some step will get hang when try to invoking EJB. When we restart the application server and re-run the client application, it may work or hang on any other step. (Totally, we have around 40 steps to invoking EJB service)
    We did check Google and find similar issue happen on the IBM Websphere appserver. They post a patch to fix this issue (http://www-01.ibm.com/support/docview.wss?rs=180&uid=swg1PK74719), but not Weblogic.
    Is there any Weblogic expert who can help me to solve this issue?
    I have attached two thread dumps (different steps) when they got hang.
    Appreciate your quick help.
    Best wishes,
    Feelyn
    ==========================================================================================================================================
    Thread Dump files.
    NULL ------------------------------------------------------------------------
    0SECTION THREADS subcomponent dump routine
    NULL =================================
    NULL
    1XMCURTHDINFO Current Thread Details
    NULL ----------------------
    NULL
    1XMTHDINFO All Thread Details
    NULL ------------------
    NULL
    2XMFULLTHDDUMP Full thread dump J9 VM (J2RE 6.0 IBM J9 2.4 AIX ppc64-64 build jvmap6460-20090215_2988320090215_029883_BHdSMr, native threads):
    3XMTHREADINFO "main" TID:0x0000000110A64600, j9thread_t:0x000000011011F420, state:CW, prio=5
    3XMTHREADINFO1 (native thread ID:0x125009, native priority:0x5, native policy:UNKNOWN)
    4XESTACKTRACE at java/util/HashMap.findNonNullKeyEntry(HashMap.java:526(Compiled Code))
    4XESTACKTRACE at java/util/HashMap.getEntry(HashMap.java:511(Compiled Code))
    4XESTACKTRACE at java/util/HashMap.get(HashMap.java:497(Compiled Code))
    4XESTACKTRACE at weblogic/utils/collections/SoftHashMap.get(SoftHashMap.java:194(Compiled Code))
    4XESTACKTRACE at weblogic/ejb/container/internal/RemoteBusinessIntfProxy.getTargetMethod(RemoteBusinessIntfProxy.java:125(Compiled Code))
    4XESTACKTRACE at weblogic/ejb/container/internal/RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:53(Compiled Code))
    4XESTACKTRACE at $Proxy0.cleanBx001(Bytecode PC:18)
    4XESTACKTRACE at com/tesco/eod/exec/thred/CleanZBx001Thead.cleanBx001(CleanZBx001Thead.java:38)
    4XESTACKTRACE at com/tesco/eod/exec/MainClass.cleanBx001(MainClass.java:1033)
    4XESTACKTRACE at com/tesco/eod/exec/MainClass.main(MainClass.java:1239)
    3XMTHREADINFO "JIT Compilation Thread" TID:0x0000000111CBE200, j9thread_t:0x000000011011FE20, state:CW, prio=10
    3XMTHREADINFO1 (native thread ID:0x127073, native priority:0xB, native policy:UNKNOWN)
    3XMTHREADINFO "Signal Dispatcher" TID:0x0000000111EBEB00, j9thread_t:0x0000000111D5B940, state:R, prio=5
    3XMTHREADINFO1 (native thread ID:0xA4165, native priority:0x5, native policy:UNKNOWN)
    4XESTACKTRACE at com/ibm/misc/SignalDispatcher.waitForSignal(Native Method)
    4XESTACKTRACE at com/ibm/misc/SignalDispatcher.run(SignalDispatcher.java:54)
    3XMTHREADINFO "Gc Slave Thread" TID:0x0000000111EFED00, j9thread_t:0x0000000111EC8340, state:CW, prio=5
    3XMTHREADINFO1 (native thread ID:0xDC0CD, native priority:0x5, native policy:UNKNOWN)
    3XMTHREADINFO "Gc Slave Thread" TID:0x0000000111FBBA00, j9thread_t:0x0000000111EC8840, state:CW, prio=5
    3XMTHREADINFO1 (native thread ID:0x27C1D9, native priority:0x5, native policy:UNKNOWN)
    3XMTHREADINFO "Gc Slave Thread" TID:0x000000011209AB00, j9thread_t:0x0000000112055AE0, state:CW, prio=5
    3XMTHREADINFO1 (native thread ID:0x1EA0D5, native priority:0x5, native policy:UNKNOWN)
    3XMTHREADINFO "Gc Slave Thread" TID:0x000000011209FD00, j9thread_t:0x0000000112055FE0, state:CW, prio=5
    3XMTHREADINFO1 (native thread ID:0x282155, native priority:0x5, native policy:UNKNOWN)
    3XMTHREADINFO "Gc Slave Thread" TID:0x0000000112107E00, j9thread_t:0x00000001120564E0, state:CW, prio=5
    3XMTHREADINFO1 (native thread ID:0xFF037, native priority:0x5, native policy:UNKNOWN)
    3XMTHREADINFO "Gc Slave Thread" TID:0x0000000112122700, j9thread_t:0x000000011211DD80, state:CW, prio=5
    3XMTHREADINFO1 (native thread ID:0x10B1BF, native priority:0x5, native policy:UNKNOWN)
    3XMTHREADINFO "Gc Slave Thread" TID:0x00000001123E4200, j9thread_t:0x000000011211E280, state:CW, prio=5
    3XMTHREADINFO1 (native thread ID:0x119025, native priority:0x5, native policy:UNKNOWN)
    3XMTHREADINFO "Finalizer thread" TID:0x0000000112D5A000, j9thread_t:0x000000011211E780, state:CW, prio=5
    3XMTHREADINFO1 (native thread ID:0xDE109, native priority:0x5, native policy:UNKNOWN)
    3XMTHREADINFO "ExecuteThread: '0' for queue: 'default'" TID:0x0000000112DEE600, j9thread_t:0x0000000112DD8B80, state:CW, prio=5
    3XMTHREADINFO1 (native thread ID:0x25412D, native priority:0x5, native policy:UNKNOWN)
    4XESTACKTRACE at java/lang/Object.wait(Native Method)
    4XESTACKTRACE at java/lang/Object.wait(Object.java:167)
    4XESTACKTRACE at weblogic/kernel/ExecuteThread.waitForRequest(ExecuteThread.java:91)
    4XESTACKTRACE at weblogic/kernel/ExecuteThread.run(ExecuteThread.java:115)
    3XMTHREADINFO "ExecuteThread: '1' for queue: 'default'" TID:0x0000000112E23F00, j9thread_t:0x0000000112DD9080, state:CW, prio=5
    3XMTHREADINFO1 (native thread ID:0x2DC15F, native priority:0x5, native policy:UNKNOWN)
    4XESTACKTRACE at java/lang/Object.wait(Native Method)
    4XESTACKTRACE at java/lang/Object.wait(Object.java:167)
    4XESTACKTRACE at weblogic/kernel/ExecuteThread.waitForRequest(ExecuteThread.java:91)
    4XESTACKTRACE at weblogic/kernel/ExecuteThread.run(ExecuteThread.java:115)
    3XMTHREADINFO "ExecuteThread: '2' for queue: 'default'" TID:0x0000000112F65E00, j9thread_t:0x0000000112DD9580, state:CW, prio=5
    3XMTHREADINFO1 (native thread ID:0x275171, native priority:0x5, native policy:UNKNOWN)
    4XESTACKTRACE at java/lang/Object.wait(Native Method)
    4XESTACKTRACE at java/lang/Object.wait(Object.java:167)
    4XESTACKTRACE at weblogic/kernel/ExecuteThread.waitForRequest(ExecuteThread.java:91)
    4XESTACKTRACE at weblogic/kernel/ExecuteThread.run(ExecuteThread.java:115)
    3XMTHREADINFO "ExecuteThread: '3' for queue: 'default'" TID:0x0000000112FF2D00, j9thread_t:0x0000000112FBAF80, state:CW, prio=5
    3XMTHREADINFO1 (native thread ID:0x1B4199, native priority:0x5, native policy:UNKNOWN)
    4XESTACKTRACE at java/lang/Object.wait(Native Method)
    4XESTACKTRACE at java/lang/Object.wait(Object.java:167(Compiled Code))
    4XESTACKTRACE at weblogic/kernel/ExecuteThread.waitForRequest(ExecuteThread.java:89(Compiled Code))
    4XESTACKTRACE at weblogic/kernel/ExecuteThread.run(ExecuteThread.java:115)
    3XMTHREADINFO "ExecuteThread: '4' for queue: 'default'" TID:0x00000001130DD800, j9thread_t:0x0000000112FBB480, state:R, prio=5
    3XMTHREADINFO1 (native thread ID:0x245133, native priority:0x5, native policy:UNKNOWN)
    4XESTACKTRACE at java/net/SocketInputStream.socketRead0(Native Method)
    4XESTACKTRACE at java/net/SocketInputStream.read(SocketInputStream.java:140(Compiled Code))
    4XESTACKTRACE at weblogic/socket/SocketMuxer.readReadySocketOnce(SocketMuxer.java:887(Compiled Code))
    4XESTACKTRACE at weblogic/socket/SocketMuxer.readReadySocket(SocketMuxer.java:849(Compiled Code))
    4XESTACKTRACE at weblogic/socket/JavaSocketMuxer.processSockets(JavaSocketMuxer.java:283)
    4XESTACKTRACE at weblogic/socket/SocketReaderRequest.run(SocketReaderRequest.java:29)
    4XESTACKTRACE at weblogic/work/ExecuteRequestAdapter.execute(ExecuteRequestAdapter.java:21)
    4XESTACKTRACE at weblogic/kernel/ExecuteThread.execute(ExecuteThread.java:145)
    4XESTACKTRACE at weblogic/kernel/ExecuteThread.run(ExecuteThread.java:117)
    3XMTHREADINFO "weblogic.timers.TimerThread" TID:0x0000000111DACF00, j9thread_t:0x0000000112FBB980, state:CW, prio=9
    3XMTHREADINFO1 (native thread ID:0xFE11F, native priority:0x9, native policy:UNKNOWN)
    4XESTACKTRACE at java/lang/Object.wait(Native Method)
    4XESTACKTRACE at java/lang/Object.wait(Object.java:196(Compiled Code))
    4XESTACKTRACE at weblogic/timers/internal/TimerThread$Thread.run(TimerThread.java:267)
    3XMTHREADINFO "Thread-5" TID:0x00000001130E2900, j9thread_t:0x00000001130DC700, state:CW, prio=5
    3XMTHREADINFO1 (native thread ID:0x1E61A9, native priority:0x5, native policy:UNKNOWN)
    4XESTACKTRACE at java/lang/Object.wait(Native Method)
    4XESTACKTRACE at java/lang/Object.wait(Object.java:167)
    4XESTACKTRACE at java/util/Timer$TimerImpl.run(Timer.java:210)
    3XMTHREADINFO "weblogic.transaction.TxTimer: '1'" TID:0x00000001132FA300, j9thread_t:0x00000001130DCC00, state:CW, prio=5
    3XMTHREADINFO1 (native thread ID:0x20E10F, native priority:0x5, native policy:UNKNOWN)
    4XESTACKTRACE at java/lang/Object.wait(Native Method)
    4XESTACKTRACE at java/lang/Object.wait(Object.java:196(Compiled Code))
    4XESTACKTRACE at weblogic/transaction/internal/GenericTimer.run(GenericTimer.java:15)
    4XESTACKTRACE at java/lang/Thread.run(Thread.java:735)
    NULL ------------------------------------------------------------------------

    Here has more details:
    java weblogic.version: WebLogic Server 10.3 Fri Jul 25 16:30:05 EDT 2008 1137967
    SERVICE NAME VERSION INFORMATION
    ============ ===================
    Kernel Commonj WorkManager v1.1
    TimerService Commonj TimerManager v1.1
    CorbaService CORBA 2.3, IIOP 1.2, RMI-IIOP SFV2, OTS 1.2, CSIv2 Level 0 + Stateful
    XMLService XML 1.1
    Transaction Service JTA 1.0.1B
    JDBCService JSR-114, JDBC 3.0
    CustomResourceServerService 1.0.0.0
    Servlet Container Servlet 2.5, JSP 2.1
    WebServices JSR-173, JAX-RPC, JSR-109, WSDL, WS-Addressing, WS-Policy, JAX-B, JAX-R, UDDI, WS-Management(HP), JAXP-1.3, WS-Security
    Pre Admin Singleton Services S 1.0
    Singleton Services Batch Manag 1.0
    EJB Container EJB 3.0
    MDBService EJB 3.0
    EJBTimerService EJB 3.0
    J2EE Connector 1.5
    JMS Service JMS 1.1

  • Calling EJB with HTML via SERVLET

    Hi,
    I used a writen example that calls EJB from HTML via SERVLET. Example name is Bonus. The problem I have is that the HTML throw error while calling SERVLET. I dont figure out what seams to be a problem. Someone know?
    I wonder if the problem is in servlet? The EJB is fine!
    christian
    HTML CODE:(bonus.html)
    <HTML>
    <HEAD>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1250"/>
    <TITLE>untitled1</TITLE>
    </HEAD>
    <BODY BGCOLOR = "WHITE">
    <BLOCKQUOTE>
    <H3>Bonus Calculation</H3>
    <FORM METHOD="GET" ACTION="BonusAlias">
    <P>Enter social security Number:<P>
    <INPUT TYPE="TEXT" NAME="SOCSEC"></INPUT>
    </P>
    Enter Multiplier:
    <P>
    <INPUT TYPE="TEXT" NAME="MULTIPLIER"></INPUT>
    </P>
    <INPUT TYPE="SUBMIT" VALUE="Submit">
    <INPUT TYPE="RESET">
    </FORM>
    </BLOCKQUOTE>
    </BODY>
    </HTML>
    SERVLET CODE:(BonusServlet.java)
    package mypackage5;
    import mypackage5.Calc;
    import mypackage5.CalcHome;
    import mypackage5.impl.CalcBean;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import javax.naming.*;
    import javax.rmi.PortableRemoteObject;
    import java.beans.*;
    public class BonusServlet extends HttpServlet {
    CalcHome homecalc;
    public void init(ServletConfig config) throws ServletException{
    //Look up home interface
    try{
    //InitialContext ctx = new InitialContext();
    //Object objref = ctx.lookup("Calc");
    //homecalc = (CalcHome)PortableRemoteObject.narrow(objref, CalcHome.class);
    Context context = new InitialContext();
    CalcHome calcHome = (CalcHome)PortableRemoteObject.narrow(context.lookup("Calc"), CalcHome.class);
    Calc calc;
    catch (Exception NamingException) {
    NamingException.printStackTrace();
    public void doGet (HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
    String socsec = null;
    int multiplier = 0;
    double calc = 0.0;
    PrintWriter out;
    response.setContentType("text/html");
    String title = "EJB Example";
    out = response.getWriter();
    out.println("<HTML><HEAD><TITLE>");
    out.println(title);
    out.println("</TITLE></HEAD><BODY>");
    try{
    Calc theCalculation;
    //Get Multiplier and Social Security Information
    String strMult = request.getParameter("MULTIPLIER");
    Integer integerMult = new Integer(strMult);
    multiplier = integerMult.intValue();
    socsec = request.getParameter("SOCSEC");
    //Calculate bonus
    double bonus = 100.00;
    theCalculation = homecalc.create();
    calc = theCalculation.calcBonus(multiplier, bonus);
    catch (Exception CreateException){
    CreateException.printStackTrace();
    //Display Data
    out.println("<H1>Bonus Calculation</H1>");
    out.println("<P>Soc Sec: " + socsec + "<P>");
    out.println("<P>Multiplier: " +
    multiplier + "<P>");
    out.println("<P>Bonus Amount: " + calc + "<P>");
    out.println("</BODY></HTML>");
    out.close();
    public void destroy() {
    System.out.println("Destroy");

    The error is that page cannot be found! When I run only the servlet it works, when I run the HTML page and enter the field throws eror that the page cannot be found!
    thanks
    Christian

  • WDP calling EJB and passing objects of classes from Java project

    Hi.
    We have <b>Java</b> project which contains some classes common for all projects (like xxx.Version).
    We have <b>EJB</b> project which defines EJB interface using these common classes (like getVersion(String,int): xxx.Version and getCurrency(String,xxx.Version,int):xxx.Currency ).
    We have <b>Web Dynpro</b> project which calls EJB:
    1. Lookup is successful
    2. call to getVersion is successful
    3. call to getCurrency fails with <b>NoSuchMethodException</b>:
    xxx.XXXObjectImpl0.getCurrency(java.lang.String, xxx.Version, int)
         at java.lang.Class.getMethod(Class.java:986)
         at com.sap.engine.services.rmi_p4.reflect.LocalInvocationHandler.invokeInternal(LocalInvocationHandler.java:51)
         at com.sap.engine.services.rmi_p4.reflect.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:53)
         at $Proxy346.getCurrency(Unknown Source)
         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:324)
         at com.sap.engine.services.ejb.session.stateless_sp5.ObjectStubProxyImpl.invoke(ObjectStubProxyImpl.java:187)
         at $Proxy347.getCurrency(Unknown Source)
         at xxx.XXX.getCurrencyWrapper(XXXXX.java:24)
    How can I set dependencies to get this running?
    Thanks to all
           Volker

    Hi,
    Is it available in the interface you are using..
    If the answer is yes.. you might have probably forgotten to deploy the EJBs ear file after making the changes..
    Rebuild it.. and deploy the EJB s ear file again..
    It will solve the problem.. If that also does not work,it might be a problem with the cache.. restart the server..
    It should work now !
    Regards
    Bharathwaj

  • How to Call EJB from coldfusion

    I need to call EJB that's created in JBoss from coldfusion.
    I'm getting different errors depending on how I set the home object
    and provider url.
    If I prefix provider url with jnp://, then I get the
    following error
    The connection to the remote JNDI server on host jnp at port
    1099 has failed (as have all backup hosts listed, if any) - please
    verify that the server is running and the NamingService is
    available
    If I take the jnp out and keep just the ip address and port,
    then i get the following error
    null (no security manager: RMI class loader disabled).
    So I'm not sure what the issue is and I haven't used this
    feature before.
    Here's my code

    I tries to call custom EJBfrom custom component received
    follwong error
    ERROR [STDERR] javax.naming.CommunicationException [Root exception is java.lang.ClassNotFoundException:
    No ClassLoaders found for: com.mycom.myapp.action.interfaces.pm.ejb.PmFacadeRemote
    (no security manager: RMI class loader disabled)]
    any idea?
    Thanks
    YogLC

  • Calling EJB from an applet in 9iAS Release 2?

    Hello!
    In 9iAS Release 1 it is not so easy to call an EJB from an applet. First the applet needs special privileges and then the applet starts only once. The cause of problem is the implementation of ormi.
    Will 9iAS Rel. 2 support Applets calling EJBs?

    Jeff,
    I am also trying to make an applet client for an EJB deployed to OC4J.
    I modified the java2.policy file as you suggested, but when I tried to run my applet, I
    got the following error:
    java.lang.ExceptionInInitializerError: java.security.AccessControlException: access denied (java.util.PropertyPermission tunneling.shortcut read)
         at java.security.AccessControlContext.checkPermission(Unknown Source)
         at java.security.AccessController.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
         at java.lang.System.getProperty(Unknown Source)
         at java.lang.Boolean.getBoolean(Unknown Source)
         at com.evermind.server.rmi.RMIInitialContextFactory.<clinit>(RMIInitialContextFactory.java:34)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Unknown Source)
         at com.sun.naming.internal.VersionHelper12.loadClass(Unknown Source)
         at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
         at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
         at javax.naming.InitialContext.init(Unknown Source)
         at javax.naming.InitialContext.<init>(Unknown Source)
         at its.fnd.ejb.EJBHomeFinder.getHomeObject(Unknown Source)
         at its.fnd.flight.ejb.EJBFlightFactory.<init>(Unknown Source)
         at its.fnd.flight.FlightFactory.<init>(FlightFactory.java:97)
         at EJBApplet.jbInit(EJBApplet.java:47)
         at EJBApplet.init(EJBApplet.java:36)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    I am using OC4J (stand-alone) version 9.0.2.0.0 on Solaris 7 and Microsoft Internet Explorer
    5.0 with the java 1.3.1 plug-in.
    Here is the applet code that I use to lookup the EJB home interface:
    Properties props = new Properties();
    props.put(Context.INITIAL_CONTEXT_FACTORY,"com.evermind.server.rmi.RMIInitialContextFactory");
    props.put(Context.PROVIDER_URL,"ormi://host:6666/app");
    props.put(Context.SECURITY_PRINCIPAL,"admin");
    props.put(Context.SECURITY_CREDENTIALS,"password");
    Context ctxt = new InitialContext(props);
    Object homeObj = ctxt.lookup("my_bean");
    MyBeanHome home = PortableRemoteObject.narrow(homeObj, MyBeanHome.class);
    The HTML page with the <applet> tag is a static HTML page that is part of OC4J's default
    web application. The applet class file is located in a subdirectory of the default-web-app
    directory. Here is the HTML page...
    <HTML>
    <HEAD>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
    <TITLE>
    HTML Test Page
    </TITLE>
    </HEAD>
    <BODY>
    <object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" width="580" height="450" name="EJBApplet" align="middle" alt="Loading EJBApplet ...">
    <param name="java_code" value="EJBApplet">
    <param name="java_codebase" value="/tests">
    <param name="java_archive" value="xerces.jar,ejb.jar,oc4j.jar,jaas.jar"/>
    <param name="java_type" value="application/x-java-applet;version=1.3">
    <param name="java_scriptable" value="true">
    <table cellpadding="1" bgcolor="#FFFFFF" width="580" height="450">
    <tr><td>
    This is a place for an APPLET.<br>Your browser doesn't support the correct applet java plug-in.<br><br>You can install the correct plug-in from here.<br><a target='_blank' onClick='javascript:self.window.close()' href="/classes/3rdparty/j2re-win-plug-in.exe">Click here to install plug-in.</a><br><br>Or if you have an Internet connection you can install the correct plug-in from here.<br><a target='_blank' onClick='javascript:self.window.close()' href="http://java.sun.com/products/plugin/1.3/plugin-install.html">Click here to install plug-in from Internet.</a><br><br>You can call your System Administrator for assistance.</td></tr>
    </table>
    </object>
    </BODY>
    </HTML>
    I have searched the Internet, and the documentation, and tried several, different things,
    but I can't get it to work.
    Any and all help will be greatly appreciated.
    Thanks,
    Sofia.

  • Calling EJB from Oracle via IIOP

    I've spent the last two days trying to figure out how I can call an
    EJB from an Oracle Stored Procedure. I first looked into WLS JNDI
    (Using WLInitialContextFactory ), but my collegue recommended I look
    into IIOP because it is "less proprietary". I was able to get a WL
    example working that does a lookup on an EJB and "narrows" the IIOP
    object...so it looked promissing, but then I tried to load the JAR
    into Oracle and it said:
    "referenced name javax/rmi/PortableRemoteObject could not be found"
    So I did a quick check and it looks like this didn't come into
    existance until JDK 1.3. By all accounts, Oracle 8.1.6 supports JDK 2
    (1.2). So now I'm stuck. I've got a few examples about connecting to
    the Oracle ORB using session-iiop, but I don't know if Weblogic will
    be able to work with this. I don't know how I'd even call it because
    the URL requires an Oracle SID...so now what? I see three options.
    Please let me know which would be best (or another option that I'm
    missing)
    1. Try connecting with Weblogic "T3"
    2. Try to get the right combination of classes loaded so 1.2 can work
    like 1.3
    3. Use the Oracle IIOP (I have no examples for connecting to other
    ORBs so I have no idea how to lookup objects).
    Chris

    [email protected] (Chris Snyder) writes:
    Andy Piper <[email protected]> wrote in message news:<[email protected]>...
    [email protected] (Chris Snyder) writes:
    1. Try connecting with Weblogic "T3"It depends on what version of WLS you are using. If you are using 6.1
    then you are out-of-luck because this only support JDK 1.3.1.We are using WLS 6.1 and Oracle 8.1.6. There's got to be a way to
    connect what is essentially a 1.2 JVM to a 1.3.1 JVM. On my way home
    yesterday I was wondering if just straight RMI would work...although
    we need to encrypt the connection. I've seen several people talk
    about calling EJB's from stored procedures so it seems like there is a
    way. Any other ideas?The really gross way is HTTP. In a previous life I had a customer use
    oracle's HTTP plug-in to do this. You could probably invert the
    problem also. I.e. write CORBA objects that sit inside an Orb hosted
    in WLS and invoke on those using oracle's CORBA support. But HTTP is
    probably the way most likely to work. You probably couldn't use RMI
    over HTTP either - you would have to write a servlet that delegated to
    your beans.
    andy

  • Calling EJB from JSP

    Hi - I'm running OC4J 9.0.2 on windows 2000
    I have a JSP that accepts user inputs and the call respective Servlets. Before the servlet gets called, I want to log a tracing event with an EJB(Stateless Session Bean).
    I have manipulated the "form" values with JavaScript but cannot find any docs on how to call an EJB from JavaScript in a JSP.
    The JSP and EJB works fine on there own. How do I get the "form" values into the EJB variables without JavaScript?
    The EJB logs fine while still in the "JAVA" part of the JSP but I don't know how to extract these 2 index values.
    Tks
    Andre
    Here is extract of code:
    <%@ page language="java" contentType="text/html;charset=windows-1252"%>
    <%@ page language="java" import="java.io.*"%>
    <%@ page language="java" import="java.util.*"%>
    <%@ page language="java" import="javax.naming.*"%>
    <%@ page language="java" import="javax.rmi.*"%>
    <%@ page language="java" import="WizardEvents.WizEventLog.*"%>
    <HTML>
    <HEAD>
    <BODY background="/wp/Background.gif">
    <script language="JavaScript">
    // build timer to display at bottom of screen for debugging of screen dumps
    function display_time()
    var da = new Date();
    var dd = da.getDate('DD');
    var dm = da.getMonth('MON')+1;
    var dy = da.getYear('YYYY');
    var h = da.getHours();
    var m = da.getMinutes();
    if (m < 10)
    m = "0" + m;
    var t = dy+"\-"+dm+"\-"+dd+" "+h+":"+m;
    defaultStatus = t;
    setTimeout("display_time()",60000); // one minute
    return true;
    function registerEvent()
    var menuItem = document.selRequest.selCategory.selectedIndex;
    var serviceOption = document.selRequest.serviceOption.selectedIndex;
    // now invoke EJB to log event
    alert("selected menu option is "+menuItem+" and service option "+serviceOption);
    return true;
    // get the value from the categories and build up list of the options...
    function buildItems()
    // alert("Building items");
    // get the index (starting with 0) of the categories selection
    var menuItem = document.selRequest.selCategory.selectedIndex;
    // reset the values for the options selection to 0
    document.selRequest.serviceOption.length=0;
    // define new array to hold options for transfer to selection item
    newOptions = new Array;
    // Now check which menu option, build list
    var newLength = 0;
    switch(menuItem)
    case 0:
    newLength = 1;
    newOptions[0] = new Option("No Service Option",0,false,false);
    break;
    case 1:
    newLength = 1;
    newOptions[0] = new Option("No Service Option",0,false,false);
    break;
    case 2:
    newLength = 1;
    newOptions[0] = new Option("No Service Option",0,false,false);
    break;
    case 3:
    newLength = 1;
    newOptions[0] = new Option("No Service Option",0,false,false);
    break;
    case 4:
    newLength = 1;
    newOptions[0] = new Option("No Service Option",0,false,false);
    break;
    case 5:
    newLength = 5;
    newOptions[0] = new Option("All wallet and airtime balance",0,true,true);
    newOptions[1] = new Option("Airtime balance",1,false,false);
    newOptions[2] = new Option("SMS-a-lot balance",2,false,false);
    newOptions[3] = new Option("Call Extender balance",3,false,false);
    newOptions[4] = new Option("Per Second Billing balance",4,false,false);
    break;
    case 6:
    newLength = 2;
    newOptions[0] = new Option("Subscriber data - Channel Provisioning Options",8,true,true);
    newOptions[1] = new Option("IBS Pending Transaction Inquiry",9,false,false);
    break;
    default:
    newLength = 1;
    newOptions[0] = new Option("No Service Option - Default",0,false,false);
    break;
    var serviceOption = document.selRequest.serviceOption;
    // transfer array to select statement
    for (var i=0; i < newLength; i++)
    serviceOption.options[i] = newOptions;
    </script>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
    <TITLE>Wizard Prepaid Interface</TITLE>
    <%----%>
    <BODY text="#FFFFFF" bgcolour="#ffffff" bgcolor="#3c698a" onload="display_time();" >
    <H2 ALIGN=Center>Wizard Prepaid Interface</H2>
    <PRE>
    <%
    java.util.Enumeration params=request.getParameterNames();
    StringBuffer urlBuf = request.getRequestURL();
    String urlValue = urlBuf.toString();
    int colPos = urlValue.indexOf(":8888");
    String serverName = urlValue.substring(0,colPos+5);
    String paramValues1[] = request.getParameterValues("event_ref_no");
    String eventRefNo = paramValues1[0];
    String paramValues2[] = request.getParameterValues("msisdn_no");
    String msisdnNo = paramValues2[0];
    String paramValues3[] = request.getParameterValues("operator_id");
    String operatorId = paramValues3[0];
    String paramValues4[] = request.getParameterValues("wizDB");
    String wizDB = paramValues4[0].toLowerCase();
    // set session values into session object
    session.removeAttribute("eventRefNo");
    session.removeAttribute("msisdnNo");
    session.removeAttribute("operatorId");
    session.removeAttribute("wizDB");
    session.removeAttribute("serverName");
    session.setAttribute("eventRefNo",eventRefNo);
    session.setAttribute("msisdnNo",msisdnNo);
    session.setAttribute("operatorId",operatorId);
    session.setAttribute("wizDB",wizDB);
    session.setAttribute("serverName",serverName);
    session.setAttribute("eventOpenCount","0");
    session.setAttribute("errorString","No errors encountered yet");
    // now build ref to lookup event log EJB
    WizardEvents.WizEventLog eventBean;
    Context ctx = new InitialContext();
    Object homeObject=ctx.lookup("WizEventLog");
    WizardEvents.WizEventLogHome home =
    (WizardEvents.WizEventLogHome)PortableRemoteObject.narrow(homeObject, WizardEvents.WizEventLogHome.class);
    eventBean=(WizardEvents.WizEventLog)PortableRemoteObject.narrow(home.create(),
    WizardEvents.WizEventLog.class);
    int eventRefNoInput = Integer.parseInt(eventRefNo);
    int operatorIdInput = Integer.parseInt(operatorId);
    long msisdnNoInput = Long.parseLong(msisdnNo);
    int callCatCodeInput = 177;
    int callCatItemCodeInput = 2;
    String machineName = "WEB";
    String moduleName = "WIZARDPREPAID.JSP";
    String[] resArray = null;
    // event logging EJB
    resArray = eventBean.setEventDetail(eventRefNoInput,
    operatorIdInput,
    callCatCodeInput,
    callCatItemCodeInput,
    machineName,
    moduleName,
    wizDB);
    %>
    </PRE>
    <%--
    // check if data passed is valid
    --%>
    <jsp:include page="/servlet/CheckValidURL" flush="true"></jsp:include>
    <%
    if (session.getAttribute("eventOpenCount").equals("1"))
    %>
    <H3 ALIGN=CENTER>MSISDN = <%=msisdnNo%></H3>
    <HR>
    <H4 ALIGN=CENTER>Prepaid Query History</H4>
    <%--
    onclick can empty the service options field
    --%>
    <TABLE>
    <TD>Enter request target :</TD>
    <%--action="/wp/servlet/ValidateParamsClass"--%>
    <FORM name="selRequest" method="POST" >
    <TD><SELECT name="selCategory" onchange="buildItems()" >
    <OPTION value="Prepaid Cards Loaded">Prepaid Cards Loaded</OPTION>
    <OPTION value="Prepaid Recycle History">Prepaid Recycle History</OPTION>
    <OPTION value="Prepaid Failed Recharges">Prepaid Failed Recharges</OPTION>
    <OPTION value="Prepaid Access4Life Status">Prepaid Access4Life Status</OPTION>
    <OPTION value="Prepaid Number4Life Status">Prepaid Number4Life Status</OPTION>
    <OPTION value="IBS Balance Inquiry">IBS Balance Inquiry</OPTION>
    <OPTION value="IBS Subscriber Data Inquiry">IBS Subscriber Data Inquiry</OPTION>
    </SELECT>
    </TD>
    </TABLE>
    <%--
    Build the possible service options for IBS depending on selection
    Create selection list and then assign default value of none
    --%>
    <TABLE>
    <TD>Possible Service Options:</TD>
    <TD><select name="serviceOption">
    <option value="">No option available</option>
    <SCRIPT>
    // re-build items to cater for FORWARD/BACK buttons, etc
    buildItems();
    </SCRIPT>
    </TD>
    </TABLE>
    <%--
    --%>
    <%--
    --%>
    <INPUT type="submit" value="Query Prepaid Systems" onclick="registerEvent()" >
    </FORM>

    Hi Christian,
    A few questions to clarify where the cause of the problem might be:
    1. When you run the JSP app in JDeveloper, are you connecting to the remotely deployed app module, or the local one in your workspace?
    2. In your JSP project, there is an appmodule.properties file. This file should specify the connection mode to use to connect to your EJB (ConnectMode=EJB), and should be deployed to a directory on your webserver's classpath, along with the connections.properties file. If the appmodule.properties file contains the wrong connectmode setting, or is not on the classpath for the webserver, this might be the cause.
    Let us know.

  • Calling EJB from XI Mapping

    Hello,
    i try to call a ejb (deployed on the same machine) within a message mapping (userdefined function).
    Is there any documentation how to do the jndi lookup?
    Do i have to pass user credentials in order get working jndi-lookups. Currently i get only sap....UnsatisfiedReferenceImpl Objects from the context.lookup(...).
    As far as i can see there is no binding of my ejb visible for lookups (tracing the content of context.list("")).
    Do i have to load a foo_client.jar into xi or not. Are there other jars to load into xi to get it work .....?
    Thanks
    Peter

    Hello.
    Check my wiki article:
    http://wiki.sdn.sap.com/wiki/display/stage/SapNetweaverProcessIntegration.CallEjb3.0methodfromJavaclassmappingPI7.1
    (SapNetweaver Process Integration. Call Ejb 3.0 method from Java class mapping PI 7.1)

  • Calling EJB method

    Hi All,
    I have never worked with EJBs so I am kind of stuck with one problem.
    I have to make use of one existing EJB project through my external standard java class. The existing EJB project makes use of some other packages which are also EJB projects and I am not allowed to change any functionality of the EJB project but to use them as it is.
    I am just initilizing the class object of the EJB project and calling its method. Within the EJB project there is a method which is calling another method of another EJB class.
    The problem is that I dont see this other EJB class object getting initilized first and then calling its method as it happens in a normal scenario, hence when that method gets called i get a null pointer execption.
    Let me give you some idea by posting some code snippet.
    @WebService(targetNamespace = "http://www.ttt.de/ota")
    @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.BARE)
    // standard EJB3 annotations
    @Local(AMSAgencyWSPortType.class)
    @Stateless
    @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
    // jboss propriatary annotations
    @WebContext(transportGuarantee = "NONE", secureWSDLAccess = false)
    public class AMSProfileServiceBean extends AbstractProfileBuilder implements AMSAgencyWSPortType
      private static Log log = LogFactory.getLog(AMSMappingServiceBean.class);
      @EJB(mappedName = "PotsdamProfileService/local")
      private PotsdamProfileService profileService;
      private Security              security;
      @EJB
      private OTAProfileBuilder     otaProfileBuilder;
    @Override
      public OTATTProfileReadRS otaTTReadRQ(Holder<Security> wsseHeader, OTATTReadRQ request)
         security = wsseHeader.value;
         BigDecimal requestVersion = request.getVersion();
         OTATTProfileReadRS otaProfileReadRS = new OTATTProfileReadRS();
         otaProfileReadRS.setVersion(requestVersion);
         PotsdamInstanceKey profileIntanceKey;
        try
          profileIntanceKey = getKeyHandler(requestVersion).buildUserKey(wsseHeader);
          PotsdamInstance userInstance = loadProfileFromPotsdam(profileIntanceKey);
    private PotsdamInstance loadProfileFromPotsdam(PotsdamInstanceKey userCredentials) throws PotsdamException
           PotsdamInstance potsdamInstance = null;
           try{
        Holder<com.ttt.potsdam.common.messages.Security> wsseHeader = buildWsseHeader(security);
        ProfileResponse potsdamInstanceRS = profileService.loadProfile(wsseHeader, userCredentials);
    ...I get an error message before the sequence reaches loadProfile(..), which in my sense is due to the fact that 'profileService' never was initilized in the EJB project.
    profileService is object of another EJB project, which looks somethign like this:
    @Stateless
    @LocalBinding(jndiBinding = "PotsdamProfileService/local")
    // jboss 4.2
    @org.jboss.annotation.ejb.LocalBinding(jndiBinding = "PotsdamProfileService/local")
    public class PotsdamProfileServiceBean implements PotsdamProfileService {
         private static Log log = LogFactory.getLog(PotsdamProfileServiceBean.class);
         @EJB
         private CacheProfileService cacheProfileService;
         @EJB(mappedName = "/PersistenceUnitsManagerBean/local")
         private PersistenceUnitsManager persistenceUnitsManager;
         @EJB
         private PotsdamService potsdamService;
         public ProfileResponse loadProfile(Holder<Security> wsseHeader,
                   PotsdamInstanceKey cacheInstanceKey) {
               log.debug("inside  loadProfile");
    ...Now I am calling the main EJB like this:
    PotsdamotaTTReadRQ();
    public OTATTProfileReadRS PotsdamotaTTReadRQ()
           AMSProfileServiceBean a = new AMSProfileServiceBean();
           Holder<Security> wsseHeader = new Holder<Security>();
           OTATTProfileReadRS response = a.otaTTReadRQ(wsseHeader, request);
           return response;
      }So my confusion is how can I make use of profileService.loadProfile(wsseHeader, userCredentials); ??
    I tried to initilize: PotsdamProfileServiceBean profileService = new PotsdamProfileServiceBean();but I get jndi binding and lots of other exception.
    Please help.
    Edited by: 925515 on 04.07.2012 06:40

    Thanks for your pointer. Could you please help me out with a small code snippet example?
    I want to make use of this existing bean (AMSProfileServiceBean ):
    @WebService(targetNamespace = "http://www.ttt.de/ota")
    @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.BARE)
    // standard EJB3 annotations
    @Local(AMSAgencyWSPortType.class)
    @Stateless
    @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
    // jboss propriatary annotations
    @WebContext(transportGuarantee = "NONE", secureWSDLAccess = false)
    public class AMSProfileServiceBean extends AbstractProfileBuilder implements AMSAgencyWSPortType
      private static Log log = LogFactory.getLog(AMSMappingServiceBean.class);
      @EJB(mappedName = "PotsdamProfileService/local")
      private PotsdamProfileService profileService;
      private Security              security;
      @EJB
      private OTAProfileBuilder     otaProfileBuilder;
      @EJB
      private OTAProfileUpdater     otaProfileUpdater;
    @Override
      public OTATTProfileReadRS otaTTReadRQ(Holder<Security> wsseHeader, OTATTReadRQ request)
    ...in my soap-connector :
    @WebServiceProvider(wsdlLocation = "WEB-INF/wsdl/PotsdamAMSAgencyWS.wsdl", targetNamespace = "http://www.ttt.de/ota", serviceName = "PotsdamAMSAgencyWS", portName = "PotsdamAMSAgencyWSPortType")
    @ServiceMode(value = Service.Mode.MESSAGE)
    public class PotsdamAgencyWSProvider extends WSProvider implements Provider<SOAPMessage>
      @Resource
      WebServiceContext     wsCtx;
    ...A small example would be really appreciated.
    Thanks.

  • Calling EJB in WebDynpro JavaBean model

    Hi,
    we have our business logic encapsulated in EJB's. Due to performance issues we don't want to call the EJB's via the webservice model in Web Dynpro. Thus we decided to use the Java Bean model in Web Dynpro and call the EJB's we need in the execute method of the Java Bean.
    This worked fine before we migrated from FP12 to FP14. Now we get a
    java.lang.NoClassDefFoundError: javax/ejb/EJBHome
    exception when we try to access the EJB in the execute method of the Java Bean.
    This happens although we have defined a library reference to
    sap.com/ejb20
    in project properties -> Web Dynpro References.
    Did we miss something in order to use the ejb20.jar?
    Any help to this topic is appreciated.
    Greetings.
    Achim

    Hi,
    we have exactly the same problem!! We also use FP14
    Please help!
    Greetings
    Thomas

  • Help: applet call ejb in oracle8i

    Hello:
    Can someone tell me how to call ejb in oracle8i from applet?
    thanks a lot!
    tom
    null

    Hi mark tomlinson:
    It does not work(IE and Netscape). Did you run the example
    ejbclubmed?
    tom
    mark tomlinson (guest) wrote:
    : Here is an example snippet:
    : Assuming that the EJB MyEJB has been deployed and the generated
    : server stubs (MyEJB_generated.jar) is referenced to resolve the
    : Home and Bean objects, then:
    : MyEJB myejb_obj;
    : String user = "scott";
    : String password = "tiger"
    : String URL = "sess_iiop://<my8iserver>:2481:ORCL:/test/MyEJB";
    : // Creates the Hashtable to hold the environment variables.
    : Hashtable environment = new Hashtable();
    : // Tells JNDI to speak sess_iiop
    : environment.put(javax.naming.Context.URL_PKG_PREFIXES,
    : "oracle.aurora.jndi");
    : // Tells sess_iiop the userid, password, and credential
    : authentication.environment.put
    (Context.SECURITY_PRINCIPAL,user);
    : environment.put(Context.SECURITY_CREDENTIALS, password);
    : environment.put(Context.SECURITY_AUTHENTICATION,
    : ServiceCtx.NON_SSL_LOGIN);
    : // Creates the initial context.
    : Context ic = new InitialContext(environment);
    : // Gets an implementation of the EJB's home interface from the
    : // inital context.
    : MyEJBHome home = (RentalsEJBHome) ic.lookup(URL);
    : // Tells the home interface to create an instance of the bean
    : myejb_obj = home.create();
    : From there you invoke moethods exposed on the bean object as
    you
    : would any other java object...
    null

Maybe you are looking for

  • JNI and loadlibrary

    I know there are about a billion topics already posted on this subject but I am getting nowhere with this issue. I was able to get java to see the path and the shared library file that I want to load using java -Djava.library.path=. myjavaclass. Howe

  • Nice display to fit small space

    I'm recommending several Macs for a customer. One workspace has an overhanging bookcase which leaves about 18" usable above the desk. The new 21.5" iMac is 17.75", which is too close for comfort (it might fit, but probably wouldn't pivot). The base o

  • Invalid Message during GetOrder.Response

    Hi All, Currently we are encountering issue whereby we invoke GetOrder.Response using this script fn:root(.)/oms:GetOrder.Response, and there is fallout response being returned to OSM with this format : <GetOrder.Response xmlns="urn:com:metasolv:oms:

  • Isolation level "read uncommitted"

    Hi, How to configure the isolation level of an environment to read uncommitted? Thanks Andy

  • Wwdc predictions / rumours New retina macbook pro's

    Anyone hazard a guess as to if the retina macbook pro's will be upgraded (or know insider info) at WWDC 2014 on 2nd June? I'm particularly interested to see if the 13 inch retina will get a graphics boost from iris to iris pro like the base 15 inch r