hello all

Has anybody got some experience with WEBLogic 7.0 and IONA's ORBacus for C++ 4.1.0.
I have written a C++ client that invokes a session EJB and it works with JBoss which uses JacORB.

With WEBLogic 7.0 my C++ client is able to resolve naming service and even to create aa instance of stateful session bean.
It has problems when invoking business methods.

Some methods return wrongs results and one method which should return ::org::omg::boxedRMI::CORBA::seq1_WStringValue just hangs.

I configured WL to use IIOP 1.1, but it didnt help.

<Server DefaultGIOPMinorVersion="1"

However without this change WL used to throw NPE exceptions when methods of SFSB where invoked.

I have tried several NameService URLs:

NameService=corbaloc:localhost:7001/NameService
NameService=corbaloc:iiop:localhost:7001/NameService
NameService=corbaloc:iiop:1.1@localhost:7001/NameService
NameService=corbaloc:iiop:1.2@localhost:7001/NameService

BTW JBoss works when NameService=corbaloc::localhost:3528/JBoss/Naming/root is used.

I have used rmic tool to generate IDL files, maybe I should have used WEBLogic's ejbc ?

any thoughts ?

Maris


PS I have posted NPE trace , a test client and IDL below.

--------- exception -----

<2002.4.11 02:16:52 EET> <Error> <kernel> <000802> <ExecuteRequest failed
 java.lang.NullPointerException
java.lang.NullPointerException
        at weblogic.rmi.internal.BasicServerRef.associateTxContext(Lweblogic.rmi.spi.InboundRequest;Lweblogic.rmi.spi.OutboundResp
onse;)V(Unknown Source)
        at weblogic.rmi.internal.ReplyOnError.execute(Lweblogic.kernel.ExecuteThread;)V(Unknown Source)
        at weblogic.kernel.ExecuteThread.execute(Lweblogic.kernel.ExecuteRequest;)V(Unknown Source)
        at weblogic.kernel.ExecuteThread.run()V(Unknown Source)
        at java.lang.Thread.startThreadFromVM(Ljava.lang.Thread;)V(Unknown Source)



--------- CPP -------

#include <stdio.h>

#include <OB/CORBA.h>
#include <OB/CosNaming.h>

#include <beans.h>

using namespace std;

int main(int argc, char* argv[])
{
CORBA::ORB_var orb;

if (argc!=3)
{
cout < return -1;
}

try
{
// init ORB
orb = CORBA::ORB_init(argc,argv);

cout << "Resolving naming service: " << argv[2] <
// resolve naming service
CORBA::Object_var obj = orb -> resolve_initial_references("NameService");

CosNaming::NamingContext_var nc = CosNaming::NamingContext::_narrow(obj.in());

cout <
// resolve EJB home interface
CosNaming::Name aName;
    aName.length(1);
    aName[0].id = CORBA::string_dup("carmichaelbeans_beans_CarmichaelSessionHome");
    aName[0].kind = CORBA::string_dup("");
CORBA::Object_var aObj = nc -> resolve(aName);

carmichaelbeans::beans::CarmichaelSessionHome_ptr home = carmichaelbeans::beans::CarmichaelSessionHome::_narrow(aObj);


carmichaelbeans::beans::CarmichaelSession_ptr session = home->create(true);


CORBA::ValueFactory factory = new org::omg::boxedRMI::CORBA::seq1_WStringValue_init;
orb->register_value_factory(org::omg::boxedRMI::CORBA::seq1_WStringValue::_OB_id(),factory);
factory->_remove_ref();

factory = new javax::ejb::CreateException_init;
orb->register_value_factory(javax::ejb::CreateException::_OB_id(),factory);
factory->_remove_ref();

factory = new javax::ejb::FinderException_init;
orb->register_value_factory(javax::ejb::FinderException::_OB_id(),factory);
factory->_remove_ref();

factory = new javax::ejb::RemoveException_init;
orb->register_value_factory(javax::ejb::RemoveException::_OB_id(),factory);
factory->_remove_ref();

factory = new javax::naming::NamingException_init;
orb->register_value_factory(javax::naming::NamingException::_OB_id(),factory);
factory->_remove_ref();


org::omg::boxedRMI::CORBA::seq1_WStringValue * strings = session->getStoredCarmichaelNumbers(); /////////////

long totalNumber = strings->length();

cout <
for (long i=0; i<totalNumber; i++)
{
::CORBA::WStringValue* str = (*strings)[i];
wcout < //wprintf(L"%ls\n", str->_value());
}


session->remove();

return 0;
} catch (CORBA::Exception& e)
{
cout < return -1;
}

return 0;
}
--------- IDL -------------

#include "orb.idl"


module javax {
module ejb {

    valuetype CreateException {
    };

#pragma ID CreateException "RMI:javax.ejb.CreateException:048A3675A6FD5463:575FB6C03D49AD6A"

};
};

module javax {
module ejb {

    exception CreateEx {
    
        CreateException value;
    
    };

};
};

module javax {
module ejb {

    valuetype FinderException {
    };

#pragma ID FinderException "RMI:javax.ejb.FinderException:048A3675A6FD5463:79EE1514C8B7CA15"

};
};


module javax {
module ejb {

    exception FinderEx {
    
        FinderException value;
    
    };

};
};


module javax {
module ejb {

    valuetype RemoveException{
    };

#pragma ID RemoveException "RMI:javax.ejb.RemoveException:048A3675A6FD5463:C06A008FD05A462A"

};
};


module javax {
module ejb {

    exception RemoveEx {
    
        RemoveException value;
    
    };

};
};

module javax {
module naming {

    valuetype NamingException{
    };

#pragma ID NamingException "RMI:javax.naming.NamingException:EC5FE6E4DEB619DC:EDF860E38A3EE737"

};
};


module javax {
module naming {

    exception NamingEx {
    
        NamingException value;
    
    };

};
};


module org {
module omg {
module boxedRMI {
module CORBA {

valuetype seq1_WStringValue sequence<::CORBA::WStringValue>;

#pragma ID seq1_WStringValue "RMI:[Ljava.lang.String;:071DA8BE7F971128:A0F0A4387A3BB342"
};
};
};
};


module carmichaelbeans {
module beans {

    interface CarmichaelSession
{
long test( );

void remove( ) raises (
            ::javax::ejb::RemoveEx );

        void deleteAllCarmichaelNumbers( ) raises (
            ::javax::ejb::RemoveEx,
            ::javax::ejb::FinderEx );
        ::CORBA::WStringValue findCarmichaelNumber(
            in ::CORBA::WStringValue arg0,
            in ::CORBA::WStringValue arg1,
            in long arg2 );
        ::CORBA::WStringValue findStoreCarmichaelNumber(
            in ::CORBA::WStringValue arg0,
            in ::CORBA::WStringValue arg1,
            in long arg2 ) raises (
            ::javax::naming::NamingEx,
            ::javax::ejb::CreateEx );
        ::org::omg::boxedRMI::CORBA::seq1_WStringValue getStoredCarmichaelNumbers( ) raises (
            ::javax::ejb::FinderEx );

#pragma ID CarmichaelSession "RMI:carmichaelbeans.beans.CarmichaelSession:0000000000000000"
    };
};
};

module carmichaelbeans {
module beans {

    interface CarmichaelSessionHome {
    
        ::carmichaelbeans::beans::CarmichaelSession create(
            in boolean arg0 ) raises (
            ::javax::ejb::CreateEx );
    
    };

#pragma ID CarmichaelSessionHome "RMI:carmichaelbeans.beans.CarmichaelSessionHome:0000000000000000"

};
};