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.

PB10.5 : CreateJavaVM not working with exe

4 posts in EJB Client Last posting was on 2007-08-27 09:39:41.0Z
Sandeep Posted on 2007-08-22 15:57:20.0Z
Sender: 3288.46cc58ec.1804289383@sybase.com
From: sandeep
Newsgroups: sybase.public.powerbuilder.ejbclient
Subject: PB10.5 : CreateJavaVM not working with exe
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <46cc5ce0.32dd.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 22 Aug 2007 08:57:20 -0700
X-Trace: forums-1-dub 1187798240 10.22.241.41 (22 Aug 2007 08:57:20 -0700)
X-Original-Trace: 22 Aug 2007 08:57:20 -0700, 10.22.241.41
Lines: 20
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:754
Article PK: 424853

Hi,
I have created sample application as given at
http://www.sybase.com/detail?id=1037085

Applicaiton works fine with PB development environment. Now
I have compiled the exe of the same and that is not
working... returns -1 for 'CreateJavaVM'. I have copied
jvm.dll ,PBjvm105.DLL, pbejbclient105.pbd,
pbejbclient105.jar to the same directory of application exe.

When I searched on my machine I found many jvm.dll... even
in powerbuilder folder there are two under client and server
folder. I am not sure which to take?

I don't know where else it searchs for this dll and let me
know if i am missing any other .dlls or .jar files to be
copied

Regards,
Sandeep


bede Posted on 2007-08-23 13:54:30.0Z
From: bede <bedenosp@msofico.be>
Newsgroups: sybase.public.powerbuilder.ejbclient
Subject: Re: PB10.5 : CreateJavaVM not working with exe
Message-ID: <MPG.2137afb2d933bd209898a5@forums.sybase.com>
References: <46cc5ce0.32dd.1681692777@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: 23 Aug 2007 06:54:30 -0700
X-Trace: forums-1-dub 1187877270 194.7.38.226 (23 Aug 2007 06:54:30 -0700)
X-Original-Trace: 23 Aug 2007 06:54:30 -0700, uu194-7-38-226.unknown.uunet.be
Lines: 42
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:755
Article PK: 424855

haven't seen the testcase, but do check out the registry settings (local machine) for java
that define the relative directory where the classes & JRE are located.

in order to use the ones in the directory of the installed application, we set it as follows:

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

obviously -in this example- we have a jre folder where the exe is deployed

HTH,

Ben

PS: activate JVM logging to find out from where the classes are loaded/used


In article <46cc5ce0.32dd.1681692777@sybase.com>, sandeep says...

> Hi,
> I have created sample application as given at
> http://www.sybase.com/detail?id=1037085
>
> Applicaiton works fine with PB development environment. Now
> I have compiled the exe of the same and that is not
> working... returns -1 for 'CreateJavaVM'. I have copied
> jvm.dll ,PBjvm105.DLL, pbejbclient105.pbd,
> pbejbclient105.jar to the same directory of application exe.
>
> When I searched on my machine I found many jvm.dll... even
> in powerbuilder folder there are two under client and server
> folder. I am not sure which to take?
>
> I don't know where else it searchs for this dll and let me
> know if i am missing any other .dlls or .jar files to be
> copied
>
> Regards,
> Sandeep
>


Brett Birschbach Posted on 2007-08-24 20:01:50.0Z
Sender: 726c.46cf2953.1804289383@sybase.com
From: Brett Birschbach
Newsgroups: sybase.public.powerbuilder.ejbclient
Subject: Re: PB10.5 : CreateJavaVM not working with exe
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <46cf392e.73b2.1681692777@sybase.com>
References: <MPG.2137afb2d933bd209898a5@forums.sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 24 Aug 2007 13:01:50 -0700
X-Trace: forums-1-dub 1187985710 10.22.241.41 (24 Aug 2007 13:01:50 -0700)
X-Original-Trace: 24 Aug 2007 13:01:50 -0700, 10.22.241.41
Lines: 66
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:756
Article PK: 424856

I'm having similar problems with starting my Java VM for a
deployed app. I can get it to work on some computers and
not on others, so I'm trying to figure out the correct
combination of settings.

Modifying the registry keys, at least for PB 11, for JDK and
JRE locations does absolutely nothing except for change my
Java version in the IDE. This has no bearing on the
deployed app.

Am I missing something?

Furthermore, though it is not documented, my testing shows
that setting the $JAVA_HOME environment variable to a JDK
will cause the deployed app to use that java version instead
of the default in the PB shared directory.

This is so frustrating...the documentation on running java
from a deployed app is extremely lacking...

> haven't seen the testcase, but do check out the registry
> settings (local machine) for java that define the
> relative directory where the classes & JRE are located.
>
> in order to use the ones in the directory of the installed
> application, we set it as follows:
>
> [HKEY_LOCAL_MACHINE\SOFTWARE\Sybase\PowerBuilder\10.5\Java
> ] "JDKLocation"="."
> "JDKLocationDef"="."
> "JREBinLocation"=".\\jre\\bin\\client"
> "JREBinLocationDef"=".\\jre\\bin\\client"
>
> obviously -in this example- we have a jre folder where the
> exe is deployed
>
> HTH,
>
> Ben
>
> PS: activate JVM logging to find out from where the
> classes are loaded/used
>
>
> In article <46cc5ce0.32dd.1681692777@sybase.com>, sandeep
> > says... Hi,
> > I have created sample application as given at
> > http://www.sybase.com/detail?id=1037085
> >
> > Applicaiton works fine with PB development environment.
> > Now I have compiled the exe of the same and that is not
> > working... returns -1 for 'CreateJavaVM'. I have copied
> > jvm.dll ,PBjvm105.DLL, pbejbclient105.pbd,
> > pbejbclient105.jar to the same directory of application
> > exe.
> > When I searched on my machine I found many jvm.dll...
> > even in powerbuilder folder there are two under client
> > and server folder. I am not sure which to take?
> >
> > I don't know where else it searchs for this dll and let
> > me know if i am missing any other .dlls or .jar files to
> > be copied
> >
> > Regards,
> > Sandeep
> >


bede Posted on 2007-08-27 09:39:41.0Z
From: bede <bedenosp@msofico.be>
Newsgroups: sybase.public.powerbuilder.ejbclient
Subject: Re: PB10.5 : CreateJavaVM not working with exe
Message-ID: <MPG.213ca2814fdc64259898a6@forums.sybase.com>
References: <MPG.2137afb2d933bd209898a5@forums.sybase.com> <46cf392e.73b2.1681692777@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: 27 Aug 2007 02:39:41 -0700
X-Trace: forums-1-dub 1188207581 194.7.38.226 (27 Aug 2007 02:39:41 -0700)
X-Original-Trace: 27 Aug 2007 02:39:41 -0700, uu194-7-38-226.unknown.uunet.be
Lines: 81
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:757
Article PK: 424857

Can't say much on PB 11 yet, but for prior versions (eg 10.5) Java configuration properties
are stored in separate folders for IDE and RunTime (deployed exe)

HKEY_LOCAL_MACHINE\SOFTWARE\Sybase\PowerBuilder\10.5\Java\PBIDECONFIG
HKEY_LOCAL_MACHINE\SOFTWARE\Sybase\PowerBuilder\10.5\Java\PBRTCONFIG

Depending on the app. server, you'll have to define specific startup options.
- define what JVM logging you want
- extra JVM startup props (e.g. required to connect to a WebSphere server)
...

in my experience, common problems are:
- JVM doesn't load -> check environment variables (java, path, javahome) & LOCALMACHINE
settings on the deployed PCs.

- lookup/connect fails (check for correct JVM loaded) -> check classpath, app.server
dependent classes present, compressed jars (best to zip with 0% compression), app.server
deployment

- serialization errors (eg: "cannot read from underlying bridge") --> client classes doesn't
match server classes

- PBNI -> incompatible PB proxies for java classes

Ben

PS: It's true that PB-java doc/samples is not sufficient, IMO it deserves much more
attention.


In article <46cf392e.73b2.1681692777@sybase.com>, Brett Birschbach says...

> I'm having similar problems with starting my Java VM for a
> deployed app. I can get it to work on some computers and
> not on others, so I'm trying to figure out the correct
> combination of settings.
>
> Modifying the registry keys, at least for PB 11, for JDK and
> JRE locations does absolutely nothing except for change my
> Java version in the IDE. This has no bearing on the
> deployed app.
>
> Am I missing something?
>
> Furthermore, though it is not documented, my testing shows
> that setting the $JAVA_HOME environment variable to a JDK
> will cause the deployed app to use that java version instead
> of the default in the PB shared directory.
>
> This is so frustrating...the documentation on running java
> from a deployed app is extremely lacking...
>
> > haven't seen the testcase, but do check out the registry
> > settings (local machine) for java that define the
> > relative directory where the classes & JRE are located.
> >
> > in order to use the ones in the directory of the installed
> > application, we set it as follows:
> >
> > [HKEY_LOCAL_MACHINE\SOFTWARE\Sybase\PowerBuilder\10.5\Java
> > ] "JDKLocation"="."
> > "JDKLocationDef"="."
> > "JREBinLocation"=".\\jre\\bin\\client"
> > "JREBinLocationDef"=".\\jre\\bin\\client"
> >
> > obviously -in this example- we have a jre folder where the
> > exe is deployed
> >
> > HTH,
> >
> > Ben
> >
> > PS: activate JVM logging to find out from where the
> > classes are loaded/used
> >
> >
> > In article <46cc5ce0.32dd.1681692777@sybase.com>, sandeep
> > > says... Hi,
> > > I have created sample application as given at
> > > http://www.sybase.com/detail?id=1037085
> > >
> > > Applicaiton works fine with PB development environment.