Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Using ejb_proxy for java call - error in compiled runtime

91 views
Skip to first unread message

Steve

unread,
Sep 6, 2007, 1:35:04 PM9/6/07
to
I posted this over on the pbni forum but was told to try here, so sorry for
the crosspost.

I've got a simple ejb proxy working in the IDE (PB10) and have managed to
compile it. Problem is, when I click the button running the code which
makes the proxy call, I get an App Terminated Error:

Error calling method of a PBNI object

The error is happening on this line:

li_return = l_jvm.createJavaVM( "C:\Development\PBuilder\TestingThings",
FALSE )

This is a project with 3 pbls, 1 that is a regular pbl that compiles to an
.exe, the other two are the ejbclient and one that is the holder of the
proxy object. The .exe is running from the same directory as the code is
but I'm figuring it's something to do with the app not finding a resource
that the IDE is aware of. Problem is, I'm new to this so I'm not exactly
sure what I should be looking for or checking; Java isn't in my 'comfort'
zone as far as understanding goes.

Any hints? The end goal is to take the ejb proxy we create (to make java
calls) and deploy the whole thing as an app. This is just a small test of
some larger functionality we need to create.

Thanks.

Ivan

unread,
Sep 7, 2007, 9:32:21 PM9/7/07
to
I thing you should try, usually"Error calling method of a PBNI object" will
occur when your Client Jar file is inconsistent with your deployed Jar file
within your Application Server. So you can recomplie all your java source
and generate both updated client jar file and deployed jar file and also
regenerate your proxy in PB. then try to execute the program again.

"Steve" <nob...@home.com> 撰寫於郵件新聞:46e03a48$1@forums-1-dub...

bede

unread,
Sep 10, 2007, 8:00:34 AM9/10/07
to
after you get the error, exit your application and go back to PB IDE.
Check the Java status via menu Tools/System Options/Java and when running, verify that the
JRE and classPath are the ones that you had expected.
If no Java is running, something must be wrong with the location PB searches for the JRE, so
doublecheck that as well (see HKEY_LOCAL_MACHINE\SOFTWARE\Sybase\PowerBuilder\10.X\Java )

Good luck,

Ben

PS: googling this newsgroup may give you more info


In article <46e03a48$1@forums-1-dub>, nob...@home.com says...

Steve

unread,
Sep 11, 2007, 9:00:40 AM9/11/07
to
I've been pressed with other matters so I haven't had time to recompile
everything as Ivan has suggested...

However from your suggestion I feel I need to clarify the problem.

I can run the app just fine from within the IDE. The error happens when I
try to run the compiled/deployed executable.


"bede" <bede...@msofico.be> wrote in message
news:MPG.214f50214...@forums.sybase.com...

bede

unread,
Sep 12, 2007, 3:25:21 AM9/12/07
to
my mistake..

in that case focus on:
- deployment of JRE compared to exe should be reflected by reg settings, eg: when copying a
jre into the folder with the exe, you could use these settings:
[HKEY_LOCAL_MACHINE\SOFTWARE\Sybase\PowerBuilder\10.5\Java]
"JDKLocation"="."
"JDKLocationDef"="."
"JREBinLocation"=".\\jre\\bin\\client"
"JREBinLocationDef"=".\\jre\\bin\\client"

- Check the settings under HKEY_LOCAL_MACHINE\SOFTWARE\Sybase\PowerBuilder\10.5\Java
\PBRTConfig for specific needs regarding your application server (eg: websphere usually
requires extras)

- start JavaVM in debug mode and interpret vm.out. indicate what you want logged in registry
again:

[HKEY_LOCAL_MACHINE\SOFTWARE\Sybase\PowerBuilder\10.5\Java\PBRTConfig\PBJVMconfig]
"0"="-verbose:jni"
"1"="-verbose:class"
"Count"="2"

In article <46e69178@forums-1-dub>, nob...@home.com says...

Steve

unread,
Jan 3, 2008, 2:16:45 PM1/3/08
to
bede,

It's been a while and I'm now back to this mess.

I've set the java debug via PB to true:
li_return = l_jvm.createJavaVM( "C:\Development\PBuilder\EJBTesting", TRUE )

...and I get mixed results. Sometimes I'll get vm.out from running in the
IDE, but my issue is with the compiled version. I have yet to see output
from the debugger running the .exe.

You're registry checks below I really have no idea as to their meaning.
We're not running any servers, this is just doing an EJBProxy to call a java
class. The PBJVMconfig...I have exactly what you have below, I don't know
what it means.

I have another post in the PBNI group as we found a codexchange example that
bypasses the proxy...I'm not sure how but it works; Howerver I'm in the same
situation, I get an error calling method of PBNI object error trying to
execute the compiled version.

I'm lost and the other guy on my team helping can't believe this is THAT
difficult.

1=


"bede" <bede...@msofico.be> wrote in message

news:MPG.2151b2c68...@forums.sybase.com...

bede

unread,
Feb 6, 2008, 10:03:46 AM2/6/08
to
It's been a while for me too ;)


Please compare the values of following registry settings

HKEY_LOCAL_MACHINE\SOFTWARE\Sybase\PowerBuilder\XX.XX\Java\PBRTConfig

vs.

HKEY_LOCAL_MACHINE\SOFTWARE\Sybase\PowerBuilder\XX.XX\Java\PBIDEConfig

do they contain the same keys & values?


In article <477d349d@forums-1-dub>, nob...@home.com says...

0 new messages