Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

RMI-IIOP NoSuchObjectException

1 view
Skip to first unread message

Joel

unread,
May 28, 2003, 3:08:18 PM5/28/03
to

I have looked up an EJB from the Weblogic tree. I am attempting to call on method
on this EJB, and the method takes a reference to my client object. I have created
the stub for the client using JBuilder's rmic with the options of -v1.2 and -iiop.
I also export the object in the constructor of the client using UnicastRemoteObject.exportObject(this).


1) When I attempt to put the wlclient.jar and wljmsclient.jar in the classpath
of my client, the
following error occurs:


java.rmi.NoSuchObjectException: CORBA INV_OBJREF 0 No; nested exception is:
org.omg.CORBA.INV_OBJREF: client.Client not exported or is a JRMP stub vmcid:
0x0 minor
code: 0 completed: No
at com.sun.corba.se.internal.iiop.ShutdownUtilDelegate.mapSystemException
(ShutdownUtilDelegate.java:91)
..


2) When I put the weblogic.jar (without the 2 client.jar files) in my classpath,
this error does
not occur.

Thanks in advance,
Joel

Andy Piper

unread,
May 28, 2003, 3:04:35 PM5/28/03
to
"Joel" <joe...@hotmail.com> writes:

> I have looked up an EJB from the Weblogic tree. I am attempting to call on method
> on this EJB, and the method takes a reference to my client object. I have created
> the stub for the client using JBuilder's rmic with the options of -v1.2 and -iiop.
> I also export the object in the constructor of the client using UnicastRemoteObject.exportObject(this).

You need to generate a Tie for the impl also, i.e. run rmic on your
client object impl.

andy

Joel

unread,
May 28, 2003, 4:44:38 PM5/28/03
to

I am currently running rmic on the client object impl, and the Tie is being created.

Andy Piper

unread,
May 28, 2003, 6:17:18 PM5/28/03
to
"Joel" <joe...@hotmail.com> writes:

> I am currently running rmic on the client object impl, and the Tie is being created.

and you have a stub for the EJB also? The error message you are
getting indicates that it cannot find a stub or tie. Are they in the
classpath of your client? Does this work if you take JBuilder out of
the picture? We have tests that do exactly this so there must be
something obvious or subtle going wrong.

andy

Joel

unread,
May 29, 2003, 10:39:10 AM5/29/03
to

I don't know what else to do. I have a stub for the EJB as well. I am getting
the EJB stub fine
from the server. However, it doesn't like me using the client as a parameter
to the EJB
method. I have the stubs and ties in the classpath of my client, and they are
in the jar that is
the EJB.

The problem seems to be the same when I do an ant compile, rmic, and jar. Is
there
something special that I need to do on the client side besides having the Stubs
and Ties
available and exporting the object using UnicastRemoteObject.exportObject(..)?
I'm stumpbed.

Thanks,
Joel

Andy Piper

unread,
May 29, 2003, 12:15:59 PM5/29/03
to
"Joel" <joe...@hotmail.com> writes:

> The problem seems to be the same when I do an ant compile, rmic, and jar. Is
> there
> something special that I need to do on the client side besides having the Stubs
> and Ties
> available and exporting the object using UnicastRemoteObject.exportObject(..)?
> I'm stumpbed.

You should probably use PortableRemoteObject.exportObject() rather
than UnicastRemoteObject.exportObject(). You should probably also make
your client object implementation extend PortableRemoteObject. The JDK
does some special magic in these classes. UnicastRemoteObject is more
a JRMP thing. We use PRO in our tests.

andy

Joel

unread,
May 29, 2003, 5:19:50 PM5/29/03
to

"Joel" <joe...@hotmail.com> wrote:
>Andy,
> Thanks for the help. I now have my client object extending the PortableRemoteObject
>rather
>than using UnicastRemoteObject's exportObject method. That cures the
>previous
>error. Now
>I'm getting a different error. It occurs in the same place, when I attempt
>to
>send my client as
>a parameter to the server. Both are using the exact same JDK and the
>same class
>files.
>Please advise.
>
>Exception in thread "main" java.io.IOException: Invalid indirection to
>offset
>84
>88
> at com.sun.corba.se.internal.io.IIOPInputStream.throwExceptionType(Nativ
>e Method)
> at com.sun.corba.se.internal.io.IIOPInputStream.defaultReadObjectDelegat
>e(IIOPInputStream.java:446)
> at com.sun.corba.se.internal.io.InputStreamHook.defaultReadObject(InputS
>treamHook.java:163)
> at java.text.DecimalFormat.readObject(DecimalFormat.java:2506)
> at com.sun.corba.se.internal.io.IIOPInputStream.readObject(Native
>Method
>)
> at com.sun.corba.se.internal.io.IIOPInputStream.invokeObjectReader(IIOPI
>nputStream.java:1298)
> at com.sun.corba.se.internal.io.IIOPInputStream.inputObject(IIOPInputStr
>eam.java:908)
> at com.sun.corba.se.internal.io.IIOPInputStream.simpleReadObject(IIOPInp
>utStream.java:261)
> at com.sun.corba.se.internal.io.ValueHandlerImpl.readValueInternal(Value
>HandlerImpl.java:247)
> at com.sun.corba.se.internal.io.ValueHandlerImpl.readValue(ValueHandlerI
>mpl.java:209)
> at com.sun.corba.se.internal.iiop.CDRInputStream_1_0.read_value(CDRInput
>Stream_1_0.java:1075)
> at com.sun.corba.se.internal.iiop.CDRInputStream.read_value(CDRInputStre
>am.java:293)
> at com.sun.corba.se.internal.io.IIOPInputStream.inputObjectField(IIOPInp
>utStream.java:1577)
> at com.sun.corba.se.internal.io.IIOPInputStream.inputClassFields(IIOPInp
>utStream.java:1796)
> at com.sun.corba.se.internal.io.IIOPInputStream.inputObject(IIOPInputStr
>
>...(more stuff from this exception then: )
>
>java.rmi.MarshalException: CORBA MARSHAL 1398079699 Maybe; nested exception
>is:
>
> org.omg.CORBA.MARSHAL: Unable to read value from underlying bridge
>: Una
>ble to read value from underlying bridge : Unable to read value from
>underlying
>bridge : Unable to read value from underlying bridge : Unable to read
>value from
> underlying bridge : Unable to read value from underlying bridge : Unable
>to rea
>d value from underlying bridge : Unable to read value from underlying
>bridge :
>U
>nable to read value from underlying bridge : Unable to read value from
>underlyin
>g bridge : Unable to read value from underlying bridge : Serializable
>readObject
> method failed internally vmcid: SUN minor code: 211 completed: Maybe
> at com.sun.corba.se.internal.iiop.ShutdownUtilDelegate.mapSystemExceptio
>n(ShutdownUtilDelegate.java:97)
> at javax.rmi.CORBA.Util.mapSystemException(Util.java:65)
>
>
>Any help would be GREATLY appreciated.
>
>Thanks,
>Joel
>

It is also important to note that this error only occurs when wlclient.jar and
wljmsclient.jar are in
the classpath and weblogic.jar is not. When weblogic.jar is in the client's classpath,
everything
works fine.

Joel

unread,
May 29, 2003, 5:17:08 PM5/29/03
to

Andy,

Andy Piper

unread,
May 29, 2003, 7:35:38 PM5/29/03
to
"Joel" <joe...@hotmail.com> writes:

> Exception in thread "main" java.io.IOException: Invalid indirection to offset
> 84

What, precisely, are you sending to the client? We are currently
trying to solve some problems with outbound chunking with another
customer - this looks like the same problem. Basically the encoding we
use for custom marshaled valuetypes causes the JDK ORB to choke.

Raise a call with BEA and ask for the patch to CR106750. That may fix
your problem.

BTW you only need wljmsclient.jar in your classpath - it references
wlclient.jar via its manifest classpath.

andy
--

Joel

unread,
Jun 2, 2003, 1:08:54 PM6/2/03
to


Andy,
The email that you sent did not contain the attachment that you said it would.
Could you please
resend that? Thanks.

Another question. As I read more about this IIOP, I fear that I may be doing
one other thing
incorrectly. When creating the InitialContext on the client, should I be using
the WLInitialContextFactory
as the factory, or should I use the com.sun.jndi.cosnaming.CNCtxFactory be used.
In conjuction
with that, should the provider URL be using t3 or iiop://? When using the CNCtxFactory
and the
iiop procotol, I get a CommunicationException. I think that I'm a little lost
at this point.

Also, to answer your question, at the time of the error, the client isn't being
sent anything.
It's when the client attempts to send a reference of himself to the server when
the error occurs.

Thanks,
Joel

Andy Piper

unread,
Jun 2, 2003, 12:46:13 PM6/2/03
to
Newsgroups: weblogic.developer.interest.rmi-iiop
Subject: Re: RMI-IIOP NoSuchObjectException
References: <3ed4fb12$1...@newsgroups.bea.com> <m31xyi5...@xemacs.org>
<85u1bdp...@beasys.com> <3edb...@newsgroups.bea.com>
From: Andy Piper <andyp_...@bea.com>
Date: Mon, 02 Jun 2003 09:46:13 -0700
Message-ID: <85ptlwp...@beasys.com>
User-Agent: Gnus/5.1002 (Gnus v5.10.2) XEmacs/21.4 (Rational FORTRAN,
cygwin32)
Cancel-Lock: sha1:DL1+DxI47IHSdv2CVNCkBdnxqQs=
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
NNTP-Posting-Host: 216.148.48.18
X-Original-NNTP-Posting-Host: 216.148.48.18
X-Trace: newsgroups.bea.com 1054572621 216.148.48.18 (2 Jun 2003 09:50:21 -0800)
X-Original-Trace: 2 Jun 2003 09:50:21 -0800, 216.148.48.18
Organization: BEA NEWS SITE
Lines: 31
XPident: Unknown
Path: newsgroups.bea.com!not-for-mail
Xref: newsgroups.bea.com weblogic.developer.interest.rmi-iiop:2055

"Joel" <joe...@hotmail.com> writes:


> Could you please
> resend that? Thanks.

The bug is now fixed properly so you should go through support to get
the patch.

> Another question. As I read more about this IIOP, I fear that I may be doing
> one other thing
> incorrectly. When creating the InitialContext on the client, should I be using
> the WLInitialContextFactory

Yes.

> as the factory, or should I use the com.sun.jndi.cosnaming.CNCtxFactory be used.

No. You should only use this if you want a really thin client that
doesn't support transactions, security or clustering.

> In conjuction
> with that, should the provider URL be using t3 or iiop://? When using the CNCtxFactory
> and the
> iiop procotol, I get a CommunicationException. I think that I'm a little lost
> at this point.

The thin client code will map t3:// to iiop:// so it doesn't matter which you use.

andy
--

0 new messages