14 Replies Latest reply on Dec 9, 2014 12:42 AM by alwu-Oracle

    [Jena RDF] Error message ORA-13199

    2773504

      Hello all, ,

       

      I use D2Rq for transformation of SGBD(SQLserveur at Oracle a semantic graph c12 through, used file .ttl)

      My error message is the following result:

       

      java.sql.SQLException: ORA-13199: During LBV: [04-NOV-14 03.07.15.421063000 PM -05:00]

      ORA-13199: Element Parse Error: Invalid numeric value [debug info: GCVN-numeric: 114.4000015258789E0] (value: "114.4000015258789E0"^^<http://www.w3.org/2001/XMLSchema#decimal>) [

      ORA-06512: at "MDSYS.MD", line 1723

      ORA-06512: at "MDSYS.MDERR", line 17

      ORA-06512: at "MDSYS.SDO_RDF", line 86

      ORA-06512: at "MDSYS.SDO_RDF_INTERNAL", line 1307

      ORA-06512: at line 1

      ORA-06512: at "MDSYS.SDO_RDF_INTERNAL", line 2826

       

      I am looking for a solution with Jena API? Or a way to hide exhibitors decimal (E0) !!

       

      Any suggestions would be welcome

       

      Ce message a été modifié par : 2773504

        • 1. Re: [Jena RDF] Error message ORA-13199
          2773504

          is there a possible answer?

          • 2. Re: [Jena RDF] Error message ORA-13199
            alwu-Oracle

            Hi,

             

            Just to understand the question a bit better. Are you trying to

            1) use D2R to convert a relational table(s) into an RDF graph in N-TRIPLES format, and

            2) use Jena Adapter to load the N-TRIPLE file into RDF store in Oracle Database 12c?

             

            Thanks,


            Zhe Wu

            • 3. Re: [Jena RDF] Error message ORA-13199
              2773504

              Hi alwu,

              1) I have already

              2) In this step I get an error with the Decimal Type (used in the file .ttl of D2Rq) that adds E (exponent). Was originally a type BigDicimale

               

              FROM "dbo"."LABO33_ESSAI_APC01" WHERE (dbo."LABO33_ESSAI_APC01"."labo33_Methanol" IS NOT NULL OR dbo."LABO33_ESSAI_APC01"."labo33_Ethanol" IS NOT NULL)

              15:07:15 WARN  OracleBulkUpdateHandler :: addInBulk: [13660 ] sqle

              java.sql.SQLException: ORA-13199: During LBV: [04-NOV-14 03.07.15.421063000 PM -05:00]

              ORA-13199: Element Parse Error: Invalid numeric value [debug info: GCVN-numeric: 114.4000015258789E0] (value: "114.4000015258789E0"^^<http://www.w3.org/2001/XMLSchema#decimal>) [

              ORA-06512: at "MDSYS.MD", line 1723

              ORA-06512: at "MDSYS.MDERR", line 17

              ORA-06512: at "MDSYS.SDO_RDF", line 86

              ORA-06512: at "MDSYS.SDO_RDF_INTERNAL", line 1307

              ORA-06512: at line 1

              ORA-06512: at "MDSYS.SDO_RDF_INTERNAL", line 2826

               

              ]

              • 4. Re: [Jena RDF] Error message ORA-13199
                2773504

                I posted a little more useful logs :

                 

                ERROR :: com.hp.hpl.jena.datatypes.DatatypeFormatException: Lexical form '115.0E0' is not a legal instance of Datatype[http://www.w3.org/2001/XMLSchema#decimal -> class java.math.BigDecimal] Lexical form '115.0E0' is not a legal instance of Datatype[http://www.w3.org/2001/XMLSchema#decimal -> class java.math.BigDecimal] during parse -org.apache.xerces.impl.dv.InvalidDatatypeValueException: cvc-datatype-valid.1.2.1: '115.0E0' is not a valid value for 'decimal'.

                • 5. Re: [Jena RDF] Error message ORA-13199
                  alwu-Oracle

                  Hi,

                   

                  Is it possible to get rid of E0 from your decimal values?

                  Assume you have an N-TRIPLE file, you can do a string replacement of

                   

                  E0"^^<http://www.w3.org/2001/XMLSchema#decimal> .

                   

                  with

                   

                  "^^<http://www.w3.org/2001/XMLSchema#decimal> .

                   

                  Let me know if it helps,

                   

                  Thanks,

                   

                  Zhe Wu

                  • 6. Re: [Jena RDF] Error message ORA-13199
                    2773504

                    I a file generated with .ttl d2rq, plus manual modification.

                    Here is a piece:

                    #Huile

                    map:Huile_0  a  d2rq:PropertyBridge ;

                    d2rq:belongsToClassMap map:Labo33_essai_apc01 ;

                          d2rq:column "dbo.EQUI13_INVENT_1T.equi13_QteHuileApp" ;

                          #d2rq:condition "dbo.\"MAINT_INVENT_General\".\"Cle_Equipement\" NOT IN (SELECT \"equi01_CleEquip\" FROM dbo.\"EQUI14_INVENT_1U\")" ;

                          d2rq:datatype xsd:decimal ;

                          d2rq:join "dbo.EQUI13_INVENT_1T.equi01_CleEquip = dbo.MAINT_INVENT_General.Cle_Equipement" ;

                    d2rq:join "dbo.LABO33_ESSAI_APC01.equi01_CleEquip = dbo.MAINT_INVENT_General.Cle_Equipement" ;

                          d2rq:property vocab:MIDATDEV_MESURE_QUANTITE_HUILE .

                     

                    I get the value of the Decimal type is the style: 114 E 0

                     

                    Values are automatically converted as a scientific notation. But it Creates an error when I transferred in decimal guy Oracle c12

                    • 7. Re: [Jena RDF] Error message ORA-13199
                      alwu-Oracle

                      Hi,

                       

                      Does it make a difference to use xsd:double for the d2rq:datatype?

                      Alternatively, you might be able to use d2rq:sqlExpression to do some format conversion. However, I am not a MS SQL Server expert.

                       

                      Thanks,


                      Zhe Wu

                      • 8. Re: [Jena RDF] Error message ORA-13199
                        2773504

                        yes, I have already tested d2rq: SqlExpression for conversion but without success.

                         

                        I did the test with type Double, but with the following message: [WARN] DataType - Unsupported NUMERIC format: ''; treating as NULL


                        to you a proposed solution?

                         

                        Thanks,

                        • 9. Re: [Jena RDF] Error message ORA-13199
                          alwu-Oracle

                          Hi,

                           

                          I can only speculate here because I don't have a SQL Server database. Given the message, it seems that there might be values like "123,01"

                           

                          In some countries/systems, decimal separator is a comma "," instead of a dot "."  

                          Is that the case for your SQL Server?

                           

                          Given the above message, a WARN instead of an ERROR, do you get triples generated at all?

                           

                          Thanks,


                          Zhe Wu

                          • 10. Re: [Jena RDF] Error message ORA-13199
                            2773504

                            It is with points.

                            Currently the Warning is not a hand blocking the point I do not know this is a result with Warning  !!

                             

                            think's

                            • 11. Re: [Jena RDF] Error message ORA-13199
                              2773504
                              Hello everyone,

                               

                              I use d2rq to the transformation of relational and RDF file with the Association d2rq attached.

                               

                              The result is that when I recovered figures initially BigDecimale (in the relational database) I transform them ^^Double or ^^Decimal I have the scientific concept that is used with an E?

                               

                              Message: ORA-13199: Element Parse Error: Invalid numeric value [debug info: GCVN-numeric: 114.4000015258789E0] (value: "114.4000015258789E0"^^<http://www.w3.org/2001/XMLSchema#decimal>)


                              How it is possible to resolve this behavior?


                              Thins.

                              • 12. Re: [Jena RDF] Error message ORA-13199
                                alwu-Oracle

                                Hi,

                                 

                                I have posted a suggestion before. Not sure if you have got a chance to give it a try.

                                 

                                Is it possible to get rid of E0 from your decimal values?

                                Assume you have an N-TRIPLE file, you can do a string replacement of

                                 

                                E0"^^<http://www.w3.org/2001/XMLSchema#decimal> .

                                 

                                with

                                 

                                "^^<http://www.w3.org/2001/XMLSchema#decimal> .

                                 

                                Thanks,


                                Zhe Wu

                                • 13. Re: [Jena RDF] Error message ORA-13199
                                  2773504

                                  Hello Alwu,

                                  No it is not possible to solve the problem also easily.

                                   

                                  The values are initially identified in a basic field DB (SQLServeur) is a measure mathematical type BigDecimal (so a very long number with high accuracy), but when I transferred it with has triple base DB (Oralce c12) I provide in the form of type Double with d2rq.

                                   

                                  The result is a number with an exponent of the style: xxxE1 or xxxE0 or xxxE2 ...

                                  This is in my opinion a scientific representation of the number is correct, but can not be considered a digital type JAVA, this is where my problem just now.

                                   

                                   

                                  Thank you in advance for your suggestions, hope to have given you more clarification.

                                  • 14. Re: [Jena RDF] Error message ORA-13199
                                    alwu-Oracle

                                    I see. Previously I thought you only had "E0"

                                     

                                    Here is a different approach. You can read the generated RDF data into a Jena Model, iterate through the triples, and for each object field that is of type xsd:decimal, parse it using Java BigDecimal, apply toString method, generate a new triple and append it to an empty model. Finally, dump out that new model into a file.

                                     

                                    For example,

                                     

                                    (new BigDecimal("1.023E-02")).toString();

                                    ==>0.01023

                                     

                                    (new BigDecimal("1.023E+01")).toString();

                                    ==>10.23

                                     

                                    (new BigDecimal("1.023E+0")).toString();

                                    ==>1.023

                                     

                                    Hope it helps,


                                    Zhe