Post by Keda » Tue, 23 Nov 1999 04:00:00

Hello Everyone,

This problem really seems to be bugging me, on returning object
reference of the same interface type, i get a MARSHAL exception when i
try to invoke some methods on this object.

the basic interface architecture is as follows :

interface aInterface {
        void someMethod()
        aInterface newObject();


interface aInterface_Factory {
        aInterface createObject();


the aInterface_Factory interface is used to create the object the first

the basic implementation is as follows:
aInterface_ptr aInteface_Factory_Impl::createObject() {
        aInterface_ptr aObj = new aInteface_Impl();
        return aInterface::_duplicate(aObj);


//this works fine and returns a aInterface object reference on which i
am able to invoke methods defined in aInterface.

the aInterface_Impl file looks as follows for the newObject method:

aInterface_ptr aInterface_Impl::newObject() {
        //do some computations

        aInterface_ptr aObj = new aInterface_Impl();
        return aInterface::_duplicate(aObj);


on the client side the simple code is

main () {

        //ORB and BOA intialization code
        //obtain reference to aInterface_Factory running on the server side

        aInterface oldPtr = aInterface_Factory.createObject();
        oldPtr->someMethod(); //works fine since oldPtr reference obtained
through aInterface_Factory object
        aInterface_var newPtr = oldPtr->newObject(); //Also works fine and able
to get a ref. to a new Obj.
        newPtr->someMethod(); --//MARSHAL Error here the method is not sent to
the Server side at all

i had the similar problem when i was trying to return object references
from using the factory interface and i got solved using the duplicate
- the key difference is that the oldPtr object is created from the
aInterface_Factory createObject and the newObject is created through the
newObject method in aInterface.

Any hints on why this occurs.

with regards,



1. strange corba marshal error org.omg.CORBA.MARSHAL

I have a strange corba marshal error while receiving a structured push
The error has type org.omg.CORBA.MARSHAL with minor code 0 and message
'Referenced type of indirect type noy marshaled!'
I am using jdk 1.4.1, the event pusher is a smalltalk system.
Anybody seen this before and knows the solution ?


2. Supra hold the line?

3. 10170-- Error marshalling param/result - Encoding/decoding error

4. Phone number for Safe Harbor sought?

5. CORBA stub marshalling and unmarshalling

6. Visa/MC

7. CORBA Marshal exception / upgrade from JDK1.3 to JDK1.4


9. java.rmi.MarshalException: CORBA MARSHAL 0[]

10. org.omg.CORBA.MARSHAL: minor code: 0 completed: No

11. Marshalling problems with Corba sequences