You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by neo21 zerro <ne...@yahoo.com> on 2011/07/27 10:53:43 UTC

Oracle temporary table.


  Hello, 


  Has someone used Jena with Oracle ? Because I'm having some problems with the temporary table 
that are created for the Oracle Database.



Thanks!
Your help is greatly appreciated!

Re: Oracle temporary table.

Posted by neo21 zerro <ne...@yahoo.com>.

   I found a soulution for Oracle, it look's like in Oracle the temporary tables are global, but the data is per session. 
   So when I generate my schema I create from the beginning the two temporary tables and never drop them. This works because 
 if thread's come from different session, the temporary tables are there and since the data is per session, they cannot see or delete another thread's
data.
   One more thing, after a session to the temporary tables was closed the data in the temporary table for that session is deleted to limit the 
increase of the temp table size.



Thanks!
Hope it helps!



________________________________
From: Damian Steer <d....@bristol.ac.uk>
To: neo21 zerro <ne...@yahoo.com>
Sent: Wednesday, July 27, 2011 10:07 PM
Subject: Re: Oracle temporary table.


On 27 Jul 2011, at 11:39, neo21 zerro wrote:

> 
>   Hello Damian, 
>  
> 
>     Thank you very much for your help.  
>     The problem is that I get the error: name is already being used by existing object, and I presume that 
> this is because in the class TubleLoaderBase the method ensureTempTables1, give's the error. I'm accessing it from a multithreaded context, 
> so I presume this could happen : 
>     Thread 1: drop's the temporary tables
>     Thread 2: create's the temporary table 
>     Thread 1: create's the temporary table (assiuming that the tables were droped) - here is where the error appear's
> 

Could you provide some simplified code to show how you are working with SDB?

Are you sharing an sdb store between threads, or using distinct sdb stores?

Damian

Re: Oracle temporary table.

Posted by neo21 zerro <ne...@yahoo.com>.

  Hello Damian, 
 

    Thank you very much for your help.   
    The problem is that I get the error: name is already being used by existing object, and I presume that 
this is because in the class TubleLoaderBase the method ensureTempTables1, give's the error. I'm accessing it from a multithreaded context, 
so I presume this could happen : 
    Thread 1: drop's the temporary tables
    Thread 2: create's the temporary table 
    Thread 1: create's the temporary table (assiuming that the tables were droped) - here is where the error appear's


The stacktrace is shown below:

Caused by: 
com.hp.hpl.jena.sdb.SDBException: Problem making new tupleloader
at 
com.hp.hpl.jena.sdb.layout2.LoaderTuplesNodes.updateOneTuple(LoaderTuplesNodes.java:269)
at 
com.hp.hpl.jena.sdb.layout2.LoaderTuplesNodes.access$2(LoaderTuplesNodes.java:256)
at 
com.hp.hpl.jena.sdb.layout2.LoaderTuplesNodes$Commiter.run(LoaderTuplesNodes.java:334)
at 
java.lang.Thread.run(Thread.java:662)
Caused by: 
java.lang.reflect.InvocationTargetException
at 
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at 
java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at 
com.hp.hpl.jena.sdb.layout2.LoaderTuplesNodes.updateOneTuple(LoaderTuplesNodes.java:267)
... 
3 more
Caused by: com.hp.hpl.jena.sdb.SDBException: Problem initialising 
loader for [Quads]
at 
com.hp.hpl.jena.sdb.layout2.TupleLoaderBase.<init>(TupleLoaderBase.java:47)
at 
com.hp.hpl.jena.sdb.layout2.hash.TupleLoaderHashBase.<init>(TupleLoaderHashBase.java:17)
at 
com.hp.hpl.jena.sdb.layout2.hash.TupleLoaderHashOracle.<init>(TupleLoaderHashOracle.java:22)
... 
8 more
Caused by: java.sql.SQLSyntaxErrorException: ORA-00955: name is 
already used by an existing object

at 
oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:440)
at 
oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
at 
oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:837)
at 
oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:445)
at 
oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:191)
at 
oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:523)
at 
oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:193)
at 
oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:998)
at 
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1315)
at 
oracle.jdbc.driver.OracleStatement.executeInternal(OracleStatement.java:1890)
at 
oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:1855)
at 
oracle.jdbc.driver.OracleStatementWrapper.execute(OracleStatementWrapper.java:304)
at 
weblogic.jdbc.wrapper.Statement.execute(Statement.java:466)
at 
com.hp.hpl.jena.sdb.sql.SDBConnection.exec(SDBConnection.java:174)
at 
com.hp.hpl.jena.sdb.layout2.TupleLoaderBase.createTempTables(TupleLoaderBase.java:327)
at 
com.hp.hpl.jena.sdb.layout2.TupleLoaderBase.ensureTempTables1(TupleLoaderBase.java:351)
at 
com.hp.hpl.jena.sdb.layout2.TupleLoaderBase.ensureTempTables(TupleLoaderBase.java:334)
at 
com.hp.hpl.jena.sdb.layout2.TupleLoaderBase.init(TupleLoaderBase.java:52)
at 
com.hp.hpl.jena.sdb.layout2.TupleLoaderBase.<init>(TupleLoaderBase.java:45)
... 
10 more
 




________________________________
From: Damian Steer <d....@bristol.ac.uk>
To: jena-users@incubator.apache.org; neo21 zerro <ne...@yahoo.com>
Sent: Wednesday, July 27, 2011 1:06 PM
Subject: Re: Oracle temporary table.


On 27 Jul 2011, at 09:58, neo21 zerro wrote:
> 
>   Hello, 
> 
> 
>   Has someone used Jena with Oracle ? Because I'm having some problems with the temporary table 
> that are created for the Oracle Database.

Could you explain what your problem is? Oracle is rarely tested due to the pain of setting it up.

Temporary tables are a constant point of wide variability between RDBs, so it's entirely possible I got something wrong there.

Damian

Re: Oracle temporary table.

Posted by Damian Steer <d....@bristol.ac.uk>.
On 27 Jul 2011, at 09:58, neo21 zerro wrote:
> 
>   Hello, 
> 
> 
>   Has someone used Jena with Oracle ? Because I'm having some problems with the temporary table 
> that are created for the Oracle Database.

Could you explain what your problem is? Oracle is rarely tested due to the pain of setting it up.

Temporary tables are a constant point of wide variability between RDBs, so it's entirely possible I got something wrong there.

Damian

Oracle temporary table.

Posted by neo21 zerro <ne...@yahoo.com>.





  Hello, 


  Has someone used Jena with Oracle ? Because I'm having some problems with the temporary table 
that are created for the Oracle Database.



Thanks!
Your help is greatly appreciated!