Insert a record to access and report an error: unhandled exception type = segmentation error vmstate = 0x0005ff05 j9generic_signal_nu

Source: Internet
Author: User
Tags rowcount

Description: inserts a record into access. The Code is as follows:

// Insert data into access <br/> private int adddata (list <summarypriceinfo> datelistfordownload, string fileurl) throws exception {<br/> int rowcount = 0; <br/> connection con = NULL; <br/> preparedstatement PS = NULL; <br/> try {<br/> system. out. println ("fileurl =" + fileurl); <br/> con = getconnection (fileurl); <br/> con. setautocommit (false); <br/> PS = con. preparestatement ("insert into price values (?, ?, ?, ?, ?, ?,? ,?, ?, ?, ?, ?) "); </P> <p> for (summarypriceinfo object: datelistfordownload) {</P> <p> ps. setstring (1, (rowcount + 1) + ""); <br/> ps. setstring (2, stringutil. formatnulltoempty (object. getrealname (); <br/> ps. setstring (3, stringutil. formatnulltoempty (object. getoscym (); <br/> ps. setstring (4, stringutil. formatnulltoempty (object. getorgname (); <br/> ps. setstring (5, stringutil. formatnulltoempty (object. getorgsyssize (); <Br/> ps. setstring (6, stringutil. formatnulltoempty (object. getmodelid (); <br/> ps. setstring (7, stringutil. formatnulltoempty (object. getriskcoef (); <br/> ps. setstring (8, stringutil. formatnulltoempty (object. getoscid (); <br/> ps. setstring (9, stringutil. formatnulltoempty (object. getgetaudmoney (); <br/> ps. setstring (10, stringutil. formatnulltoempty (object. getminimumlimit (); <br/> ps. setstring (11, stri Ngutil. formatnulltoempty (object. getinvoiceno (); <br/> ps. setstring (12, stringutil. formatnulltoempty (object. getsubaudorg (); </P> <p> ps. addbatch (); </P> <p> rowcount ++; </P> <p >}< br/> ps.exe cutebatch (); <br/> con. commit (); <br/> con. setautocommit (true); <br/> system. out. println ("----------------- data is successfully inserted into access! --------------- "); <Br/>} catch (exception e) {<br/> con. rollback (); <br/> E. printstacktrace (); <br/> throw new exception (); <br/>}finally {<br/> If (PS! = NULL) PS. Close (); <br/> If (con! = NULL) con. Close (); <br/>}< br/> return rowcount; <br/>}

 

Run to ps.exe cutebatch (). The following error is returned!

Unhandled exception
Type = segmentation error vmstate = 0x0005ff05
J9generic_signal_number = 00000004 exceptioncode = c0000005 exceptionaddress = 009e0698 contextflags = 0001003f
Handler1 = 008b05b0 handler2 = 008f74f0 inaccessibleaddress = 00000028
EDI = 43f87d50 ESI = 442012c0 eax = 00000001 EBX = 00000000
ECX = 44 f0c45c edX = 00000000
EIP = 009e0698 ESP = 421 dfaec EBP = 44f0c49c
Module = D:/IBM/sdp70/JDK/JRE/bin/j9jit23. dll
Module_base_address = 00990000 offset_in_dll = 00050698

Method_being_compiled = org/Eclipse/jdt/Internal/Compiler/lookup/referencebinding. iscompatiblewith (lorg/Eclipse/jdt/Internal/Compiler/lookup/typebinding;) Z
Target = 2_30_20060915_08260_lhdsmr (Windows XP 5.1 build 2600 Service Pack 2)
CPU = x86 (2 logical CPUs) (0x7fde9000 RAM)
Jvmdump006i processing dump event "GPF", detail ""-Please wait.
Jvmdump007i JVM requesting system dump using 'd:/IBM/sdp70/core.20070814.103226.3596.dmp'
Jvmdump010i system dump written to D:/IBM/sdp70/core.20070814.103226.3596.dmp
Jvmdump007i JVM requesting snap dump using 'd:/IBM/sdp70/snap0001.20070814.103226.3596.trc'
Jvmdump010i snap dump written to D:/IBM/sdp70/snap0001.20070814.103226.3596.trc
Jvmdump007i JVM requesting Java dump using 'd:/IBM/sdp70/javacore.20070814.103226.3596.txt'
Jvmdump010i Java dump written to D:/IBM/sdp70/javacore.20070814.103226.3596.txt
Jvmdump013i processed dump event "GPF", detail "".

 

You can use the following methods to fix the issue on the Internet.

Open tomcathome/bin/tomcat5w.exe, click the Java tab, and you will find two items:
Initial memory pool and maximum memory pool.
Initial memory pool: memory size set for initialization.
Maximum memory pool: The maximum memory size.
Set the initial memory pool to 64 mb .!!! Success !!!
After the settings are complete, press OK and restart tomcat. Then you will find that the JVM available memory in Tomcat has changed.

 

However, if the test fails, the same error is still reported. We found that records are inserted into access. For the same field, if the inserted value has null or empty strings, the above error occurs, if both are null or empty strings, no error is reported! I don't know why?

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.