Can somebody explain me what does Java Result: -1073740791 mean. I had a code which used to send data that was saved in my mysql database, through ethernet using UDP protocol, everything worked fine until i sent fewer data(25 rows), when i started sending data in huge amount(100 rows) it used to display Java Result: -1073740791 and would stop the running code. Im using jpcap, winpcap and netbeans.
35 6186
Find out where exactly that message comes from. If it's from one of the third party APIs' method then check it's specs to see when such errors could be reported.
-
while(rs.next()) {
-
outData.append(rs.getLong(1)).append(":")
-
.append(rs.getString(2)).append(":").append(rs.getInt(3))
-
.append(":").append(rs.getString(4)).append(":")
-
.append(rs.getString(5)).append(":")
-
.append(rs.getString(6)).append("$");
-
}
-
outData.append("#");
-
/*datatypes in java and mysql
java mysql
getString varchar
getLong Bigint
getInt int, tinyint */
the error occurs after this ResultSet block, , i dont know why
You can pinpoint it further by putting those rs.getXX calls in separate statements. If it's the bigint column then use try using getBigDecimal.
i tried doing it by sending 25 rows of data per 1 iteration of for loop and it works fine. But when i try to transmit whole set of data its not working, it gives the same notification(Java Result:-1073807364).
Is their any limit for ResultSet?!
What do you mean by transmit? Where did you set the limit?
i transmit the accessed data from database to an other system via ethernet.
i have set the limit here - - String query = "select * from table_name limit "+limit1+",25";
where, limit1 holds values like 1,26,51 and so on
Maybe you are keeping the database connections open for too long while doing the transfer? Select the data into a List of results and close your result set and connection then loop through your list transferring the records.
I tried that too, without any success :(
You now need to create a small but full complete class with code that demonstrates the problem and post it. If the error is database side only like you are suggesting by saying it's affected by the limit then the example code shouldn't need to include the part that transfers the files.
I have attached the whole working code part causing the problem, please find the attachment.
No don't attach all the code. Create a small class with code that demonstrates the problem and post that code here using code tags.
- public static String getData(String table) {
-
Connection con = null;
-
StringBuilder outData = new StringBuilder();
-
try {
-
Class.forName("com.mysql.jdbc.Driver");
-
String conURL = "jdbc:mysql://localhost/icart";
-
con = DriverManager.getConnection(conURL,
-
"user", "pswrd");
-
String query = "select * from " + table + "";
-
System.out.println(query);
-
PreparedStatement st = con.prepareStatement(query);
-
ResultSet rs = st.executeQuery();
-
outData.append("%");
-
System.out.println("appending data");
-
while (rs.next()) {
-
outData.append(rs.getBigDecimal(1))
-
.append(":").append(rs.getString(2)).append(":")
-
.append(rs.getInt(3)).append(":")
-
.append(rs.getString(4)).append(":")
-
.append(rs.getString(5)).append(":")
-
.append(rs.getString(6)).append("$");
-
}
-
outData.append("~"); //the code terminates at this line
-
rs.close();
-
-
con.close();
-
System.out.println(outData);
-
} catch (ClassNotFoundException ex) {
-
Logger.getLogger(Test.class.getName()).log(Level.SEVERE, null, ex);
-
} catch (SQLException | RuntimeException e) {
-
JOptionPane.showMessageDialog(null, e);
-
}
-
return outData.toString();
-
}
Here it is
Don't just do - } catch (SQLException | RuntimeException e) {
-
JOptionPane.showMessageDialog(null, e);
-
}
-
when debugging. Print out the whole stacktrace with e.printStackTrace();
i see some errors in log file after printing the StackTraces, i don't understand what they actually mean, kindly help me.
Here i attach my IDELog file
Post the error messages here, don't attach files.
WARNING [org.netbeans.modules.java.source.tasklist.Incorrec tErrorBadges]: Incorrect error badges detected, file=C:\Users\Office User\AppData\Local\NetBeans\Cache\7.2\index\s15\ja va\14\gensrc\jpcap\packet\Packet.java.
WARNING [org.netbeans.modules.java.source.tasklist.Incorrec tErrorBadges]: The file is not on its own source classpath, ignoring.
INFO [org.netbeans.modules.parsing.impl.TaskProcessor]: Task: class org.netbeans.modules.java.source.JavaSourceAccesso r$CancelableTaskWrapper ignored cancel for 93 ms.
WARNING [org.netbeans.modules.java.source.tasklist.Incorrec tErrorBadges]: Incorrect error badges detected, file=C:\Users\Office User\AppData\Local\NetBeans\Cache\7.2\index\s15\ja va\14\gensrc\jpcap\JpcapSender.java.
WARNING [org.netbeans.modules.java.source.tasklist.Incorrec tErrorBadges]: The file is not on its own source classpath, ignoring.
INFO [org.netbeans.modules.parsing.impl.TaskProcessor]: Task: class org.netbeans.modules.java.source.JavaSourceAccesso r$CancelableTaskWrapper ignored cancel for 81 ms.
INFO [org.netbeans.modules.java.navigation.ElementScanni ngTask]: Duplicate top level class: <error>
INFO [org.netbeans.modules.java.navigation.ElementScanni ngTask]: Duplicate top level class: <error>
INFO [org.netbeans.modules.java.navigation.ElementScanni ngTask]: Duplicate top level class: <error>
INFO [org.netbeans.modules.java.navigation.ElementScanni ngTask]: Duplicate top level class: <error>
INFO [org.netbeans.modules.java.navigation.ElementScanni ngTask]: Duplicate top level class: <error>
INFO [org.netbeans.modules.java.navigation.ElementScanni ngTask]: Duplicate top level class: <error>
INFO [org.netbeans.modules.java.navigation.ElementScanni ngTask]: Duplicate top level class: <error>
INFO [org.netbeans.modules.java.navigation.ElementScanni ngTask]: Duplicate top level class: <error>
INFO [org.netbeans.modules.java.navigation.ElementScanni ngTask]: Duplicate top level class: <error>
INFO [org.netbeans.modules.java.navigation.ElementScanni ngTask]: Duplicate top level class: <error>
INFO [org.netbeans.modules.parsing.impl.TaskProcessor]: Task: class org.netbeans.modules.java.source.JavaSourceAccesso r$CancelableTaskWrapper ignored cancel for 61 ms.
INFO [org.netbeans.modules.parsing.impl.TaskProcessor]: Task: class org.netbeans.modules.java.source.JavaSourceAccesso r$CancelableTaskWrapper ignored cancel for 91 ms.
INFO [org.netbeans.modules.parsing.impl.TaskProcessor]: Task: class org.netbeans.modules.java.source.JavaSourceAccesso r$CancelableTaskWrapper ignored cancel for 81 ms.
INFO [org.netbeans.modules.java.navigation.ElementScanni ngTask]: Duplicate enclosed element: <error>
INFO [org.netbeans.modules.java.navigation.ElementScanni ngTask]: Duplicate enclosed element: <error>
INFO [org.netbeans.modules.java.navigation.ElementScanni ngTask]: Duplicate enclosed element: <error>
INFO [org.netbeans.modules.parsing.impl.TaskProcessor]: Task: class org.netbeans.modules.java.source.JavaSourceAccesso r$CancelableTaskWrapper ignored cancel for 69 ms.
INFO [org.netbeans.modules.parsing.impl.TaskProcessor]: Task: class org.netbeans.modules.java.source.JavaSourceAccesso r$CancelableTaskWrapper ignored cancel for 80 ms.
INFO [org.netbeans.modules.java.navigation.ElementScanni ngTask]: Duplicate top level class: <error>
INFO [org.netbeans.modules.java.navigation.ElementScanni ngTask]: Duplicate top level class: <error>
INFO [org.netbeans.modules.java.navigation.ElementScanni ngTask]: Duplicate top level class: <error>
INFO [org.netbeans.modules.java.navigation.ElementScanni ngTask]: Duplicate top level class: <error>
INFO [org.netbeans.modules.parsing.impl.TaskProcessor]: Task: class org.netbeans.modules.java.source.JavaSourceAccesso r$CancelableTaskWrapper ignored cancel for 77 ms.
INFO [org.netbeans.modules.parsing.impl.TaskProcessor]: Task: class org.netbeans.modules.java.source.JavaSourceAccesso r$CancelableTaskWrapper ignored cancel for 104 ms.
WARNING [org.netbeans.modules.java.source.tasklist.Incorrec tErrorBadges]: Incorrect error badges detected, file=C:\Users\Office User\AppData\Local\NetBeans\Cache\7.2\index\s15\ja va\14\gensrc\jpcap\JpcapSender.java.
WARNING [org.netbeans.modules.java.source.tasklist.Incorrec tErrorBadges]: The file is not on its own source classpath, ignoring.
INFO [org.netbeans.modules.parsing.impl.TaskProcessor]: Task: class org.netbeans.modules.java.source.JavaSourceAccesso r$CancelableTaskWrapper ignored cancel for 66 ms.
INFO [org.netbeans.modules.parsing.impl.TaskProcessor]: Task: class org.netbeans.modules.java.source.JavaSourceAccesso r$CancelableTaskWrapper ignored cancel for 89 ms.
INFO [org.netbeans.modules.parsing.impl.TaskProcessor]: Task: class org.netbeans.modules.java.source.JavaSourceAccesso r$CancelableTaskWrapper ignored cancel for 65 ms.
INFO [org.netbeans.modules.parsing.impl.TaskProcessor]: Task: class org.netbeans.modules.java.source.JavaSourceAccesso r$CancelableTaskWrapper ignored cancel for 100 ms.
INFO [org.netbeans.modules.parsing.impl.TaskProcessor]: Task: class org.netbeans.modules.java.source.JavaSourceAccesso r$CancelableTaskWrapper ignored cancel for 86 ms.
INFO [org.netbeans.modules.parsing.impl.TaskProcessor]: Task: class org.netbeans.modules.java.source.JavaSourceAccesso r$CancelableTaskWrapper ignored cancel for 104 ms.
INFO [org.netbeans.modules.parsing.impl.TaskProcessor]: Task: class org.netbeans.modules.java.source.JavaSourceAccesso r$CancelableTaskWrapper ignored cancel for 68 ms.
Most of those are info messages from your IDE that have nothing to do with your application. Put the e.printStackTrace() in the catch blocks and check your application's console to see what the full error message is from your application.
i get no error in my console. This is my output
"$295:CRM software:0:no offer:19890:560 $296:charting software:0:no offer:19978:120 $297:web browsers:0:no offer:20065:120 $298:smart card software:0:no offer:20153:120 $299:content management software:0:no offer:20241:120 $300:infrastructure virtua:0:no offer:20329:120 $551:digital cameras:1:upto 5% off:42264:152 $552:hand-held camcorders:1:upto 5% off:42351:152 $553:webcams:1:upto 5% off:42439:152 $554:binoculars:1:upto 5% off:42527:152 $555:straps:1:upto 5% off:42615:152 $556:action sports cameras:1:upto 5% off:42702:152 $557:telescopes:1:upto 5% off:42790:152 $558:telescope accessories:1:upto 5% off:42878:152 $559:film cameras:1:upto 5% off:42966:152 $560:rifle scopes:1:upto 5% off:43053:152 $561:spotting scopes:1:upto 5% off:43141:152 $562:microscopes:1:upto 5% off:43229:152 $563:microscope accessories:1:upto 5% off:43317:152 $564:rangefinders:1:upto 5% off:43404:152 $565:monoculars:0:no offer:43492:152 $566:eyepieces:0:no offer:43580:152 $567:eyepice accessories:0:no offer:43667:152 $568:document cameras:0:no offer:43755:152 $569:optics cases:0:no offer:43843:152 $570:opera glasses:1:buy 2 get 1 free:43931:152 $571:drive recorders:1:buy 2 get 1 free:44018:152 $572:instant print cameras:1:buy 2 get 1 free:44106:152 $573:folders:1:buy 2 get 1 free:44194:152 $574:folders:0:no offer:44282:152 $575:picture frames:0:no offer:44369:152 $~
Java Result: -1073740791
BUILD SUCCESSFUL (total time: 55 seconds) "
Why is your program printing out all that data? Anyway you need to pinpoint the source of the problem (if any) perhaps by running it outside of Netbeans because right now you seem to be confused about what is Netbeans' own logging and what your application's logging is.
i got the below lines printed from the printstacktrace -
java.lang.NullPointerException
at dao.DAO.getBay(DAO.java:79)
at pkgnew.New.sendBayNo(New.java:252)
at pkgnew.New.receivePack(New.java:322)
at pkgnew.New.main(New.java:495)
where line 495 as:
how do i avoid null point exception here?!
So what code is at DAO.java:79? Something there is null.
- String query = "select * from table_name";
-
System.out.println(query);
-
PreparedStatement st = con.prepareStatement(query);
line 79 is preparedStatement
So con is null at that point then.
I resolved the null Pointer exception. now again i get "Java Result: -1073740791" and the code terminates:(
After googling alot i learnt that, The number "-1073740791" is an exit code, which indicate a bug in the executed software that causes stack overflow leading to abnormal termination of the software.
If this is the actual case, how do i avoid stack buffer overflow??
Again, add logging around the code and e.printStackTrace statements to pin point the exact line that is causing it and full error message.
i have used this below block, still does not show up any warning or error at any line - catch (UnknownHostException ex) {
-
Logger.getLogger(New.class.getName()).log(Level.SEVERE, null, ex);
-
} catch (IOException|RuntimeException e) {
-
e.printStackTrace();
-
}
1.) How do you know that is the line that is reporting the error?
2.) Add e.printStackTrace() before Logger.getLogger(New.class.getName()).log(Level.SE VERE, null, ex); during this debugging (you can remove it after you identify the source of your problem)
Not Working:(:( I have completely lost with this, i'm going nuts tracking the reason behind this abnormal termination of the code:(
You still haven't said whether you have pinpointed the source of the error using printlines and printstacktraces yet. You need to know the exact line that is throwing the error first.
Well, yes i have used printstacktraces and printlines. The code exactly terminates when i try to send the data, after packetizing it. This is the code line - sender.sendPacket(sendPacket);
where sendPacket is the byte array that holds the data packet.
Did you wrap just the sendPacket call in a try/catch then?
What does the documentation of the sendPacket method say? Did you write it or is it part of some third party A.P.I
yes, i did wrap the code line within a try catch block, Its a part of third party API of this " UDPPacket sendPacket = new UDPPacket(55000, 61000);"
here is the code snippet of what and how i'm doing, - try {
-
InetAddress src = null;
-
InetAddress dest = null;
-
if (pack instanceof IPPacket) {
-
IPPacket ipp = (IPPacket) pack;
-
src = ipp.dst_ip;
-
dest = ipp.src_ip;
-
}
-
EthernetPacket etherSrc = ((EthernetPacket) pack.datalink);
-
byte[] gwmac = null;
-
gwmac = etherSrc.src_mac;
-
System.out.println("dest mac : " + gwmac);
-
JpcapSender sender = JpcapSender.openDevice(devices[index]);
-
UDPPacket sendPacket = new UDPPacket(55000, 61000);
-
-
sendPacket.setIPv4Parameter(0, false,
-
false, false, 0, false,
-
false, false, 0, 1010101, 100,
-
IPPacket.IPPROTO_UDP,
-
src, dest);
-
String outData = DAO.getBay(bay);
-
sendPacket.data = outData.getBytes();
-
EthernetPacket ether = new EthernetPacket();
-
ether.frametype = EthernetPacket.ETHERTYPE_IP;
-
ether.src_mac = devices[index].mac_address;
-
ether.dst_mac = gwmac;
-
sendPacket.datalink = ether;
-
System.out.println("back to sendbay");
-
-
try{
-
sender.sendPacket(sendPacket);
-
}
-
catch ( RuntimeException ex) {
-
ex.printStackTrace(System.out);
-
Logger.getLogger(New.class.getName()).log(Level.SEVERE, null, ex);
-
}
-
}
-
catch (IOException ex) {
-
Logger.getLogger(New.class.getName()).log(Level.SEVERE, null, ex);
-
}
Don't do - catch ( RuntimeException ex) {
-
ex.printStackTrace(System.out);
-
Logger.getLogger(New.class.getName()).log(Level.SEVERE, null, ex);
-
}
Then check the APIs for those external classes as well to make sure you're calling them with right values.
Just do - catch ( Exception ex) {
-
ex.printStackTrace();
-
-
}
2 windows pop up asking,
window 1: Java(TM) platform SE binary has stopped working
Windows is collecting more information about the problem. This might take several minutes...
Window 2: Do you want to send more information about the problem?
Additional details about what went wrong can help Microsoft create a solution.
The solution for me was here: http://stackoverflow.com/questions/1...dt-environment
From what I understand, the problem is occurring because your max heap size is being exceeded during some processing event - be it in the development kit or while emulating. The good thing is that you can alter the max heap size in the android.ini file (it's at the very end.) I changed mine to 1024M.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: SubbaRao Karanam |
last post by:
What does this error for the Code below
java.io.StreamCorruptedException: invalid stream header
at java.io.ObjectInputStream.readStreamHeader(Unknown Source)
at...
|
by: RobertMaas |
last post by:
After many years of using LISP, I'm taking a class in Java and finding
the two roughly comparable in some ways and very different in other
ways. Each has a decent size library of useful utilities...
|
by: Dominique |
last post by:
I am trying to communicate to a prolog server from a java client,
however even though the connection is successfully made every time I
try to perform QueryExecute I get an error, either Socket...
|
by: oll3i |
last post by:
i need to write publisher subscriber application on openjms and use db4o but i dont know how do i add the references to db4o when i compile the app with javac ?
i added db4o-6.1-java5.jar to my...
|
by: inetjack |
last post by:
Hi,
This is a little test application, generating and compiling code at runtime.
The loadClassLoader() method of the Factory Object suppose to unload all class previously loaded.
It does not...
|
by: xirowei |
last post by:
public class Result
{
private int countA = 0;
private int countB = 0;
private int statement;
private boolean statusA = false;
private boolean statusB = false;
private int arrayA = new...
|
by: ohadr |
last post by:
hi,
i get Exception in thread "main" java.lang.NullPointerException
when i run my application.
the exact error is:
"Exception in thread "main" java.lang.NullPointerException
at...
|
by: onlinegear |
last post by:
HI i am writing this for college i know i have loads of combo boxes with nothing in the i havent got that far yet. but every time i run this is comes up with this erro
run:
Exception in thread...
|
by: danielmessick |
last post by:
Hello, I'm trying to fix my Java applet to have a fully functional calculator. I managed to create the buttons and have the +, -, /, *, =, and clear buttons WORKING. But, I cant seem to figure out...
|
by: executor |
last post by:
hello friends ,
I m working in a project and need to take data from a csv file and other data base files .Im not getting how to get data from a csv file . Please help me out .
Thank...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |