3 Replies Latest reply on Jun 18, 2008 1:57 PM by alwu-Oracle

    Problem in inserting the rdf object through jena

    madhan2
      Hello,

      i am trying to add the values from jena it hitting the folowing error

      2008-06-17 09:24:56,253 [oracle.spatial.rdf.client.jena.SimpleLog] WARN - Could not perform query
      java.sql.SQLException: ORA-00942: table or view does not exist

           at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:74)
      at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:110)
           at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:171)
           at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
           at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)
           at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1030)
           at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:194)
           at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:947)
           at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1222)
           at oracle.jdbc.driver.OraclePreparedStatement.sendBatch(OraclePreparedStatement.java:3685)
           at oracle.jdbc.driver.OraclePreparedStatementWrapper.sendBatch(OraclePreparedStatementWrapper.java:1139)
           at oracle.spatial.rdf.client.jena.GraphOracleSem.flushAdd(GraphOracleSem.java:927)
           at oracle.spatial.rdf.client.jena.GraphOracleSem.graphBaseFind(GraphOracleSem.java:1585)
           at com.hp.hpl.jena.graph.impl.GraphBase.find(GraphBase.java:240)
           at com.hp.hpl.jena.graph.GraphUtil.findAll(GraphUtil.java:31)
           at com.hp.hpl.jena.graph.impl.GraphBase.toString(GraphBase.java:428)
           at com.hp.hpl.jena.graph.impl.GraphBase.toString(GraphBase.java:414)
           at com.mimos.stp.kbh.OracleConnector.addTriples(OracleConnector.java:104)
           at com.mimos.stp.test.JUTest.TestAdd(JUTest.java:37)
           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.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99)
           at org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81)
           at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
           at org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)
           at org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
           at org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:66)
           at org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35)
           at org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
           at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
           at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
           at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
           at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
           at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
           at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
           at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
           at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

      and java code is

      try {

      Oracle oracle = new Oracle(jdbcUrl, user, password);
      // System.out.println(oracle);
      GraphOracleSem graph = new GraphOracleSem(oracle, modelName);
      ModelOracleSem model = new ModelOracleSem(graph);

                     
      Node sub = Node.createURI("http://www.example.org/family/John");
      Node pred = Node.createURI("http://www.example.org/family/fatherOf");
      Node obj = Node.createURI("http://www.example.org/family/mary");

      graph.add(Triple.create(sub, pred, obj));
      System.out.println("triple added");
      graph.getApplicationTableName();
      System.out.println(graph.getApplicationTableName());
      } catch (Exception e) {
      e.printStackTrace();
      }
      graph.close();
      oracle.dispose();

      my table is "health_rdf_data" but when check with graph.getApplicationTableName() it showing "health_tpl" table why i donot understood and i didn't created this table.


      please suggest me

      thanking you,
      Madhan.