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

Error calling method of a PBNI object

226 views
Skip to first unread message

olivier

unread,
Feb 13, 2004, 11:17:39 AM2/13/04
to
Hi,
Run my deployed application I get this error
(PBXRuntimeError) :
"PBNI exeption: Error calling method of a PBNI object"

this is the code:
//declaration used to get data from xml code
PBDOM_BUILDER pbdom_builder_new
PBDOM_DOCUMENT pbdom_doc
PBDOM_OBJECT pbdom_obj_array_root[]
PBDOM_OBJECT pbdom_obj_array_data[]
int i
TRY
//parsing if parsing != succed return error
long ret
ret= XMLParseString(xml_code)
if ret<>0 then return ret
//string XMLTravco -> PBDOM_DOCUMENT pbdom_doc
pbdom_builder_new = Create PBDOM_Builder
pbdom_doc = pbdom_builder_new.BuildFromString(xml_code)
//getrootElement
pbdom_doc.GetRootElement().GetContent(ref
pbdom_obj_array_root)
//getdatasElement
for i=4 to upperbound(pbdom_obj_array_root) step 2
pbdom_obj_array_root[i].GetContent(ref
pbdom_obj_array_data)
//create country
add_country(pbdom_obj_array_data)
next

CATCH (PBDOM_Exception except)
MessageBox ('error', "PBDOM exception: " + except.Text)
CATCH ( PBXRuntimeError re )
MessageBox( 'error', "PBNI exception: " + re.getMessage() )
END TRY

I get no error with this code when I run it from the PB9
IDE.

thanks olivier.

Bruce Armstrong [TeamSybase]

unread,
Feb 13, 2004, 12:50:36 PM2/13/04
to
Did you deploy the PBDOM90.DLL and PBDOM90.PBD files with your app?

gzach

unread,
Mar 9, 2004, 10:45:50 PM3/9/04
to
Probable Solution or Workaround: Reference all PBDOM classes
in your powerscript irrespective of whether you are using it
or not.

gzach

unread,
Mar 9, 2004, 10:51:18 PM3/9/04
to
Can you try the following.

ScenarioA:
1. If in the project painter you have selected the
pbdom90.pbd to be deployed as a dll, then the original
pbdom90.dll in the pb shared directory is overwritten by
this newly created dll.

2. Solution: a. Rename your pbdom90.pbd to something else
like pbdom90Ex.pbd. b. Include it in your PB application.
c.Then deploy the project. So your original pbdom90.dll
which is distributed with PB is not overwritten.

ScenarioB:
1. If in the project painter you have not selected the
pbdom90.pbd to be deployed as a dll, then only the PBDOM
objects referenced in your script get deployed to the EXE.

Eg:
pbdom_object[] obj
pbdom_document doc

doc.getContent(obj[]) will fail if it tries to create a
PBDOM class instance internally which is not referenced in
your script.

2. Solution: a. Reference all PBDOM classes in your
powerscript.

Thanks
GZACH.

0 new messages