Oracle.oc4j.rmi.OracleRemoteException while calling EJB from MDB
Hi All,
From Client am sending a request to a In_queue, MDB picks from that queue and sends to EJB. EJB processes it and sends back to the MDB and MDB to Client. This works fine for 20 requests. When i increase to 30 am getting EXCEPTION : oracle.oc4j.rmi.OracleRemoteException: An exception occurred during transaction completion: ; nested exception is: javax.transaction.RollbackException: Timed out
I have increased the transaction-timeout to "999999" in orion-ejb-jar.xml. Still i get the same error. Can anybody please help me on this.
Thank you in advance
Hi all,
Got the way to solve this. I increased the time of transaction-timeout to "100" in transaction-manager.xml. by default it is "30"
Similar Messages
-
Hi Brains, :P
I'm trying create a query with javax.persistence.Query im my Stateless in the OC4J.
Query query = em.createQuery("my string query");
This line throw the exception oracle.oc4j.rmi.OracleRemoteException:
2009-03-06 13:02:38.484 ERROR J2EE EJB-08006 [MyClass:public java.util.List my.package.ejb.session.MyClass.myMethod] exceção ao chamar método: oracle.oc4j.rmi.OracleRemoteException: java.lang.NoClassDefFoundError; nested exception is:
java.lang.NoClassDefFoundError
I'd like to thank all the attention.Hi Chris,
I solved this question.
I had a problem with an entity bean. And the strange that it is not part of the query. :S.
Thanks a lot.
;) -
Hi
i write simple session EJB with simple helloworld method
Iam using jdeveloper
Jdeveloper gave option to write sample client to test above session bean
When i run that client i got this exception
Am i missing anything
This is a kind of urgent
Any help will be appreciated
oracle.oc4j.rmi.OracleRemoteException: Invocation error: java.lang.NoSuchMethodException: ejb.SessionEJB.helloworld()
at com.evermind.server.rmi.RMIConnection.handleExceptionFromMethodInvocation(RMIConnection.java:745)
at com.evermind.server.rmi.RMIConnection.obtainRemoteMethodResponse(RMIConnection.java:705)
at com.evermind.server.rmi.RMIConnection.invokeMethod(RMIConnection.java:697)
at com.evermind.server.rmi.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:70)
at com.evermind.server.rmi.RecoverableRemoteInvocationHandler.invoke(RecoverableRemoteInvocationHandler.java:27)
at com.evermind.server.ejb.StatelessSessionRemoteInvocationHandler.invoke(StatelessSessionRemoteInvocationHandler.java:43)
at __Proxy1.helloworld(Unknown Source)
at ejb.SessionEJBClient.main(SessionEJBClient.java:24)
Nested exception is:
java.lang.NoSuchMethodException: ejb.SessionEJB.helloworld()
at java.lang.Class.getMethod(Class.java)
at com.evermind.server.rmi.RMIConnection.readMethod(RMIConnection.java:492)
at com.evermind.server.rmi.RMIConnection.handleMethodInvocation(RMIConnection.java:418)
at com.evermind.server.rmi.RMIConnection.handleOrmiCommandRequest(RMIConnection.java:357)
at com.evermind.server.rmi.RMIServerConnection.handleOrmiCommandRequest(RMIServerConnection.java:192)
at com.evermind.server.rmi.RMIConnection.dispatchRequest(RMIConnection.java:325)
at com.evermind.server.rmi.RMIConnection.processReceivedCommand(RMIConnection.java:275)
at com.evermind.server.rmi.RMIConnection.listenForOrmiCommands(RMIConnection.java:236)
at com.evermind.server.rmi.RMIConnection.run(RMIConnection.java:202)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:299)
at java.lang.Thread.run(Thread.java:534)
Process exited with exit code 0.java.lang.NoSuchMethodException: ejb.SessionEJB.helloworld()
Check the method definition.
Does the method have parameters?
Is the method helloWorld? -
Calling EJB from Java Stored Procedures
Hi,
I am trying to call an Enterprise Java Bean from stored procedure. This stored procedure calls a java program. As long as it is a simple java program it works fine and loadjava.exe does not give any problem (neither compile-time nor run-time).
It is not working when I am trying to call EJB from it. It is giving compile-time error.
If anybody has implemented the same please suggest how to go forward.
thanks in advance,
Shashank AgarwalI tried the same thing without any luck. I assume you are using OC4J for your EJB ...
The compiling issue may be because you don't have the classes in your EJB client jar loaded into the database. Once those classes are loaded, you should loadjava without any problem.
However, you won't be able to call the EJB server because the EJB client (your Java code in the DB) will need the OC4J environment (oc4j.jar). I have tried to load oc4j.jar into the DB as well, and that was a big mess and nothing worked. My DB is 8.1.7, maybe the new 9i have OC4J libs bundled?!?
I looked around and only found 2 alternatives:
1. Write a JSP page that acts like an EJB client, then use URLConnection in your DB java code to send params to the JSP for it to invlode the EJB
2. Replace the JSP with RMI code, and use RMI instead of URLConnection in your DB code to invloke the EJB client.
If you find any other solution, please share it here.
Good luck!
Hi,
I am trying to call an Enterprise Java Bean from stored procedure. This stored procedure calls a java program. As long as it is a simple java program it works fine and loadjava.exe does not give any problem (neither compile-time nor run-time).
It is not working when I am trying to call EJB from it. It is giving compile-time error.
If anybody has implemented the same please suggest how to go forward.
thanks in advance,
Shashank Agarwal -
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 from .ejb
I am using Weblogic Workshop WLS8.1. I have one .ejb calling another .ejb. Appearenlty,
MyBeanHome.java MyBean.java resolve in the workshop. But they are not resolving
when I use ant build. Any suggestions.
ThanksHi John,
check the following URLS's for your requirement
1>procedure for Accessing WebService in ejb By using NetWeaver,
2>i am using webservice in ejb but it is giving Naming exception in NetWeaver (if you get naming exception while calling webservice from ejb)
3>http://help.sap.com/saphelp_webas630/helpdata/en/2c/ce9535c22ecd4db8820e238c3acce0/frameset.htm (Accessing the Web Services Context from a WS-EJB )
4>Webservice call does not return data
Do reward points if it helps -
Calling EJB from other EJB on other J2EE Server
Can I call EJB from other EJB on other J2EE Server
Servers - Websphere 5.0
Do i require home & remote interface of that ejb on client side also
Help me, pleasethe problem is actually i require that is specific to websphere
for example i want to call a method ion that ejb
say my ejb name is myejb
so the normal way i should call is
InitialContext initialContext = new InitialContext();
Object homeObject = initialContext.lookup("ejb/MyEjbHome");
MyEJBHome myEJBHome =(MYEjbHome )javax.rmi.PortableRemoteObject.narrow(homeObjectMYEjbHome.class);
myEJB = lSHome.create();
myEJB.someMethod();
but here i am having class for home and remote available
now if other app server i am not having this classes then what to do -
Hello, everybody,
I'm very new at EJB and I'm trying to learn it.
I have created Enterprise Application using Netbeans IDE, I have EJB and APP client. What I want is to connect to my MySql database and get some info from table.
For e.g. Login and Password.
How can I call EJB from my client app which connects to my database and gets information I need?What server you are using?
if you use jboss AS ,here is a simple Main class how to connect EJB and access ejb methods:
package com.david.ejb.client;
import java.util.Properties;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.rmi.PortableRemoteObject;
import com.david.ejb.domain.Person;
import com.david.ejb.domain.PersonRemote;
public class Main {
public static void main(String[] args) {
try {
Context ctx = getInitialContext();
Object obj = ctx.lookup("PersonSessionRemote/remote");
PersonRemote pr=(PersonRemote)PortableRemoteObject.narrow(obj, PersonRemote.class);
Person p=new Person();
p.setName("david");
pr.addPerson(p);
pr.findPerson(1);
// System.out.print(br.find(pk).getAuthor_name());
} catch (Exception ex) {
ex.printStackTrace();
private static Context getInitialContext() throws NamingException {
Properties p = new Properties();
p.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.NamingContextFactory");
p.setProperty(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
p.setProperty(Context.PROVIDER_URL, "jnp://localhost:1099");
return new InitialContext(p);
}Person is ant @Entity and PersonRemote is remote interfaces, to connect database you have to make datasource file at jboss-4.2.3.GA\server\default\deploy
simle mysql-ds.xml looks like this:
datasources>
<local-tx-datasource>
<jndi-name>some name</jndi-name>
<connection-url>jdbc:mysql://localhost:3306/dbname</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>root</user-name>
<password>root password</password>
<min-pool-size>5</min-pool-size>
<max-pool-size>100</max-pool-size>
<idle-timeout-minutes>15</idle-timeout-minutes>
<exception-sorter-class-name>com.mysql.jdbc.integration.jboss.ExtendedMysqlExceptionSorter</exception-sorter-class-name>
<valid-connection-checker-class-name>com.mysql.jdbc.integration.jboss.MysqlValidConnectionChecker</valid-connection-checker-class-name>
</local-tx-datasource>
</datasources>also at resources/META-INF directory you must have persistence.xml like this
<persistence>
<persistence-unit name="SimpleEjb">
<jta-data-source>java:/some name</jta-data-source>
<properties>
<property name="hibernate.hbm2ddl.auto" value="update" />
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect" />
<property name="hibernate.show_sql" value="true"/>
<property name="hibernate.format_sql" value="true"/>
</properties>
</persistence-unit>
</persistence> -
Calling EJB from from a client app
Hi all,
I am trying to call an EJB component from portal. The example EJB I have taken is from SDN Bonus Calculator example - Application Server/Web Dynpro/Samples and Tutorials/Using EJBs (20)
I deployed the EAR file - no issue
I wrote the following code in a client app and trying to connect to the EJB remotely.
try {
java.util.Properties properties = new Properties();
properties.put(Context.INITIAL_CONTEXT_FACTORY, "com.sap.engine.services.jndi.InitialContextFactoryImpl");
properties.put(Context.PROVIDER_URL, "ux0800:55304");
InitialContext ctx = new InitialContext(properties);
//InitialContext ctx = new InitialContext();
// get ejb home
home =
(BonusCalculatorLocalHome) ctx.lookup(
"localejbs/MySessionBean");
theCalculator = home.create();
} catch (Exception namingException) {
namingException.printStackTrace();
I get the following error
javax.naming.NoInitialContextException: Cannot instantiate class: com.sap.engine.services.jndi.InitialContextFactoryImpl [Root exception is java.lang.ClassNotFoundException: com.sap.engine.services.jndi.InitialContextFactoryImpl]
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 com.sap.bonus.calculation.sessionBean.MyCommandBean.<init>(MyCommandBean.java:27)
at com.sap.bonus.calculation.sessionBean.MyCommandBean.main(MyCommandBean.java:68)
Caused by: java.lang.ClassNotFoundException: com.sap.engine.services.jndi.InitialContextFactoryImpl
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.sun.naming.internal.VersionHelper12.loadClass(Unknown Source)
Any clue will be appreciated.
thnxHi Sabbir,
Following code works for me in calling EJB from normal java application. Did you added the jar files to your application?. see the required jar files in end of code.
Create simple java applcation do the following steps:
Give JNDI name to the EJB(HelloJNDI)->Add the HelloEJB to HelloEAR ->deploy
Proxy Program to call ejb:
import javax.naming.Context;
import javax.naming.InitialContext;
import com.sample.Hello;
import com.sample.HelloHome;
public class HelloTest {
public static void main(String[] args) {
Hello remote = null;
try {
Context ctx = new InitialContext();
HelloHome home = (HelloHome) ctx.lookup("HelloJNDI");
remote = home.create();
String result = remote.hello();
System.out.print("Result:" + result);
} catch (Exception e) {
System.out.println("Exception:" + e.getLocalizedMessage());
1. Go To Run > Java Application ->New->select your project and select your main class(java program from which your going to call EJB)
2. Click next tab ->(x)=Arguments
paste the following code in VM Arguments
-Djava.naming.factory.initial=com.sap.engine.services.jndi.InitialContextFactoryImpl -Djava.naming.provider.url=localhost:50104
replace the server IP address with your server IP address where your ejbs are running.
Under Class path settings for the program put the following jar files.
You can search for them from net weaver soruce folders
or copy from D:\usr\sap\J2E\JC01\j2ee\j2eeclient
ejb20.jar
logging.jar
exception.jar
sapj2eeclient.jar
Add Corresponding ejb.jar
and RUN >>>
this makes testing of your client programs easier, you can find the error trace on which line and saves lot of time.
Regards, Suresh -
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 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 -
XML Error while calling webservice from oracle function.
I am getting an error while I am trying to call webservice from oracle function. Any ideas? Thanks.
select get_new_string ('proxy:80', 'http://xxx/PatternVariations/SourceTest/WebMethods','Scott') from dual
ERROR at line 1:
ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00225: end-element tag "H4" does not match start-element tag "P"
Error at line 9
ORA-06512: at "SYS.XMLTYPE", line 0
ORA-06512: at "DORSBP00.DEMO_SOAP", line 82
ORA-06512: at "DORSBP00.GET_NEW_STRING", line 11The error message implies that the web service is returning something that is not well formed xml. Can you verify what is being returned by the web service call
-
125: VALUE_HOLDER_INSTANTIATION_MISMATCH while calling toplink from ejb
Hi Folks
I am calling registerNewObject from from a stateless session ejb.
The object i wanted to persist is as below
A--> Collection B ---
each item in collection B is mapped as one to one mapping to object C.
When I try to persist it, i get following excecption:
Exception [TOPLINK-125] (OracleAS TopLink - 10g (9.0.4.9) (Build 060118)): oracle.toplink.exceptions.DescriptorException
Exception Description: The mapping for the attribute [RPGOperRole] uses indirection, and so must be initialized to a new ValueHolder. Currently the value is: [null].
anything missing that should be done when calling from ejbYou need to initialize your variable RPGOperRole in your class to a new ValueHolder(), either in its constructor or variable definition.
i.e.
public B() {
this.RPGOperRole = new ValueHolder();
or,
private ValueHolderInterface RPGOperRole = new ValueHolder(); -
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 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.
Maybe you are looking for
-
My iPhone 4 will no longer connect to itunes
ever since i updated to the latest Itunes my iphone 4 stopped connecting to itunes. it will still charge but wont go through itunes. im on a windows 8 laptop
-
Using Interactive Adobe Forms in LEAD processing(SAP CRM 7.0)
Hi, I am new to Adobe forms. I want to create it for lead. After creation of lead adobe form should get mailed to required partner automaticaly. This partner will fill the data and send back to update the system. Please suugest me any documentation t
-
Can't print to an HP OfficeJet 55G
Just upgraded to 10.5.8, and just can't make the OfficeJet print or scan. Any ideas? I've tried reinstalling the unit and taken some other steps that made sense to me.
-
Urgent!!! ERROR: ORA-12560 TNS: protocol adapter error
Recently we tried to install a new product with a new dataabse instance. Since doing this SQLPLUS replies with: ERROR: ORA-12560 TNS: protocol adapter error I have looked at my tnsnames.ora and listener.ora and everything looks fine. I am hoping some
-
Hi, I am using a portal component (TreeView) in EP6 where the font alignment with the tree node icons is not proper. Can anybody help me in achieving this? You can go in this link to find out the exact alignment problem. <http://www.wikiupload.com/do