1. Pacito Nefulda
  2. PowerBuilder
  3. Monday, 21 January 2019 16:30 PM UTC

Guys,

We are trying to convert our current PB 12.5 application to PB 2017 R3. We managed to convert our application to 32Bit and currently testing it and at the same time we are trying the 64Bit version. Unfortunately one feature of our system seems to be encounter a problem with the 64BIt version. The code below is the one that seems to hang when executing it in 64 BIT. We are using JAVA JDK 1.7.0_02 32 bit. We downloaded the 64 bit JAVA JDK 1.8 something and add it to our path and JAVA_HOME environment but seems to hang at line 'll_return = &
iJavaVM.CreateJavaVM("", FALSE) '. Any idea why? Thank you in advance.

 

 

EJBConnection lEJBConn

long ll_return
iJavaVM = CREATE JavaVM
// need to specify the classpath form the Simple class
ll_return = &
iJavaVM.CreateJavaVM("", FALSE)
CHOOSE CASE ll_return
CASE 1
CASE 0
CASE -1
MessageBox ( "u_p8 Error", "jvm.dll was not found in the classpath.")
CASE -2
MessageBox ( "u_p8 Error", "pbejbclient125.jar file was not found." )
CASE ELSE
MessageBox ( "u_p8 Error", "Unknown result (" + String (ll_return ) + ")" )
END CHOOSE

IF ll_return < 0 THEN
DESTROY iJavaVM
END IF
MessageBox('Running...','lEJBConn = CREATE EJBConnection')
lEJBConn = CREATE EJBConnection
MessageBox('Running...','ll_return = lEJBConn.CreateJavaInstance( inv_createDoc, "CreateDoc")')
ll_return = lEJBConn.CreateJavaInstance( inv_createDoc, "CreateDoc")
MessageBox('Result Running...','ll_return = lEJBConn.CreateJavaInstance( inv_createDoc, "CreateDoc") is ' + string(ll_return))
IF ll_return <> 0 THEN
MessageBox("u_p8 Error", "CreateJavaInstance returned " +string(ll_return))
destroy lEJBConn
END IF

 

 

Accepted Answer
Pacito Nefulda Accepted Answer Pending Moderation
  1. Thursday, 24 January 2019 16:00 PM UTC
  2. PowerBuilder
  3. # Permalink

Chris,

We did downloaded the 64 Bit JVM. Everything works now. Thanks for your help. Regards.

 

Comment
  1. Chris Pollach @Appeon
  2. Friday, 25 January 2019 14:43 PM UTC
Hi Pacito;

That is excellent news ... happy PB'ing!

Regards ... Chris
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 22 January 2019 17:43 PM UTC
  2. PowerBuilder
  3. # 1

Hi Pacito;

    I saw your post yesterday - but, it was the US holiday and we were closed here at Appeon. I was able to recompile my PB2Java example last night and then it too failed to load the JVM. However, I was able to figure it out and now the App works great. Here are some key issues to watch out for when migrating to R3 ....

1) Make sure that you replace the "pbejbclient170.pbd" file. The R3 edition is 1K bigger.

2) For your 64 bit App Exe's, make sure that you install the 64 bit JVM. The basic Java installation from Oracle only installs the 32 bit version of the JVM.

  FYI: https://www.java.com/en/download/manual.jsp

  My PB2Java example has now been updated for PB2017R3. You can download it from here:  https://sourceforge.net/projects/stdfndclass/files/Applications/PowerBuilder/PB2Java/

Note1: The PB2Java example includes the 32/64 bit P-Code & 32 M-Code compiles. While both P-Codes will run OK  (for me for sure), the 32bit EXE will always crash hard. I will submit a ticket for this as I have no idea why at this time.

Note2: I tested my PB2Java App using ...

java version "1.8.0_201"
Java(TM) SE Runtime Environment (build 1.8.0_201-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.201-b09, mixed mode)

HTH

Regards ... Chris

Comment
  1. Roland Smith
  2. Tuesday, 22 January 2019 17:49 PM UTC
I recommend just importing the pbx into a pbl in the target and not using the pbd at all. Doing that negates the mismatched build problem. PowerBuilder 9 & 10 are the only ones that require a pbd, in 10.5 the Import Extension option was added.
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.