1. Dennis Eisler
  2. PowerBuilder
  3. Friday, 25 February 2022 19:15 PM UTC

We have moved to PowerBuilder 2021 in our dev environment and deploy our application by using InstallShield. The following code now generates an error in the deployed application.

pbdom_document    pbdom_doc

pbdom_builder  pbdom_bldr

pbdom_bldr = CREATE pbdom_builder

pbdom_doc = pbdom_bldr.BuildFromString(<stringName>)  //Where <stringname> is the name of the xml string. 

The Bad Runtime Function Reference error references the "pbdom_doc = pbdom_builder.BuildFromString(string_variable)" line.

This code has worked in previous years and versions of PB. Also, this code works without a problem when running interactively from a dev computer to create an XML document. So, I am pretty sure that I am missing something in my Installshield build or deployment.

On the dev system, I do not import "Import a PB Extenstion" into a PBL (pibble).  Instead, I reference the PBDOM.pbd file in the library list:

Project file, Libraries tab: "C:\Program Files (x86)\appeon\Powerbuilder 21.0\IDE\pbdom.pbd"

When I deploy the project in Installshield, I deploy the PB 21.0 PBDOM.pbx file to the installation directory on the destination computer. I also deploy the xerces_c_2_8.dll and xerces_depdom_2_8.dll files.

(As a test, I also deployed the pbdom.pbd file but that did not seem to fix the issue)

Could you please tell me whether there are any other dependencies that I am missing or whether there is something that has changed in the new version of PB (2021) that would cause this error.

Thank you very much!

Dennis

Accepted Answer
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 25 February 2022 19:52 PM UTC
  2. PowerBuilder
  3. # Permalink

Hi Dennis;

   Did you ...

  • Remove all PBDOM objects from your current App's libraries?
  • Copy PB2021's "pbdom.pbd" library to your App's WorkSpace folder?
  • Add "pbdom.pbd" library to your App's current Target's library list?
  • Drop the use of the PBX file ( I would never recommend using PBX files)

Regards ... Chris

Comment
  1. Chris Pollach @Appeon
  2. Thursday, 3 March 2022 04:16 AM UTC
Hi Miguel ... It's the other way around. PBX's are not necessary & very dangerous to go wrong upon migrations as Dennis found out. Switch to pure PBD's for clean & easy PB version migrations. ;-)
  1. Helpful
  1. Miguel Leeuwe
  2. Thursday, 3 March 2022 04:39 AM UTC
Hi Chris,

If you say so, I'll assume you're right. I do think that the use of PBD for the pbdom has the same risk as importing the PBX into a PBL: If you forget to hookup the latest version of the PBD that comes with powerbuilder, you'll have the exact same problems as when you forget to import the latest PBX that comes with powerbuilder.

regards
  1. Helpful
  1. Chris Pollach @Appeon
  2. Thursday, 3 March 2022 19:39 PM UTC
The support problem that I have encountered 100's of times (literally) is that the PB developer forgets to delete the old imported objects. This gets then compounded when new PB developers take over the App maintenance and have no idea about how PBX works. Then compounded again with junior PB developers who have no clue (LOL). With PBD's, it's more obvious to just replace the library with the newest copy and you don't have to rummage around looking where the old objects are in order to delete them. So going the PBD route (IMHO) is the KISS approach ( I love KISS ) ;-)
  1. Helpful
There are no comments made yet.
Dennis Eisler Accepted Answer Pending Moderation
  1. Sunday, 27 February 2022 00:40 AM UTC
  2. PowerBuilder
  3. # 1

Thank you Chris and Miguel. This worked. 

I copied the pbdom.pbd to the workspace as you specified earlier, removed all pbdom-related objects from the pfcapsrv PBL, ran a rebuild and a new deployment. Everything works perfectly.

Thank you very much for all your help with this.

Dennis

Comment
  1. Chris Pollach @Appeon
  2. Sunday, 27 February 2022 01:00 AM UTC
That's awesome news Dennis ... Thanks for the feedback! :-)
  1. Helpful
  1. Miguel Leeuwe
  2. Monday, 28 February 2022 02:27 AM UTC
Glad to hear that!

When I have some time I'll have a look and try to figure out why anyone would have included the pbdom into the pfc. I would expect someone has created some kind of dependency. Even so, it would have been a better idea to add the PBD instead of the objects from the PBL.

regards
  1. Helpful
There are no comments made yet.
Dennis Eisler Accepted Answer Pending Moderation
  1. Saturday, 26 February 2022 19:15 PM UTC
  2. PowerBuilder
  3. # 2

So far, this did not work I removed the old pbd and copied the latest one to my workspace, updated the library list and created a new build. I removed the pbx from the Installshield build and added the pbd file to deploy to the installation folder on the client computers. I still receive the same error. However, I just noticed Miguel Leeuwe's comment above mentioning that I might have (do have) pbdom objects in the latest pfc PBLs (pibbles).

So, I will test this some more.

Thank you

Dennis

Comment
There are no comments made yet.
Dennis Eisler Accepted Answer Pending Moderation
  1. Friday, 25 February 2022 20:47 PM UTC
  2. PowerBuilder
  3. # 3

I have not done that. I will make all these changes and test

Thank you very much!

Dennis

Comment
  1. Miguel Leeuwe
  2. Friday, 25 February 2022 21:49 PM UTC
Also please be aware that if you've upgraded any possible "later" PFC libraries, the PBDOM objects now actually will be included already somewhere. I've never really understood why that's been done and personally, I delete them from the pfc to only use the ones distributed with PB itself or any MR releases.
  1. Helpful 1
  1. Dennis Eisler
  2. Saturday, 26 February 2022 19:11 PM UTC
I just saw this now after starting another test build. I do see the PBdom files in the pfcapsrv.pbl. Ugh. I will get rid of them and test again.



Thank you for your help!
  1. Helpful
  1. Chris Pollach @Appeon
  2. Saturday, 26 February 2022 19:33 PM UTC
FWIW: It makes no sense why anyone would put any PBDOM files in the PFC layer. Weird! :-(
  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.