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.

ClassCastException

6 posts in EJB Client Last posting was on 2003-09-30 10:12:20.0Z
Sergio Santos Posted on 2003-09-26 06:49:17.0Z
Message-ID: <3F73E003.6010306@gematic.es>
From: Sergio Santos <ssantos@gematic.es>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.0.1) Gecko/20020823 Netscape/7.0
X-Accept-Language: es-es, es
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.ejbclient
Subject: ClassCastException
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Original-NNTP-Posting-Host: 213.229.150.170
X-Original-Trace: 25 Sep 2003 23:51:52 -0700, 213.229.150.170
Lines: 25
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 25 Sep 2003 23:44:54 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 25 Sep 2003 23:49:17 -0700
X-Trace: forums-1-dub 1064558957 10.22.108.75 (25 Sep 2003 23:49:17 -0700)
X-Original-Trace: 25 Sep 2003 23:49:17 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:156
Article PK: 424347

Hi,

I want to connect from PB9 to Weblogic server 6.1, with EJB client. This
is the code source:

i_TraderHome =
i_ejbconn.lookup("TraderHome","statelessSession/TraderHome","examples.ejb.basic.statelessSession.TraderHome")

and the error message is:

Exception raised: Failed to lookup the EJB home interface:
examples.ejb.basic.statelessSession.TraderHome
java.lang.ClassCastException

I'm using the jdk131. I've seen the vm.out file and looks that EJB is
Loaded:

[Loaded examples.ejb.basic.statelessSession.TraderHome]
[Loaded javax.ejb.EJBHome]
[Loaded java.lang.ClassCastException from C:\bea\jdk131\jre\lib\rt.jar]

Could anybody help me?

Thanks.


Jim O'Neil [Sybase] Posted on 2003-09-26 14:45:24.0Z
From: joneil@sybase.com (Jim O'Neil [Sybase])
Newsgroups: sybase.public.powerbuilder.ejbclient
Subject: Re: ClassCastException
Organization: Sybase Technical Support
Reply-To: joneil_REMOVETHISPART@sybase.com
Message-ID: <3f744f8d.3684137@forums.sybase.com>
References: <3F73E003.6010306@gematic.es>
X-Newsreader: Forte Free Agent 1.21/32.243
NNTP-Posting-Host: joneilpc.sybase.com
X-Original-NNTP-Posting-Host: joneilpc.sybase.com
Date: 26 Sep 2003 07:45:24 -0700
X-Trace: forums-1-dub 1064587524 204.167.42.59 (26 Sep 2003 07:45:24 -0700)
X-Original-Trace: 26 Sep 2003 07:45:24 -0700, joneilpc.sybase.com
Lines: 39
X-Authenticated-User: TeamPS
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:157
Article PK: 424350

is statelessSession/TraderHome the JNDI name of your EJB. The class
cast exception will occur if the underlying look up fails. It's not
typical WebLogic name. Something like Trader would make more sense,
or if you are using the samples with WebLogic, it's something 'long'
like ejb20_trader_....

On 25 Sep 2003 23:49:17 -0700, Sergio Santos <ssantos@gematic.es>

wrote:

>Hi,
>
>I want to connect from PB9 to Weblogic server 6.1, with EJB client. This
>is the code source:
>
>i_TraderHome =
>i_ejbconn.lookup("TraderHome","statelessSession/TraderHome","examples.ejb.basic.statelessSession.TraderHome")
>
>and the error message is:
>
>Exception raised: Failed to lookup the EJB home interface:
>examples.ejb.basic.statelessSession.TraderHome
>java.lang.ClassCastException
>
>I'm using the jdk131. I've seen the vm.out file and looks that EJB is
>Loaded:
>
>[Loaded examples.ejb.basic.statelessSession.TraderHome]
>[Loaded javax.ejb.EJBHome]
>[Loaded java.lang.ClassCastException from C:\bea\jdk131\jre\lib\rt.jar]
>
>Could anybody help me?
>
>Thanks.
>

Jim O'Neil
Principal Technical Support Engineer
Sybase, Inc.
Concord, MA


Sergio Santos Posted on 2003-09-26 16:37:36.0Z
Message-ID: <3F7469F3.7040708@gematic.es>
From: Sergio Santos <ssantos@gematic.es>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.0.1) Gecko/20020823 Netscape/7.0
X-Accept-Language: es-es, es
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.ejbclient
Subject: Re: ClassCastException
References: <3F73E003.6010306@gematic.es> <3f744f8d.3684137@forums.sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
X-Original-NNTP-Posting-Host: 213.229.150.170
X-Original-Trace: 26 Sep 2003 09:40:14 -0700, 213.229.150.170
Lines: 49
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 26 Sep 2003 09:33:11 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 26 Sep 2003 09:37:36 -0700
X-Trace: forums-1-dub 1064594256 10.22.108.75 (26 Sep 2003 09:37:36 -0700)
X-Original-Trace: 26 Sep 2003 09:37:36 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:158
Article PK: 424351

Hi,

I've renamed the JNDI name by Trader and get the same error.
Any idea? I'm using Weblogic 6.1.


Jim O'Neil [Sybase] escribió:

> is statelessSession/TraderHome the JNDI name of your EJB. The class
> cast exception will occur if the underlying look up fails. It's not
> typical WebLogic name. Something like Trader would make more sense,
> or if you are using the samples with WebLogic, it's something 'long'
> like ejb20_trader_....
>
> On 25 Sep 2003 23:49:17 -0700, Sergio Santos <ssantos@gematic.es>
> wrote:
>
>
>>Hi,
>>
>>I want to connect from PB9 to Weblogic server 6.1, with EJB client. This
>>is the code source:
>>
>>i_TraderHome =
>>i_ejbconn.lookup("TraderHome","statelessSession/TraderHome","examples.ejb.basic.statelessSession.TraderHome")
>>
>>and the error message is:
>>
>>Exception raised: Failed to lookup the EJB home interface:
>>examples.ejb.basic.statelessSession.TraderHome
>>java.lang.ClassCastException
>>
>>I'm using the jdk131. I've seen the vm.out file and looks that EJB is
>>Loaded:
>>
>>[Loaded examples.ejb.basic.statelessSession.TraderHome]
>>[Loaded javax.ejb.EJBHome]
>>[Loaded java.lang.ClassCastException from C:\bea\jdk131\jre\lib\rt.jar]
>>
>>Could anybody help me?
>>
>>Thanks.
>>
>
>
> Jim O'Neil
> Principal Technical Support Engineer
> Sybase, Inc.
> Concord, MA


Jim O'Neil [Sybase] Posted on 2003-09-26 21:49:55.0Z
From: joneil@sybase.com (Jim O'Neil [Sybase])
Newsgroups: sybase.public.powerbuilder.ejbclient
Subject: Re: ClassCastException
Organization: Sybase Technical Support
Reply-To: joneil_REMOVETHISPART@sybase.com
Message-ID: <3f74b354.6760160@forums.sybase.com>
References: <3F73E003.6010306@gematic.es> <3f744f8d.3684137@forums.sybase.com> <3F7469F3.7040708@gematic.es>
X-Newsreader: Forte Free Agent 1.21/32.243
NNTP-Posting-Host: vpn-concord-045.sybase.com
X-Original-NNTP-Posting-Host: vpn-concord-045.sybase.com
Date: 26 Sep 2003 14:49:55 -0700
X-Trace: forums-1-dub 1064612995 158.159.8.45 (26 Sep 2003 14:49:55 -0700)
X-Original-Trace: 26 Sep 2003 14:49:55 -0700, vpn-concord-045.sybase.com
Lines: 61
X-Authenticated-User: TeamPS
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:159
Article PK: 424352

and changed your lookup code? Can you confirm a Java client can
lookup the bean using the same argument as you provide to the
EJBConnection object's lookup method.

On 26 Sep 2003 09:37:36 -0700, Sergio Santos <ssantos@gematic.es>

wrote:

>Hi,
>
> I've renamed the JNDI name by Trader and get the same error.
> Any idea? I'm using Weblogic 6.1.
>
>
>Jim O'Neil [Sybase] escribió:
>> is statelessSession/TraderHome the JNDI name of your EJB. The class
>> cast exception will occur if the underlying look up fails. It's not
>> typical WebLogic name. Something like Trader would make more sense,
>> or if you are using the samples with WebLogic, it's something 'long'
>> like ejb20_trader_....
>>
>> On 25 Sep 2003 23:49:17 -0700, Sergio Santos <ssantos@gematic.es>
>> wrote:
>>
>>
>>>Hi,
>>>
>>>I want to connect from PB9 to Weblogic server 6.1, with EJB client. This
>>>is the code source:
>>>
>>>i_TraderHome =
>>>i_ejbconn.lookup("TraderHome","statelessSession/TraderHome","examples.ejb.basic.statelessSession.TraderHome")
>>>
>>>and the error message is:
>>>
>>>Exception raised: Failed to lookup the EJB home interface:
>>>examples.ejb.basic.statelessSession.TraderHome
>>>java.lang.ClassCastException
>>>
>>>I'm using the jdk131. I've seen the vm.out file and looks that EJB is
>>>Loaded:
>>>
>>>[Loaded examples.ejb.basic.statelessSession.TraderHome]
>>>[Loaded javax.ejb.EJBHome]
>>>[Loaded java.lang.ClassCastException from C:\bea\jdk131\jre\lib\rt.jar]
>>>
>>>Could anybody help me?
>>>
>>>Thanks.
>>>
>>
>>
>> Jim O'Neil
>> Principal Technical Support Engineer
>> Sybase, Inc.
>> Concord, MA
>

Jim O'Neil
Principal Technical Support Engineer
Sybase, Inc.
Concord, MA


Sergio Santos Posted on 2003-09-30 09:40:05.0Z
Message-ID: <3F794DE9.2000400@gematic.es>
From: Sergio Santos <ssantos@gematic.es>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.0.1) Gecko/20020823 Netscape/7.0
X-Accept-Language: es-es, es
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.ejbclient
Subject: Re: ClassCastException
References: <3F73E003.6010306@gematic.es> <3f744f8d.3684137@forums.sybase.com> <3F7469F3.7040708@gematic.es> <3f74b354.6760160@forums.sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
X-Original-NNTP-Posting-Host: 213.229.150.170
X-Original-Trace: 30 Sep 2003 02:42:56 -0700, 213.229.150.170
Lines: 83
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 30 Sep 2003 02:35:19 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 30 Sep 2003 02:40:05 -0700
X-Trace: forums-1-dub 1064914805 10.22.108.75 (30 Sep 2003 02:40:05 -0700)
X-Original-Trace: 30 Sep 2003 02:40:05 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:160
Article PK: 424353

Hi Jim,

I've a Java client that executes this code:

Context ctx ;
ctx = getInitialContext();
TraderHome dHome = (TraderHome) ctx.lookup("Trader");
Trader ejbBD = dHome.create();


and the result is success. All the EJB's that I test give me the same
error (ClassCastException).
I don't know where is the problem.

Thanks,


Jim O'Neil [Sybase] escribió:

> and changed your lookup code? Can you confirm a Java client can
> lookup the bean using the same argument as you provide to the
> EJBConnection object's lookup method.
>
> On 26 Sep 2003 09:37:36 -0700, Sergio Santos <ssantos@gematic.es>
> wrote:
>
>
>>Hi,
>>
>> I've renamed the JNDI name by Trader and get the same error.
>> Any idea? I'm using Weblogic 6.1.
>>
>>
>>Jim O'Neil [Sybase] escribió:
>>
>>>is statelessSession/TraderHome the JNDI name of your EJB. The class
>>>cast exception will occur if the underlying look up fails. It's not
>>>typical WebLogic name. Something like Trader would make more sense,
>>>or if you are using the samples with WebLogic, it's something 'long'
>>>like ejb20_trader_....
>>>
>>>On 25 Sep 2003 23:49:17 -0700, Sergio Santos <ssantos@gematic.es>
>>>wrote:
>>>
>>>
>>>
>>>>Hi,
>>>>
>>>>I want to connect from PB9 to Weblogic server 6.1, with EJB client. This
>>>>is the code source:
>>>>
>>>>i_TraderHome =
>>>>i_ejbconn.lookup("TraderHome","statelessSession/TraderHome","examples.ejb.basic.statelessSession.TraderHome")
>>>>
>>>>and the error message is:
>>>>
>>>>Exception raised: Failed to lookup the EJB home interface:
>>>>examples.ejb.basic.statelessSession.TraderHome
>>>>java.lang.ClassCastException
>>>>
>>>>I'm using the jdk131. I've seen the vm.out file and looks that EJB is
>>>>Loaded:
>>>>
>>>>[Loaded examples.ejb.basic.statelessSession.TraderHome]
>>>>[Loaded javax.ejb.EJBHome]
>>>>[Loaded java.lang.ClassCastException from C:\bea\jdk131\jre\lib\rt.jar]
>>>>
>>>>Could anybody help me?
>>>>
>>>>Thanks.
>>>>
>>>
>>>
>>>Jim O'Neil
>>>Principal Technical Support Engineer
>>>Sybase, Inc.
>>>Concord, MA
>>
>
> Jim O'Neil
> Principal Technical Support Engineer
> Sybase, Inc.
> Concord, MA


Sergio Santos Posted on 2003-09-30 10:12:20.0Z
Message-ID: <3F795589.7010807@gematic.es>
From: Sergio Santos <ssantos@gematic.es>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.0.1) Gecko/20020823 Netscape/7.0
X-Accept-Language: es-es, es
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.ejbclient
Subject: Re: ClassCastException
References: <3F73E003.6010306@gematic.es> <3f744f8d.3684137@forums.sybase.com> <3F7469F3.7040708@gematic.es> <3f74b354.6760160@forums.sybase.com> <3F794DE9.2000400@gematic.es>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
NNTP-Posting-Host: 213.229.150.170
X-Original-NNTP-Posting-Host: 213.229.150.170
Date: 30 Sep 2003 03:12:20 -0700
X-Trace: forums-1-dub 1064916740 213.229.150.170 (30 Sep 2003 03:12:20 -0700)
X-Original-Trace: 30 Sep 2003 03:12:20 -0700, 213.229.150.170
Lines: 111
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:161
Article PK: 424354

Hello again,

I know the problem. This is the old source code:

ls_props[1]="javax.naming.Context.INITIAL_CONTEXT_FACTORY=weblogic.jndi.WLInitialContextFactory"
ls_props[2]="javax.naming.Context.PROVIDER_URL=iiop://dess-12:7001"

and the successfull code:

ls_props[1]="javax.naming.Context.INITIAL_CONTEXT_FACTORY=weblogic.jndi.T3InitialContextFactory"
ls_props[2]="javax.naming.Context.PROVIDER_URL=t3://dess-12:7001"

I've changed the INITIAL_CONTEXT_FACTORY and the PROVIDER_URL:

WLInitialContextFactory -> T3InitialContextFactory
iiop -> t3


Thanks,


Sergio Santos escribió:

> Hi Jim,
>
> I've a Java client that executes this code:
>
> Context ctx ;
> ctx = getInitialContext();
> TraderHome dHome = (TraderHome) ctx.lookup("Trader");
> Trader ejbBD = dHome.create();
>
>
> and the result is success. All the EJB's that I test give me the same
> error (ClassCastException).
> I don't know where is the problem.
>
> Thanks,
>
>
> Jim O'Neil [Sybase] escribió:
>
>> and changed your lookup code? Can you confirm a Java client can
>> lookup the bean using the same argument as you provide to the
>> EJBConnection object's lookup method.
>>
>> On 26 Sep 2003 09:37:36 -0700, Sergio Santos <ssantos@gematic.es>
>> wrote:
>>
>>
>>> Hi,
>>>
>>> I've renamed the JNDI name by Trader and get the same error.
>>> Any idea? I'm using Weblogic 6.1.
>>>
>>>
>>> Jim O'Neil [Sybase] escribió:
>>>
>>>> is statelessSession/TraderHome the JNDI name of your EJB. The class
>>>> cast exception will occur if the underlying look up fails. It's not
>>>> typical WebLogic name. Something like Trader would make more sense,
>>>> or if you are using the samples with WebLogic, it's something 'long'
>>>> like ejb20_trader_....
>>>>
>>>> On 25 Sep 2003 23:49:17 -0700, Sergio Santos <ssantos@gematic.es>
>>>> wrote:
>>>>
>>>>
>>>>
>>>>> Hi,
>>>>>
>>>>> I want to connect from PB9 to Weblogic server 6.1, with EJB client.
>>>>> This is the code source:
>>>>>
>>>>> i_TraderHome =
>>>>> i_ejbconn.lookup("TraderHome","statelessSession/TraderHome","examples.ejb.basic.statelessSession.TraderHome")
>>>>>
>>>>>
>>>>> and the error message is:
>>>>>
>>>>> Exception raised: Failed to lookup the EJB home interface:
>>>>> examples.ejb.basic.statelessSession.TraderHome
>>>>> java.lang.ClassCastException
>>>>>
>>>>> I'm using the jdk131. I've seen the vm.out file and looks that EJB
>>>>> is Loaded:
>>>>>
>>>>> [Loaded examples.ejb.basic.statelessSession.TraderHome]
>>>>> [Loaded javax.ejb.EJBHome]
>>>>> [Loaded java.lang.ClassCastException from
>>>>> C:\bea\jdk131\jre\lib\rt.jar]
>>>>>
>>>>> Could anybody help me?
>>>>>
>>>>> Thanks.
>>>>>
>>>>
>>>>
>>>> Jim O'Neil
>>>> Principal Technical Support Engineer
>>>> Sybase, Inc.
>>>> Concord, MA
>>>
>>>
>>
>> Jim O'Neil
>> Principal Technical Support Engineer
>> Sybase, Inc.
>> Concord, MA
>
>