473,397 Members | 2,084 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Java Result: -1073740791

126 64KB
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.
Mar 25 '13 #1
35 6186
r035198x
13,262 8TB
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.
Mar 25 '13 #2
PreethiGowri
126 64KB
Expand|Select|Wrap|Line Numbers
  1. while(rs.next()) {
  2.                outData.append(rs.getLong(1)).append(":")
  3. .append(rs.getString(2)).append(":").append(rs.getInt(3))
  4. .append(":").append(rs.getString(4)).append(":")
  5. .append(rs.getString(5)).append(":")
  6. .append(rs.getString(6)).append("$");
  7.            }
  8.            outData.append("#");
  9.  
/*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
Mar 25 '13 #3
r035198x
13,262 8TB
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.
Mar 25 '13 #4
PreethiGowri
126 64KB
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?!
Mar 25 '13 #5
r035198x
13,262 8TB
What do you mean by transmit? Where did you set the limit?
Mar 25 '13 #6
PreethiGowri
126 64KB
i transmit the accessed data from database to an other system via ethernet.

i have set the limit here -
Expand|Select|Wrap|Line Numbers
  1. String query = "select * from table_name limit "+limit1+",25";
where, limit1 holds values like 1,26,51 and so on
Mar 26 '13 #7
r035198x
13,262 8TB
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.
Mar 26 '13 #8
PreethiGowri
126 64KB
I tried that too, without any success :(
Mar 26 '13 #9
r035198x
13,262 8TB
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.
Mar 26 '13 #10
PreethiGowri
126 64KB
I have attached the whole working code part causing the problem, please find the attachment.
Attached Files
File Type: txt test.txt (7.1 KB, 421 views)
Mar 26 '13 #11
r035198x
13,262 8TB
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.
Mar 26 '13 #12
PreethiGowri
126 64KB
Expand|Select|Wrap|Line Numbers
  1. public static String getData(String table) {
  2.         Connection con = null;
  3.         StringBuilder outData = new StringBuilder();
  4.         try {
  5.             Class.forName("com.mysql.jdbc.Driver");
  6.             String conURL = "jdbc:mysql://localhost/icart";
  7.             con = DriverManager.getConnection(conURL,
  8.  "user", "pswrd");
  9.             String query = "select * from " + table + "";
  10.             System.out.println(query);
  11.             PreparedStatement st = con.prepareStatement(query);
  12.             ResultSet rs = st.executeQuery();
  13.             outData.append("%");
  14.             System.out.println("appending data");
  15.             while (rs.next()) {
  16.                 outData.append(rs.getBigDecimal(1))
  17.          .append(":").append(rs.getString(2)).append(":")
  18.          .append(rs.getInt(3)).append(":")
  19.          .append(rs.getString(4)).append(":")
  20.          .append(rs.getString(5)).append(":")
  21.          .append(rs.getString(6)).append("$");
  22.             }
  23.             outData.append("~"); //the code terminates at this line
  24.             rs.close();
  25.  
  26.             con.close();
  27.             System.out.println(outData);
  28.         } catch (ClassNotFoundException ex) {
  29.             Logger.getLogger(Test.class.getName()).log(Level.SEVERE, null, ex);
  30.         } catch (SQLException | RuntimeException e) {
  31.             JOptionPane.showMessageDialog(null, e);
  32.         }
  33.         return outData.toString();
  34.     }
Here it is
Mar 26 '13 #13
r035198x
13,262 8TB
Don't just do
Expand|Select|Wrap|Line Numbers
  1. } catch (SQLException | RuntimeException e) {
  2.             JOptionPane.showMessageDialog(null, e);
  3.         }
  4.  
when debugging. Print out the whole stacktrace with e.printStackTrace();
Mar 26 '13 #14
PreethiGowri
126 64KB
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
Attached Files
File Type: txt IDELog.txt (56.3 KB, 409 views)
Mar 26 '13 #15
r035198x
13,262 8TB
Post the error messages here, don't attach files.
Mar 26 '13 #16
PreethiGowri
126 64KB
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.
Mar 26 '13 #17
r035198x
13,262 8TB
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.
Mar 26 '13 #18
PreethiGowri
126 64KB
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) "
Mar 26 '13 #19
r035198x
13,262 8TB
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.
Mar 26 '13 #20
PreethiGowri
126 64KB
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:
Expand|Select|Wrap|Line Numbers
  1.  j.receivePack();
how do i avoid null point exception here?!
Mar 26 '13 #21
r035198x
13,262 8TB
So what code is at DAO.java:79? Something there is null.
Mar 26 '13 #22
PreethiGowri
126 64KB
Expand|Select|Wrap|Line Numbers
  1.  String query = "select * from table_name";
  2.             System.out.println(query);
  3.             PreparedStatement st = con.prepareStatement(query);
line 79 is preparedStatement
Mar 26 '13 #23
r035198x
13,262 8TB
So con is null at that point then.
Mar 26 '13 #24
PreethiGowri
126 64KB
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??
Mar 27 '13 #25
r035198x
13,262 8TB
Again, add logging around the code and e.printStackTrace statements to pin point the exact line that is causing it and full error message.
Mar 27 '13 #26
PreethiGowri
126 64KB
i have used this below block, still does not show up any warning or error at any line

Expand|Select|Wrap|Line Numbers
  1. catch (UnknownHostException ex) {
  2.             Logger.getLogger(New.class.getName()).log(Level.SEVERE, null, ex);
  3.         } catch (IOException|RuntimeException e) {
  4.             e.printStackTrace();
  5.         }
Mar 27 '13 #27
r035198x
13,262 8TB
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)
Mar 27 '13 #28
PreethiGowri
126 64KB
Not Working:(:( I have completely lost with this, i'm going nuts tracking the reason behind this abnormal termination of the code:(
Mar 27 '13 #29
r035198x
13,262 8TB
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.
Mar 27 '13 #30
PreethiGowri
126 64KB
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
Expand|Select|Wrap|Line Numbers
  1.  sender.sendPacket(sendPacket);
where sendPacket is the byte array that holds the data packet.
Mar 27 '13 #31
r035198x
13,262 8TB
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
Mar 27 '13 #32
PreethiGowri
126 64KB
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,
Expand|Select|Wrap|Line Numbers
  1. try {
  2.                 InetAddress src = null;
  3.                 InetAddress dest = null;
  4.                 if (pack instanceof IPPacket) {
  5.                     IPPacket ipp = (IPPacket) pack;
  6.                     src = ipp.dst_ip;
  7.                     dest = ipp.src_ip;
  8.                 }
  9.                 EthernetPacket etherSrc = ((EthernetPacket) pack.datalink);
  10.                 byte[] gwmac = null;
  11.                 gwmac = etherSrc.src_mac;
  12.                 System.out.println("dest mac : " + gwmac);
  13.                 JpcapSender sender = JpcapSender.openDevice(devices[index]);
  14.                 UDPPacket sendPacket = new UDPPacket(55000, 61000);
  15.  
  16.                 sendPacket.setIPv4Parameter(0, false,                             
  17.                     false, false, 0, false,
  18.          false, false, 0, 1010101, 100,
  19.          IPPacket.IPPROTO_UDP,
  20.                         src, dest);
  21.                 String outData = DAO.getBay(bay);
  22.                 sendPacket.data = outData.getBytes();
  23.                 EthernetPacket ether = new     EthernetPacket();
  24.                 ether.frametype = EthernetPacket.ETHERTYPE_IP;
  25.                 ether.src_mac = devices[index].mac_address;
  26.                 ether.dst_mac = gwmac;
  27.                 sendPacket.datalink = ether;
  28.                 System.out.println("back to sendbay");
  29.  
  30.                 try{
  31.                 sender.sendPacket(sendPacket);
  32.                 }
  33.                catch ( RuntimeException ex) {
  34.                 ex.printStackTrace(System.out);
  35.                 Logger.getLogger(New.class.getName()).log(Level.SEVERE, null, ex);
  36.             }  
  37.             }
  38.             catch (IOException ex) {
  39.                 Logger.getLogger(New.class.getName()).log(Level.SEVERE, null, ex);
  40.             }   
Mar 28 '13 #33
r035198x
13,262 8TB
Don't do
Expand|Select|Wrap|Line Numbers
  1. catch ( RuntimeException ex) {
  2.                 ex.printStackTrace(System.out);
  3.                 Logger.getLogger(New.class.getName()).log(Level.SEVERE, null, ex);
  4.             }  
Then check the APIs for those external classes as well to make sure you're calling them with right values.

Just do

Expand|Select|Wrap|Line Numbers
  1. catch ( Exception ex) {
  2.                 ex.printStackTrace();
  3.  
  4.             }
Mar 28 '13 #34
PreethiGowri
126 64KB
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.
Mar 28 '13 #35
kuat
1
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.
Feb 11 '14 #36

Sign in to post your reply or Sign up for a free account.

Similar topics

2
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...
73
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...
0
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...
7
oll3i
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...
2
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...
5
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...
3
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...
1
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...
1
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...
0
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
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...
1
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...
0
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...
0
marktang
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,...
0
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...
0
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...
0
tracyyun
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...
0
isladogs
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.