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.

Java -> EAS35 PB comp -> java.lang.ClassCastException

6 posts in General Discussion (old) Last posting was on 2000-02-15 03:09:23.0Z
<=one way=> Posted on 2000-02-14 23:05:03.0Z
Newsgroups: sybase.public.easerver
From: "<=one way=>" <OneWay_111@yahoo.com>
Subject: Java -> EAS35 PB comp -> java.lang.ClassCastException
Date: Mon, 14 Feb 2000 18:05:03 -0500
Lines: 142
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----=_NextPart_000_0014_01BF7716.048FEBF0"
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2014.211
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211
NNTP-Posting-Host: oppenheimer163.oppenheimerfunds.com 216.44.5.163
Message-ID: <347_A3NwY6ad$GA.327@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:28843
Article PK: 161223

A call to a PB component in EAS35 from Java client results in the java.lang.ClassCastException.
CORBA22 stubs for PB comp.
 
TIA.
 
----------------------------------------------------------------------------
OUTPUT:
starting TestClient
 
---->Session created.
java.lang.ClassCastException: com.sybase.CORBA.ObjectRef
java.lang.ClassCastException: com.sybase.CORBA.ObjectRef
        at test.TestClient.main(TestClient.java:38)
 
----------------------------------------------------------------------------
CODE:
  try { 
   java.util.Properties props = new java.util.Properties();
   props.put("org.omg.CORBA.ORBClass", "com.sybase.CORBA.ORB");
   ORB orb = ORB.init((String[]) null, props);
 
   String ior = "iiop://somehost:9000";
   Manager manager = ManagerHelper.narrow(orb.string_to_object(ior));
 
   Session session = manager.createSession("jagadmin", "");
  System.out.println("---->Session created.");  
 
// the following line results in the exception
   Factory factory = (Factory) session.lookup("Test/testComp");
  System.out.println("---->Factory created.");
 
   Test.testComp t = (Test.testComp) Test.testCompHelper.narrow(factory.create());
  System.out.println("---->CoreAPI created.");
 
   String rs = t.returnok();
   System.out.println("Return OK called. RS=" + rs);
 
  } catch( Exception ex) {
   System.out.println(ex.toString());
   ex.printStackTrace();
  }
 }
 


Dave Wolf [Sybase] Posted on 2000-02-13 02:49:42.0Z
Newsgroups: sybase.public.easerver
From: "Dave Wolf [Sybase]" <dwolf@sybase.com>
Subject: Re: Java -> EAS35 PB comp -> java.lang.ClassCastException
Date: Sat, 12 Feb 2000 21:49:42 -0500
Lines: 180
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----=_NextPart_000_0011_01BF75A3.11E71860"
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
NNTP-Posting-Host: 158.159.8.11
Message-ID: <347_1aTX21cd$GA.96@forums.sybase.com>
References: <347_A3NwY6ad$GA.327@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:28838
Article PK: 154722

Try this
 
Factory factory = FactoryHelper.narrow(session.lookup("Foo/Bar"));

Dave Wolf
Internet Applications Division
 
<=one way=> <OneWay_111@yahoo.com> wrote in message news:A3NwY6ad$GA.327@forums.sybase.com...
A call to a PB component in EAS35 from Java client results in the java.lang.ClassCastException.
CORBA22 stubs for PB comp.
 
TIA.
 
----------------------------------------------------------------------------
OUTPUT:
starting TestClient
 
---->Session created.
java.lang.ClassCastException: com.sybase.CORBA.ObjectRef
java.lang.ClassCastException: com.sybase.CORBA.ObjectRef
        at test.TestClient.main(TestClient.java:38)
 
----------------------------------------------------------------------------
CODE:
  try { 
   java.util.Properties props = new java.util.Properties();
   props.put("org.omg.CORBA.ORBClass", "com.sybase.CORBA.ORB");
   ORB orb = ORB.init((String[]) null, props);
 
   String ior = "iiop://somehost:9000";
   Manager manager = ManagerHelper.narrow(orb.string_to_object(ior));
 
   Session session = manager.createSession("jagadmin", "");
  System.out.println("---->Session created.");  
 
// the following line results in the exception
   Factory factory = (Factory) session.lookup("Test/testComp");
  System.out.println("---->Factory created.");
 
   Test.testComp t = (Test.testComp) Test.testCompHelper.narrow(factory.create());
  System.out.println("---->CoreAPI created.");
 
   String rs = t.returnok();
   System.out.println("Return OK called. RS=" + rs);
 
  } catch( Exception ex) {
   System.out.println(ex.toString());
   ex.printStackTrace();
  }
 }
 


<=one way=> Posted on 2000-02-15 03:09:23.0Z
Newsgroups: sybase.public.easerver
From: "<=one way=>" <OneWay_111@yahoo.com>
Subject: Re: Java -> EAS35 PB comp -> java.lang.ClassCastException
Date: Mon, 14 Feb 2000 22:09:23 -0500
Lines: 200
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----=_NextPart_000_0014_01BF7738.26B60440"
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2014.211
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211
NNTP-Posting-Host: oppenheimer163.oppenheimerfunds.com 216.44.5.163
Message-ID: <347_mITp6Cdd$GA.96@forums.sybase.com>
References: <347_A3NwY6ad$GA.327@forums.sybase.com> <347_1aTX21cd$GA.96@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:28837
Article PK: 161218

Thanks. It worked. EAS docs may need to be updated ...
 
Dave Wolf [Sybase] <dwolf@sybase.com> wrote in message news:1aTX21cd$GA.96@forums.sybase.com...
Try this
 
Factory factory = FactoryHelper.narrow(session.lookup("Foo/Bar"));

Dave Wolf
Internet Applications Division
 
<=one way=> <OneWay_111@yahoo.com> wrote in message news:A3NwY6ad$GA.327@forums.sybase.com...
A call to a PB component in EAS35 from Java client results in the java.lang.ClassCastException.
CORBA22 stubs for PB comp.
 
TIA.
 
----------------------------------------------------------------------------
OUTPUT:
starting TestClient
 
---->Session created.
java.lang.ClassCastException: com.sybase.CORBA.ObjectRef
java.lang.ClassCastException: com.sybase.CORBA.ObjectRef
        at test.TestClient.main(TestClient.java:38)
 
----------------------------------------------------------------------------
CODE:
  try { 
   java.util.Properties props = new java.util.Properties();
   props.put("org.omg.CORBA.ORBClass", "com.sybase.CORBA.ORB");
   ORB orb = ORB.init((String[]) null, props);
 
   String ior = "iiop://somehost:9000";
   Manager manager = ManagerHelper.narrow(orb.string_to_object(ior));
 
   Session session = manager.createSession("jagadmin", "");
  System.out.println("---->Session created.");  
 
// the following line results in the exception
   Factory factory = (Factory) session.lookup("Test/testComp");
  System.out.println("---->Factory created.");
 
   Test.testComp t = (Test.testComp) Test.testCompHelper.narrow(factory.create());
  System.out.println("---->CoreAPI created.");
 
   String rs = t.returnok();
   System.out.println("Return OK called. RS=" + rs);
 
  } catch( Exception ex) {
   System.out.println(ex.toString());
   ex.printStackTrace();
  }
 }
 


Dave Wolf [Sybase] Posted on 2000-02-13 06:06:13.0Z
Newsgroups: sybase.public.easerver
From: "Dave Wolf [Sybase]" <dwolf@sybase.com>
Subject: Re: Java -> EAS35 PB comp -> java.lang.ClassCastException
Date: Sun, 13 Feb 2000 01:06:13 -0500
Lines: 224
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----=_NextPart_000_000B_01BF75BE.85995DC0"
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
NNTP-Posting-Host: PPPa34-ResaleDialinx8001-3R7202.saturn.bbn.com 4.54.149.31
Message-ID: <347_n5o4rjed$GA.223@forums.sybase.com>
References: <347_A3NwY6ad$GA.327@forums.sybase.com> <347_1aTX21cd$GA.96@forums.sybase.com> <347_mITp6Cdd$GA.96@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:28836
Article PK: 161219

Where does it show that?

Dave Wolf
Internet Applications Division
 
<=one way=> <OneWay_111@yahoo.com> wrote in message news:mITp6Cdd$GA.96@forums.sybase.com...
Thanks. It worked. EAS docs may need to be updated ...
 
Dave Wolf [Sybase] <dwolf@sybase.com> wrote in message news:1aTX21cd$GA.96@forums.sybase.com...
Try this
 
Factory factory = FactoryHelper.narrow(session.lookup("Foo/Bar"));

Dave Wolf
Internet Applications Division
 
<=one way=> <OneWay_111@yahoo.com> wrote in message news:A3NwY6ad$GA.327@forums.sybase.com...
A call to a PB component in EAS35 from Java client results in the java.lang.ClassCastException.
CORBA22 stubs for PB comp.
 
TIA.
 
----------------------------------------------------------------------------
OUTPUT:
starting TestClient
 
---->Session created.
java.lang.ClassCastException: com.sybase.CORBA.ObjectRef
java.lang.ClassCastException: com.sybase.CORBA.ObjectRef
        at test.TestClient.main(TestClient.java:38)
 
----------------------------------------------------------------------------
CODE:
  try { 
   java.util.Properties props = new java.util.Properties();
   props.put("org.omg.CORBA.ORBClass", "com.sybase.CORBA.ORB");
   ORB orb = ORB.init((String[]) null, props);
 
   String ior = "iiop://somehost:9000";
   Manager manager = ManagerHelper.narrow(orb.string_to_object(ior));
 
   Session session = manager.createSession("jagadmin", "");
  System.out.println("---->Session created.");  
 
// the following line results in the exception
   Factory factory = (Factory) session.lookup("Test/testComp");
  System.out.println("---->Factory created.");
 
   Test.testComp t = (Test.testComp) Test.testCompHelper.narrow(factory.create());
  System.out.println("---->CoreAPI created.");
 
   String rs = t.returnok();
   System.out.println("Return OK called. RS=" + rs);
 
  } catch( Exception ex) {
   System.out.println(ex.toString());
   ex.printStackTrace();
  }
 }
 


<=one way=> Posted on 2000-02-13 10:59:12.0Z
Newsgroups: sybase.public.easerver
From: "<=one way=>" <OneWay_111@yahoo.com>
Subject: Re: Java -> EAS35 PB comp -> java.lang.ClassCastException
Date: Sun, 13 Feb 2000 05:59:12 -0500
Lines: 272
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----=_NextPart_000_0009_01BF75E7.73A854D0"
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
NNTP-Posting-Host: ip23.an11-new-york4.ny.pub-ip.psi.net 38.26.22.23
Message-ID: <347_4enjNGhd$GA.223@forums.sybase.com>
References: <347_A3NwY6ad$GA.327@forums.sybase.com> <347_1aTX21cd$GA.96@forums.sybase.com> <347_mITp6Cdd$GA.96@forums.sybase.com> <347_n5o4rjed$GA.223@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:28835
Article PK: 161217

Jaguar Programmer's Guide
    Chapter 11
        Instantiating proxy instances
            Creating stub instances
                ....
                The code to call Session.lookup and Factory.create looks like this:
                    [ see the example following the above line]
 
Dave Wolf [Sybase] <dwolf@sybase.com> wrote in message news:n5o4rjed$GA.223@forums.sybase.com...
Where does it show that?

Dave Wolf
Internet Applications Division
 
<=one way=> <OneWay_111@yahoo.com> wrote in message news:mITp6Cdd$GA.96@forums.sybase.com...
Thanks. It worked. EAS docs may need to be updated ...
 
Dave Wolf [Sybase] <dwolf@sybase.com> wrote in message news:1aTX21cd$GA.96@forums.sybase.com...
Try this
 
Factory factory = FactoryHelper.narrow(session.lookup("Foo/Bar"));

Dave Wolf
Internet Applications Division
 
<=one way=> <OneWay_111@yahoo.com> wrote in message news:A3NwY6ad$GA.327@forums.sybase.com...
A call to a PB component in EAS35 from Java client results in the java.lang.ClassCastException.
CORBA22 stubs for PB comp.
 
TIA.
 
----------------------------------------------------------------------------
OUTPUT:
starting TestClient
 
---->Session created.
java.lang.ClassCastException: com.sybase.CORBA.ObjectRef
java.lang.ClassCastException: com.sybase.CORBA.ObjectRef
        at test.TestClient.main(TestClient.java:38)
 
----------------------------------------------------------------------------
CODE:
  try { 
   java.util.Properties props = new java.util.Properties();
   props.put("org.omg.CORBA.ORBClass", "com.sybase.CORBA.ORB");
   ORB orb = ORB.init((String[]) null, props);
 
   String ior = "iiop://somehost:9000";
   Manager manager = ManagerHelper.narrow(orb.string_to_object(ior));
 
   Session session = manager.createSession("jagadmin", "");
  System.out.println("---->Session created.");  
 
// the following line results in the exception
   Factory factory = (Factory) session.lookup("Test/testComp");
  System.out.println("---->Factory created.");
 
   Test.testComp t = (Test.testComp) Test.testCompHelper.narrow(factory.create());
  System.out.println("---->CoreAPI created.");
 
   String rs = t.returnok();
   System.out.println("Return OK called. RS=" + rs);
 
  } catch( Exception ex) {
   System.out.println(ex.toString());
   ex.printStackTrace();
  }
 }
 


Dave Wolf [Sybase] Posted on 2000-02-13 19:32:18.0Z
Newsgroups: sybase.public.easerver
From: "Dave Wolf [Sybase]" <dwolf@sybase.com>
Subject: Re: Java -> EAS35 PB comp -> java.lang.ClassCastException
Date: Sun, 13 Feb 2000 14:32:18 -0500
Lines: 302
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----=_NextPart_000_0027_01BF762F.2163C3B0"
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
NNTP-Posting-Host: 158.159.8.10
Message-ID: <347_kw7yGmld$GA.327@forums.sybase.com>
References: <347_A3NwY6ad$GA.327@forums.sybase.com> <347_1aTX21cd$GA.96@forums.sybase.com> <347_mITp6Cdd$GA.96@forums.sybase.com> <347_n5o4rjed$GA.223@forums.sybase.com> <347_4enjNGhd$GA.223@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:28823
Article PK: 161207

Do you have a support contract?  If so would you please open a doc bug.

Dave Wolf
Internet Applications Division
 
<=one way=> <OneWay_111@yahoo.com> wrote in message news:4enjNGhd$GA.223@forums.sybase.com...
Jaguar Programmer's Guide
    Chapter 11
        Instantiating proxy instances
            Creating stub instances
                ....
                The code to call Session.lookup and Factory.create looks like this:
                    [ see the example following the above line]
 
Dave Wolf [Sybase] <dwolf@sybase.com> wrote in message news:n5o4rjed$GA.223@forums.sybase.com...
Where does it show that?

Dave Wolf
Internet Applications Division
 
<=one way=> <OneWay_111@yahoo.com> wrote in message news:mITp6Cdd$GA.96@forums.sybase.com...
Thanks. It worked. EAS docs may need to be updated ...
 
Dave Wolf [Sybase] <dwolf@sybase.com> wrote in message news:1aTX21cd$GA.96@forums.sybase.com...
Try this
 
Factory factory = FactoryHelper.narrow(session.lookup("Foo/Bar"));

Dave Wolf
Internet Applications Division
 
<=one way=> <OneWay_111@yahoo.com> wrote in message news:A3NwY6ad$GA.327@forums.sybase.com...
A call to a PB component in EAS35 from Java client results in the java.lang.ClassCastException.
CORBA22 stubs for PB comp.
 
TIA.
 
----------------------------------------------------------------------------
OUTPUT:
starting TestClient
 
---->Session created.
java.lang.ClassCastException: com.sybase.CORBA.ObjectRef
java.lang.ClassCastException: com.sybase.CORBA.ObjectRef
        at test.TestClient.main(TestClient.java:38)
 
----------------------------------------------------------------------------
CODE:
  try { 
   java.util.Properties props = new java.util.Properties();
   props.put("org.omg.CORBA.ORBClass", "com.sybase.CORBA.ORB");
   ORB orb = ORB.init((String[]) null, props);
 
   String ior = "iiop://somehost:9000";
   Manager manager = ManagerHelper.narrow(orb.string_to_object(ior));
 
   Session session = manager.createSession("jagadmin", "");
  System.out.println("---->Session created.");  
 
// the following line results in the exception
   Factory factory = (Factory) session.lookup("Test/testComp");
  System.out.println("---->Factory created.");
 
   Test.testComp t = (Test.testComp) Test.testCompHelper.narrow(factory.create());
  System.out.println("---->CoreAPI created.");
 
   String rs = t.returnok();
   System.out.println("Return OK called. RS=" + rs);
 
  } catch( Exception ex) {
   System.out.println(ex.toString());
   ex.printStackTrace();
  }
 }