Error Calling Method On Pbni Object
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. Forums Archive > PowerBuilder > XML > "Error calling method of a PBNI object" Error calling method of a PBNI object 4 posts in XML . Last posting was on 2004-03-10 03:51:18.0Z olivier Posted on 2004-02-13 16:17:39.0Z Sender: 6838.402cfb21.1804289383@sybase.comFrom: olivierNewsgroups: sybase.public.powerbuilder.xmlSubject: Error calling method of a PBNI objectX-Mailer: WebNews to Mail Gateway v1.1sMessage-ID: <402cfb3a.683b.846930886@sybase.com>X-Original-NNTP-Posting-Host: 10.22.241.42X-Original-Trace: 13 Feb 2004 08:28:42 -0800, 10.22.241.42Lines: 41X-Original-NNTP-Posting-Host: forums-2-dub.sybase.comX-Original-Trace: 13 Feb 2004 07:59:29 -0800, forums-2-dub.sybase.comNNTP-Posting-Host: forums-master.sybase.comX-Original-NNTP-Posting-Host: forums-master.sybase.comDate: 13 Feb 2004 08:17:39 -0800X-Trace: forums-1-dub 1076689059 10.22.108.75 (13 Feb 2004 08:17:39 -0800)X-Original-Trace: 13 Feb 2004 08:17:39 -0800, forums-master.sybase.comX-Authenticated-User: ngsysopPath: forums-1-dub!not-for-mailXref: forums-1-dub sybase.public.powerbuilder.xml:408 Article PK: 813454 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] Posted on 2004-02-
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. Forums Archive > PowerBuilder > EJB Client > "Error calling method of a PBNI object" Error calling method of a PBNI object 8 posts in EJB Client . http://nntp-archive.sybase.com/nntp-archive/action/article/%3C402D0A29.AF61414@teamsybase.com%3E Last posting was on 2005-06-27 20:48:49.0Z Jack Posted on 2005-06-17 00:41:48.0Z Sender: 4ad9.42b21b06.1804289383@sybase.comFrom: JackNewsgroups: sybase.public.powerbuilder.ejbclientSubject: Error calling method of a PBNI objectX-Mailer: WebNews to Mail Gateway v1.1tMessage-ID: <42b21c49.4ae8.1681692777@sybase.com>X-Original-NNTP-Posting-Host: 10.22.241.42X-Original-Trace: 16 Jun 2005 17:41:46 -0700, 10.22.241.42Lines: 32X-Original-NNTP-Posting-Host: forums-2-dub.sybase.comX-Original-Trace: 16 Jun 2005 17:41:46 -0700, forums-2-dub.sybase.comNNTP-Posting-Host: forums-master.sybase.comX-Original-NNTP-Posting-Host: forums-master.sybase.comDate: 16 Jun 2005 17:41:48 http://nntp-archive.sybase.com/nntp-archive/action/article/%3Cdkk6b1hvs9th8bonvccmb0a5ngc7cjrtpv@4ax.com%3E -0700X-Trace: forums-1-dub 1118968908 10.22.108.75 (16 Jun 2005 17:41:48 -0700)X-Original-Trace: 16 Jun 2005 17:41:48 -0700, forums-master.sybase.comX-Authenticated-User: ngsysopPath: forums-1-dub!not-for-mailXref: forums-1-dub sybase.public.powerbuilder.ejbclient:546 Article PK: 424676 I am getting "Error calling method of a PBNI object" when executing the codes below. It triggers catch (Throwable t2). It works when running the source code; it fails when running the EXE on user's PC. Please Help.... I installed Java Runtime in "C:\ProgramFiles\Sybase\Shared\PowerBuilder\jre" and I have a path variable that points to that directory. I think I have all the requred DLL/PDB/JAR files intalled in "C:\ProgramFiles\Sybase\Shared\PowerBuilder". These files include: pbjvm90.dll pbejbclient90.dll pbejbclient90.pbd pbejbclient90.jar Try gEJBConn = CREATE EJBConnection li_return_jvm = gEJBConn.CreateJavaInstance (gNCClientJava, "NCClient") catch (Throwable t2) li_return = -1 as_error_msg = t2.getMessage() + ". Contact I.S." Return li_return end try Bruce Armstrong [TeamSybase] Posted on 2005-06-17 03:45:22.0Z From: "Bruce Armstrong [TeamSybase]"
have access. Continue... SoClean Theme By Jaben Cargman (Tiny Gecko)Powered by YAF | YAF © 2003-2009, Yet Another Forum.NETThis page was generated in 0.018 seconds. Copyright © 2008-2012 Werysoft Inc. All rights reserved.
HAT RUBY SAP SEARCH SILVERLIGHT SYMBIAN VIDEO VIRTUALIZATION WEB 2.0 WEBLOGIC WEBSPHERE WIRELESS XML Home Subscribe Advertise Authors Topics Videos Events Webcasts Internet of Things | Cloud | Big Data | DevOps | Containers | Microservices | WebRTC | Java | Linux | Open Stack | Mobile | Security | SDDC PowerBuilder Authors: Chris Pollach, Yeshim Deniz, Jayaram Krishnaswamy, Kevin Benedict, Avi Rosenthal Related Topics: PowerBuilder PowerBuilder: Article PowerBuilder Native Interface Handling PBNI exceptions in PowerBuilder By Roy Kiesler Article Rating: Select ratingGive it 1/5Give it 2/5Give it 3/5Give it 4/5Give it 5/5 February 1, 2004 12:00 AM EST Reads: 8,176 Related Print Email Feedback Add This Blog This The PowerBuilder Native Interface (PBNI) is a standard C++ programming interface that allows developers to extend the PowerScript language with C++ classes and to call PowerScript functions from C++ applications. Modeled after the Java Native Interface (JNI), PBNI provides a native vehicle that extends the functionality of PowerBuilder to that of the C++ programming language. In Part 3 we triggered PowerBuilder events, called PowerScript system functions from within a PBS, and discussed accessing and manipulation arrays. In Part 4, we'll discuss handling runtime errors, debugging PBNI classes, and loading the PowerBuilder VM in a third-party application. To properly handle runtime errors in PBNI objects, it's recommended that you use exception handling mechanisms in both C++ and PowerScript. PBNI methods that are callable from PowerBuilder return a PBXRESULT (long) value. The list of possible return values is defined in pbni.h and shown in Listing 1. If an exception is caught in the PBNI method, the error handling code should return the appropriate error code to the calling PowerBuilder code as shown in Listing 2. When a PBNI object method returns any value other than PBX_OK, a PBXRuntimeError exception is thrown in the PowerBuilder application and should be intercepted by the calling PowerScript code: // PowerScript // CPBNIClass myClass TRY myClass.DoSomethingBad() CATCH ( PBXRuntimeError pbxre ) MessageBox( ?PBNI Exception?, pbxre.GetMessa