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.

Application crash while calling Java Class function

12 posts in EJB Client Last posting was on 2007-01-04 04:17:55.0Z
Ivan Lai Posted on 2005-10-31 02:01:55.0Z
From: "Ivan Lai" <Ivan@no-spam.com>
Newsgroups: sybase.public.powerbuilder.ejbclient
Subject: Application crash while calling Java Class function
Lines: 17
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2527
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
X-Original-NNTP-Posting-Host: ip-55-150-66-202.rev.dyxnet.com
Message-ID: <436587fa@forums-2-dub>
X-Original-Trace: 30 Oct 2005 18:56:58 -0700, ip-55-150-66-202.rev.dyxnet.com
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 30 Oct 2005 18:56:59 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 30 Oct 2005 19:01:55 -0700
X-Trace: forums-1-dub 1130727715 10.22.108.75 (30 Oct 2005 19:01:55 -0700)
X-Original-Trace: 30 Oct 2005 19:01:55 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!forums-2-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:592
Article PK: 424721

Hi all,

I'm testing how to use PB10 to call the Java, I'm finish generate the
ejbclient and I'm following the instruction from
http://www.sybase.com/detail?id=10370085 , However, when I execute the
application and the application run to this line then the program will crash
and close my PB

ls_result = l_javapbtest.add(60, 50)

So, is anyone here have idea about this error and give me some advice?

Thank you

Ivan


Larry Cermak [Team Sybase] Posted on 2005-11-01 01:48:51.0Z
From: "Larry Cermak [Team Sybase]" <LCermak@branick-inc.com>
Newsgroups: sybase.public.powerbuilder.ejbclient
References: <436587fa@forums-2-dub>
Subject: Re: Application crash while calling Java Class function
Lines: 31
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
NNTP-Posting-Host: 12.148.200.226
X-Original-NNTP-Posting-Host: 12.148.200.226
Message-ID: <4366d793$2@forums-1-dub>
Date: 31 Oct 2005 18:48:51 -0700
X-Trace: forums-1-dub 1130813331 12.148.200.226 (31 Oct 2005 18:48:51 -0700)
X-Original-Trace: 31 Oct 2005 18:48:51 -0700, 12.148.200.226
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:593
Article PK: 424720

When I have seen problems with this it is typically a classpath issue. Also
when you instantiate the VM did you turn on debugging?

--

Larry Cermak [Team Sybase]
Branick Consulting, Inc.
www.branick-inc.com
EAServer & PowerBuilder Consulting & Training
EAServer and PowerBuilder Computer Based Training Courses

"Ivan Lai" <Ivan@no-spam.com> wrote in message news:436587fa@forums-2-dub...
> Hi all,
>
> I'm testing how to use PB10 to call the Java, I'm finish generate the
> ejbclient and I'm following the instruction from
> http://www.sybase.com/detail?id=10370085 , However, when I execute the
> application and the application run to this line then the program will
> crash and close my PB
>
> ls_result = l_javapbtest.add(60, 50)
>
> So, is anyone here have idea about this error and give me some advice?
>
> Thank you
>
> Ivan
>


Ivan Lai Posted on 2005-11-01 03:03:47.0Z
From: "Ivan Lai" <Ivan@no-spam.com>
Newsgroups: sybase.public.powerbuilder.ejbclient
References: <436587fa@forums-2-dub> <4366d793$2@forums-1-dub>
Subject: Re: Application crash while calling Java Class function
Lines: 20
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2527
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: ip-55-150-66-202.rev.dyxnet.com
X-Original-NNTP-Posting-Host: ip-55-150-66-202.rev.dyxnet.com
Message-ID: <4366e923@forums-1-dub>
Date: 31 Oct 2005 20:03:47 -0700
X-Trace: forums-1-dub 1130817827 202.66.150.55 (31 Oct 2005 20:03:47 -0700)
X-Original-Trace: 31 Oct 2005 20:03:47 -0700, ip-55-150-66-202.rev.dyxnet.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:594
Article PK: 424722


> When I have seen problems with this it is typically a classpath issue.
> Also

Could you mind to tell me what's wrong will possible generate error by my
classpath? At this moment, I pull the empty string to the the function like
this:
li_return = l_jvm.createJavaVM("", true )
and I also tried to pull the program directory to the function like this:
ls_classpath = "C:\Ddrive\develop\PB10Test"
li_return = l_jvm.createJavaVM(ls_classpath, true )

> when you instantiate the VM did you turn on debugging?

Yes, I have turned on the debug while I instantiate the VM, is there any
difference in turn on / off the debugging feature?


Thanks a lot


Larry Cermak [Team Sybase] Posted on 2005-11-02 02:51:23.0Z
From: "Larry Cermak [Team Sybase]" <LCermak@branick-inc.com>
Newsgroups: sybase.public.powerbuilder.ejbclient
References: <436587fa@forums-2-dub> <4366d793$2@forums-1-dub> <4366e923@forums-1-dub>
Subject: Re: Application crash while calling Java Class function
Lines: 39
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
NNTP-Posting-Host: 12.148.200.226
X-Original-NNTP-Posting-Host: 12.148.200.226
Message-ID: <436837bb$1@forums-1-dub>
Date: 1 Nov 2005 19:51:23 -0700
X-Trace: forums-1-dub 1130903483 12.148.200.226 (1 Nov 2005 19:51:23 -0700)
X-Original-Trace: 1 Nov 2005 19:51:23 -0700, 12.148.200.226
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:595
Article PK: 424724

If you try to create the classes and it cannot find the classes it causes
errors.

In terms of the debugging it is supposed to create a file named vm.out, if
memory serves me correctly. If that file is created it might give you some
idea as to where the problem is.

--

Larry Cermak [Team Sybase]
Branick Consulting, Inc.
www.branick-inc.com
EAServer & PowerBuilder Consulting & Training
EAServer and PowerBuilder Computer Based Training Courses

"Ivan Lai" <Ivan@no-spam.com> wrote in message news:4366e923@forums-1-dub...
>> When I have seen problems with this it is typically a classpath issue.
>> Also
>
> Could you mind to tell me what's wrong will possible generate error by my
> classpath? At this moment, I pull the empty string to the the function
> like this:
> li_return = l_jvm.createJavaVM("", true )
> and I also tried to pull the program directory to the function like this:
> ls_classpath = "C:\Ddrive\develop\PB10Test"
> li_return = l_jvm.createJavaVM(ls_classpath, true )
>
>> when you instantiate the VM did you turn on debugging?
>
> Yes, I have turned on the debug while I instantiate the VM, is there any
> difference in turn on / off the debugging feature?
>
>
> Thanks a lot
>
>


Ivan Lai Posted on 2005-11-02 03:30:22.0Z
From: "Ivan Lai" <Ivan@no-spam.com>
Newsgroups: sybase.public.powerbuilder.ejbclient
References: <436587fa@forums-2-dub> <4366d793$2@forums-1-dub> <4366e923@forums-1-dub> <436837bb$1@forums-1-dub>
Subject: Re: Application crash while calling Java Class function
Lines: 52
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2527
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: ip-55-150-66-202.rev.dyxnet.com
X-Original-NNTP-Posting-Host: ip-55-150-66-202.rev.dyxnet.com
Message-ID: <436840de@forums-1-dub>
Date: 1 Nov 2005 20:30:22 -0700
X-Trace: forums-1-dub 1130905822 202.66.150.55 (1 Nov 2005 20:30:22 -0700)
X-Original-Trace: 1 Nov 2005 20:30:22 -0700, ip-55-150-66-202.rev.dyxnet.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:596
Article PK: 424723

I'm no idea about the class path can provide correct class library or not...

btw, when I set the debugging log parameter is true, I still cannot find out
where is the vm.out located, is that file will placed on the application
directory? or somewhere?

Thanks for reply :)


"Larry Cermak [Team Sybase]" <LCermak@branick-inc.com> ¼¶¼g©ó¶l¥ó·s»D:436837bb$1@forums-1-dub...

> If you try to create the classes and it cannot find the classes it causes
> errors.
>
> In terms of the debugging it is supposed to create a file named vm.out, if
> memory serves me correctly. If that file is created it might give you some
> idea as to where the problem is.
>
> --
>
> Larry Cermak [Team Sybase]
> Branick Consulting, Inc.
> www.branick-inc.com
> EAServer & PowerBuilder Consulting & Training
> EAServer and PowerBuilder Computer Based Training Courses
>
>
> "Ivan Lai" <Ivan@no-spam.com> wrote in message
> news:4366e923@forums-1-dub...
>>> When I have seen problems with this it is typically a classpath issue.
>>> Also
>>
>> Could you mind to tell me what's wrong will possible generate error by my
>> classpath? At this moment, I pull the empty string to the the function
>> like this:
>> li_return = l_jvm.createJavaVM("", true )
>> and I also tried to pull the program directory to the function like this:
>> ls_classpath = "C:\Ddrive\develop\PB10Test"
>> li_return = l_jvm.createJavaVM(ls_classpath, true )
>>
>>> when you instantiate the VM did you turn on debugging?
>>
>> Yes, I have turned on the debug while I instantiate the VM, is there any
>> difference in turn on / off the debugging feature?
>>
>>
>> Thanks a lot
>>
>>
>
>


Timothy Madsen Posted on 2006-12-29 02:22:13.0Z
From: "Timothy Madsen" <timothy_madsen@bigfoot.com>
Newsgroups: sybase.public.powerbuilder.ejbclient
References: <436587fa@forums-2-dub> <4366d793$2@forums-1-dub>
Subject: Re: Application crash while calling Java Class function
Lines: 103
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3028
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028
NNTP-Posting-Host: c-69-248-38-201.hsd1.pa.comcast.net
X-Original-NNTP-Posting-Host: c-69-248-38-201.hsd1.pa.comcast.net
Message-ID: <459489e5@forums-1-dub>
Date: 28 Dec 2006 19:22:13 -0700
X-Trace: forums-1-dub 1167362533 69.248.38.201 (28 Dec 2006 19:22:13 -0700)
X-Original-Trace: 28 Dec 2006 19:22:13 -0700, c-69-248-38-201.hsd1.pa.comcast.net
X-Authenticated-User: pb110beta
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:702
Article PK: 424802

I am having what sounds to be a similar problem. I have need to call a java
class function so as to integrate with functionality from a 3rd party
Application Service Provider. I wanted to start with something simple - so
as the OP has mentioned, I also used the information as found at:
Sybase: Calling A Java Class From PowerBuilder 10
http://www.sybase.com/detail?id=1037085

as well as additionally using the information and the complete example as
found and provided at:
Real Gagnon: Use a Java class (PB9)
http://www.rgagnon.com/pbdetails/pb-0224.html

Due to the included example - I found the link from Real Gagnon's website to
be extremely helpful. I was able to take the example and have it work as it
within a PB 9.0.3 development environment. No problems. I was able to add
an additional java function, compile the java source into a java class,
redeploy the proxy project and use the new java method (trivial method -
just to see a new one works) in a window with no problems.

However - trying to do the same thing in PB 10.5 GA and PB 10.5.1 MR does
not work so well. (Of course I swapped the EJB*.PBD from the 90 to the 105
file and did a full rebuild - typical migration). The example from Real did
work (after migration) under PB 10.5 GA. However - trying to add another
java method and redeploying the proxy project - does not allow the new
method to be accessed. Trying to do the same thing as I did in PB 9.0.3 -
however it seems not to work under PB 10.5 GA. Simply taking the original
example (not changing Java method - using original Java class from Real
Gagnon's example - after PB migration) which was working under PB 10.5 GA -
deleting the proxies and redeploying the proxy project - also does not work.
PB 10.5.1 MR seemed worse - the example did not work after migration from PB
9.0.3 even without changing anything.

In PB 10.5 - when I say "it did not work" - the problem occurs when the
PowerScript calls the Java method. I forget exactly - but I believe under
PB 10.5 GA an error is returned - something about PBNI method not called
correctly (or something). Under PB 10.5.1 MR a GPF (or whatever MS now
calls GPFs) occurs - crash - IDE goes away - no real message with any
meaning.

Before I open a case with Sybase Technical Support - I am just wondering if
other people are able to deploy newly created java methods under PB 10.5 GA
or PB 10.5.1 MR? The example I am using is obviously very trivial - and I
would find it odd for this simply not to be working - (although of course
always possible for a defect to be anywhere) - but I wonder if there is
something else going on that I am just missing. Basically - has something
of significance and relevance changed between PB 9.0.3 and PB 10.5 in this
regard of which I am completely unaware?

We are currently in production on PB 10.5 GA (migrated onto this version in
May 2006). We had planned on going to PB 10.5.1 MR (assuming it passes all
user acceptance testing) in spring 2007 - however we require (due to a
project we have started) the ability to call methods within Java classes. I
guess my current workaround would be to stay on PB 10.5 GA and build all the
proxies in PB 9.0.3 and migrate them to PB 10.5 GA - that seems to work
fine. A little crazy - but I can live with crazy as long as it is reliable.

Anyway - any thoughts or helpful ideas would be appreciated. Relevant
experience is always very much appreciated. Is there an alternate way of
calling methods on a 3rd party Java class from a PowerBuilder 10.5 client
application - which would be more appropriate than the techniques as
illustrated in the above links?

Thanks,
Tim.

"Larry Cermak [Team Sybase]" <LCermak@branick-inc.com> wrote in message
news:4366d793$2@forums-1-dub...
> When I have seen problems with this it is typically a classpath issue.
> Also when you instantiate the VM did you turn on debugging?
>
> --
>
> Larry Cermak [Team Sybase]
> Branick Consulting, Inc.
> www.branick-inc.com
> EAServer & PowerBuilder Consulting & Training
> EAServer and PowerBuilder Computer Based Training Courses
>
>
> "Ivan Lai" <Ivan@no-spam.com> wrote in message
> news:436587fa@forums-2-dub...
>> Hi all,
>>
>> I'm testing how to use PB10 to call the Java, I'm finish generate the
>> ejbclient and I'm following the instruction from
>> http://www.sybase.com/detail?id=10370085 , However, when I execute the
>> application and the application run to this line then the program will
>> crash and close my PB
>>
>> ls_result = l_javapbtest.add(60, 50)
>>
>> So, is anyone here have idea about this error and give me some advice?
>>
>> Thank you
>>
>> Ivan
>>
>
>


bede Posted on 2006-12-29 07:28:57.0Z
From: bede <bedenosp@msofico.be>
Newsgroups: sybase.public.powerbuilder.ejbclient
Subject: Re: Application crash while calling Java Class function
Message-ID: <MPG.1ffeed8790d6144098984a@forums.sybase.com>
References: <436587fa@forums-2-dub> <4366d793$2@forums-1-dub> <459489e5@forums-1-dub>
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-15"
Content-Transfer-Encoding: 7bit
User-Agent: MicroPlanet-Gravity/2.70.2067
NNTP-Posting-Host: uu194-7-38-226.unknown.uunet.be
X-Original-NNTP-Posting-Host: uu194-7-38-226.unknown.uunet.be
Date: 29 Dec 2006 00:28:57 -0700
X-Trace: forums-1-dub 1167380937 194.7.38.226 (29 Dec 2006 00:28:57 -0700)
X-Original-Trace: 29 Dec 2006 00:28:57 -0700, uu194-7-38-226.unknown.uunet.be
Lines: 83
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:703
Article PK: 424805

hi,

- PBNI errors usually mean that proxies aren't matching the java classes
- are you using remote (ejbclient) or direct (no EJB server) calls to java classes? In case
of remote calls, your local java classes need to be the same as the ones on the server. I
know this sounds obvious, but it's often forgotten.

We are in a slightly different situation here:
a ejbclient application (PB9.3) that is being migrated to PB 10.5.1

yesterday i was trying to migrate the proxy generation process and ran into ejb2pb105 not
being able to generate proxies for java classes where the ejb2pb90 does (same java classes)

we get an error "Can't get information of <CLASSNAME>"

I've opened a case for it (# 11311563) and am awaiting a solution/workaround from support.

I have run across another post ( http://tinyurl.com/yb2n4r ) but that didn't solve anything
for me.

some more remarks:
- while PB comes shipped with java 1.5 settings, we need to use JVM 1.4
- an environment variable could be causing wrong settings/classpath/JVM/... to be loaded

If i understand correctly, you don't have issues with pb2ejb105, but more with the actual
calls to java classes. In that case i would think your problem is not related to mine, so
it'd be best to open a separate case for it.

Good luck & keep us posted ;)

Ben

In article <459489e5@forums-1-dub>, timothy_madsen@bigfoot.com says...

> I am having what sounds to be a similar problem. I have need to call a java
> class function so as to integrate with functionality from a 3rd party
> Application Service Provider. I wanted to start with something simple - so
> as the OP has mentioned, I also used the information as found at:
> Sybase: Calling A Java Class From PowerBuilder 10
> http://www.sybase.com/detail?id=1037085
>
> as well as additionally using the information and the complete example as
> found and provided at:
> Real Gagnon: Use a Java class (PB9)
> http://www.rgagnon.com/pbdetails/pb-0224.html
>
> Due to the included example - I found the link from Real Gagnon's website to
> be extremely helpful. I was able to take the example and have it work as it
> within a PB 9.0.3 development environment. No problems. I was able to add
> an additional java function, compile the java source into a java class,
> redeploy the proxy project and use the new java method (trivial method -
> just to see a new one works) in a window with no problems.
>
> However - trying to do the same thing in PB 10.5 GA and PB 10.5.1 MR does
> not work so well. (Of course I swapped the EJB*.PBD from the 90 to the 105
> file and did a full rebuild - typical migration). The example from Real did
> work (after migration) under PB 10.5 GA. However - trying to add another
> java method and redeploying the proxy project - does not allow the new
> method to be accessed. Trying to do the same thing as I did in PB 9.0.3 -
> however it seems not to work under PB 10.5 GA. Simply taking the original
> example (not changing Java method - using original Java class from Real
> Gagnon's example - after PB migration) which was working under PB 10.5 GA -
> deleting the proxies and redeploying the proxy project - also does not work.
> PB 10.5.1 MR seemed worse - the example did not work after migration from PB
> 9.0.3 even without changing anything.
>
> In PB 10.5 - when I say "it did not work" - the problem occurs when the
> PowerScript calls the Java method. I forget exactly - but I believe under
> PB 10.5 GA an error is returned - something about PBNI method not called
> correctly (or something). Under PB 10.5.1 MR a GPF (or whatever MS now
> calls GPFs) occurs - crash - IDE goes away - no real message with any
> meaning.
>
> Before I open a case with Sybase Technical Support - I am just wondering if
> other people are able to deploy newly created java methods under PB 10.5 GA
> or PB 10.5.1 MR? The example I am using is obviously very trivial - and I
> would find it odd for this simply not to be working - (although of course
> always possible for a defect to be anywhere) - but I wonder if there is
> something else going on that I am just missing. Basically - has something
> of significance and relevance changed between PB 9.0.3 and PB 10.5 in this
> regard of which I am completely unaware?
>
> We are currently in production on PB 10.5 GA (migrated onto this version in
> May 2006). We had planned on going to PB 10.5.1 MR (assuming it passes all


bede Posted on 2006-12-29 09:36:59.0Z
From: bede <bedenosp@msofico.be>
Newsgroups: sybase.public.powerbuilder.ejbclient
Subject: Re: Application crash while calling Java Class function
Message-ID: <MPG.1fff0baa25380aaf98984c@forums.sybase.com>
References: <436587fa@forums-2-dub> <4366d793$2@forums-1-dub> <459489e5@forums-1-dub> <MPG.1ffeed8790d6144098984a@forums.sybase.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-15"
Content-Transfer-Encoding: 7bit
User-Agent: MicroPlanet-Gravity/2.70.2067
NNTP-Posting-Host: uu194-7-38-226.unknown.uunet.be
X-Original-NNTP-Posting-Host: uu194-7-38-226.unknown.uunet.be
Date: 29 Dec 2006 02:36:59 -0700
X-Trace: forums-1-dub 1167388619 194.7.38.226 (29 Dec 2006 02:36:59 -0700)
X-Original-Trace: 29 Dec 2006 02:36:59 -0700, uu194-7-38-226.unknown.uunet.be
Lines: 75
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:704
Article PK: 424804

I think i have found the solution for my problem: Apparently, ejb2PB105 looks in the registry
to determine which JVM to use. I assumed it would be using the JVM which comes up when you
type "java -version" on the command line

This was the first setting (required for our application):

[HKEY_LOCAL_MACHINE\SOFTWARE\Sybase\PowerBuilder\10.5\Java]
"JDKLocation"="."
"JDKLocationDef"="."
"JREBinLocation"=".\\jre\\bin\\client"
"JREBinLocationDef"=".\\jre\\bin\\client"


This is the setting that works for the ejb2PB105.exe

[HKEY_LOCAL_MACHINE\SOFTWARE\Sybase\PowerBuilder\10.5\Java]
"JDKLocation"="C:\\Program Files\\Sybase\\Shared\\PowerBuilder\\jdk14"
"JDKLocationDef"="C:\\Program Files\\Sybase\\Shared\\PowerBuilder\\jdk14"
"JREBinLocation"="C:\\Program Files\\Sybase\\Shared\\PowerBuilder\\jdk14\\jre\\bin\\client"
"JREBinLocationDef"="C:\\Program Files\\Sybase\\Shared\\PowerBuilder\\jdk14\\jre\\bin
\\client"



In article <MPG.1ffeed8790d6144098984a@forums.sybase.com>, bedenosp@msofico.be says...

> hi,
>
> - PBNI errors usually mean that proxies aren't matching the java classes
> - are you using remote (ejbclient) or direct (no EJB server) calls to java classes? In case
> of remote calls, your local java classes need to be the same as the ones on the server. I
> know this sounds obvious, but it's often forgotten.
>
> We are in a slightly different situation here:
> a ejbclient application (PB9.3) that is being migrated to PB 10.5.1
>
> yesterday i was trying to migrate the proxy generation process and ran into ejb2pb105 not
> being able to generate proxies for java classes where the ejb2pb90 does (same java classes)
>
> we get an error "Can't get information of <CLASSNAME>"
>
> I've opened a case for it (# 11311563) and am awaiting a solution/workaround from support.
>
> I have run across another post ( http://tinyurl.com/yb2n4r ) but that didn't solve anything
> for me.
>
> some more remarks:
> - while PB comes shipped with java 1.5 settings, we need to use JVM 1.4
> - an environment variable could be causing wrong settings/classpath/JVM/... to be loaded
>
> If i understand correctly, you don't have issues with pb2ejb105, but more with the actual
> calls to java classes. In that case i would think your problem is not related to mine, so
> it'd be best to open a separate case for it.
>
> Good luck & keep us posted ;)
>
> Ben
>
> In article <459489e5@forums-1-dub>, timothy_madsen@bigfoot.com says...
> > I am having what sounds to be a similar problem. I have need to call a java
> > class function so as to integrate with functionality from a 3rd party
> > Application Service Provider. I wanted to start with something simple - so
> > as the OP has mentioned, I also used the information as found at:
> > Sybase: Calling A Java Class From PowerBuilder 10
> > http://www.sybase.com/detail?id=1037085
> >
> > as well as additionally using the information and the complete example as
> > found and provided at:
> > Real Gagnon: Use a Java class (PB9)
> > http://www.rgagnon.com/pbdetails/pb-0224.html
> >
> > Due to the included example - I found the link from Real Gagnon's website to
> > be extremely helpful. I was able to take the example and have it work as it
> > within a PB 9.0.3 development environment. No problems. I was able to add
> > an additional java function, compile the java source into a java class,
> > redeploy the proxy project and use the new java method (trivial method -


Timothy Madsen Posted on 2006-12-30 01:16:02.0Z
From: "Timothy Madsen" <timothy_madsen@bigfoot.com>
Newsgroups: sybase.public.powerbuilder.ejbclient
References: <436587fa@forums-2-dub> <4366d793$2@forums-1-dub> <459489e5@forums-1-dub> <MPG.1ffeed8790d6144098984a@forums.sybase.com> <MPG.1fff0baa25380aaf98984c@forums.sybase.com>
Subject: Re: Application crash while calling Java Class function
Lines: 190
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3028
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028
NNTP-Posting-Host: c-69-248-38-201.hsd1.pa.comcast.net
X-Original-NNTP-Posting-Host: c-69-248-38-201.hsd1.pa.comcast.net
Message-ID: <4595cbe2$1@forums-1-dub>
Date: 29 Dec 2006 18:16:02 -0700
X-Trace: forums-1-dub 1167444962 69.248.38.201 (29 Dec 2006 18:16:02 -0700)
X-Original-Trace: 29 Dec 2006 18:16:02 -0700, c-69-248-38-201.hsd1.pa.comcast.net
X-Authenticated-User: pb110beta
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:706
Article PK: 424806

I think I just had the proxy project messed up. I am not sure what
exactly - but I tried again today - and it was working fine - at least for
the "simple" example. My bad. Perhaps when I was migrating the example app
from PB9.0.3 to PB 10.5.1 MR - it is possible I used the proxy project
without properly changing all the folder locations (I use different folders
for my pibble locations / workspaces between PB 9.0.3 and PB 10.5.1). As to
your other questions - I am using direct calls to java classes - no
application server involved. We are just client-server. I want the client
to call java classes on the local workstation. I also checked my registry
under PB10.5 as you showed - I have similar information as to what you say
"works for the ejb2PB105.exe" - except that it points to jdk1.5.0_06 -
rather than the jdk14 - but the rest is the same. Note - as of PB 10.5.1
MR - per CR 431836 - JDK 1.5 should now be supported. So - I am now able to
get the simple demo working under PB 10.5.1 - including adding additional
(trivial) java methods and being able to generate proxies so as to be able
to access these from PowerScript.

However - trying to go from the "simple example" - to my real world
example - I am running into a problem. When trying to generate proxies via
ejb2pb105 - I am getting the error:
Bad Java class name: OutboundObjectHome

One difference between these two cases (simple example above which works and
the one now which doesn't) - is that I am now trying to use Java Classes
inside of a 3rd party JAR - and there are no included HOME classes. I tried
to put a HOME class in. I think I am doing something wrong here - I don't
understand the purpose of the HOME to start with - so I am probably doing
this wrong.

The JAR file I am using is:
com.application.util.jar
The class I want to access in the JAR file is:
com.application.util.outbound.OutboundObject

I made a JAVA file as:
[OutboundObjectHome.java]
public interface OutboundObjectHome {}

Compiled it into a CLASS using the JAVAC from JDK 1.4.2_06. Then took the
JAR file, expanded it - placed the HOME CLASS file into the directory
\com\application\util\outbound\ such that it was sitting right next to the
OutboundObject.class file. Then used the command:
JAR cf com.application.util.jar *.*
to put the files back into a JAR.

Then checked the resulting JAR using JAVAP (from JDK 1.4.2_06) as:
C:\blah\> javap -classpath com.application.util.jar
com.application.util.outbound.OutboundObject
Compiled from "OutboundClient.java"
public class com.application.util.outbound.OutboundObject extends
java.lang.Object{
public void setMethod1(boolean);
public void setMethod1(boolean);
... lots of public methods - chopped out ...
}

That looked good. Tried the same thing with the HOME:
C:\blah\> javap -classpath com.application.util.jar
com.application.util.outbound.OutboundObjectHome
Compiled from "OutboundObjectHome.java"
interface OutboundObjectHome{
}

Although this returned results - I am wondering if it should reference the
com.application.util.outbound. - like it does in the OutboundObject above.
Anyway - then tried:
C:\blah\> ejb2pb105 -classpath com.application.util.jar
com.application.util.outbound.OutboundObject -home
com.application.util.outbound.OutboundObjectHome
C:\blah\> type ejbproxies.err
Bad Java class name: OutboundObjectHome
C:\blah\>

I also tried using ejb2pb90 and received different error message as:
C:\blah\> ejb2pb90 -classpath com.application.util.jar
com.application.util.outbound.OutboundObject -home
com.application.util.outbound.OutboundObjectHome
C:\blah\> type ejbproxies.err
Error: binary file 'OutboundObjectHome' contains OutboundObjectHome
C:\blah\>

So - any pointers as to what I am doing wrong? Also - if there is a way I
can put the HOME CLASS as a stand-alone file "next to" the jar file - that
would be ideal as the jar file comes from a 3rd party and I would prefer to
use it as is - without modifying it.

Thanks,
Tim.

"bede" <bedenosp@msofico.be> wrote in message
news:MPG.1fff0baa25380aaf98984c@forums.sybase.com...
>I think i have found the solution for my problem: Apparently, ejb2PB105
>looks in the registry
> to determine which JVM to use. I assumed it would be using the JVM which
> comes up when you
> type "java -version" on the command line
>
> This was the first setting (required for our application):
>
> [HKEY_LOCAL_MACHINE\SOFTWARE\Sybase\PowerBuilder\10.5\Java]
> "JDKLocation"="."
> "JDKLocationDef"="."
> "JREBinLocation"=".\\jre\\bin\\client"
> "JREBinLocationDef"=".\\jre\\bin\\client"
>
>
> This is the setting that works for the ejb2PB105.exe
>
> [HKEY_LOCAL_MACHINE\SOFTWARE\Sybase\PowerBuilder\10.5\Java]
> "JDKLocation"="C:\\Program Files\\Sybase\\Shared\\PowerBuilder\\jdk14"
> "JDKLocationDef"="C:\\Program Files\\Sybase\\Shared\\PowerBuilder\\jdk14"
> "JREBinLocation"="C:\\Program
> Files\\Sybase\\Shared\\PowerBuilder\\jdk14\\jre\\bin\\client"
> "JREBinLocationDef"="C:\\Program
> Files\\Sybase\\Shared\\PowerBuilder\\jdk14\\jre\\bin
> \\client"
>
>
>
> In article <MPG.1ffeed8790d6144098984a@forums.sybase.com>,
> bedenosp@msofico.be says...
>> hi,
>>
>> - PBNI errors usually mean that proxies aren't matching the java classes
>> - are you using remote (ejbclient) or direct (no EJB server) calls to
>> java classes? In case
>> of remote calls, your local java classes need to be the same as the ones
>> on the server. I
>> know this sounds obvious, but it's often forgotten.
>>
>> We are in a slightly different situation here:
>> a ejbclient application (PB9.3) that is being migrated to PB 10.5.1
>>
>> yesterday i was trying to migrate the proxy generation process and ran
>> into ejb2pb105 not
>> being able to generate proxies for java classes where the ejb2pb90 does
>> (same java classes)
>>
>> we get an error "Can't get information of <CLASSNAME>"
>>
>> I've opened a case for it (# 11311563) and am awaiting a
>> solution/workaround from support.
>>
>> I have run across another post ( http://tinyurl.com/yb2n4r ) but that
>> didn't solve anything
>> for me.
>>
>> some more remarks:
>> - while PB comes shipped with java 1.5 settings, we need to use JVM 1.4
>> - an environment variable could be causing wrong
>> settings/classpath/JVM/... to be loaded
>>
>> If i understand correctly, you don't have issues with pb2ejb105, but more
>> with the actual
>> calls to java classes. In that case i would think your problem is not
>> related to mine, so
>> it'd be best to open a separate case for it.
>>
>> Good luck & keep us posted ;)
>>
>> Ben
>>
>> In article <459489e5@forums-1-dub>, timothy_madsen@bigfoot.com says...
>> > I am having what sounds to be a similar problem. I have need to call a
>> > java
>> > class function so as to integrate with functionality from a 3rd party
>> > Application Service Provider. I wanted to start with something
>> > simple - so
>> > as the OP has mentioned, I also used the information as found at:
>> > Sybase: Calling A Java Class From PowerBuilder 10
>> > http://www.sybase.com/detail?id=1037085
>> >
>> > as well as additionally using the information and the complete example
>> > as
>> > found and provided at:
>> > Real Gagnon: Use a Java class (PB9)
>> > http://www.rgagnon.com/pbdetails/pb-0224.html
>> >
>> > Due to the included example - I found the link from Real Gagnon's
>> > website to
>> > be extremely helpful. I was able to take the example and have it work
>> > as it
>> > within a PB 9.0.3 development environment. No problems. I was able to
>> > add
>> > an additional java function, compile the java source into a java class,
>> > redeploy the proxy project and use the new java method (trivial
>> > method -


bede Posted on 2006-12-30 16:09:35.0Z
From: bede <bedenosp@msofico.be>
Newsgroups: sybase.public.powerbuilder.ejbclient
Subject: Re: Application crash while calling Java Class function
Message-ID: <MPG.2000b8e84b7ef07e98984e@forums.sybase.com>
References: <436587fa@forums-2-dub> <4366d793$2@forums-1-dub> <459489e5@forums-1-dub> <MPG.1ffeed8790d6144098984a@forums.sybase.com> <MPG.1fff0baa25380aaf98984c@forums.sybase.com> <4595cbe2$1@forums-1-dub>
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-15"
Content-Transfer-Encoding: 7bit
User-Agent: MicroPlanet-Gravity/2.70.2067
NNTP-Posting-Host: d51537842.access.telenet.be
X-Original-NNTP-Posting-Host: d51537842.access.telenet.be
Date: 30 Dec 2006 09:09:35 -0700
X-Trace: forums-1-dub 1167498575 81.83.120.66 (30 Dec 2006 09:09:35 -0700)
X-Original-Trace: 30 Dec 2006 09:09:35 -0700, d51537842.access.telenet.be
Lines: 74
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:707
Article PK: 424808

well, i'm not sure but i think since it's called ejb2pb105 it would only work for ejb classes
(which have a home interface class as well). can't you just leave the home part out of the
ejb2pb105 call?

What you could do -as workaround- is write a simple ejb according to the book (bean & home),
add one public method that uses all other classes (which aren't ejb) as arguments or as
return value and generate proxies for that. Every public referenced class involved will also
get proxies generated.

one remark: all required classes are included in the jar? You may need to add ejbclient jars
to the class path

javap is definitely the way to check the input for proxy generation

happy new year (to all),

Ben

PS: a bit tricky to answer all Qs correct 'coz am not at work now.. i'll try to get back on
this sometime next week.



In article <4595cbe2$1@forums-1-dub>, timothy_madsen@bigfoot.com says...

> I think I just had the proxy project messed up. I am not sure what
> exactly - but I tried again today - and it was working fine - at least for
> the "simple" example. My bad. Perhaps when I was migrating the example app
> from PB9.0.3 to PB 10.5.1 MR - it is possible I used the proxy project
> without properly changing all the folder locations (I use different folders
> for my pibble locations / workspaces between PB 9.0.3 and PB 10.5.1). As to
> your other questions - I am using direct calls to java classes - no
> application server involved. We are just client-server. I want the client
> to call java classes on the local workstation. I also checked my registry
> under PB10.5 as you showed - I have similar information as to what you say
> "works for the ejb2PB105.exe" - except that it points to jdk1.5.0_06 -
> rather than the jdk14 - but the rest is the same. Note - as of PB 10.5.1
> MR - per CR 431836 - JDK 1.5 should now be supported. So - I am now able to
> get the simple demo working under PB 10.5.1 - including adding additional
> (trivial) java methods and being able to generate proxies so as to be able
> to access these from PowerScript.
>
> However - trying to go from the "simple example" - to my real world
> example - I am running into a problem. When trying to generate proxies via
> ejb2pb105 - I am getting the error:
> Bad Java class name: OutboundObjectHome
>
> One difference between these two cases (simple example above which works and
> the one now which doesn't) - is that I am now trying to use Java Classes
> inside of a 3rd party JAR - and there are no included HOME classes. I tried
> to put a HOME class in. I think I am doing something wrong here - I don't
> understand the purpose of the HOME to start with - so I am probably doing
> this wrong.
>
> The JAR file I am using is:
> com.application.util.jar
> The class I want to access in the JAR file is:
> com.application.util.outbound.OutboundObject
>
> I made a JAVA file as:
> [OutboundObjectHome.java]
> public interface OutboundObjectHome {}
>
> Compiled it into a CLASS using the JAVAC from JDK 1.4.2_06. Then took the
> JAR file, expanded it - placed the HOME CLASS file into the directory
> \com\application\util\outbound\ such that it was sitting right next to the
> OutboundObject.class file. Then used the command:
> JAR cf com.application.util.jar *.*
> to put the files back into a JAR.
>
> Then checked the resulting JAR using JAVAP (from JDK 1.4.2_06) as:
> C:\blah\> javap -classpath com.application.util.jar
> com.application.util.outbound.OutboundObject
> Compiled from "OutboundClient.java"
> public class com.application.util.outbound.OutboundObject extends


"Jim O'Neil [Sybase]" <joneil_ Posted on 2006-12-30 18:27:45.0Z
From: "Jim O'Neil [Sybase]" <joneil_@_sybase_dot_com>
Newsgroups: sybase.public.powerbuilder.ejbclient
Subject: Re: Application crash while calling Java Class function
Message-ID: <emedp2tuf52u3ne82f7ac3d82clfq3ec6u@4ax.com>
References: <436587fa@forums-2-dub> <4366d793$2@forums-1-dub> <459489e5@forums-1-dub> <MPG.1ffeed8790d6144098984a@forums.sybase.com> <MPG.1fff0baa25380aaf98984c@forums.sybase.com> <4595cbe2$1@forums-1-dub>
X-Newsreader: Forte Agent 3.3/32.846
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: pool-68-163-104-227.bos.east.verizon.net
X-Original-NNTP-Posting-Host: pool-68-163-104-227.bos.east.verizon.net
Date: 30 Dec 2006 11:27:45 -0700
X-Trace: forums-1-dub 1167506865 68.163.104.227 (30 Dec 2006 11:27:45 -0700)
X-Original-Trace: 30 Dec 2006 11:27:45 -0700, pool-68-163-104-227.bos.east.verizon.net
Lines: 9
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:708
Article PK: 424809

Try "public class OutboundObjectHome {}". The EJB2PB proxy generation
process uses the output of javap, but we're not too flexible on what
we expect from that output.

On 29 Dec 2006 18:16:02 -0700, "Timothy Madsen"

<timothy_madsen@bigfoot.com> wrote:

>interface OutboundObjectHome{
>}


Timothy Madsen Posted on 2007-01-04 04:17:55.0Z
From: "Timothy Madsen" <timothy_madsen@bigfoot.com>
Newsgroups: sybase.public.powerbuilder.ejbclient
References: <436587fa@forums-2-dub> <4366d793$2@forums-1-dub> <459489e5@forums-1-dub> <MPG.1ffeed8790d6144098984a@forums.sybase.com> <MPG.1fff0baa25380aaf98984c@forums.sybase.com> <4595cbe2$1@forums-1-dub> <emedp2tuf52u3ne82f7ac3d82clfq3ec6u@4ax.com>
Subject: Re: Application crash while calling Java Class function
Lines: 42
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3028
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: c-69-248-38-201.hsd1.pa.comcast.net
X-Original-NNTP-Posting-Host: c-69-248-38-201.hsd1.pa.comcast.net
Message-ID: <459c8e03$1@forums-1-dub>
Date: 3 Jan 2007 21:17:55 -0700
X-Trace: forums-1-dub 1167887875 69.248.38.201 (3 Jan 2007 21:17:55 -0700)
X-Original-Trace: 3 Jan 2007 21:17:55 -0700, c-69-248-38-201.hsd1.pa.comcast.net
X-Authenticated-User: pb110beta
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:710
Article PK: 424810

I was able to get this working by including the Java package as the first
line of the Java home file.

I made a JAVA file as:
[OutboundObjectHome.java]
package com.application.util.outbound;
public interface OutboundObjectHome {}

Compiled that into a CLASS and put it into the JAR in the same directory as
the OutboundObject.class file. I was then able to generate the proxies in
PB 10.5.1 with no problems.

BTW - In addition to the Sybase document:
Calling a Java Class from PowerBuilder 10
http://www.sybase.com/detail?id=1037085

and Real Gagnon's example:
Use a Java class (PB9)
http://www.rgagnon.com/pbdetails/pb-0224.html

I also found a great slide show at:
Techwave 2003 - Conference Proceedings
http://www.sybase.com/detail?id=1010039
PWB519 Accessing Third-Party Enterprise JavaBeans Servers from PowerBuilder
9.0
http://download.sybase.com/presentation/2003_presentations/PWB519.ppt

Tim.

"Jim O'Neil [Sybase]" <joneil_@_sybase_dot_com> wrote in message
news:emedp2tuf52u3ne82f7ac3d82clfq3ec6u@4ax.com...
> Try "public class OutboundObjectHome {}". The EJB2PB proxy generation
> process uses the output of javap, but we're not too flexible on what
> we expect from that output.
>
> On 29 Dec 2006 18:16:02 -0700, "Timothy Madsen"
> <timothy_madsen@bigfoot.com> wrote:
>
>>interface OutboundObjectHome{
>>}