RMI-IIOP JNDI lookup returns com.sun.corba.se.internal.iiop.CDRInputStream
I have two different RMI-IIOP java clients, one is working fine and the other is not. Both are using weblogic.jndi.WLInitialContextFactory from wlclient.jar in WLS 8.1sp5 and JDK 1.4.2_6.
One java client is a straight-forward java main. JNDI lookup is returning EJBHome_Stub correctly loaded by sun.rmi.server.LoaderHandler$Loader
The other java client is a complex java program with multiple threads and many jars. A thread does the same JNDI lookup as the simple java client, but the object returned is of type com.sun.corba.se.internal.iiop.CDRInputStream_1_0$1 which has NULL classloader (bootstrap classloader).
What condition triggered the WebLogic InitialContext to default to com.sun.corba.se.internal.iiop.CDRInputStream?
Kevin Fung <> writes:
This is usally symptomatic of an IOR without the corresponding stub
being loaded, usually because the correct security manager is not
set. However the client jar bypasses the security manager to try and
avoid this problem, so I am confused as to why you are seeing this. Do
you know which object it is accessing? Can you try putting IIOP stubs
for it in the client?
andy
I have two different RMI-IIOP java clients, one is working fine and the other is not. Both are using weblogic.jndi.WLInitialContextFactory from wlclient.jar in WLS 8.1sp5 and JDK 1.4.2_6.
One java client is a straight-forward java main. JNDI lookup is returning EJBHome_Stub correctly loaded by sun.rmi.server.LoaderHandler$Loader
The other java client is a complex java program with multiple threads and many jars. A thread does the same JNDI lookup as the simple java client, but the object returned is of type com.sun.corba.se.internal.iiop.CDRInputStream_1_0$1 which has NULL classloader (bootstrap classloader).
What condition triggered the WebLogic InitialContext to default to com.sun.corba.se.internal.iiop.CDRInputStream?
Similar Messages
-
Missing com.sun.corba.se.internal.iiop.CDRInputStream
I am trying to test the new OC4J 10.0.3 which supposed to be a J2EE 1.4 compliant.
I followed the instruction to unzip it, and when I tried to start it I got the error :
I did a thorugh search for that package in my Java directory and couldnt find a match in either J2SE or J2EE.
Your help is highly appreciated.
Starting OC4J...
05/01/22 02:13:22 Exception in thread "OC4J Launcher" oracle.oc4j.loader.util.An
notatedNoClassDefFoundError:
Missing class: com.sun.corba.se.internal.iiop.CDRInputStream
Dependent class: com.evermind.server.ApplicationContext
Loader: oc4j:10.1.3
Code-Source: /D:/Java/Jdev10g/j2ee14/j2ee/home/lib/oc4j-internal.jar
Configuration: <code-source> in boot.xml in D:\Java\Jdev10g\j2ee14\j2e
e\home\oc4j.jar
The missing class is not available from any code-source or loader in the server.
05/01/22 02:13:22 at oracle.oc4j.loader.PolicyClassLoader.handleClassNotFo
und (PolicyClassLoader.java:1956) [/D:/Java/Jdev10g/j2ee14/j2ee/home/oc4j.jar (f
rom system property java.class.path), by sun.misc.Launcher$AppClassLoader@14822
57]
at oracle.oc4j.loader.PolicyClassLoader.internalLoadClass (PolicyClassLo
ader.java:1641) [/D:/Java/Jdev10g/j2ee14/j2ee/home/oc4j.jar (from system propert
y java.class.path), by sun.misc.Launcher$AppClassLoader@1482257]
at oracle.oc4j.loader.PolicyClassLoader.loadClass (PolicyClassLoader.jav
a:1591) [/D:/Java/Jdev10g/j2ee14/j2ee/home/oc4j.jar (from system property java.c
lass.path), by sun.misc.Launcher$AppClassLoader@1482257]
at oracle.oc4j.loader.PolicyClassLoader.loadClass (PolicyClassLoader.jav
a:1577) [/D:/Java/Jdev10g/j2ee14/j2ee/home/oc4j.jar (from system property java.c
lass.path), by sun.misc.Launcher$AppClassLoader@1482257]
at java.lang.ClassLoader.loadClassInternal (ClassLoader.java:319) [jre b
ootstrap, by jre bootstrap]
at com.evermind.server.ApplicationContext.<clinit> (ApplicationContext.j
ava:62) [/D:/Java/Jdev10g/j2ee14/j2ee/home/lib/oc4j-internal.jar (from <code-sou
rce> in boot.xml in D:\Java\Jdev10g\j2ee14\j2ee\home\oc4j.jar), by oc4j:10.1.3]
at com.evermind.server.Application.<init> (Application.java:173) [/D:/Ja
va/Jdev10g/j2ee14/j2ee/home/lib/oc4j-internal.jar (from <code-source> in boot.xm
l in D:\Java\Jdev10g\j2ee14\j2ee\home\oc4j.jar), by oc4j:10.1.3]
at com.evermind.server.ApplicationServer.initializeApplications (Applica
tionServer.java:1403) [/D:/Java/Jdev10g/j2ee14/j2ee/home/lib/oc4j-internal.jar (
from <code-source> in boot.xml in D:\Java\Jdev10g\j2ee14\j2ee\home\oc4j.jar), by
oc4j:10.1.3]
at com.evermind.server.ApplicationServer.setConfig (ApplicationServer.ja
va:944) [/D:/Java/Jdev10g/j2ee14/j2ee/home/lib/oc4j-internal.jar (from <code-sou
rce> in boot.xml in D:\Java\Jdev10g\j2ee14\j2ee\home\oc4j.jar), by oc4j:10.1.3]
at com.evermind.server.ApplicationServerLauncher.run (ApplicationServerL
auncher.java:87) [/D:/Java/Jdev10g/j2ee14/j2ee/home/lib/oc4j-internal.jar (from
<code-source> in boot.xml in D:\Java\Jdev10g\j2ee14\j2ee\home\oc4j.jar), by oc4
j:10.1.3]
at java.lang.Thread.run (Thread.java:595) [jre bootstrap, by jre bootst
rap]Hi
when i am trying to start the oc4j server, it is throwing me the following error.
Please give me some solution...
06/05/19 16:20:40 oracle.classloader.util.AnnotatedClassFormatError: MBeanServer
EjbHome_StatefulSessionHomeWrapper1 (Unsupported major.minor version 49.0)
Invalid class: MBeanServerEjbHome_StatefulSessionHomeWrapper1
Loader: system.root:0.0.0
Code-Source: /C:/product/10.1.3/OracleAS_1/j2ee/home/application-dep
loyments/admin_ejb/deployment-cache.jar
Configuration: <ejb> in wrappers
Dependent class: com.evermind.server.ejb.deployment.SessionBeanDescripto
r
Loader: oc4j:10.1.3
Code-Source: /C:/product/10.1.3/OracleAS_1/j2ee/home/lib/oc4j-intern
al.jar
Configuration: <code-source> in META-INF/boot.xml in C:\product\10.1.3
\OracleAS_1\j2ee\home\oc4j.jar
This class was compiled for a newer version of the JRE. Expected version
48.0, found 49.0.
06/05/19 16:20:40 at oracle.classloader.PolicyClassLoader.findLocalClass (
PolicyClassLoader.java:1457) [/C:/product/10.1.3/OracleAS_1/j2ee/home/lib/pcl.ja
r (from system property java.class.path), by sun.misc.Launcher$AppClassLoader@54
87165]
at oracle.classloader.SearchPolicy$FindLocal.getClass (SearchPolicy.java
:167) [/C:/product/10.1.3/OracleAS_1/j2ee/home/lib/pcl.jar (from system property
java.class.path), by sun.misc.Launcher$AppClassLoader@5487165]
at oracle.classloader.SearchSequence.getClass (SearchSequence.java:119)
[/C:/product/10.1.3/OracleAS_1/j2ee/home/lib/pcl.jar (from system property java.
class.path), by sun.misc.Launcher$AppClassLoader@5487165]
at oracle.classloader.PolicyClassLoader.internalLoadClass (PolicyClassLo
ader.java:1660) [/C:/product/10.1.3/OracleAS_1/j2ee/home/lib/pcl.jar (from syste
m property java.class.path), by sun.misc.Launcher$AppClassLoader@5487165]
at oracle.classloader.PolicyClassLoader.loadClass (PolicyClassLoader.jav
a:1621) [/C:/product/10.1.3/OracleAS_1/j2ee/home/lib/pcl.jar (from system proper
ty java.class.path), by sun.misc.Launcher$AppClassLoader@5487165]
at oracle.classloader.PolicyClassLoader.loadClass (PolicyClassLoader.jav
a:1606) [/C:/product/10.1.3/OracleAS_1/j2ee/home/lib/pcl.jar (from system proper
ty java.class.path), by sun.misc.Launcher$AppClassLoader@5487165]
at java.lang.ClassLoader.loadClassInternal (ClassLoader.java:302) [jre b
ootstrap, by jre.bootstrap]
at java.lang.Class.forName0 (Native method) [unknown, by unknown]
at java.lang.Class.forName (Class.java:219) [jre bootstrap, by jre.boots
trap]
at com.evermind.server.ejb.deployment.SessionBeanDescriptor.createHomeIn
stance (SessionBeanDescriptor.java:443) [/C:/product/10.1.3/OracleAS_1/j2ee/home
/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in C:\product\10
.1.3\OracleAS_1\j2ee\home\oc4j.jar), by oc4j:10.1.3]
at com.evermind.server.ejb.EJBPackageDeployment.getHomeInstanceCore (EJB
PackageDeployment.java:1136) [/C:/product/10.1.3/OracleAS_1/j2ee/home/lib/oc4j-i
nternal.jar (from <code-source> in META-INF/boot.xml in C:\product\10.1.3\Oracle
AS_1\j2ee\home\oc4j.jar), by oc4j:10.1.3]
at com.evermind.server.ejb.EJBPackageDeployment.getHomeInstance (EJBPack
ageDeployment.java:1189) [/C:/product/10.1.3/OracleAS_1/j2ee/home/lib/oc4j-inter
nal.jar (from <code-source> in META-INF/boot.xml in C:\product\10.1.3\OracleAS_1
\j2ee\home\oc4j.jar), by oc4j:10.1.3]
at com.evermind.server.ejb.EJBPackageDeployment.bindRemoteHome (EJBPacka
geDeployment.java:533) [/C:/product/10.1.3/OracleAS_1/j2ee/home/lib/oc4j-interna
l.jar (from <code-source> in META-INF/boot.xml in C:\product\10.1.3\OracleAS_1\j
2ee\home\oc4j.jar), by oc4j:10.1.3]
at com.evermind.server.ejb.EJBPackageDeployment.bindHomes (EJBPackageDep
loyment.java:442) [/C:/product/10.1.3/OracleAS_1/j2ee/home/lib/oc4j-internal.jar
(from <code-source> in META-INF/boot.xml in C:\product\10.1.3\OracleAS_1\j2ee\h
ome\oc4j.jar), by oc4j:10.1.3]
at com.evermind.server.ejb.EJBContainer.postInit (EJBContainer.java:1010
) [/C:/product/10.1.3/OracleAS_1/j2ee/home/lib/oc4j-internal.jar (from <code-sou
rce> in META-INF/boot.xml in C:\product\10.1.3\OracleAS_1\j2ee\home\oc4j.jar), b
y oc4j:10.1.3]
at com.evermind.server.ApplicationStateRunning.initializeApplication (Ap
plicationStateRunning.java:210) [/C:/product/10.1.3/OracleAS_1/j2ee/home/lib/oc4
j-internal.jar (from <code-source> in META-INF/boot.xml in C:\product\10.1.3\Ora
cleAS_1\j2ee\home\oc4j.jar), by oc4j:10.1.3]
at com.evermind.server.Application.setConfig (Application.java:391) [/C:
/product/10.1.3/OracleAS_1/j2ee/home/lib/oc4j-internal.jar (from <code-source> i
n META-INF/boot.xml in C:\product\10.1.3\OracleAS_1\j2ee\home\oc4j.jar), by oc4j
:10.1.3]
at com.evermind.server.Application.setConfig (Application.java:308) [/C:
/product/10.1.3/OracleAS_1/j2ee/home/lib/oc4j-internal.jar (from <code-source> i
n META-INF/boot.xml in C:\product\10.1.3\OracleAS_1\j2ee\home\oc4j.jar), by oc4j
:10.1.3]
at com.evermind.server.ApplicationServer.initializeSystemApplication (Ap
plicationServer.java:1480) [/C:/product/10.1.3/OracleAS_1/j2ee/home/lib/oc4j-int
ernal.jar (from <code-source> in META-INF/boot.xml in C:\product\10.1.3\OracleAS
_1\j2ee\home\oc4j.jar), by oc4j:10.1.3]
at com.evermind.server.ApplicationServer.initializeAutoDeployedApplicati
ons (ApplicationServer.java:1467) [/C:/product/10.1.3/OracleAS_1/j2ee/home/lib/o
c4j-internal.jar (from <code-source> in META-INF/boot.xml in C:\product\10.1.3\O
racleAS_1\j2ee\home\oc4j.jar), by oc4j:10.1.3]
at com.evermind.server.ApplicationServer.setConfig (ApplicationServer.ja
va:922) [/C:/product/10.1.3/OracleAS_1/j2ee/home/lib/oc4j-internal.jar (from <co
de-source> in META-INF/boot.xml in C:\product\10.1.3\OracleAS_1\j2ee\home\oc4j.j
ar), by oc4j:10.1.3]
at com.evermind.server.ApplicationServerLauncher.run (ApplicationServerL
auncher.java:113) [/C:/product/10.1.3/OracleAS_1/j2ee/home/lib/oc4j-internal.jar
(from <code-source> in META-INF/boot.xml in C:\product\10.1.3\OracleAS_1\j2ee\h
ome\oc4j.jar), by oc4j:10.1.3]
at java.lang.Thread.run (Thread.java:534) [jre bootstrap, by jre.bootstr
ap] -
Com.sun.corba.ee.impl.encoding.CDRInputStream not found
i get this classdef not found error when starting OC4J
Does anyone know what jar is this a part of?Hello,
Which kind of applications do you have deployed in your OC4J?
Which version of OC4J are you using on which OS?
I cannot find it in a working OC4J, using the classloader query utility. When I google this class I find some exception regarding glassfish, and not directly this class.
Could you please post the full stack trace?
Regards
Tugdual Grall -
Com/sun/corba/se/connection/ORBSocketFactory
Is the class com/sun/corba/se/connection/ORBSocketFactory in the JRE 1.5.
I get my WLS 8.1 client working with 1.4 but it desn't work anymore with 1.5 due to the following error:
java.lang.NoClassDefFoundError: com/sun/corba/se/connection/ORBSocketFactory
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
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 weblogic.corba.j2ee.naming.ORBHelper.<clinit>(ORBHelper.java:112)
at weblogic.corba.client.ClientORBInitializer.initialize(ClientORBInitializer.java:84)
at weblogic.security.auth.login.UsernamePasswordLoginModule.login(UsernamePasswordLoginModul
e.java:226)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at javax.security.auth.login.LoginContext.invoke(Unknown Source)
at javax.security.auth.login.LoginContext.access$000(Unknown Source)
at javax.security.auth.login.LoginContext$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.login.LoginContext.invokePriv(Unknown Source)
at javax.security.auth.login.LoginContext.login(Unknown Source)
It seems that the cless doesn't exist any more????
Thanks in advance for your help,
Olivier.Hi,
I have faced with the same problem as you, and I am too cannot find any clear and full description/solution about upgrading from 1.4 to 1.5 and com.sun.corba.se.connection and com.sun.corba.se.internal packages. I am trying to find official clarification from java.sun.com but without results. Did you get any results with this question?
I will be very grateful for you help! -
run an application on a multiple IPs windows box. In order to initialize the ORB on the right IP, i set the com.sun.CORBA.ORBServerHost property at the app startup.
If the right IP is set, then the software works fine as expected. Btut ionce the wrong IP is set, the software won't work even if I restart it with the right parameter. It looks like the new value just does not take effect.
And until the box is rebooted, the new parameter will take effect. As per my understanding, this parameter should be set at a JVM level and will be cleared after the JVM is shutdown......
Have no idea how to fix this issue and even don't know where to start to investigate it?
Would you please provide any suggestion on it? Thx in advance.I had the same problem when I upgraded to snv_114 from snv_98
on SPARC. The important line in /var/dt/Xerrors is this one:
could not open default font 'fixed'
The problem (in my case, anyway) was that the fonts.dir files were
not updated during the install/upgrade process. This fixed it:
$ su -
# cd /usr/X11/lib/X11/fonts
# for f in *; do cd $f; mkfontdir; cd -; done -
Hi ,
I am seeing this issue while starting my managed server.
com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread run
FINE: "IOP00710309: (INTERNAL) Worker thread Thread[p: default-threadpool; w: Idle,5,ORB ThreadGroup 0] caught throwable com.sun.corba.se.impl.orbutil.threadpool.TimeoutException when requesting work from work queue default-workqueue."
org.omg.CORBA.INTERNAL: vmcid: SUN minor code: 309 completed: No
at com.sun.corba.se.impl.logging.ORBUtilSystemException.workerThreadThrowableFromRequestWork(ORBUtilSystemException.java:6330)
at com.sun.corba.se.impl.logging.ORBUtilSystemException.workerThreadThrowableFromRequestWork(ORBUtilSystemException.java:6355)
at com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:494
I have searched the net for this but didnt find any resolution. Please help.
Regards,
RishiThis became bug 6560301. And Sun pointed out that it was my bad in not handling spurious wakeups. Java 6 makes spurious wakeups more likely. (My experience is from "never" to "sometimes".)
More info at:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6560301 -
hi again,
i have a question
what this means?
com.sun.corba.se.impl.orb.ORBImpl is Sun proprietary API and may be removed in a future releaseThe message means that you are using stuff that you shouldn't be using. Sun may remove that stuff from future versions of Java which will break your code/application/library.
-
Jndi lookup fails on Sun app server 8
My standalone client on java is able to lookup TopicConnectionFactory on localhost on Sun Server 7 perfectly, but fails on Sun Server 8. I've set up the resources correctly as described in the J2EE 1.4 tutorial, but I get the following error:
SEVERE: NAM5003: CommunicationException in SerialContext lookup()
java.lang.NullPointerException
at com.sun.enterprise.naming.factory.ConnectorObjectFactory.getObjectInstance(ConnectorObjectFactory.java:64)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:301)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:148)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
javax.naming.CommunicationException:
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:174)
at javax.naming.InitialContext.lookup(InitialContext.java:347)What could be wrong??It turned out to be a JMS library version issue. I had files for Server 8.0, but was running 8.1. Who knew it would be that big a deal.
Now that I have the right version, I'm able to look up topics and queues, but cannot lookup TopicConnectionFactory. The client does not return at connectionFactory = (TopicConnectionFactory)initial.lookup("jms/FieldTopicConnectionFactory"); and no error in server.log.
Here's the rest of the code:
try {
Context initial = new InitialContext();
connectionFactory = (TopicConnectionFactory)initial.lookup("jms/FieldTopicConnectionFactory"); //does not return
dest = (Topic) initial.lookup("jms/FieldTopic"); //this works!!
} catch{...}I run my standalone through these JVM args:
-Dorg.omg.CORBA.ORBInitialPort=3700 -Dorg.omg.CORBA.ORBInitialHost=myserver.com -
9iAS Release 2
When trying to tunnel through Apache to the OC4J_home instance using ...
http:ormi://<host>:<HTTPport>/<application> <admin><password>
and then looking up a JNDI name ...
TopicConnectionFactory connectionFactory =
(TopicConnectionFactory)new InitialContext(p).lookup("jms/myTopicConnectionFactory");
I get a NamingException thrown, with the message: Disconnected: Type code out of range, is -29.
The jms.xml file is correct. It works against a standalone OC4J instance (therefore no tunneling) ...
ormi://<host>:23791/<application> <admin><password>
I'm connecting from a standalone client and using the RMIInitialContextFactory, the tunneling is working (changing oc4j username/password gets a SecurityException). What's missing? Do you have to change the jndi name when tunneling? What does -29 mean in english?Tunneling through the Apache HTTP server to an OC4J instance from remote standalone clients works on Linux installations of 9iAS but not on NT installations, failing with a 'Type Code out of range, is -29' error, JVM versions on client and server are the same. Also works against a standalone version of oc4j on NT, what's happening?
-
Random classcast exception - com.sun.jndi.cosnaming.CNCtxFactory
Hi,
I am trying to use a remote ejb (weblogic 8.1.5/ jdk 14) from a j2se 1.5 rmi-iiop client.
If I use com.sun.jndi.cosnaming.CNCtxFactory to look up the remote home & then use the remote interface, I get the following error RANDOMly (i.e only some calls succeed).
java.lang.ClassCastException
at xxx.equals(xxxjava:129)
at weblogic.corba.utils.IndirectionValueHashtable.get(IndirectionValueHashtable.java:119)
at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1471)
at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1624)
at com.sun.corba.se.internal.io.IIOPOutputStream.writeObjectField(IIOPOutputStream.java:685)
at com.sun.corba.se.internal.io.IIOPOutputStream.outputClassFields(IIOPOutputStream.java:745)
at com.sun.corba.se.internal.io.IIOPOutputStream.defaultWriteObjectDelegate(IIOPOutputStream.java:167)
at com.sun.corba.se.internal.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:526)
at com.sun.corba.se.internal.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:123)
at com.sun.corba.se.internal.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:136)
at com.sun.corba.se.internal.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:116)
at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1593)
at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1624)
at com.sun.corba.se.internal.io.IIOPOutputStream.writeObjectField(IIOPOutputStream.java:685)
at com.sun.corba.se.internal.io.IIOPOutputStream.outputClassFields(IIOPOutputStream.java:745)
at com.sun.corba.se.internal.io.IIOPOutputStream.defaultWriteObjectDelegate(IIOPOutputStream.java:167)
at com.sun.corba.se.internal.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:526)
at com.sun.corba.se.internal.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:123)
at com.sun.corba.se.internal.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:136)
at com.sun.corba.se.internal.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:116)
at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1593)
at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1624)
at weblogic.iiop.RMIMsgOutput.writeObject(RMIMsgOutput.java:117)
at xxx.yyy_ehqjge_EOImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:492)
at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:108)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:435)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:430)
at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:35)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
I had a look at IndirectionValueHashtable class. It looks like the classcast is happening because the "handle-to-object" map has non String values.
Could this be a corba compatabilty issue?
The problem doesn't occur if I use weblogic initial context factory & t3 protocol.
What is the best way to overcome this problem? I dont want to distribute weblogic.jar [from 8.1.5 server]. wlclient is okay.
thanksTony Zimmer <> writes:
Certainly looks like a bug, in which case you need to go through
support to get it fixed. Do however check that your objects are in
fact serializable (including all their fields).
andy
Tried a few more combinations. No luck so far.
classcast exception for some objects at some times
server: WebLogic Server 10.0 / Sun 1.5.0_06/ WinNT 6
client: Sun jdk 1.5.0_11/1.4.2_14
java.lang.ClassCastException: java.lang.String
at xxxpack.client.PaymentReceipt.equals(PaymentReceipt.java:881)
at weblogic.corba.utils.IndirectionValueHashtable.get(IndirectionValueHashtable.java:119)
at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1836)
at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1992)
at weblogic.iiop.IIOPOutputStream.writeObject(IIOPOutputStream.java:2253)
at weblogic.utils.io.ObjectStreamClass.writeFields(ObjectStreamClass.java:413)
at weblogic.corba.utils.ValueHandlerImpl.writeValueData(ValueHandlerImpl.java:235)
at weblogic.corba.utils.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:182)
at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1957)
at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1992)
at weblogic.iiop.IIOPOutputStream.writeObject(IIOPOutputStream.java:2253)
at weblogic.utils.io.ObjectStreamClass.writeFields(ObjectStreamClass.java:413)
at weblogic.corba.utils.ValueHandlerImpl.writeValueData(ValueHandlerImpl.java:235)
at weblogic.corba.utils.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:182)
at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1957)
at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1992)
at weblogic.iiop.IIOPOutputStream.writeObject(IIOPOutputStream.java:2253)
at xxxpack.server.ProcessPayment_ehqjge_EOImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:589)
at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:224)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:479)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:475)
at weblogic.rmi.internal.BasicServerRef.access$300(BasicServerRef.java:59)
at weblogic.rmi.internal.BasicServerRef$BasicExecuteRequest.run(BasicServerRef.java:1016)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
server: WebLogic Server 8.1 SP6 / Sun 1.4.2_11 / WinNT 6
client jdk 1.4.2_14/1.5.0_11:
java.lang.ClassCastException
at xxxpack.client.PurchaseAmount.equals(PurchaseAmount.java:148)
at weblogic.corba.utils.IndirectionValueHashtable.get(IndirectionValueHashtable.java:119)
at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1471)
at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1624)
at com.sun.corba.se.internal.io.IIOPOutputStream.writeObjectField(IIOPOutputStream.java:685)
at com.sun.corba.se.internal.io.IIOPOutputStream.outputClassFields(IIOPOutputStream.java:745)
at com.sun.corba.se.internal.io.IIOPOutputStream.defaultWriteObjectDelegate(IIOPOutputStream.java:167)
at com.sun.corba.se.internal.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:526)
at com.sun.corba.se.internal.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:123)
at com.sun.corba.se.internal.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:136)
at com.sun.corba.se.internal.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:116)
at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1593)
at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1624)
at com.sun.corba.se.internal.io.IIOPOutputStream.writeObjectField(IIOPOutputStream.java:685)
at com.sun.corba.se.internal.io.IIOPOutputStream.outputClassFields(IIOPOutputStream.java:745)
at com.sun.corba.se.internal.io.IIOPOutputStream.defaultWriteObjectDelegate(IIOPOutputStream.java:167)
at com.sun.corba.se.internal.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:526)
at com.sun.corba.se.internal.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:123)
at com.sun.corba.se.internal.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:136)
at com.sun.corba.se.internal.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:116)
at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1593)
at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1624)
at weblogic.iiop.RMIMsgOutput.writeObject(RMIMsgOutput.java:117)
at xxxpack.server.ProcessPayment_ehqjge_EOImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:491)
at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:120)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:434)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:429)
at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:35)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
Do you have a list/ martix of client-server versions used for the bug fixes?
Thanks -
Hi,
Iam struggling with this problem from last 3days.
Any body could u help me to solve this problem.
error:
Caught an unexpected exception!
java.lang.ClassCastException at com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow (PortableRemoteObject.java:293)
at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:134)
at ConverterClient.main(ConverterClient.java:59)
Client Code is here:
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.rmi.PortableRemoteObject;
import java.util.Properties;
import javax.ejb.CreateException;
import java.util.Hashtable;
// NOT NECESSARY import Converter;
// NOT NECESSARY import ConverterHome;
public class ConverterClient {
public static void main(String[] args) {
try {
Properties env = new Properties();
env.put("java.naming.factory.initial","com.sun.jndi.cosnaming.CNCtxFactory");
env.put("java.naming.provider.url", "iiop://localhost:3700");
Context initial = new InitialContext(env);
ConverterHome home =(ConverterHome)PortableRemoteObject.narrow(initial.lookup("MyConverter"),ConverterHome.class);
// Create converter session bean
Converter currencyConverter = home.create();
// Calculate from dollars to yen
double amount = currencyConverter.dollarToYen(100.00);
System.out.println("100 Dollars is " + String.valueOf(amount) + " Yen");
// Calculate from yen to dollars
amount = currencyConverter.yenToEuro(100.00);
System.out.println("100 Yen is " + String.valueOf(amount) + " Dollars");
} catch (Exception ex) {
System.err.println("Caught an unexpected exception!");
ex.printStackTrace();Hi,
I have a stateless bean and accessing it from a jsp page in Orion App Server. There is no problem in the deployment. of the application.
When I access the bean from the jsp page is throwing
java.lang.ClassCastException
at com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(Unknown Source)
The code is :
Object homeObject = null;
homeObject = ctx.lookup("LoginHome");
out.println(homeObject.toString());
LoginHome ejbHome = (LoginHome)PortableRemoteObject.narrow(homeObject,LoginHome.class);
Login login = ejbHome.create();
when I use the statement
homeOject.toString() to print the object it prints
LoginHome EJBHome
I am not able to resolve this for th epast three days.
Thanks,
Vivek S -
ClassCastException on ejb jndi lookup
Hello,
I try to get an standalone remote client to to connect to my stateless session bean:
java.util.Properties props = new java.util.Properties();
props.put("java.naming.provider.url", "181.205.12.19:50004");
props.put("java.naming.factory.initial", "com.sap.engine.services.jndi.InitialContextFactoryImpl" );
props.put("java.naming.security.authentication", "simple");
props.put("java.naming.security.principal", "j2ee_admin");
props.put("java.naming.security.credentials", "*****");
jndiContext = new InitialContext(props);
fetching of jndi context is fine, but once I try to lookup my home interface I get a class cast exception:
home = (ToEdifactConverterHome) PortableRemoteObject.narrow(jndiContext.lookup ("sap.com/EdifactEar/ToEdifactConverterBean"), ToEdifactConverterHome.class);
java.lang.ClassCastException
at com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:293)
at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:134)
at test.cceag.transform.TransformTester.setUp(TransformTester.java:74)
at test.cceag.transform.TransformTester.main(TransformTester.java:48)
The jndi lookup seems to return the bean implementation object, but not the home interface itself.
Thanks for any hints
MatthiasHi Matthias,
i think the guide
"How to...EJB: Accessing EJB Applications Using JNDI"
will help you to solve the ejb lookup problem:
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/0736159e-0301-0010-9ea4-c63d83d0797b
good luck, Katharina -
JNDI lookup of stand alone Entity Bean?
Hi,
I am attempting to lookup an Entity EJB from within a web app that was deployed as a separate EJB Module. (As far as I understand, multiple web applications should be able to reference EJB's that are deployed independantly within their own EJB modules.)
To verify this works, I am using the sample "simple CMP EJB" sample that is pacakged with the App Server install.
First, I deployed the 'cmp-simpleEjb.jar' as a stand alone EJB-Module using the web admin tool. It loads/deploys with no problem.
Next, I create my own simple web app, and include the following relevant code in my Servlet:
InitialContext ctx = new InitialContext();
Object obj = ctx.lookup("ejb/MyProduct");
ProductHome pHome = (ProductHome)PortableRemoteObject.narrow(obj,ProductHome.class);
My web.xml includes an ejb-ref:
<ejb-ref>
<ejb-ref-name>ejb/MyProduct</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<home>samples.ejb.cmp.simple.ejb.Product</home>
<remote>samples.ejb.cmp.simple.ejb.ProductHome</remote>
</ejb-ref>
My sun-wevb.xml incudes an ejb-ref:
<ejb-ref>
<ejb-ref-name>ejb/MyProduct</ejb-ref-name>
<jndi-name>ejb/MyProduct</jndi-name>
</ejb-ref>
When I deploy my web app and call the Servlet from a browser, an Excpetion is thrown with a message "null". Can anyone please help me understand what is going on here?I added the Remote/Home interfaces into my web app's /WEB-INF/lib folder (jar-ed up of course) and now the Servlet fails with the following stack trace:
[25/Mar/2003:23:27:32] WARNING ( 527): CORE3283: stderr: java.lang.ClassCastException
[25/Mar/2003:23:27:32] WARNING ( 527): CORE3283: stderr: at com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:293)
[25/Mar/2003:23:27:32] WARNING ( 527): CORE3283: stderr: at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:134)
[25/Mar/2003:23:27:32] WARNING ( 527): CORE3283: stderr: at com.etango.testejb.struts.HomeAction.perform(Unknown Source)
[25/Mar/2003:23:27:32] WARNING ( 527): CORE3283: stderr: at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1787)
[25/Mar/2003:23:27:32] WARNING ( 527): CORE3283: stderr: at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1586)
[25/Mar/2003:23:27:32] WARNING ( 527): CORE3283: stderr: at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:492)
[25/Mar/2003:23:27:32] WARNING ( 527): CORE3283: stderr: at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
[25/Mar/2003:23:27:32] WARNING ( 527): CORE3283: stderr: at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
[25/Mar/2003:23:27:32] WARNING ( 527): CORE3283: stderr: at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:723)
[25/Mar/2003:23:27:32] WARNING ( 527): CORE3283: stderr: at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:444)
[25/Mar/2003:23:27:32] WARNING ( 527): CORE3283: stderr: at org.apache.catalina.core.ApplicationDispatcher.access$000(ApplicationDispatcher.java:123)
[25/Mar/2003:23:27:32] WARNING ( 527): CORE3283: stderr: at org.apache.catalina.core.ApplicationDispatcher$PrivilegedForward.run(ApplicationDispatcher.java:138)
Are you supposed to package the Home/Remote interface classes with the web app if referencing a independantly deployed EJB? -
Remote EJB 3 lookup error in Sun JAS 9.01
Hello,
I have a very simply EJB 3 deployed to a remote SJAS 9.01 (say, in the host "Jupiter") that has only one remote business interface that returns a string. The JNDI name is "mypackage.MyBean".
On a local host (named "Earth", local) there is a simple App Client:
package appCliente;
import javax.ejb.EJB;
public class SlessAppClient {
@EJB (mappedName="corbaname:iiop:jupiter:3700#mypackage.MyBean")
private static mypackage.MyBeanRemote bean;
public static void main(String args[]) {
System.out.println(" *** My Bean : " + bean.hello());
This works fine (i.e. with injection).
What must I do to change this to a "lookup" to use with dinamic (runtime) lookup?
I suppose it should be like this:
package appCliente;
import javax.ejb.EJB;
public class SlessAppClient {
// Do not use injection:
////// @EJB /////(mappedName="corbaname:iiop:jupiter:3700#mypackage.MyBean")
private static mypackage.MyBeanRemote bean;
public static void main(String args[]) {
Properties props = new Properties();
props.setProperty("org.omg.CORBA.ORBInitialHost", "jupiter");
InitialContext ic = new InitialContext(props);
sless = (MyBeanRemote) ic.lookup("mypackage.MyBean");
System.out.println(" *** My Bean : " + bean.hello());
But this doesn't work!!!
(After getting something like this working, let's change to the "no parameters" InitialContext)
Tried the Glassfish EJB FAQs suggestions, but didn't work either.
Please, anybody has any suggestions?
Thanks for any help.Thanks
I added appserv-rt.jar file in classpath and run the code
code is like this
@EJB(name="192.168.0.32/TemperatureBean")
private static TemperatureRemote temperatureBean;
private static TemperatureRemote convert;
URL url;
JFrame frame=new JFrame("Temperature Converter");
JPanel p=new JPanel();
JLabel label1=new JLabel("Enter temperature");
JTextField text=new JTextField();
JLabel label2=new JLabel();
JButton button=new JButton("Convert");
It gives me following exception
javax.naming.NameNotFoundException
at com.sun.enterprise.naming.TransientContext.resolveContext(TransientContext.java:255)
at com.sun.enterprise.naming.TransientContext.lookup(TransientContext.java:178)
at com.sun.enterprise.naming.SerialContextProviderImpl.lookup(SerialContextProviderImpl.java:61)
at com.sun.enterprise.naming.RemoteSerialContextProviderImpl.lookup(RemoteSerialContextProviderImpl.java:116)
at sun.reflect.GeneratedMethodAccessor142.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:121)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:650)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:193)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1705)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1565)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:947)
at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:178)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:717)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:473)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1270)
at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:479)
can you help me? -
Stand-alone JNDI lookup of an EJB in an Enterprise Application (EAR) build
Hi All,
I am having some difficulty doing JNDI look up an EJB 3.0 Bean that is part of an Enterprise Application (EAR) build. Below are all the related codes:
package ejb;
import javax.ejb.Local;
@Local
public interface Hello1Local {
public String getHello1();
package ejb;
import javax.ejb.Stateless;
@Stateless
public class Hello1Bean implements Hello1Local {
public String getHello1() {
return "I am Hello1 Bean!";
package ejb;
import javax.ejb.Remote;
@Remote
public interface Hello2Remote {
public String getHello2();
package ejb;
import javax.ejb.Stateless;
import javax.ejb.EJB;
@Stateless
@EJB(name="ejb/Hello1",
beanInterface=Hello1Local.class,
beanName="Hello1Bean")
public class Hello2Bean implements Hello2Remote {
@EJB private Hello1Local hello1bean;
public String getHello2() {
return hello1bean.getHello1();
There is no problem looking up Hello2 Bean using an Application Client such as the following:
public class LocalHelloApplicationClient {
@EJB(name="Hello2")
private static Hello2Remote hello2Bean;
public static void main(String[] args) {
System.out.println("hello2Bean.getHello2(): " + hello2Bean.getHello2());
}There is also no problem doing JNDI lookup (from a Stand-Alone Client the same bean if both Hello1 and Hello2 were created by themselves. ie not part of an Enterprise Application (EAR) build. However, I am wondering whether it is possible to do JNDI lookup of the same bean (Hello2) that is part of an Enterprise Application (EAR) built. Below are the type of JNDI lookup entries that I have tried without success:
public class StandalonePojoCallHelloWorld {
public static void main(String [] args)
try
InitialContext jndiContext = new InitialContext();
Hello2Remote hello2Bean = (Hello2Remote) jndiContext.lookup("ejb.Hello2Remote");
or
Hello2Remote hello2Bean = (Hello2Remote) jndiContext.lookup("LocalHelloEnterpriseApplication.Hello2.remote");
or
Hello2Remote hello2Bean = (Hello2Remote) jndiContext.lookup("LocalHelloEnterpriseApplication.ejb.Hello2Remote");
or
Hello2Remote hello2Bean = (Hello2Remote) jndiContext.lookup("LocalHelloEnterpriseApplication.Hello2Remote");
or
Hello2Remote hello2Bean = (Hello2Remote) jndiContext.lookup("LocalHelloEnterpriseApplication.LocalHelloEnterpriseApplication-ejb.Hello2Remote");
System.out.println("hello2Bean.getHello2(): " + hello2Bean.getHello2());
catch (javax.naming.NamingException ne)
ne.printStackTrace();
They all came up with the same error message:
javax.naming.NameNotFoundException: LocalHelloEnterpriseApplication.LocalHelloEnterpriseApplication-ejb.Hello2Remote not found
at com.sun.enterprise.naming.TransientContext.doLookup(TransientContext.java:216)
at com.sun.enterprise.naming.TransientContext.lookup(TransientContext.java:188)
at com.sun.enterprise.naming.SerialContextProviderImpl.lookup(SerialContextProviderImpl.java:74)
at com.sun.enterprise.naming.RemoteSerialContextProviderImpl.lookup(RemoteSerialContextProviderImpl.java:129)
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:597)Any suggestion would be appreciated.
Thanks,
JackHello
I've somme problems to get access to ejb interface from remote stand-alone client.
Here is my EJB code :
package stateless;
import javax.ejb.Stateless;
@Stateless(name = "TestSB", mappedName = "ejb/stateless/TestSB")
public class TestEJBBean implements TestEJBRemote {
public String getMessage() {
return "Hello EJB World";
}And the remote interface :
package stateless;
import javax.ejb.Remote;
@Remote
public interface TestEJBRemote {
String getMessage();
} In client side, i just edit main.java like this :
package testclient;
import java.io.FileInputStream;
import java.util.Properties;
import javax.naming.InitialContext;
import stateless.TestEJBRemote;
public class Main {
public static void main(String[] args) throws Exception {
Properties props = new Properties();
props.load(new FileInputStream("jndi.properties"));
InitialContext ctx = new InitialContext(props);
TestEJBRemote testEJB = (TestEJBRemote) ctx.lookup("ejb/stateless/TestSB");
System.out.println(testEJB.getMessage());
}here is my jndi.properties file (my glassfish server IP is 192.168.0.10) :
java.naming.factory.initial = com.sun.enterprise.naming.SerialInitContextFactory
java.naming.factory.url.pkgs = com.sun.enterprise.naming
java.naming.factory.state = com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl
org.omg.CORBA.ORBInitialHost = 192.168.0.10
org.omg.CORBA.ORBInitialPort = 3918when i run client on the same machine than the glassfish app server, it works fine.
But i run it on the different machine than the glassfish app server (on the same LAN without firewall), it fails with this error message :
eclan@eclan-laptop:~/NetBeansProjects/TestClient$ java -jar dist/TestClient.jar
24 août 2008 09:53:05 com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
ATTENTION: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: 127.0.1.1; port: 3918"
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2690)
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2711)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:261)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:274)
at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:130)
at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:192)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:181)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:325)
at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69)
at com.sun.enterprise.naming.SerialContext.narrowProvider(SerialContext.java:131)
at com.sun.enterprise.naming.SerialContext.getRemoteProvider(SerialContext.java:220)
at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:160)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:398)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at testclient.Main.main(Main.java:14)
Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection refused
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:347)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:244)
... 13 more
Caused by: java.net.ConnectException: Connection refused
at sun.nio.ch.Net.connect(Native Method)
at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:507)
at com.sun.corba.ee.impl.orbutil.ORBUtility.openSocketChannel(ORBUtility.java:105)
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:332)
... 14 more
24 août 2008 09:53:05 com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
ATTENTION: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: 127.0.1.1; port: 4038"
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2690)
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2711)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:261)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:274)
at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:130)
at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:192)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:181)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:325)
at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69)
at com.sun.enterprise.naming.SerialContext.narrowProvider(SerialContext.java:131)
at com.sun.enterprise.naming.SerialContext.getRemoteProvider(SerialContext.java:220)
at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:160)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:398)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at testclient.Main.main(Main.java:14)
Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection refused
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:347)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:244)
... 13 more
Caused by: java.net.ConnectException: Connection refused
at sun.nio.ch.Net.connect(Native Method)
at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:507)
at com.sun.corba.ee.impl.orbutil.ORBUtility.openSocketChannel(ORBUtility.java:105)
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:332)
... 14 more
24 août 2008 09:53:05 com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
ATTENTION: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: 127.0.1.1; port: 4138"
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2690)
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2711)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:261)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:274)
at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:130)
at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:192)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:181)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:325)
at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69)
at com.sun.enterprise.naming.SerialContext.narrowProvider(SerialContext.java:131)
at com.sun.enterprise.naming.SerialContext.getRemoteProvider(SerialContext.java:220)
at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:160)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:398)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at testclient.Main.main(Main.java:14)
Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection refused
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:347)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:244)
... 13 more
Caused by: java.net.ConnectException: Connection refused
at sun.nio.ch.Net.connect(Native Method)
at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:507)
at com.sun.corba.ee.impl.orbutil.ORBUtility.openSocketChannel(ORBUtility.java:105)
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:332)
... 14 more
24 août 2008 09:53:05 com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
ATTENTION: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: 127.0.1.1; port: 3918"
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2690)
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2711)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:261)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:274)
at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:130)
at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:192)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:181)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:325)
at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69)
at com.sun.enterprise.naming.SerialContext.narrowProvider(SerialContext.java:131)
at com.sun.enterprise.naming.SerialContext.getRemoteProvider(SerialContext.java:220)
at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:160)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:398)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at testclient.Main.main(Main.java:14)
Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection refused
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:347)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:244)
... 13 more
Caused by: java.net.ConnectException: Connection refused
at sun.nio.ch.Net.connect(Native Method)
at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:507)
at com.sun.corba.ee.impl.orbutil.ORBUtility.openSocketChannel(ORBUtility.java:105)
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:332)
... 14 more
24 août 2008 09:53:05 com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
ATTENTION: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: 127.0.1.1; port: 4038"
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2690)
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2711)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:261)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:274)
at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:130)
at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:192)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:181)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:325)
at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69)
at com.sun.enterprise.naming.SerialContext.narrowProvider(SerialContext.java:131)
at com.sun.enterprise.naming.SerialContext.getRemoteProvider(SerialContext.java:220)
at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:160)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:398)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at testclient.Main.main(Main.java:14)
Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection refused
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:347)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:244)
... 13 more
Caused by: java.net.ConnectException: Connection refused
at sun.nio.ch.Net.connect(Native Method)
at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:507)
at com.sun.corba.ee.impl.orbutil.ORBUtility.openSocketChannel(ORBUtility.java:105)
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:332)
... 14 more
24 août 2008 09:53:05 com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
ATTENTION: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: 127.0.1.1; port: 4138"
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2690)
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2711)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:261)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:274)
at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:130)
at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:192)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:181)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:325)
at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69)
at com.sun.enterprise.naming.SerialContext.narrowProvider(SerialContext.java:131)
at com.sun.enterprise.naming.SerialContext.getRemoteProvider(SerialContext.java:220)
at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:160)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:398)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at testclient.Main.main(Main.java:14)
Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection refused
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:347)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:244)
... 13 more
Caused by: java.net.ConnectException: Connection refused
at sun.nio.ch.Net.connect(Native Method)
at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:507)
at com.sun.corba.ee.impl.orbutil.ORBUtility.openSocketChannel(ORBUtility.java:105)
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:332)
... 14 more
eclan@eclan-laptop:~/NetBeansProjects/TestClient$ THANKS YOU FOR YOUR HELP
Justin
Maybe you are looking for
-
How can I email photos from iphoto '11?
I am having trouble emailing photos from iphoto '11. When I put the recipients address in, it disappears when I click "send" and I get some message about "key chain" and iphoto wants to use my confidential information???? What I ended up doing is
-
I am converting a PostreSQL query to T-SQL but am running into a syntax error that I cannot understand. My main query below works fine. WITH itowner AS ( SELECT itowner_1.comp1id AS businessserviceid, person.name AS itowner_name,
-
During Upgrade /ASU/UPGRADE problems
Dear Expert: Amost at the last of the Upgrade r/3 4.7 x110 to ECC 6.0... at the phase REQ_POST_ASU_RUN it prompt message as below: To perform the manual application-specific post-upgrade steps, start ASU Toolbox now, to do this,use transaction /ASU/U
-
Hi SAP Gurus, Could you let me know how is it possible to export bw project in a html file. I went in metadata repository /extra /export BW. But we upload many files where link between each other doesn't work correctly. Can we optimize this extractio
-
How do you get rid of error -37 on itunes?
Trying to download IOS 5 on my Ipod Touch 4G and after awhile an error box pops up in iTunes "Error occurred while updating ipod (-37). If you continue all data will be lost from your ipod." How can I fix this?