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.

Call JAVA class from PB

13 posts in EJB Client Last posting was on 2005-02-24 08:03:21.0Z
Jack Posted on 2005-02-14 19:17:29.0Z
Sender: 6ea0.4210f912.1804289383@sybase.com
From: Jack
Newsgroups: sybase.public.powerbuilder.ejbclient
Subject: Call JAVA class from PB
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4210f949.6ea4.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 14 Feb 2005 11:17:29 -0800
X-Trace: forums-1-dub 1108408649 10.22.241.41 (14 Feb 2005 11:17:29 -0800)
X-Original-Trace: 14 Feb 2005 11:17:29 -0800, 10.22.241.41
Lines: 16
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:441
Article PK: 424614

My PB application calls a function of a java class. It works
perfectly within the PB9 IDE, but not if I deploy it on
user's PC (Win XP). I got "Exception Error" when trying to
call the JAVA class function.

I suppose I need to intall JDK1.4 on the user's PC. If I
install JDK1.4 in "C:\java\jdk14", how does the PB
application (exe) know where to go to look for jdk1.4?

I also copied the JAVA class files into the directory where
the EXE lives.

Is this the only thing (jdk1.4) that I am missing for the PB
deployment?

I greatly appreciate any help. Thanks.


Real Gagnon Posted on 2005-02-14 21:43:12.0Z
Newsgroups: sybase.public.powerbuilder.ejbclient
Subject: Re: Call JAVA class from PB
From: Real Gagnon <realSpam@IsBadrgagnon.com>
References: <4210f949.6ea4.1681692777@sybase.com>
Organization: Your Company
Message-ID: <Xns95FDAA1605417realSpamIsBadrgagnon@192.138.151.106>
User-Agent: Xnews/5.04.25
NNTP-Posting-Host: ip.ssq.ca
X-Original-NNTP-Posting-Host: ip.ssq.ca
Date: 14 Feb 2005 13:43:12 -0800
X-Trace: forums-1-dub 1108417392 66.38.211.199 (14 Feb 2005 13:43:12 -0800)
X-Original-Trace: 14 Feb 2005 13:43:12 -0800, ip.ssq.ca
Lines: 22
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:442
Article PK: 424617


> I suppose I need to intall JDK1.4 on the user's PC. If I
> install JDK1.4 in "C:\java\jdk14", how does the PB
> application (exe) know where to go to look for jdk1.4?

First JDK is for developper, you need to install the JRE (Java Runtime
Environment) if it's for the end user.


PB needs to locate the jvm.dll file. PB uses an algorithm based on the
location of the pbjvm90.dll file location to find the jvm.dll (the Java
Virtual Machine). If not found, PowerBuilder uses the first jvm.dll whose
location is defined in the user's PATH environment variable. If no jvm.dll
is found, the Java VM does not start.

It's not a bad idea to use the AppPath registry entry of your application
instead of the system path definition.

Bye.
--
Real Gagnon From Quebec, Canada
http://www.rgagnon.com/howto.html
for Java and Powerbuilder HowTo


Jack Posted on 2005-02-15 15:47:24.0Z
Sender: 7ce9.42121932.1804289383@sybase.com
From: Jack
Newsgroups: sybase.public.powerbuilder.ejbclient
Subject: Re: Call JAVA class from PB
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4212198c.7cf9.1681692777@sybase.com>
References: <Xns95FDAA1605417realSpamIsBadrgagnon@192.138.151.106>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 15 Feb 2005 07:47:24 -0800
X-Trace: forums-1-dub 1108482444 10.22.241.41 (15 Feb 2005 07:47:24 -0800)
X-Original-Trace: 15 Feb 2005 07:47:24 -0800, 10.22.241.41
Lines: 41
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:444
Article PK: 424620


> > I suppose I need to intall JDK1.4 on the user's PC. If
> > I install JDK1.4 in "C:\java\jdk14", how does the PB
> > application (exe) know where to go to look for jdk1.4?
>
> First JDK is for developper, you need to install the JRE
> (Java Runtime Environment) if it's for the end user.
>
>
> PB needs to locate the jvm.dll file. PB uses an algorithm
> based on the location of the pbjvm90.dll file location to
> find the jvm.dll (the Java Virtual Machine). If not found
> , PowerBuilder uses the first jvm.dll whose location is
> defined in the user's PATH environment variable. If no
> jvm.dll is found, the Java VM does not start.
>
> It's not a bad idea to use the AppPath registry entry of
> your application instead of the system path definition.
>
> Bye.
> --
> Real Gagnon From Quebec, Canada
> http://www.rgagnon.com/howto.html
> for Java and Powerbuilder HowTo

Real,
Thanks for the info. It is very helpful. I am still a
little bit confused regarding the steps for deployment.
Here are the steps (I think, correct me if I am wrong):


Assuming my PB Deployment directory is "c:\pb Appl"

1. copy pbjvm90.dll into c:\pb Appl
2. Install JRE by copying the JRE installed with PB FROM:
"C:\Program Files\Sybase\Shared\PowerBuilder\jdk14\jre" TO:
"c:\pb Appl"

On step 2, do I copy everything under the JRE directory or
just the JRE\bin\client?

Thanks again for your help.


Bede <bede_nosp Posted on 2005-02-15 08:00:18.0Z
From: Bede <bede_nosp@m_sofico.be>
Newsgroups: sybase.public.powerbuilder.ejbclient
Subject: Re: Call JAVA class from PB
Message-ID: <MPG.1c7bca43fde624cd9896d1@forums.sybase.com>
References: <4210f949.6ea4.1681692777@sybase.com>
Organization: Sofico
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: 15 Feb 2005 00:00:18 -0800
X-Trace: forums-1-dub 1108454418 194.7.38.226 (15 Feb 2005 00:00:18 -0800)
X-Original-Trace: 15 Feb 2005 00:00:18 -0800, uu194-7-38-226.unknown.uunet.be
Lines: 24
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:443
Article PK: 424618

we put the jre (rename the folder to -exactly- "jre") in the
application's installed directory, otherwise you'll need to indicate
what jre to use in the registry under LOCAL_MACHINE (google for this
within this group)

Ben
In article <4210f949.6ea4.1681692777@sybase.com>, Jack says...

> My PB application calls a function of a java class. It works
> perfectly within the PB9 IDE, but not if I deploy it on
> user's PC (Win XP). I got "Exception Error" when trying to
> call the JAVA class function.
>
> I suppose I need to intall JDK1.4 on the user's PC. If I
> install JDK1.4 in "C:\java\jdk14", how does the PB
> application (exe) know where to go to look for jdk1.4?
>
> I also copied the JAVA class files into the directory where
> the EXE lives.
>
> Is this the only thing (jdk1.4) that I am missing for the PB
> deployment?
>
> I greatly appreciate any help. Thanks.
>


Jack Posted on 2005-02-18 22:45:12.0Z
Sender: 7ba6.42166f9b.1804289383@sybase.com
From: Jack
Newsgroups: sybase.public.powerbuilder.ejbclient
Subject: Re: Call JAVA class from PB
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <42166ff3.7bb4.1681692777@sybase.com>
References: <MPG.1c7bca43fde624cd9896d1@forums.sybase.com>
X-Original-NNTP-Posting-Host: 10.22.241.42
X-Original-Trace: 18 Feb 2005 14:45:07 -0800, 10.22.241.42
Lines: 37
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 18 Feb 2005 14:45:09 -0800, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 18 Feb 2005 14:45:12 -0800
X-Trace: forums-1-dub 1108766712 10.22.108.75 (18 Feb 2005 14:45:12 -0800)
X-Original-Trace: 18 Feb 2005 14:45:12 -0800, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:446
Article PK: 424619

I am still having problem with deployment.

Assuming my PB Deployment directory is "c:\pb Appl", I did
the following:

1. copy pbjvm90.dll into c:\pb Appl
2. Install JRE (folder name is "jre") in the application's
installed directory (under c:\pb Appl).

I still got the "Exception Thrown" error. Please help!!!

> we put the jre (rename the folder to -exactly- "jre") in
> the application's installed directory, otherwise you'll
> need to indicate what jre to use in the registry under
> LOCAL_MACHINE (google for this within this group)
>
> Ben
> In article <4210f949.6ea4.1681692777@sybase.com>, Jack
> > says... My PB application calls a function of a java
> > class. It works perfectly within the PB9 IDE, but not if
> > I deploy it on user's PC (Win XP). I got "Exception
> > Error" when trying to call the JAVA class function.
> >
> > I suppose I need to intall JDK1.4 on the user's PC. If
> > I install JDK1.4 in "C:\java\jdk14", how does the PB
> > application (exe) know where to go to look for jdk1.4?
> >
> > I also copied the JAVA class files into the directory
> > where the EXE lives.
> >
> > Is this the only thing (jdk1.4) that I am missing for
> > the PB deployment?
> >
> > I greatly appreciate any help. Thanks.
> >


Gokhan Demir Posted on 2005-02-20 01:56:08.0Z
From: Gokhan Demir <gokhan.demir@igonline.biz>
User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.ejbclient
Subject: Re: Call JAVA class from PB
References: <MPG.1c7bca43fde624cd9896d1@forums.sybase.com> <42166ff3.7bb4.1681692777@sybase.com>
In-Reply-To: <42166ff3.7bb4.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Original-NNTP-Posting-Host: 212.174.52.141
Message-ID: <4217ee30@forums-2-dub>
X-Original-Trace: 19 Feb 2005 17:56:00 -0800, 212.174.52.141
Lines: 70
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 19 Feb 2005 17:56:03 -0800, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 19 Feb 2005 17:56:08 -0800
X-Trace: forums-1-dub 1108864568 10.22.108.75 (19 Feb 2005 17:56:08 -0800)
X-Original-Trace: 19 Feb 2005 17:56:08 -0800, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:447
Article PK: 424622

Hello,

What I do for deployment of an EJB client application is as follows:
1. I use Powerbuilder Runtime packager to make an msi file that is
easily installable for the end-user's machine. I make sure that I choose
the EJB client functionality in the packager utility.
2. I install the latest jre 1.4.2 from Sun. After the installation, I
manually edit the system PATH environment variable to include
<JRE_HOME>\bin\client directory.
3. I install the generated PB runtime packager. After the installation,
I make sure that <SYBASE_HOME>\Shared\Powerbuilder is in the path.
4. Copy my application files in an empty directory and create a shortcut
on the desktop.

In addition, If I want the PDF export functionality to work on the
user's PC:
4. I install Ghostscript from GNU. (gs706w32.exe)
5. I make a copy of <SYBASE_HOME>\Shared\Powerbuilder\drivers directory
from my own development PC (where the PB9 Enterprise is installed) and
copy this drivers folder under the user's PC, the same location.

Also, I would doubly make sure that my classpath contains all the
necessary classes in the user's PC. Providing the classpath correctly is
the last important step.

Best Regards,
Gokhan Demir

Jack wrote:
> I am still having problem with deployment.
>
> Assuming my PB Deployment directory is "c:\pb Appl", I did
> the following:
>
> 1. copy pbjvm90.dll into c:\pb Appl
> 2. Install JRE (folder name is "jre") in the application's
> installed directory (under c:\pb Appl).
>
> I still got the "Exception Thrown" error. Please help!!!
>
>
>
>
>>we put the jre (rename the folder to -exactly- "jre") in
>>the application's installed directory, otherwise you'll
>>need to indicate what jre to use in the registry under
>>LOCAL_MACHINE (google for this within this group)
>>
>>Ben
>>In article <4210f949.6ea4.1681692777@sybase.com>, Jack
>>
>>>says... My PB application calls a function of a java
>>>class. It works perfectly within the PB9 IDE, but not if
>>>I deploy it on user's PC (Win XP). I got "Exception
>>>Error" when trying to call the JAVA class function.
>>>
>>>I suppose I need to intall JDK1.4 on the user's PC. If
>>>I install JDK1.4 in "C:\java\jdk14", how does the PB
>>>application (exe) know where to go to look for jdk1.4?
>>>
>>>I also copied the JAVA class files into the directory
>>>where the EXE lives.
>>>
>>>Is this the only thing (jdk1.4) that I am missing for
>>>the PB deployment?
>>>
>>>I greatly appreciate any help. Thanks.
>>>


Jack Posted on 2005-02-21 21:08:25.0Z
Sender: 7bbd.421a4b1a.1804289383@sybase.com
From: JACK
Newsgroups: sybase.public.powerbuilder.ejbclient
Subject: Re: Call JAVA class from PB
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <421a4dc9.7be8.1681692777@sybase.com>
References: <4217ee30@forums-2-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 21 Feb 2005 13:08:25 -0800
X-Trace: forums-1-dub 1109020105 10.22.241.41 (21 Feb 2005 13:08:25 -0800)
X-Original-Trace: 21 Feb 2005 13:08:25 -0800, 10.22.241.41
Lines: 91
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:448
Article PK: 424625

Gokhan,

Thanks for the reply.

My two JAVA class files are called NCClient and
NCClientHome. These 2 class files are in the same directory
as my PB exe. I also specify the classpath (System
Enviroment Variable) pointing to the directory (e.g. c:\pb
Appl) that contains the JAVA class files.

It didn't work. I am still getting the "Exception Thrown
has not been handled" error. Again, it works when I run it
in the PB IDE.

Any other advice? Thanks.

> Hello,
>
> What I do for deployment of an EJB client application is
> as follows: 1. I use Powerbuilder Runtime packager to make
> an msi file that is easily installable for the end-user's
> machine. I make sure that I choose the EJB client
> functionality in the packager utility. 2. I install the
> latest jre 1.4.2 from Sun. After the installation, I
> manually edit the system PATH environment variable to
> include <JRE_HOME>\bin\client directory.
> 3. I install the generated PB runtime packager. After the
> installation, I make sure that
> <SYBASE_HOME>\Shared\Powerbuilder is in the path. 4. Copy
> my application files in an empty directory and create a
> shortcut on the desktop.
>
> In addition, If I want the PDF export functionality to
> work on the user's PC:
> 4. I install Ghostscript from GNU. (gs706w32.exe)
> 5. I make a copy of
> <SYBASE_HOME>\Shared\Powerbuilder\drivers directory from
> my own development PC (where the PB9 Enterprise is
> installed) and copy this drivers folder under the user's
> PC, the same location.
>
> Also, I would doubly make sure that my classpath contains
> all the necessary classes in the user's PC. Providing the
> classpath correctly is the last important step.
>
> Best Regards,
> Gokhan Demir
>
>
>
> Jack wrote:
> > I am still having problem with deployment.
> >
> > Assuming my PB Deployment directory is "c:\pb Appl", I
> > did the following:
> >
> > 1. copy pbjvm90.dll into c:\pb Appl
> > 2. Install JRE (folder name is "jre") in the
> > application's installed directory (under c:\pb Appl).
> >
> > I still got the "Exception Thrown" error. Please
> > help!!!
> >
> >
> >
> >>we put the jre (rename the folder to -exactly- "jre") in
> >>the application's installed directory, otherwise you'll
> >>need to indicate what jre to use in the registry under
> >>LOCAL_MACHINE (google for this within this group)
> >>
> >>Ben
> >>In article <4210f949.6ea4.1681692777@sybase.com>, Jack
> >>
> >>>says... My PB application calls a function of a java
> >>>class. It works perfectly within the PB9 IDE, but not
> if >>>I deploy it on user's PC (Win XP). I got "Exception
> >>>Error" when trying to call the JAVA class function.
> >>>
> >>>I suppose I need to intall JDK1.4 on the user's PC. If
> >>>I install JDK1.4 in "C:\java\jdk14", how does the PB
> >>>application (exe) know where to go to look for jdk1.4?
> >>>
> >>>I also copied the JAVA class files into the directory
> >>>where the EXE lives.
> >>>
> >>>Is this the only thing (jdk1.4) that I am missing for
> >>>the PB deployment?
> >>>
> >>>I greatly appreciate any help. Thanks.
> >>>


Bede <bede_nosp Posted on 2005-02-22 08:23:19.0Z
From: Bede <bede_nosp@m_sofico.be>
Newsgroups: sybase.public.powerbuilder.ejbclient
Subject: Re: Call JAVA class from PB
Message-ID: <MPG.1c850a205c6aacf29896d5@forums.sybase.com>
References: <4217ee30@forums-2-dub> <421a4dc9.7be8.1681692777@sybase.com>
Organization: Sofico
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: 22 Feb 2005 00:23:19 -0800
X-Trace: forums-1-dub 1109060599 194.7.38.226 (22 Feb 2005 00:23:19 -0800)
X-Original-Trace: 22 Feb 2005 00:23:19 -0800, uu194-7-38-226.unknown.uunet.be
Lines: 106
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:450
Article PK: 424623

those java classes should be in the classpath that you use to start the
jvm with, not so much the system's environment variable.

btw: do you get that same error if you catch everything (eg. using
Throwable)
try
// servercall
...
catch (throwable t)
// process error
end try

PS: i've noticed my other post only got out today.. sorry 'bout that
In article <421a4dc9.7be8.1681692777@sybase.com>, JACK says...

> Gokhan,
>
> Thanks for the reply.
>
> My two JAVA class files are called NCClient and
> NCClientHome. These 2 class files are in the same directory
> as my PB exe. I also specify the classpath (System
> Enviroment Variable) pointing to the directory (e.g. c:\pb
> Appl) that contains the JAVA class files.
>
> It didn't work. I am still getting the "Exception Thrown
> has not been handled" error. Again, it works when I run it
> in the PB IDE.
>
> Any other advice? Thanks.
>
>
> > Hello,
> >
> > What I do for deployment of an EJB client application is
> > as follows: 1. I use Powerbuilder Runtime packager to make
> > an msi file that is easily installable for the end-user's
> > machine. I make sure that I choose the EJB client
> > functionality in the packager utility. 2. I install the
> > latest jre 1.4.2 from Sun. After the installation, I
> > manually edit the system PATH environment variable to
> > include <JRE_HOME>\bin\client directory.
> > 3. I install the generated PB runtime packager. After the
> > installation, I make sure that
> > <SYBASE_HOME>\Shared\Powerbuilder is in the path. 4. Copy
> > my application files in an empty directory and create a
> > shortcut on the desktop.
> >
> > In addition, If I want the PDF export functionality to
> > work on the user's PC:
> > 4. I install Ghostscript from GNU. (gs706w32.exe)
> > 5. I make a copy of
> > <SYBASE_HOME>\Shared\Powerbuilder\drivers directory from
> > my own development PC (where the PB9 Enterprise is
> > installed) and copy this drivers folder under the user's
> > PC, the same location.
> >
> > Also, I would doubly make sure that my classpath contains
> > all the necessary classes in the user's PC. Providing the
> > classpath correctly is the last important step.
> >
> > Best Regards,
> > Gokhan Demir
> >
> >
> >
> > Jack wrote:
> > > I am still having problem with deployment.
> > >
> > > Assuming my PB Deployment directory is "c:\pb Appl", I
> > > did the following:
> > >
> > > 1. copy pbjvm90.dll into c:\pb Appl
> > > 2. Install JRE (folder name is "jre") in the
> > > application's installed directory (under c:\pb Appl).
> > >
> > > I still got the "Exception Thrown" error. Please
> > > help!!!
> > >
> > >
> > >
> > >>we put the jre (rename the folder to -exactly- "jre") in
> > >>the application's installed directory, otherwise you'll
> > >>need to indicate what jre to use in the registry under
> > >>LOCAL_MACHINE (google for this within this group)
> > >>
> > >>Ben
> > >>In article <4210f949.6ea4.1681692777@sybase.com>, Jack
> > >>
> > >>>says... My PB application calls a function of a java
> > >>>class. It works perfectly within the PB9 IDE, but not
> > if >>>I deploy it on user's PC (Win XP). I got "Exception
> > >>>Error" when trying to call the JAVA class function.
> > >>>
> > >>>I suppose I need to intall JDK1.4 on the user's PC. If
> > >>>I install JDK1.4 in "C:\java\jdk14", how does the PB
> > >>>application (exe) know where to go to look for jdk1.4?
> > >>>
> > >>>I also copied the JAVA class files into the directory
> > >>>where the EXE lives.
> > >>>
> > >>>Is this the only thing (jdk1.4) that I am missing for
> > >>>the PB deployment?
> > >>>
> > >>>I greatly appreciate any help. Thanks.
> > >>>
>


Gokhan Demir Posted on 2005-02-23 18:25:18.0Z
From: Gokhan Demir <gokhan.demir@igonline.biz>
User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.ejbclient
Subject: Re: Call JAVA class from PB
References: <4217ee30@forums-2-dub> <421a4dc9.7be8.1681692777@sybase.com>
In-Reply-To: <421a4dc9.7be8.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Original-NNTP-Posting-Host: adsluser-1165.adsl.ttnet.net.tr
Message-ID: <421cca88@forums-2-dub>
X-Original-Trace: 23 Feb 2005 10:25:12 -0800, adsluser-1165.adsl.ttnet.net.tr
Lines: 112
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 23 Feb 2005 10:25:15 -0800, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 23 Feb 2005 10:25:18 -0800
X-Trace: forums-1-dub 1109183118 10.22.108.75 (23 Feb 2005 10:25:18 -0800)
X-Original-Trace: 23 Feb 2005 10:25:18 -0800, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:451
Article PK: 424626

Hi back, sorry for returning late.

I can think of two more situations where this "exception thrown has not
been handled" might have been caused:
1. the java classes provided at runtime classpath may have different
structures (they have different javap output) than the ones used to
generate the java proxies.
2. User's PC may have older Powerbuilder runtime DLLs than the
development PC.

Regards,
Gokhan

JACK wrote:
> Gokhan,
>
> Thanks for the reply.
>
> My two JAVA class files are called NCClient and
> NCClientHome. These 2 class files are in the same directory
> as my PB exe. I also specify the classpath (System
> Enviroment Variable) pointing to the directory (e.g. c:\pb
> Appl) that contains the JAVA class files.
>
> It didn't work. I am still getting the "Exception Thrown
> has not been handled" error. Again, it works when I run it
> in the PB IDE.
>
> Any other advice? Thanks.
>
>
>
>>Hello,
>>
>>What I do for deployment of an EJB client application is
>>as follows: 1. I use Powerbuilder Runtime packager to make
>>an msi file that is easily installable for the end-user's
>>machine. I make sure that I choose the EJB client
>>functionality in the packager utility. 2. I install the
>>latest jre 1.4.2 from Sun. After the installation, I
>>manually edit the system PATH environment variable to
>>include <JRE_HOME>\bin\client directory.
>>3. I install the generated PB runtime packager. After the
>>installation, I make sure that
>><SYBASE_HOME>\Shared\Powerbuilder is in the path. 4. Copy
>>my application files in an empty directory and create a
>>shortcut on the desktop.
>>
>>In addition, If I want the PDF export functionality to
>>work on the user's PC:
>>4. I install Ghostscript from GNU. (gs706w32.exe)
>>5. I make a copy of
>><SYBASE_HOME>\Shared\Powerbuilder\drivers directory from
>>my own development PC (where the PB9 Enterprise is
>>installed) and copy this drivers folder under the user's
>>PC, the same location.
>>
>>Also, I would doubly make sure that my classpath contains
>>all the necessary classes in the user's PC. Providing the
>>classpath correctly is the last important step.
>>
>>Best Regards,
>>Gokhan Demir
>>
>>
>>
>>Jack wrote:
>>
>>>I am still having problem with deployment.
>>>
>>>Assuming my PB Deployment directory is "c:\pb Appl", I
>>>did the following:
>>>
>>>1. copy pbjvm90.dll into c:\pb Appl
>>>2. Install JRE (folder name is "jre") in the
>>>application's installed directory (under c:\pb Appl).
>>>
>>>I still got the "Exception Thrown" error. Please
>>>help!!!
>>>
>>>
>>>
>>>
>>>>we put the jre (rename the folder to -exactly- "jre") in
>>>>the application's installed directory, otherwise you'll
>>>>need to indicate what jre to use in the registry under
>>>>LOCAL_MACHINE (google for this within this group)
>>>>
>>>>Ben
>>>>In article <4210f949.6ea4.1681692777@sybase.com>, Jack
>>>>
>>>>
>>>>>says... My PB application calls a function of a java
>>>>>class. It works perfectly within the PB9 IDE, but not
>>
>>if >>>I deploy it on user's PC (Win XP). I got "Exception
>>
>>>>>Error" when trying to call the JAVA class function.
>>>>>
>>>>>I suppose I need to intall JDK1.4 on the user's PC. If
>>>>>I install JDK1.4 in "C:\java\jdk14", how does the PB
>>>>>application (exe) know where to go to look for jdk1.4?
>>>>>
>>>>>I also copied the JAVA class files into the directory
>>>>>where the EXE lives.
>>>>>
>>>>>Is this the only thing (jdk1.4) that I am missing for
>>>>>the PB deployment?
>>>>>
>>>>>I greatly appreciate any help. Thanks.
>>>>>


Jack Posted on 2005-02-18 22:44:16.0Z
Sender: 7ba6.42166f9b.1804289383@sybase.com
From: Jack
Newsgroups: sybase.public.powerbuilder.ejbclient
Subject: Re: Call JAVA class from PB
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <42166fbc.7bab.1681692777@sybase.com>
References: <MPG.1c7bca43fde624cd9896d1@forums.sybase.com>
X-Original-NNTP-Posting-Host: 10.22.241.42
X-Original-Trace: 18 Feb 2005 14:44:12 -0800, 10.22.241.42
Lines: 38
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 18 Feb 2005 14:44:14 -0800, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 18 Feb 2005 14:44:16 -0800
X-Trace: forums-1-dub 1108766656 10.22.108.75 (18 Feb 2005 14:44:16 -0800)
X-Original-Trace: 18 Feb 2005 14:44:16 -0800, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:445
Article PK: 424621

I am still having problem with deployment.

Assuming my PB Deployment directory is "c:\pb Appl", I did
the following:

1. copy pbjvm90.dll into c:\pb Appl
2. Install JRE (folder name is "jre") in the application's
installed directory (under c:\pb Appl).

I still got the "Exception Thrown" error. Please help!!!

> we put the jre (rename the folder to -exactly- "jre") in
> the application's installed directory, otherwise you'll
> need to indicate what jre to use in the registry under
> LOCAL_MACHINE (google for this within this group)
>
> Ben
> In article <4210f949.6ea4.1681692777@sybase.com>, Jack
> > says... My PB application calls a function of a java
> > class. It works perfectly within the PB9 IDE, but not if
> > I deploy it on user's PC (Win XP). I got "Exception
> > Error" when trying to call the JAVA class function.
> >
> > I suppose I need to intall JDK1.4 on the user's PC. If
> > I install JDK1.4 in "C:\java\jdk14", how does the PB
> > application (exe) know where to go to look for jdk1.4?
> >
> > I also copied the JAVA class files into the directory
> > where the EXE lives.
> >
> > Is this the only thing (jdk1.4) that I am missing for
> > the PB deployment?
> >
> > I greatly appreciate any help. Thanks.
> >


Bede <bede_nosp Posted on 2005-02-22 08:16:45.0Z
From: Bede <bede_nosp@m_sofico.be>
Newsgroups: sybase.public.powerbuilder.ejbclient
Subject: Re: Call JAVA class from PB
Message-ID: <MPG.1c83f5628696cd249896d4@forums.sybase.com>
References: <MPG.1c7bca43fde624cd9896d1@forums.sybase.com> <42166fbc.7bab.1681692777@sybase.com>
Organization: Sofico
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: 22 Feb 2005 00:16:45 -0800
X-Trace: forums-1-dub 1109060205 194.7.38.226 (22 Feb 2005 00:16:45 -0800)
X-Original-Trace: 22 Feb 2005 00:16:45 -0800, uu194-7-38-226.unknown.uunet.be
Lines: 47
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:449
Article PK: 424624

see help for full details on what dlls are required (depends highly on
what features you use)
for ejbclient, don't forget to include both pbejbclient90.pbd
and pbejbclient90.dll as well.

Ben

In article <42166fbc.7bab.1681692777@sybase.com>, Jack says...

> I am still having problem with deployment.
>
> Assuming my PB Deployment directory is "c:\pb Appl", I did
> the following:
>
> 1. copy pbjvm90.dll into c:\pb Appl
> 2. Install JRE (folder name is "jre") in the application's
> installed directory (under c:\pb Appl).
>
> I still got the "Exception Thrown" error. Please help!!!
>
>
>
>
> > we put the jre (rename the folder to -exactly- "jre") in
> > the application's installed directory, otherwise you'll
> > need to indicate what jre to use in the registry under
> > LOCAL_MACHINE (google for this within this group)
> >
> > Ben
> > In article <4210f949.6ea4.1681692777@sybase.com>, Jack
> > > says... My PB application calls a function of a java
> > > class. It works perfectly within the PB9 IDE, but not if
> > > I deploy it on user's PC (Win XP). I got "Exception
> > > Error" when trying to call the JAVA class function.
> > >
> > > I suppose I need to intall JDK1.4 on the user's PC. If
> > > I install JDK1.4 in "C:\java\jdk14", how does the PB
> > > application (exe) know where to go to look for jdk1.4?
> > >
> > > I also copied the JAVA class files into the directory
> > > where the EXE lives.
> > >
> > > Is this the only thing (jdk1.4) that I am missing for
> > > the PB deployment?
> > >
> > > I greatly appreciate any help. Thanks.
> > >
>


Jack Posted on 2005-02-23 22:26:33.0Z
Sender: 1fe1.421d0242.1804289383@sybase.com
From: Jack
Newsgroups: sybase.public.powerbuilder.ejbclient
Subject: Re: Call JAVA class from PB
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <421d0318.2002.1681692777@sybase.com>
References: <MPG.1c83f5628696cd249896d4@forums.sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 23 Feb 2005 14:26:33 -0800
X-Trace: forums-1-dub 1109197593 10.22.241.41 (23 Feb 2005 14:26:33 -0800)
X-Original-Trace: 23 Feb 2005 14:26:33 -0800, 10.22.241.41
Lines: 72
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:452
Article PK: 424630

Thanks for the advice.

I made 2 changes (see below) and it is now working.
Cheeers!

1. I modify the classpath in my EJB Proxy Project and
regenerate it. Before the change, I enter "c:\pb app" for
the classpath since the JAVA class files are in "c:\pb app".
I changed it to "." I guess I don't understand the meaning
of "." as the classpath.

2. I include pbejbclient90.jar plus other required dlls.
If I don't include pbejbclient90.jar, it won't work.

Now it is working; and I don't know if both step1 and step2
fixed the problem or just step2.

I have one more question. I installed JRE1.4.2. Do I need
the entire JRE folder (which include 3 subfolders bin,
javaws, lib) or just JRE\BIN?

Thanks again Bede and Gokhan for the help!

> see help for full details on what dlls are required
> (depends highly on what features you use)
> for ejbclient, don't forget to include both
> pbejbclient90.pbd and pbejbclient90.dll as well.
>
> Ben
>
> In article <42166fbc.7bab.1681692777@sybase.com>, Jack
> > says... I am still having problem with deployment.
> >
> > Assuming my PB Deployment directory is "c:\pb Appl", I
> > did the following:
> >
> > 1. copy pbjvm90.dll into c:\pb Appl
> > 2. Install JRE (folder name is "jre") in the
> > application's installed directory (under c:\pb Appl).
> >
> > I still got the "Exception Thrown" error. Please
> > help!!!
> >
> >
> >
> > > we put the jre (rename the folder to -exactly- "jre")
> > > in the application's installed directory, otherwise
> > > you'll need to indicate what jre to use in the
> > > registry under LOCAL_MACHINE (google for this within
> > this group) >
> > > Ben
> > > In article <4210f949.6ea4.1681692777@sybase.com>, Jack
> > > > says... My PB application calls a function of a java
> > > > class. It works perfectly within the PB9 IDE, but
> > > > not if I deploy it on user's PC (Win XP). I got
> > > > "Exception Error" when trying to call the JAVA class
> > > function. >
> > > > I suppose I need to intall JDK1.4 on the user's PC.
> > > > If I install JDK1.4 in "C:\java\jdk14", how does the
> > > > PB application (exe) know where to go to look for
> > > jdk1.4? >
> > > > I also copied the JAVA class files into the
> > > > directory where the EXE lives.
> > > >
> > > > Is this the only thing (jdk1.4) that I am missing
> > > > for the PB deployment?
> > > >
> > > > I greatly appreciate any help. Thanks.
> > > >
> >


Bede <bede_nosp Posted on 2005-02-24 08:03:21.0Z
From: Bede <bede_nosp@m_sofico.be>
Newsgroups: sybase.public.powerbuilder.ejbclient
Subject: Re: Call JAVA class from PB
Message-ID: <MPG.1c87a8af9d9cab1c9896d7@forums.sybase.com>
References: <MPG.1c83f5628696cd249896d4@forums.sybase.com> <421d0318.2002.1681692777@sybase.com>
Organization: Sofico
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-15"
Content-Transfer-Encoding: 7bit
User-Agent: MicroPlanet-Gravity/2.70.2067
X-Original-NNTP-Posting-Host: uu194-7-38-226.unknown.uunet.be
X-Original-Trace: 24 Feb 2005 00:03:17 -0800, uu194-7-38-226.unknown.uunet.be
Lines: 85
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 24 Feb 2005 00:03:18 -0800, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 24 Feb 2005 00:03:21 -0800
X-Trace: forums-1-dub 1109232201 10.22.108.75 (24 Feb 2005 00:03:21 -0800)
X-Original-Trace: 24 Feb 2005 00:03:21 -0800, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:453
Article PK: 424632

see inline

In article <421d0318.2002.1681692777@sybase.com>, Jack says...

> Thanks for the advice.
>
> I made 2 changes (see below) and it is now working.
> Cheeers!
>
> 1. I modify the classpath in my EJB Proxy Project and
> regenerate it. Before the change, I enter "c:\pb app" for
> the classpath since the JAVA class files are in "c:\pb app".
> I changed it to "." I guess I don't understand the meaning
> of "." as the classpath.

"." refers to the application's install directory (current directory)

>
> 2. I include pbejbclient90.jar plus other required dlls.
> If I don't include pbejbclient90.jar, it won't work.
oh yes, you def. need the jar as well

>
> Now it is working; and I don't know if both step1 and step2
> fixed the problem or just step2.
>
> I have one more question. I installed JRE1.4.2. Do I need
> the entire JRE folder (which include 3 subfolders bin,
> javaws, lib) or just JRE\BIN?
just the jre (which is more than jre\bin btw)

>
> Thanks again Bede and Gokhan for the help!
HTH

>
>
>
> > see help for full details on what dlls are required
> > (depends highly on what features you use)
> > for ejbclient, don't forget to include both
> > pbejbclient90.pbd and pbejbclient90.dll as well.
> >
> > Ben
> >
> > In article <42166fbc.7bab.1681692777@sybase.com>, Jack
> > > says... I am still having problem with deployment.
> > >
> > > Assuming my PB Deployment directory is "c:\pb Appl", I
> > > did the following:
> > >
> > > 1. copy pbjvm90.dll into c:\pb Appl
> > > 2. Install JRE (folder name is "jre") in the
> > > application's installed directory (under c:\pb Appl).
> > >
> > > I still got the "Exception Thrown" error. Please
> > > help!!!
> > >
> > >
> > >
> > > > we put the jre (rename the folder to -exactly- "jre")
> > > > in the application's installed directory, otherwise
> > > > you'll need to indicate what jre to use in the
> > > > registry under LOCAL_MACHINE (google for this within
> > > this group) >
> > > > Ben
> > > > In article <4210f949.6ea4.1681692777@sybase.com>, Jack
> > > > > says... My PB application calls a function of a java
> > > > > class. It works perfectly within the PB9 IDE, but
> > > > > not if I deploy it on user's PC (Win XP). I got
> > > > > "Exception Error" when trying to call the JAVA class
> > > > function. >
> > > > > I suppose I need to intall JDK1.4 on the user's PC.
> > > > > If I install JDK1.4 in "C:\java\jdk14", how does the
> > > > > PB application (exe) know where to go to look for
> > > > jdk1.4? >
> > > > > I also copied the JAVA class files into the
> > > > > directory where the EXE lives.
> > > > >
> > > > > Is this the only thing (jdk1.4) that I am missing
> > > > > for the PB deployment?
> > > > >
> > > > > I greatly appreciate any help. Thanks.
> > > > >
> > >
>