Article View: borland.public.jbuilder.java.api
Article #3203JNI - Null pointer exeption
From: Eduard Andre
Date: Mon, 09 Mar 1998 00:00
Date: Mon, 09 Mar 1998 00:00
98 lines
4023 bytes
4023 bytes
--------------A1D43857FA9FBEB9D953FEA9
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
I need help urgent.
Problem:
I have created a DLL in Visual C++, which reads data from DataFlex
files. I use this DLL with a JBuilder App, which represents the whole
UI.
If I start the application an call the external functions, I always get
a NullPointer- Exception. If I start the same App in JBuilders debug
mode everything works great.
Have anybody an idea what happens.
here are a code fragment:
void mnuTest1_actionPerformed(ActionEvent e) {
long timed;
int rcount = 0;
long fHandle;
int err = 0;
statusBar.setText("");
fHandle = dfDLL.dfOpenFile("D:\\RT97\\KUN.DAT", 0); <<< works fine
timed = System.currentTimeMillis();
while (dfDLL.dfRecordFind(fHandle,1,4) == 0) { <<<<
NullPointerExcetion
rcount++;
}
txtAnzahl.setText(java.lang.Integer.toString(rcount));
txtCount.setText(dfDLL.dfFieldGetString(fHandle,1));
timed = (System.currentTimeMillis()- timed);
statusBar.setText(java.lang.Long.toString(timed)+" MilliSekunden");
dfDLL.dfCloseFile(fHandle);
}
It seems it's a timing problem, but I don't no why.
At the moment whe have only an email adress for the whole company. If
anybody send me an answer please add my name.
Many thanks
Eduard Andre
--------------A1D43857FA9FBEB9D953FEA9
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<HTML>
I need help urgent.
<BR><B><U>Problem</U></B>:
<BR>I have created a DLL in Visual C++, which reads data from DataFlex
files. I use this DLL with a JBuilder App, which represents the whole UI.
<BR>If I start the application an call the external functions, I
always get a NullPointer- Exception. If I start the same App in JBuilders
debug mode everything works great.
<P>Have anybody an idea what happens.
<P>here are a code fragment:
<P> void mnuTest1_actionPerformed(ActionEvent e) {
<BR> long timed;
<BR> int rcount =
0;
<BR> long fHandle;
<BR> int err = 0;
<BR>
<BR> statusBar.setText("");
<BR> fHandle = dfDLL.dfOpenFile("D:\\RT97\\KUN.DAT",
0); <B><FONT COLOR="#3333FF"><<< works fine</FONT></B>
<BR> timed = System.currentTimeMillis();
<BR> while (dfDLL.dfRecordFind(fHandle,1,4) == 0) {
<B><FONT COLOR="#FF0000"><<<< NullPointerExcetion</FONT></B>
<BR> rcount++;
<BR> }
<BR> txtAnzahl.setText(java.lang.Integer.toString(rcount));
<BR> txtCount.setText(dfDLL.dfFieldGetString(fHandle,1));
<BR> timed = (System.currentTimeMillis()- timed);
<BR> statusBar.setText(java.lang.Long.toString(timed)+"
MilliSekunden");
<BR> dfDLL.dfCloseFile(fHandle);
<BR> }
<P>It seems it's a timing problem, but I don't no why.
<P>At the moment whe have only an email adress for the whole company. If
anybody send me an answer please add my name.
<P>Many thanks
<BR><B>Eduard Andre</B>
<BR> </HTML>
--------------A1D43857FA9FBEB9D953FEA9--
Technical Details
Message-ID:
<350410F3.296C69D6@aon.at>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1089d0,abf8afec4bf3b834,start X-Google-Attributes: gid1089d0,public From: Eduard Andre <vendare@aon.at> Subject: JNI - Null pointer exeption Date: 1998/03/09 Message-ID: <350410F3.296C69D6@aon.at> X-Deja-AN: 332293608 Content-Type: multipart/alternative; boundary="------------A1D43857FA9FBEB9D953FEA9" Organization: Another Netscape Collabra Server User Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.api