Call EJB via ORMI+OID
Hi All,
I need to achieve this
1. Swing client needs to be authendicated when he calls any EJB of the deployed application. ( My application is secured by OID)
When i am doing a remote lookup my EJB using ORMI from swing client, i am getting invalid user name and password.
I am supplying the user name configured in OID. Help me in achieving this.
Enclosing the java program:
package com.test.ormi;
import javax.naming.Context;
import javax.naming.NamingException;
import javax.naming.InitialContext;
import java.util.Hashtable;
public class ORMITest {
static public Context getInitialContext(String url, String user, String passwd) throws NamingException {
Hashtable h = new Hashtable();
h.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory");
h.put(Context.PROVIDER_URL, url);
h.put(Context.SECURITY_PRINCIPAL, user); // OID user name
h.put(Context.SECURITY_CREDENTIALS, passwd);
try {
Context context = new InitialContext(h);
return context;
} catch (Throwable th) {
throw new NamingException(th.getMessage());
public static void main(String[] args) {
Context initalCtx = null;
try {
initalCtx = ORMITest.getInitialContext("ormi://developmentservername:12345/CQS", "user", "password");
Object o = initalCtx.lookup("jndiname");
System.out.println("Class:" + o.getClass());
} catch (NamingException e) {
e.printStackTrace();
} finally {
Regards.
Hi,
Could you make a simple client Java program (instead of Swing), and call to the EJB.
Could you test with hardcoded URL (for Context.PROVIDER_URL) and let me know if that works.
I attached a sample code
Thanks,
Olaf
====
package sampleClient;
import java.util.Hashtable;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.rmi.PortableRemoteObject;
import employeedetailssoln.Employee;
import employeedetailssoln.EmployeeHome;
import javax.naming.NamingException;
public class SamClient
public static void main(String [] args)
SamClient sClient = new SamClient();
try
Context context = getInitialContext();
SamHome samHome = (SamHome)PortableRemoteObject.narrow(context.lookup("SampleEJB"), SamHome.class);
Sam samJ;
// Use one of the create() methods below to create a new instance
samJ = samHome.create();
// invoke samJ
catch(Throwable ex)
ex.printStackTrace();
private static Context getInitialContext() throws NamingException
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory");
env.put(Context.SECURITY_PRINCIPAL, "admin");
env.put(Context.SECURITY_CREDENTIALS, "welcome1");
env.put(Context.PROVIDER_URL, "ormi://localhost:23891/current-workspace-app");
return new InitialContext(env);
Similar Messages
-
Oracle Service Bus, calling ejb on ormi protocol
Hi.
I'm trying to call an EJB on a Oracle Application server on the ormi protocol, but when i try to call it, I get this error:
<con:fault xmlns:con="http://www.bea.com/wli/sb/context">
<con:errorCode>BEA-380000</con:errorCode>
<con:reason>
General runtime error: Error accessing the JNDI context for the EJB call: java.net.UnknownHostException: Unknown protocol: 'ORMI'
</con:reason>
<con:location>
<con:node>PipelinePairNode1</con:node>
<con:pipeline>PipelinePairNode1_request</con:pipeline>
<con:stage>stage1</con:stage>
<con:path>request-pipeline</con:path>
</con:location>
</con:fault>
I have my business service referencing a local jndi provider which in turn points to the remote server, on the ormi protocol.
Could I be missing some libraries?I have my business service referencing a local jndi provider which in turn points to the remote server, on the ormi protocol.
Could I be missing some libraries?EJB transport doesn't support ORMI. Protocols supported by JNDI Provider resource are documented. Click help on you JNDI provider page.
supported protocols : http, https,t3, t3s, iiop,iiops.
Only BPEL transport supports ORMI (http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/bpelpmtransport/transport.html)
cheers
Manoj
Edited by: mneelapu on Jun 8, 2009 2:39 PM -
Calling EJB via IIOP from Oracle database
Hi all,
I hope someone has a solution for calling an EJB from a Oracle PL/SQL
procedure.
We are using IIOP because T3 force weblogic.jar (approx 30MB) to be
loaded in the database. Unfortunately, Oracle refuse it with many
errors, and corrupt its own JVM !
so... IIOP
When we try that, we get the following error :
org.omg.CORBA.OBJ_ADAPTER: minor code: 1398079492 completed: No
at com.sun.corba.se.internal.corba.ORB.connect(ORB.java:1098)
at com.sun.corba.se.internal.corba.ORB.getServantIOR(ORB.java:1140)
at com.sun.corba.se.internal.corba.ClientDelegate.getServiceContexts(ClientDelegate.java:254)
at com.sun.corba.se.internal.corba.ClientDelegate.createRequest(ClientDelegate.java:346)
at com.sun.corba.se.internal.corba.ClientDelegate.createRequest(ClientDelegate.java:366)
at com.sun.corba.se.internal.corba.InitialNamingClient.resolve(InitialNamingClient.java:198)
at com.sun.corba.se.internal.corba.InitialNamingClient.cachedInitialReferences(InitialNamingClient.java:265)
at com.sun.corba.se.internal.corba.InitialNamingClient.resolve_initial_references(InitialNamingClient.java:188)
at com.sun.corba.se.internal.corba.ORB.resolve_initial_references(ORB.java:1461)
at com.sun.jndi.cosnaming.CNCtx.setOrbAndRootContext(CNCtx.java:281)
at com.sun.jndi.cosnaming.CNCtx.initUsingUrl(CNCtx.java:256)
at com.sun.jndi.cosnaming.CNCtx.initOrbAndRootContext(CNCtx.java:193)
at com.sun.jndi.cosnaming.CNCtx.<init>(CNCtx.java:73)
at com.sun.jndi.cosnaming.CNCtxFactory.getInitialContext(CNCtxFactory.java:35)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:665)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:293)
at javax.naming.InitialContext.init(InitialContext.java:269)
at javax.naming.InitialContext.<init>(InitialContext.java:245)
at ch.xxx.ConnectEJB.getInitialContext(ConnectEJB.java:99)
The environments are Oracle 9.2 and WLS 7.0, Client and Server use JDK
1.3.1
The same test client is running without any error from a jvm outside
Oracle.
Thanks in advance for your help.
Chris.[email protected] (ChrisFR) writes:
Sounds like a question for Oracle.
andy
Hi all,
I hope someone has a solution for calling an EJB from a Oracle PL/SQL
procedure.
We are using IIOP because T3 force weblogic.jar (approx 30MB) to be
loaded in the database. Unfortunately, Oracle refuse it with many
errors, and corrupt its own JVM !
so... IIOP
When we try that, we get the following error :
org.omg.CORBA.OBJ_ADAPTER: minor code: 1398079492 completed: No
at com.sun.corba.se.internal.corba.ORB.connect(ORB.java:1098)
at com.sun.corba.se.internal.corba.ORB.getServantIOR(ORB.java:1140)
at com.sun.corba.se.internal.corba.ClientDelegate.getServiceContexts(ClientDelegate.java:254)
at com.sun.corba.se.internal.corba.ClientDelegate.createRequest(ClientDelegate.java:346)
at com.sun.corba.se.internal.corba.ClientDelegate.createRequest(ClientDelegate.java:366)
at com.sun.corba.se.internal.corba.InitialNamingClient.resolve(InitialNamingClient.java:198)
at com.sun.corba.se.internal.corba.InitialNamingClient.cachedInitialReferences(InitialNamingClient.java:265)
at com.sun.corba.se.internal.corba.InitialNamingClient.resolve_initial_references(InitialNamingClient.java:188)
at com.sun.corba.se.internal.corba.ORB.resolve_initial_references(ORB.java:1461)
at com.sun.jndi.cosnaming.CNCtx.setOrbAndRootContext(CNCtx.java:281)
at com.sun.jndi.cosnaming.CNCtx.initUsingUrl(CNCtx.java:256)
at com.sun.jndi.cosnaming.CNCtx.initOrbAndRootContext(CNCtx.java:193)
at com.sun.jndi.cosnaming.CNCtx.<init>(CNCtx.java:73)
at com.sun.jndi.cosnaming.CNCtxFactory.getInitialContext(CNCtxFactory.java:35)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:665)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:293)
at javax.naming.InitialContext.init(InitialContext.java:269)
at javax.naming.InitialContext.<init>(InitialContext.java:245)
at ch.xxx.ConnectEJB.getInitialContext(ConnectEJB.java:99)
The environments are Oracle 9.2 and WLS 7.0, Client and Server use JDK
1.3.1
The same test client is running without any error from a jvm outside
Oracle.
Thanks in advance for your help.
Chris.--
" .sigs are like your face - rarely seen by you and uglier than you think"
mail: [email protected] -
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 -
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 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. -
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 -
Calling EJB 3.0 from ALBPM
Hi,
I tried calling EJB 2.1 from ALBPM and it worked.
But I was nto able to call EJB 3.0.
Is calling EJB 3.0 supported from ALBPM 6.0.2?
If yes, how to call a business method in EJB 3.0?Frank,
Thanks. The @LOB annotations are missing.
Create table with:
CREATE TABLE TestBlob (id number PRIMARY KEY, xmlCol BLOB);
INSERT INTO TestBlob VALUES(1, EMPTY_BLOB());
The following is the complete listing for the EJB 3 class generated from table TestBlob.
package ejb3;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
@Entity
@NamedQueries({
@NamedQuery(name = "Testblob.findAll", query = "select o from Testblob o")
public class Testblob implements Serializable {
@Id
@Column(nullable = false)
private Long id;
private byte[] xmlCol;
public Testblob() {
public Testblob(Long id) {
this.id = id;
public Long getId() {
return id;
public void setId(Long id) {
this.id = id;
public byte[] getXmlCol() {
return xmlCol;
public void setXmlCol(byte[] xmlCol) {
this.xmlCol = xmlCol;
} -
EJB 2.1 session bean calling EJB 3 session bean?
I have a WL 10 (JDK 1.5/EE 5) server that has several EJB 3 stateless session beans deployed and working well. But now I need to allow a JBoss 3.2.3 (JDK 1.4) EJB 2.1 session bean make remote calls into these EJB 3 EJBs. Can this even work?
It seems to me that EJB 3 calling EJB 2 would be fine, but not in the reverse?I have a WL 10 (JDK 1.5/EE 5) server that has several EJB 3 stateless session beans deployed and working well. But now I need to allow a JBoss 3.2.3 (JDK 1.4) EJB 2.1 session bean make remote calls into these EJB 3 EJBs. Can this even work?
It seems to me that EJB 3 calling EJB 2 would be fine, but not in the reverse? -
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
VolkerHi,
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 codeI 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 -
How can I call EJB from JSP/Servlets in iWS?
Hi!!
My JSP/Servlets are on iWS, and I deploy EJB on iAS.
In this case, I don't know how JSP/Servlet call EJb on iAS.
I'd like to know how I can set JNDI name in JSP/Servlet on iWS.
I will thank you if you give me a simple example source using JSP/Servlet
and EJB.
Thanks in advance!!!
- Park-Park,
Why Are you running your JSP/Servlets in iWS instead of iAS? For whatever
reason,
look at the Converter sample from iAS. You will be doing RMI/IIOP in this
case and the sample explains in detail what to do.
hth,
-robert
"SungHyun, Park" <[email protected]> wrote in message
news:9jpfmt$[email protected]..
Hi!!
My JSP/Servlets are on iWS, and I deploy EJB on iAS.
In this case, I don't know how JSP/Servlet call EJb on iAS.
I'd like to know how I can set JNDI name in JSP/Servlet on iWS.
I will thank you if you give me a simple example source using JSP/Servlet
and EJB.
Thanks in advance!!!
- Park- -
Call EJB from a XI Javamapping
I have developed a simple EAR which contains a CMP with local and remote interfaces. This cmp may be successfully called using the remote-interface from a client (j2se) project. Now i like to call the same CMP from within a XI JavaMapping. In the execute method i am using the following code:
InitialContext ctx;
MeraConfigurationLocal configLocal = null;
try {
ctx = new InitialContext();
Object obj = ctx.lookup("localejbs/mgb.ch/XIMera_EAR/MeraConfigurationBean");
if (trace != null)
trace.addInfo("Got object from jndi: "+obj);
MeraConfigurationLocalHome configHome = (MeraConfigurationLocalHome)obj;
if (configHome !=null) {
if (trace != null)
trace.addInfo("ConfigurationLocalHome: "+configHome);
configLocal = configHome.create();
} catch (Exception e) {
throw new StreamTransformationException(e.getMessage(), e);
int port = Integer.parseInt(
configLocal.ReadParam(MeraResourcePoolDispatcherService.CFG_GENERAL_LISTENER_PORT));
if (trace != null)
trace.addInfo("Got listenerport from localejbs/mgb.ch/XIMera_EAR/MeraConfigBean: "+port);
after calling ctx.lookup ... i got the following traceentry in xi:
<Trace level="1" type="T">*** START APPLICATION TRACE ***</Trace>
<Trace level="2" type="T">Got object from jndi: [email protected]30</Trace>
<Trace level="1" type="T">*** END APPLICATION TRACE ***</Trace>
when i try to cast this obj into a MeraConfigurationLocal the system is throwing a ClassCastExceptionHello.
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) -
Hello Developers!
I deployed my ejb to OAS4081. I call that
from JDeveloper so it good. But when I try
to call from applet in IExpl5 I can't
instantiate the ORB. I've got a com.ms.security.SecurityException : oracle.oas.orb.CORBA.ORB.init
I coded the CLASSPATH(oasoorb(yoj),client,
ejbapi...) perfectly, I think.
If anybody could help, please...
Thanx!Hi there,
I saw someone on this group had a problem to locate proper classpath
to call EJB from JSP. I thought if you call EJB from classpath, you are
calling the bean. But you loss all the EJB functions. To be able to utilize
EJB features like object pooling. You need to call it from Weblogic server
using url/jndi, not from the jar directly.
Any comment? Am I right?
BTW, my question about calling EJB from JSP means calling through URL,
not a local path.
Thank you
>-------------------------------------------------------------------->
Jim wrote in message <[email protected]>...
>Hi there,
> Can I call EJB from JSP? Is there a particular security setting or
>concern for Weblogic? Is there an coding example?
>
>Thank you
>
>
-
Calling EJB with Annotation not successfull within Netbeans
I am trying to call EJB but my simple program can't find a ejb
within netbeans. I also download a stub file from the admin page and add to the ejb client path. but still without the luck
@EJB
private static ConverterBean converterBean;
public static void main(String[] args) {
// TODO code application logic here
BigDecimal param = new BigDecimal ("100.00");
BigDecimal amount = converterBean.dollarToYen(param);
System.out.println( amount );
}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.
Maybe you are looking for
-
Hi friends Is ther any report to see slow moving items with quantity and value. Regards, Mahesh. Edited by: Csaba Szommer on Dec 19, 2011 8:30 AM
-
Webdynpro ALV index of rows in a separate column
Hello, I have an ALV in webdynpro and would like to see the index of the rows in a separate column. Does anybody know if there is an option for that in ALV or how to solve this problem? Thanks!
-
Batch determination at Characteristic level
Hi All Anyone can tel either one can determin batches at charateristic level. your answer is highly appreciated Regards
-
My MacBook has recently become really slow and im not sure how to fix it.
Over the past few weeks my macbook has become extremely slow, would anybody have any ideas of how to fix it?
-
hey guys.....hi! m making a intro for kids and i loaded the .swf using the loader concept in action script.3.0. and m confused how to export this files which can be played when user insert the cd/dvd in cd/dvd rom.like we can find some interactive cd