10 Replies Latest reply: Jan 23, 2009 6:00 PM by 807588 RSS

    core dump when updating blob on unix

    807588
      I have a string and use code like this to update it in database using jdbc:
      String sql = "update abc set notes=? where id="+id;
      jdbcu.setStatement(sql);
      jdbcu.setBytes(1, newNotes);
      int upd = jdbcu.runUpdateSQL();

      it works fine when I run it from desktop but when i run the same code from unix, the jvm core dumps:
      please help me why its happening?
      and whats the best way to update the blob in a table using jdbc so I dont have problem on either env.
      Thanks
        • 1. Re: core dump when updating blob on unix
          807588
          Are you using a pure Java JDBC driver or one which uses a shared library?
          It is likely to be a bug in your JDBC driver.
          When you get a dump, where in the stack trace does the error occur (you should be able to read it)
          • 2. Re: core dump when updating blob on unix
            807588
            It is using weblogic jdbc and it works fine for any other update. which does not involve blob.
            only blob data update is causing the problem and happens at the time when i run the update sql command. here is the core dump log:

            # An unexpected error has been detected by HotSpot Virtual Machine:
            #
            # SIGSEGV (0xb) at pc=0xfed630c4, pid=28747, tid=1
            #
            # Java VM: Java HotSpot(TM) Client VM (1.4.2_13-b06 mixed mode)
            # Problematic frame:
            # V [libjvm.so+0x1630c4]
            #

            --------------- T H R E A D ---------------

            Current thread (0x00037050): JavaThread "main" [_thread_in_vm, id=1]

            siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x00000000

            Registers:
            O0=0xff0463d4 O1=0x00000000 O2=0x00037050 O3=0xff33c000
            O4=0x00000000 O5=0x0e33c312 O6=0xffbfa720 O7=0xfed63054
            G1=0x00005000 G2=0x00020002 G3=0x00000006 G4=0x00000004
            G5=0x00000000 G6=0x2c039d28 G7=0xff350000 Y=0x00000000
            PC=0xfed630c4 nPC=0xfed630c8


            Top of Stack: (sp=0xffbfa720)
            0xffbfa720: f9c007c0 00034bc0 ffbfad3c f165a648
            0xffbfa730: 00000000 00037050 ff022000 ff0388bc
            0xffbfa740: ff03a088 00000000 00000000 00020002
            0xffbfa750: 002d2d08 fed62fdc ffbfa788 fe827e04
            0xffbfa760: ffbfa788 fe827d48 00198fb4 00037b0c
            0xffbfa770: 00037910 00000000 0003790c 00037908
            0xffbfa780: 0003790c 00000000 0000fc00 00000000
            0xffbfa790: 00000002 00540054 00000000 00832d62

            Instructions: (pc=0xfed630c4)
            0xfed630b4: 80 a6 e0 00 26 80 00 4d d6 02 20 e4 84 06 80 1b
            0xfed630c4: d2 06 60 00 c6 02 60 08 80 a0 80 03 18 80 00 46

            Stack: [0xffb7c000,0xffc00000), sp=0xffbfa720, free space=505k
            Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
            V [libjvm.so+0x1630c4]
            C [libocijdbc10.so+0x7e0c]
            C [libocijdbc10.so+0xa874] Java_oracle_jdbc_driver_T2CStatement_t2cParseExecuteDescribe+0x1b4
            j oracle.jdbc.driver.T2CStatement.t2cParseExecuteDescribe(Loracle/jdbc/driver/OracleStatement;JIIIZZZZ[BIBII[SI[B[CII[SII[B[CII[I[S[BIIIIZZ[Loracle/jdbc/   driver/Accessor;[[[B[J[BI[CI[SIZ)I+0
            j  oracle.jdbc.driver.T2CPreparedStatement.executeForDescribe()V+260
            j  oracle.jdbc.driver.T2CPreparedStatement.executeForRows(Z)V+41
            j  oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout()V+271
            j  oracle.jdbc.driver.OraclePreparedStatement.executeInternal()I+94
            j  oracle.jdbc.driver.OraclePreparedStatement.executeUpdate()I+17
            j  com.enabil.aurora.tools.common.JDBCUtility.runUpdateSQL()I+6
            j  com.enabil.aurora.tools.misc.FixNotes.updateAccount([B)I+46
            j  com.enabil.aurora.tools.misc.FixNotes.fixNote(Ljava/lang/String;)V+442
            j  com.enabil.aurora.tools.misc.FixNotes.<init>(Ljava/lang/String;Z)V+203
            j  com.enabil.aurora.tools.misc.FixNotes.main([Ljava/lang/String;)V+52
            v  ~StubRoutines::call_stub
            V  [libjvm.so+0xcad88]
            V [libjvm.so+0xdee88]
            V [libjvm.so+0x168934]
            C [java+0x2f94] main+0x167c
            Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
            j oracle.jdbc.driver.T2CStatement.t2cParseExecuteDescribe(Loracle/jdbc/driver/OracleStatement;JIIIZZZZ[BIBII[SI[B[CII[SII[B[CII[I[S[BIIIIZZ[Loracle/jdbc/   driver/Accessor;[[[B[J[BI[CI[SIZ)I+0
            j  oracle.jdbc.driver.T2CPreparedStatement.executeForDescribe()V+260
            j  oracle.jdbc.driver.T2CPreparedStatement.executeForRows(Z)V+41
            j  oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout()V+271
            j  oracle.jdbc.driver.OraclePreparedStatement.executeInternal()I+94
            j  oracle.jdbc.driver.OraclePreparedStatement.executeUpdate()I+17
            j  com.enabil.aurora.tools.common.JDBCUtility.runUpdateSQL()I+6
            j  com.enabil.aurora.tools.misc.FixNotes.updateAccount([B)I+46
            j  com.enabil.aurora.tools.misc.FixNotes.fixNote(Ljava/lang/String;)V+442
            j  com.enabil.aurora.tools.misc.FixNotes.<init>(Ljava/lang/String;Z)V+203
            j  com.enabil.aurora.tools.misc.FixNotes.main([Ljava/lang/String;)V+52
            v  ~StubRoutines::call_stub                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
            • 3. Re: core dump when updating blob on unix
              807588
              Try using the thin client which doesn't use the shared library.
              • 4. Re: core dump when updating blob on unix
                807588
                please tell me how do i do that, ie how do i use thin client...
                • 5. Re: core dump when updating blob on unix
                  807588
                  this is how i m doing:
                  Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
                  con = DriverManager.getConnection("jdbc:oracle:oci8:" + dbUser + "/" + dbPassword + "@" + dbInstance);
                  • 6. Re: core dump when updating blob on unix
                    807588
                    Its been a while since I use Oracle so I looked it up
                    [http://www.google.co.uk/search?q=jdbc+oracle+thin+connection+string]
                    • 7. Re: core dump when updating blob on unix
                      807588
                      Thanks bud, it apparently worked by using thin client. I am testing more.
                      But could you briefly explain why it worked with thin client and nto with other, whats the difference? THANKS again.
                      • 8. Re: core dump when updating blob on unix
                        807588
                        The thin client is pure Java, whereas the OCI driver uses a native library (.so file in your case) in order to communicate to Oracle's OCI interface. We ceased to use the OCI version like 10 years ago, cause it was giving us constant trouble and practically no performance gain.
                        • 9. Re: core dump when updating blob on unix
                          807588
                          ok thanks very much
                          • 10. Re: core dump when updating blob on unix
                            807588
                            Another hint: if you need an Oracle driver that's slim, fast (faster than the one from Oracle itself), and less buggy, google for "Oranxo". It's a commercial product, though.