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.

PB cannot find existing proxy object

7 posts in EJB Client Last posting was on 2007-11-01 19:02:19.0Z
toad Posted on 2007-10-25 19:52:50.0Z
From: toad <strakats@verizon.net>
Newsgroups: sybase.public.powerbuilder.ejbclient
Subject: PB cannot find existing proxy object
Date: Thu, 25 Oct 2007 19:52:50 -0000
Organization: http://groups.google.com
Lines: 13
Message-ID: <1193341970.533034.125750@y42g2000hsy.googlegroups.com>
NNTP-Posting-Host: 65.170.41.5
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
X-Trace: posting.google.com 1193341970 11709 127.0.0.1 (25 Oct 2007 19:52:50 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 25 Oct 2007 19:52:50 +0000 (UTC)
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322),gzip(gfe),gzip(gfe)
X-HTTP-Via: 1.1 ics_server.swacorp.com (ICS 2.3.0.0.16)
Complaints-To: groups-abuse@google.com
Injection-Info: y42g2000hsy.googlegroups.com; posting-host=65.170.41.5; posting-account=ps2QrAMAAAA6_jCuRt2JEIpn5Otqf_w0
Path: forums-1-dub!forums-master!newswest.sybase.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!y42g2000hsy.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:768
Article PK: 424867

Hello,

I'm using PB 10.5.1 & JRE 1.5. Even though the proxy class "Header"
exists in the list of PB generated proxys, I am getting the following
java exception error within PB:

"Failed to find the proxy to represent the java class: Header."

Any suggestions?

Thanks,
Doug


Gokhan Demir Posted on 2007-10-26 09:13:05.0Z
From: Gokhan Demir <gokhan.demir@igonline.biz>
User-Agent: Thunderbird 2.0.0.6 (Windows/20070728)
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.ejbclient
Subject: Re: PB cannot find existing proxy object
References: <1193341970.533034.125750@y42g2000hsy.googlegroups.com>
In-Reply-To: <1193341970.533034.125750@y42g2000hsy.googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-9; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: mail.it.gen.tr
X-Original-NNTP-Posting-Host: mail.it.gen.tr
Message-ID: <4721afa1$2@forums-1-dub>
Date: 26 Oct 2007 02:13:05 -0700
X-Trace: forums-1-dub 1193389985 85.105.196.163 (26 Oct 2007 02:13:05 -0700)
X-Original-Trace: 26 Oct 2007 02:13:05 -0700, mail.it.gen.tr
Lines: 29
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:769
Article PK: 424868

Hmm I never had sthg like this. At which point do you see this
exception? Can you send your code block? Also the exported library entry
for your java class?

Some things that come to my mind includes (all to be read as maybe):
. a possible typo in the createJavaInstance method call
. wrong pbl list
. generated proxy object does not compile
. your java class does not have an empty constructor

Hth,
Gokhan

toad wrote:
> Hello,
>
> I'm using PB 10.5.1 & JRE 1.5. Even though the proxy class "Header"
> exists in the list of PB generated proxys, I am getting the following
> java exception error within PB:
>
> "Failed to find the proxy to represent the java class: Header."
>
> Any suggestions?
>
> Thanks,
> Doug
>


toad Posted on 2007-10-26 15:33:36.0Z
From: toad <strakats@verizon.net>
Newsgroups: sybase.public.powerbuilder.ejbclient
Subject: Re: PB cannot find existing proxy object
Date: Fri, 26 Oct 2007 08:33:36 -0700
Organization: http://groups.google.com
Lines: 106
Message-ID: <1193412816.555276.78800@o3g2000hsb.googlegroups.com>
References: <1193341970.533034.125750@y42g2000hsy.googlegroups.com> <4721afa1$2@forums-1-dub>
NNTP-Posting-Host: 65.170.41.5
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
X-Trace: posting.google.com 1193412816 21117 127.0.0.1 (26 Oct 2007 15:33:36 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Fri, 26 Oct 2007 15:33:36 +0000 (UTC)
In-Reply-To: <4721afa1$2@forums-1-dub>
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322),gzip(gfe),gzip(gfe)
X-HTTP-Via: 1.1 ics_server.swacorp.com (ICS 2.3.0.0.16)
Complaints-To: groups-abuse@google.com
Injection-Info: o3g2000hsb.googlegroups.com; posting-host=65.170.41.5; posting-account=ps2QrAMAAAA6_jCuRt2JEIpn5Otqf_w0
Path: forums-1-dub!forums-master!newswest.sybase.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!o3g2000hsb.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:770
Article PK: 424869

> > "Failed to find the proxy to represent the java class: Header."

The PB code calls a java method (HashTest.getHashtable) that returns a
Hashtable which contains the object "Header". Calling the method
Hashtable.containskey("RESPONSE.HEADER") returns "true" but calling
the method Hashtable.get("RESPONSE.HEADER") results in the java
exception.

PB code:
=======
Hashtable i_Hashtable
HashTest i_HashTest
Header i_Header
any i_any

i_JavaVM = CREATE JavaVM
i_JavaVM.createJavaVM( "OSSClient.jar;corbaconn.jar;swalog4j.jar",
TRUE )
i_JavaVM.createJavaInstance(i_Hashtable, "Hashtable" )
i_JavaVM.createJavaInstance(i_HashTest, "HashTest" )
i_JavaVM.createJavaInstance(i_Header, "Header" )

try

i_Hashtable = i_HashTest.getHashtable()

messagebox("Hashtable",string(i_Hashtable.containskey("RESPONSE.HEADER")))
i_any = i_Hashtable.get("RESPONSE.HEADER")

catch (Throwable t)
messagebox("Exception Error", t.getmessage())
end try

Exported proxy for HashTest:
=====================

$PBExportHeader$hashtest.srx
$PBExportComments$Proxy imported from EJB through EJB Proxy generator.
global type HashTest from nonvisualobject
end type

type variables
protected:
string HashTest_javaname= "HashTest"
end variables

forward prototypes
public:
subroutine HashTest() alias for "<init>,()V"
subroutine dummyHeader( Header Header_1) alias for "dummyHeader,
(LHeader;)V"
subroutine dummyRoute( Route Route_1) alias for "dummyRoute,
(LRoute;)V"
subroutine dummySegment( Segment Segment_1) alias for "dummySegment,
(LSegment;)V"
function HashTest getHashTest() alias for "getHashTest,()LHashTest;"
function Hashtable getHashtable() alias for "getHashtable,()Ljava/
util/Hashtable;"
function Hashtable getHashtable2() alias for "getHashtable2,()Ljava/
util/Hashtable;"
function string getMyName() alias for "getMyName,()Ljava/lang/
String;"
subroutine main( string string_1[]) alias for "main,([Ljava/lang/
String;)V"
subroutine printHashtable( Hashtable Hashtable_1) alias for
"printHashtable,(Ljava/util/Hashtable;)V"
end prototypes


Exported proxy for Header:
====================

$PBExportHeader$header.srx
$PBExportComments$Proxy imported from EJB through EJB Proxy generator.
global type Header from nonvisualobject
end type

type variables
protected:
string Header_javaname= "Header"
end variables

forward prototypes
public:
subroutine Header() alias for "<init>,()V"
function string getDestination() alias for "getDestination,()Ljava/
lang/String;"
function string getNumOfRoute() alias for "getNumOfRoute,()Ljava/lang/
String;"
function string getOrigin() alias for "getOrigin,()Ljava/lang/
String;"
function string getRequestid() alias for "getRequestid,()Ljava/lang/
String;"
subroutine setDestination( string string_1) alias for
"setDestination,(Ljava/lang/String;)V"
subroutine setNumOfRoute( string string_1) alias for "setNumOfRoute,
(Ljava/lang/String;)V"
subroutine setOrigin( string string_1) alias for "setOrigin,(Ljava/
lang/String;)V"
subroutine setRequestid( string string_1) alias for "setRequestid,
(Ljava/lang/String;)V"
end prototypes

Thanks for you time!!!!


Gokhan Demir Posted on 2007-10-27 14:11:51.0Z
From: Gokhan Demir <gokhan.demir@igonline.biz>
User-Agent: Thunderbird 2.0.0.6 (Windows/20070728)
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.ejbclient
Subject: Re: PB cannot find existing proxy object
References: <1193341970.533034.125750@y42g2000hsy.googlegroups.com> <4721afa1$2@forums-1-dub> <1193412816.555276.78800@o3g2000hsb.googlegroups.com>
In-Reply-To: <1193412816.555276.78800@o3g2000hsb.googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-9; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: mail.it.gen.tr
X-Original-NNTP-Posting-Host: mail.it.gen.tr
Message-ID: <47234727$1@forums-1-dub>
Date: 27 Oct 2007 07:11:51 -0700
X-Trace: forums-1-dub 1193494311 85.105.196.163 (27 Oct 2007 07:11:51 -0700)
X-Original-Trace: 27 Oct 2007 07:11:51 -0700, mail.it.gen.tr
Lines: 167
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:771
Article PK: 424870

In my opinion, your code would be working well under normal conditions.
Anyway, I have some notes:

1) you have to give the full path of your java class to the
createJavaInstance method (i.e. not "Hashtable", but
"java.lang.Hashtable").

2) in your code, there is no need to call createJavaInstance for
Hashtable and for Header classes.

3) It is always a good practice to check the return value of the
createJavaInstance method, since, instead of throwing an exception, this
method just returns a long to indicate its success/failure status.

4) I am thinking loudly. From the exception text, I assume that
i_Hashtable.get("RESPONSE.HEADER") does not return a null. So what can
it be? Here what comes to my mind (again these should be read as maybe):

a) double check the PBL holding the proxy for Header class is in your
PBL library search list.

b) Regenerate the proxy for your java classes. Empty the PBL holding
your proxy objects to make sure you have an up-to-date proxy object for
your java classes.

c) Be sure you are using the same jar files (all) when generating
proxies and when running your application. That way you eliminate the
risk of not finding java classes that Header java class depends.

If these does not make any difference:

d) (here I go paranoiac) the class Header does not have a java package,
and it is kinda generic name. Can it be that its somewhat generic name
is fooling Powerbuilder? You can try refactoring this Header class, and
move it to a java package and change its name to for instance Headerx :)

e) I have seen cases where certain Powerbuilder builds behave
differently. For example pb 9.0.2 build 7534 can return the exception
text from a java class, but 9.0.3 latest build cannot. I would take my
time and try the same code with a different pb build to see if it is a
pb bug. Trying with pb 9, 10 or 11 would be nice too. If you can see
your code runs under any of these versions, you can consider opening a
support case with Sybase.

f) Make an executable of your application and try with the executable as
well to see if you get the same exception. If it works in executable but
does not work in dvlp environment, open a support case with Sybase.

One final note:

g) If your java code were running on an app server (so, a different jvm)
then it would be that the returned serialized java class uid mismatch
with what class is available in your client side classpath. However from
your code, I can surely tell that this is not the case for you.

That's all I can imagine.

Regards,
Gokhan Demir

toad wrote:
>>> "Failed to find the proxy to represent the java class: Header."
>
> The PB code calls a java method (HashTest.getHashtable) that returns a
> Hashtable which contains the object "Header". Calling the method
> Hashtable.containskey("RESPONSE.HEADER") returns "true" but calling
> the method Hashtable.get("RESPONSE.HEADER") results in the java
> exception.
>
> PB code:
> =======
> Hashtable i_Hashtable
> HashTest i_HashTest
> Header i_Header
> any i_any
>
> i_JavaVM = CREATE JavaVM
> i_JavaVM.createJavaVM( "OSSClient.jar;corbaconn.jar;swalog4j.jar",
> TRUE )
> i_JavaVM.createJavaInstance(i_Hashtable, "Hashtable" )
> i_JavaVM.createJavaInstance(i_HashTest, "HashTest" )
> i_JavaVM.createJavaInstance(i_Header, "Header" )
>
> try
>
> i_Hashtable = i_HashTest.getHashtable()
>
> messagebox("Hashtable",string(i_Hashtable.containskey("RESPONSE.HEADER")))
> i_any = i_Hashtable.get("RESPONSE.HEADER")
>
> catch (Throwable t)
> messagebox("Exception Error", t.getmessage())
> end try
>
> Exported proxy for HashTest:
> =====================
>
> $PBExportHeader$hashtest.srx
> $PBExportComments$Proxy imported from EJB through EJB Proxy generator.
> global type HashTest from nonvisualobject
> end type
>
> type variables
> protected:
> string HashTest_javaname= "HashTest"
> end variables
>
> forward prototypes
> public:
> subroutine HashTest() alias for "<init>,()V"
> subroutine dummyHeader( Header Header_1) alias for "dummyHeader,
> (LHeader;)V"
> subroutine dummyRoute( Route Route_1) alias for "dummyRoute,
> (LRoute;)V"
> subroutine dummySegment( Segment Segment_1) alias for "dummySegment,
> (LSegment;)V"
> function HashTest getHashTest() alias for "getHashTest,()LHashTest;"
> function Hashtable getHashtable() alias for "getHashtable,()Ljava/
> util/Hashtable;"
> function Hashtable getHashtable2() alias for "getHashtable2,()Ljava/
> util/Hashtable;"
> function string getMyName() alias for "getMyName,()Ljava/lang/
> String;"
> subroutine main( string string_1[]) alias for "main,([Ljava/lang/
> String;)V"
> subroutine printHashtable( Hashtable Hashtable_1) alias for
> "printHashtable,(Ljava/util/Hashtable;)V"
> end prototypes
>
>
> Exported proxy for Header:
> ====================
>
> $PBExportHeader$header.srx
> $PBExportComments$Proxy imported from EJB through EJB Proxy generator.
> global type Header from nonvisualobject
> end type
>
> type variables
> protected:
> string Header_javaname= "Header"
> end variables
>
> forward prototypes
> public:
> subroutine Header() alias for "<init>,()V"
> function string getDestination() alias for "getDestination,()Ljava/
> lang/String;"
> function string getNumOfRoute() alias for "getNumOfRoute,()Ljava/lang/
> String;"
> function string getOrigin() alias for "getOrigin,()Ljava/lang/
> String;"
> function string getRequestid() alias for "getRequestid,()Ljava/lang/
> String;"
> subroutine setDestination( string string_1) alias for
> "setDestination,(Ljava/lang/String;)V"
> subroutine setNumOfRoute( string string_1) alias for "setNumOfRoute,
> (Ljava/lang/String;)V"
> subroutine setOrigin( string string_1) alias for "setOrigin,(Ljava/
> lang/String;)V"
> subroutine setRequestid( string string_1) alias for "setRequestid,
> (Ljava/lang/String;)V"
> end prototypes
>
> Thanks for you time!!!!
>
>


toad Posted on 2007-10-29 20:31:36.0Z
From: toad <strakats@verizon.net>
Newsgroups: sybase.public.powerbuilder.ejbclient
Subject: Re: PB cannot find existing proxy object
Date: Mon, 29 Oct 2007 13:31:36 -0700
Organization: http://groups.google.com
Lines: 7
Message-ID: <1193689896.351815.187990@22g2000hsm.googlegroups.com>
References: <1193341970.533034.125750@y42g2000hsy.googlegroups.com> <4721afa1$2@forums-1-dub> <1193412816.555276.78800@o3g2000hsb.googlegroups.com> <47234727$1@forums-1-dub>
NNTP-Posting-Host: 65.170.41.5
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
X-Trace: posting.google.com 1193689896 25694 127.0.0.1 (29 Oct 2007 20:31:36 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Mon, 29 Oct 2007 20:31:36 +0000 (UTC)
In-Reply-To: <47234727$1@forums-1-dub>
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322),gzip(gfe),gzip(gfe)
X-HTTP-Via: 1.1 ics_server.swacorp.com (ICS 2.3.0.0.16)
Complaints-To: groups-abuse@google.com
Injection-Info: 22g2000hsm.googlegroups.com; posting-host=65.170.41.5; posting-account=ps2QrAMAAAA6_jCuRt2JEIpn5Otqf_w0
Path: forums-1-dub!forums-master!newswest.sybase.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!22g2000hsm.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:772
Article PK: 424871

Gokhan,

First off, I really appreciate you taking the time to reply back. I
went though all your suggestions and tried a few more things but
unfortunately the result is the same. I was hoping to stumble across
something I was doing wrong but it looks like yet another PB quirk :(


Gokhan Demir Posted on 2007-10-29 20:14:18.0Z
From: Gokhan Demir <gokhan.demir@igonline.biz>
User-Agent: Thunderbird 2.0.0.6 (Windows/20070728)
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.ejbclient
Subject: Re: PB cannot find existing proxy object
References: <1193341970.533034.125750@y42g2000hsy.googlegroups.com> <4721afa1$2@forums-1-dub> <1193412816.555276.78800@o3g2000hsb.googlegroups.com> <47234727$1@forums-1-dub> <1193689896.351815.187990@22g2000hsm.googlegroups.com>
In-Reply-To: <1193689896.351815.187990@22g2000hsm.googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-9; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: mail.it.gen.tr
X-Original-NNTP-Posting-Host: mail.it.gen.tr
Message-ID: <47264d2a$1@forums-1-dub>
Date: 29 Oct 2007 13:14:18 -0700
X-Trace: forums-1-dub 1193692458 85.105.196.163 (29 Oct 2007 13:14:18 -0700)
X-Original-Trace: 29 Oct 2007 13:14:18 -0700, mail.it.gen.tr
Lines: 17
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:773
Article PK: 424872

Ok then. Next thing is to open a support case with Powerbuilder. Please
prepare a reproducible support case. Eliminate your business logic from
your java classes and try to simplify the situation as mush as you can
do. Sybase engineering staff is very responsive to ejb client bug cases.
I'm sure you get very fast response from Sybase.

Good bye.
Gokhan.

toad wrote:
> Gokhan,
>
> First off, I really appreciate you taking the time to reply back. I
> went though all your suggestions and tried a few more things but
> unfortunately the result is the same. I was hoping to stumble across
> something I was doing wrong but it looks like yet another PB quirk :(
>


toad Posted on 2007-11-01 19:02:19.0Z
From: toad <strakats@verizon.net>
Newsgroups: sybase.public.powerbuilder.ejbclient
Subject: Re: PB cannot find existing proxy object
Date: Thu, 01 Nov 2007 12:02:19 -0700
Organization: http://groups.google.com
Lines: 2
Message-ID: <1193943739.606060.198740@k79g2000hse.googlegroups.com>
References: <1193341970.533034.125750@y42g2000hsy.googlegroups.com> <4721afa1$2@forums-1-dub> <1193412816.555276.78800@o3g2000hsb.googlegroups.com> <47234727$1@forums-1-dub> <1193689896.351815.187990@22g2000hsm.googlegroups.com> <47264d2a$1@forums-1-dub>
NNTP-Posting-Host: 65.170.41.5
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
X-Trace: posting.google.com 1193943739 11329 127.0.0.1 (1 Nov 2007 19:02:19 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 1 Nov 2007 19:02:19 +0000 (UTC)
In-Reply-To: <47264d2a$1@forums-1-dub>
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322),gzip(gfe),gzip(gfe)
X-HTTP-Via: 1.1 ics_server.swacorp.com (ICS 2.3.0.0.16)
Complaints-To: groups-abuse@google.com
Injection-Info: k79g2000hse.googlegroups.com; posting-host=65.170.41.5; posting-account=ps2QrAMAAAA6_jCuRt2JEIpn5Otqf_w0
Path: forums-1-dub!forums-master!newswest.sybase.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!k79g2000hse.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:775
Article PK: 424874

no PowerBuilder :(