Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Re:Java CORBA client error:BAD_OPERATION: The delegate has not been set

3 posts in General Discussion (old) Last posting was on 2000-03-30 21:44:01.0Z
Bill Pfeiffer Posted on 2000-03-30 20:50:20.0Z
Newsgroups: sybase.public.easerver
From: "Bill Pfeiffer" <pfeiffer@gte.net>
Subject: Re:Java CORBA client error:BAD_OPERATION: The delegate has not been set
Date: Thu, 30 Mar 2000 15:50:20 -0500
Lines: 41
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6700
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
NNTP-Posting-Host: 208.26.45.2
Message-ID: <347_#HuS6tom$GA.201@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:25184
Article PK: 228460

I have written a servlet hosted on another java based application server
that needs to communicate to a PB componant that is hosted on jaguar. The
current version my app server is based on the ms jdk. My current java client
code works just fine under this jdk. However the app server is about to be
upgraded to run under Sun jdk 1.2. When I attempt to run the same code under
the jdk 1.2 based server, I get the error listed in this posting's subject
line.

My initial code was based on the org.omg.CosNaming classes that a previous
post on the subject said to avoid.

I looked that post's recommendation to use the SessionManager, and have
tried to follow the EAServer docs on this method, but I am having a problem
with the following code:

// props have been initialized already

String _compName = "S3JagComp/n_rpt_svr";
org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init((String []) null, props);
org.omg.CORBA.Object objRef = null;
objRef =
orb.string_to_object(props.getProperty("com.sybase.CORBA.NameServiceURL",
"Error"));
Manager manager = ManagerHelper.narrow(objRef);
Session session = manager.createSession("jagadmin", "");
// Next line gives a 'java.lang.ClassCastException:
com/sybase/CORBA/ObjectRef'
Factory fact = (Factory) session.lookup(_compName);
rptSvr = S3JagComp.n_rpt_svrHelper.narrow(fact.create());

I'm not sure I'm even heading in the right direction. Any ideas on why I get
the exception?

TIA,

Bill Pfeiffer


Dave Wolf [Sybase] Posted on 2000-03-30 21:08:42.0Z
Newsgroups: sybase.public.easerver
From: "Dave Wolf [Sybase]" <dwolf@sybase.com>
Subject: Re: Re:Java CORBA client error:BAD_OPERATION: The delegate has not been set
Date: Thu, 30 Mar 2000 16:08:42 -0500
Lines: 56
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6600
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
NNTP-Posting-Host: PPPa41-ResaleCanada8001-5R1009.saturn.bbn.com 4.16.18.244
Message-ID: <347_ETRXJzom$GA.298@forums.sybase.com>
References: <347_#HuS6tom$GA.201@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:25178
Article PK: 154277

Just do

Factory fact = FactoryHelper.narrow(session.lookup(_compName));

Dave Wolf
Internet Applications Division

"Bill Pfeiffer" <pfeiffer@gte.net> wrote in message
news:#HuS6tom$GA.201@forums.sybase.com...
> I have written a servlet hosted on another java based application server
> that needs to communicate to a PB componant that is hosted on jaguar. The
> current version my app server is based on the ms jdk. My current java
client
> code works just fine under this jdk. However the app server is about to be
> upgraded to run under Sun jdk 1.2. When I attempt to run the same code
under
> the jdk 1.2 based server, I get the error listed in this posting's subject
> line.
>
> My initial code was based on the org.omg.CosNaming classes that a previous
> post on the subject said to avoid.
>
> I looked that post's recommendation to use the SessionManager, and have
> tried to follow the EAServer docs on this method, but I am having a
problem
> with the following code:
>
> // props have been initialized already
>
> String _compName = "S3JagComp/n_rpt_svr";
> org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init((String []) null, props);
> org.omg.CORBA.Object objRef = null;
> objRef =
> orb.string_to_object(props.getProperty("com.sybase.CORBA.NameServiceURL",
> "Error"));
> Manager manager = ManagerHelper.narrow(objRef);
> Session session = manager.createSession("jagadmin", "");
> // Next line gives a 'java.lang.ClassCastException:
> com/sybase/CORBA/ObjectRef'
> Factory fact = (Factory) session.lookup(_compName);
> rptSvr = S3JagComp.n_rpt_svrHelper.narrow(fact.create());
>
> I'm not sure I'm even heading in the right direction. Any ideas on why I
get
> the exception?
>
> TIA,
>
> Bill Pfeiffer
>
>
>
>
>


Bill Pfeiffer Posted on 2000-03-30 21:44:01.0Z
Newsgroups: sybase.public.easerver
From: "Bill Pfeiffer" <pfeiffer@gte.net>
Subject: Re: Re:Java CORBA client error:BAD_OPERATION: The delegate has not been set
Date: Thu, 30 Mar 2000 16:44:01 -0500
Lines: 71
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6700
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
NNTP-Posting-Host: 208.26.45.2
Message-ID: <347_M0$85Lpm$GA.298@forums.sybase.com>
References: <347_#HuS6tom$GA.201@forums.sybase.com> <347_ETRXJzom$GA.298@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:25170
Article PK: 154268

That did it!

Thanks again!

Bill Pfeiffer

"Dave Wolf [Sybase]" <dwolf@sybase.com> wrote in message
news:ETRXJzom$GA.298@forums.sybase.com...
> Just do
>
> Factory fact = FactoryHelper.narrow(session.lookup(_compName));
>
> Dave Wolf
> Internet Applications Division
>
> "Bill Pfeiffer" <pfeiffer@gte.net> wrote in message
> news:#HuS6tom$GA.201@forums.sybase.com...
> > I have written a servlet hosted on another java based application server
> > that needs to communicate to a PB componant that is hosted on jaguar.
The
> > current version my app server is based on the ms jdk. My current java
> client
> > code works just fine under this jdk. However the app server is about to
be
> > upgraded to run under Sun jdk 1.2. When I attempt to run the same code
> under
> > the jdk 1.2 based server, I get the error listed in this posting's
subject
> > line.
> >
> > My initial code was based on the org.omg.CosNaming classes that a
previous
> > post on the subject said to avoid.
> >
> > I looked that post's recommendation to use the SessionManager, and have
> > tried to follow the EAServer docs on this method, but I am having a
> problem
> > with the following code:
> >
> > // props have been initialized already
> >
> > String _compName = "S3JagComp/n_rpt_svr";
> > org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init((String []) null, props);
> > org.omg.CORBA.Object objRef = null;
> > objRef =
> >
orb.string_to_object(props.getProperty("com.sybase.CORBA.NameServiceURL",
> > "Error"));
> > Manager manager = ManagerHelper.narrow(objRef);
> > Session session = manager.createSession("jagadmin", "");
> > // Next line gives a 'java.lang.ClassCastException:
> > com/sybase/CORBA/ObjectRef'
> > Factory fact = (Factory) session.lookup(_compName);
> > rptSvr = S3JagComp.n_rpt_svrHelper.narrow(fact.create());
> >
> > I'm not sure I'm even heading in the right direction. Any ideas on why I
> get
> > the exception?
> >
> > TIA,
> >
> > Bill Pfeiffer
> >
> >
> >
> >
> >
>
>