5 Replies Latest reply: Mar 18, 2010 12:44 PM by 715399 RSS

    error commiting update

    758021
      Hello again,

      We have a function that executes periodically, updating semantic data (removing and adding triples of different resources).

      But occasionally, that same method has thrown the exception listed below, with is strange because nothing changes in each iteration.

      Any idea about this? Thanks

      com.hp.hpl.jena.shared.JenaException: java.sql.SQLException: ORA-55312: parse failed for triple: id-form: 1155603932193326894 5351557915217640050 4442928618316056940
      ORA-06512: at "MDSYS.MD", line 1723
      ORA-06512: at "MDSYS.MDERR", line 38
      ORA-06512: at "MDSYS.SDO_RDF_INTERNAL", line 5341
      ORA-06512: at "MDSYS.OFERTAFORMATIVA_INS", line 37
      ORA-04088: error during execution of trigger 'MDSYS.OFERTAFORMATIVA_INS'

           at oracle.spatial.rdf.client.jena.OracleTransactionHandler.commit(OracleTransactionHandler.java:110)
           at com.hp.hpl.jena.rdf.model.impl.ModelCom.commit(ModelCom.java:1080)
           at org.fundacionctic.ogd.data.service.OracleJenaService.addResource(OracleJenaService.java:112)
           at org.fundacionctic.ogd.data.service.OracleJenaService.addRDF(OracleJenaService.java:418)
           at org.fundacionctic.ogd.data.XMLDataSource.updateData(XMLDataSource.java:59)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:597)
           at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:276)
           at org.springframework.scheduling.support.MethodInvokingRunnable.run(MethodInvokingRunnable.java:76)
           at org.springframework.scheduling.timer.DelegatingTimerTask.run(DelegatingTimerTask.java:66)
           at java.util.TimerThread.mainLoop(Timer.java:512)
           at java.util.TimerThread.run(Timer.java:462)
      Caused by: java.sql.SQLException: ORA-55312: parse failed for triple: id-form: 1155603932193326894 5351557915217640050 4442928618316056940
      ORA-06512: at "MDSYS.MD", line 1723
      ORA-06512: at "MDSYS.MDERR", line 38
      ORA-06512: at "MDSYS.SDO_RDF_INTERNAL", line 5341
      ORA-06512: at "MDSYS.OFERTAFORMATIVA_INS", line 37
      ORA-04088: error during execution of trigger 'MDSYS.OFERTAFORMATIVA_INS'

           at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:439)
           at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:395)
           at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:802)
           at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:436)
           at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:186)
           at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:521)
           at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:205)
           at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:1008)
           at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1307)
           at oracle.jdbc.driver.OraclePreparedStatement.sendBatch(OraclePreparedStatement.java:3753)
           at oracle.jdbc.driver.PhysicalConnection.commit(PhysicalConnection.java:3652)
           at oracle.jdbc.driver.PhysicalConnection.commit(PhysicalConnection.java:3680)
           at oracle.spatial.rdf.client.jena.OracleTransactionHandler.commit(OracleTransactionHandler.java:106)
           ... 13 more
        • 1. Re: error commiting update
          758021
          Another exception we cannot account for... Exactly in the same place in the code. Our method insert triples for a resource from a temporal model, and looks something like this:

          public void addResource(Resource resource, String model) {
          StmtIterator itr = resource.listProperties();
          Model m = getModel(model);
          while (itr.hasNext()) {
          m.begin();
          m.add(itr.nextStatement());
          m.commit();
          }
          }

          Maybe some internal misconfiguration in the semantic settings?

          com.hp.hpl.jena.shared.JenaException: java.sql.SQLException: ORA-55303: Fallo en el constructor SDO_RDF_TRIPLE_S: Simple case: SQLERRM=ORA-06519: detectada y realizado un rollback de una transacción autónoma activa
          ORA-06512: en "MDSYS.MD", línea 1723
          ORA-06512: en "MDSYS.MDERR", línea 17
          ORA-06512: en "MDSYS.SDO_RDF_TRIPLE_S", línea 211

               at oracle.spatial.rdf.client.jena.OracleTransactionHandler.commit(OracleTransactionHandler.java:110)
               at com.hp.hpl.jena.rdf.model.impl.ModelCom.commit(ModelCom.java:1080)
               at org.fundacionctic.ogd.data.service.OracleJenaService.addResource(OracleJenaService.java:112)
               at org.fundacionctic.ogd.data.service.OracleJenaService.addRDF(OracleJenaService.java:418)
               at org.fundacionctic.ogd.data.service.OracleJenaService.addRDF(OracleJenaService.java:444)
               at org.fundacionctic.ogd.data.XMLWSDataSource.updateData(XMLWSDataSource.java:86)
               at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
               at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
               at java.lang.reflect.Method.invoke(Method.java:597)
               at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:276)
               at org.springframework.scheduling.support.MethodInvokingRunnable.run(MethodInvokingRunnable.java:76)
               at org.springframework.scheduling.timer.DelegatingTimerTask.run(DelegatingTimerTask.java:66)
               at java.util.TimerThread.mainLoop(Timer.java:512)
               at java.util.TimerThread.run(Timer.java:462)
          Caused by: java.sql.SQLException: ORA-55303: Fallo en el constructor SDO_RDF_TRIPLE_S: Simple case: SQLERRM=ORA-06519: detectada y realizado un rollback de una transacción autónoma activa
          ORA-06512: en "MDSYS.MD", línea 1723
          ORA-06512: en "MDSYS.MDERR", línea 17
          ORA-06512: en "MDSYS.SDO_RDF_TRIPLE_S", línea 211

               at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:439)
               at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:395)
               at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:802)
               at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:436)
               at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:186)
               at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:521)
               at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:205)
               at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:1008)
               at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1307)
               at oracle.jdbc.driver.OraclePreparedStatement.sendBatch(OraclePreparedStatement.java:3753)
               at oracle.jdbc.driver.PhysicalConnection.commit(PhysicalConnection.java:3652)
               at oracle.jdbc.driver.PhysicalConnection.commit(PhysicalConnection.java:3680)
               at oracle.spatial.rdf.client.jena.OracleTransactionHandler.commit(OracleTransactionHandler.java:106)
               ... 14 more
          • 2. Re: error commiting update
            715399
            Hi,

            This looks like a parsing error. Can you please post the triple that causes this exception? Has the exception causing triple been successfully inserted before in your test?

            Thanks,
            Vladimir
            • 3. Re: error commiting update
              758021
              Thanks Vladimir,

              When you say a parser error, are you referring to both the exceptions above?

              Now we are modifying our code to get more info of the triples when the exceptions occur. Soon we will post.
              • 4. Re: error commiting update
                758021
                More details about this...

                We detected most of the exceptions thrown were related with locale issues. For our locale, ES-es, we inserted doubles values with a comma decimal delimiter, this way:

                resource.addProperty(prop,"-5,866197",(RDFDatatype) XSDDatatype.XSDdouble);

                That worked most of the time. But we noticed that some of our threads did not get the correct locale sometimes when were launched. We think that was the cause of the problem. When we fixed that, the vast majority of exceptions have gone away.

                Except in just two cases... when we get again one of the exceptions described above. For example, the insertion of this triple...

                [http://oracleto:8080/asturias/comun/gobierno/Direccion/592, http://www.w3.org/2003/01/geo/wgs84_pos#lat, "43,5353225"^^http://www.w3.org/2001/XMLSchema#double]

                throws the exception below:

                com.hp.hpl.jena.shared.JenaException: java.sql.SQLException: ORA-55312: fallo en el análisis para el triple: id-form: 5214721031104623137 5351557915217640050 5511382174874133559
                ORA-06512: en "MDSYS.MD", línea 1723
                ORA-06512: en "MDSYS.MDERR", línea 38
                ORA-06512: en "MDSYS.SDO_RDF_INTERNAL", línea 5341
                ORA-06512: en "MDSYS.LOCALIZACION_INS", línea 37
                ORA-04088: error durante la ejecución del disparador 'MDSYS.LOCALIZACION_INS'

                     at oracle.spatial.rdf.client.jena.OracleTransactionHandler.commit(OracleTransactionHandler.java:110)
                     at com.hp.hpl.jena.rdf.model.impl.ModelCom.commit(ModelCom.java:1080)
                     at org.fundacionctic.ogd.data.service.OracleJenaService.addResource(OracleJenaService.java:119)
                     at org.fundacionctic.ogd.data.service.OracleJenaService.addRDF(OracleJenaService.java:434)
                     at org.fundacionctic.ogd.data.service.OracleJenaService.addRDF(OracleJenaService.java:460)
                     at org.fundacionctic.ogd.data.D2RDataSource.updateData(D2RDataSource.java:69)
                     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                     at java.lang.reflect.Method.invoke(Method.java:597)
                     at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:276)
                     at org.springframework.scheduling.support.MethodInvokingRunnable.run(MethodInvokingRunnable.java:76)
                     at org.springframework.scheduling.timer.DelegatingTimerTask.run(DelegatingTimerTask.java:66)
                     at java.util.TimerThread.mainLoop(Timer.java:512)
                     at java.util.TimerThread.run(Timer.java:462)
                Caused by: java.sql.SQLException: ORA-55312: fallo en el análisis para el triple: id-form: 5214721031104623137 5351557915217640050 5511382174874133559
                ORA-06512: en "MDSYS.MD", línea 1723
                ORA-06512: en "MDSYS.MDERR", línea 38
                ORA-06512: en "MDSYS.SDO_RDF_INTERNAL", línea 5341
                ORA-06512: en "MDSYS.LOCALIZACION_INS", línea 37
                ORA-04088: error durante la ejecución del disparador 'MDSYS.LOCALIZACION_INS'

                     at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:439)
                     at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:395)
                     at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:802)
                     at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:436)
                     at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:186)
                     at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:521)
                     at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:205)
                     at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:1008)
                     at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1307)
                     at oracle.jdbc.driver.OraclePreparedStatement.sendBatch(OraclePreparedStatement.java:3753)
                     at oracle.jdbc.driver.PhysicalConnection.commit(PhysicalConnection.java:3652)
                     at oracle.jdbc.driver.PhysicalConnection.commit(PhysicalConnection.java:3680)
                     at oracle.spatial.rdf.client.jena.OracleTransactionHandler.commit(OracleTransactionHandler.java:106)
                     ... 14 more

                And it is strange, because when we add that triple in a simple junit test, the insertion is finished with no problems. The test code:

                          Oracle oracle = new Oracle(jdbcUrl, null, null);
                          ModelOracleSem m = ModelOracleSem.createOracleSemModel(oracle,modelo);
                          Resource r = m.createResource("http://oracleto:8080/asturias/comun/gobierno/Direccion/129");
                          Property p = m.createProperty("http://www.w3.org/2003/01/geo/wgs84_pos#long");
                          RDFNode o = m.createTypedLiteral("43,5353225",(RDFDatatype) XSDDatatype.XSDdouble);
                          Statement stmt = m.createStatement(r, p, o);
                          m.begin();
                          m.add(stmt);
                          m.commit();
                          oracle.dispose();

                Any idea?
                • 5. Re: error commiting update
                  715399
                  Hi,

                  You're inserting triples in concurrent threads, right? It might be a synchronization issue that could occur when inserting the same triple in different sessions.

                  The first session inserted the triple whereas the second one threw the exception, so only one triple was inserted (the duplicate triple was not inserted). If you do want to insert all of the duplicate triples as well, then when this rare case occurs you should catch the ORA-55312 exception and re-insert the triple.

                  Cheers,
                  Vlad