You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by viz06 <vi...@yahoo.com> on 2008/06/24 15:28:25 UTC

DataStore table name

There seems to be a bug configuring DataStore. I am using the following
configuration

<DataStore class="org.apache.jackrabbit.core.data.db.DbDataStore">
            
            
            
            
            
            
            
            
            
    </DataStore>

this works the first time around and creates the table cmr_datastore, but on
2nd run I get this oracle error

ORA-00955: name is already used by an existing object

On digging up code it seems the below check (in DbDataStore)for existing
datastore table is wrong. This is checking for tableSQL (DATASTORE)and if
not found creates CMR_DATASTORE. 


ResultSet rs = meta.getTables(null, null, tableSQL, null);

boolean exists = rs.next();
rs.close();
if (!exists) {
      conn.executeStmt(createTableSQL, null);
}

where tableSQL is DataStore (default value) while createTableSQL is 'CREATE
TABLE ${tablePrefix}${table}(ID VARCHAR(255) PRIMARY KEY, LENGTH NUMBER,
LAST_MODIFIED NUMBER, DATA BLOB'

For 1st run system could not find cmr_datastore table hence it creates one,
on 2nd run again it checks if the datastore table exists as it doesn't, it
tries creating cmr_datastore which fails because it already exists.

I couldn't find any mention of this issue on the forum or anywhere else.
Could it me an issue with my environment, which I really doubt.

I am using Jackrabbit 1.4.4.

Thanks
-- 
View this message in context: http://www.nabble.com/DataStore-table-name-tp18091039p18091039.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Re: DataStore table name

Posted by viz06 <vi...@yahoo.com>.
Edited:



viz06 wrote:
> 
> There seems to be a bug configuring DataStore. I am using the following
> configuration
> 
> <DataStore class="org.apache.jackrabbit.core.data.db.DbDataStore">
>             
>             
>             
>             
>             
>             
>             
>             
>             
>     </DataStore>
> 
> this works the first time around and creates the table cmr_datastore, but
> on 2nd run I get this oracle error
> 
> ORA-00955: name is already used by an existing object
> 
> On digging up code it seems the below check (in DbDataStore)for existing
> datastore table is wrong. This is checking for tableSQL (DATASTORE)and if
> not found creates CMR_DATASTORE. 
> 
> 
> ResultSet rs = meta.getTables(null, null, tableSQL, null);
> 
> boolean exists = rs.next();
> rs.close();
> if (!exists) {
>       conn.executeStmt(createTableSQL, null);
> }
> 
> where tableSQL is DataStore (default value) while createTableSQL is
> 'CREATE TABLE ${tablePrefix}${table}(ID VARCHAR(255) PRIMARY KEY, LENGTH
> NUMBER, LAST_MODIFIED NUMBER, DATA BLOB'
> 
> For 1st run system could not find datastore table so it creates
> cmr_datastore, on 2nd run again it checks if the datastore table exists as
> it doesn't, it tries creating cmr_datastore which fails because it already
> exists.
> 
> I couldn't find any mention of this issue on the forum or anywhere else.
> Could it me an issue with my environment, which I really doubt.
> 
> I am using Jackrabbit 1.4.4.
> 
> Thanks
> 

-- 
View this message in context: http://www.nabble.com/DataStore-table-name-tp18091039p18091133.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Re: DataStore table name

Posted by Thomas Müller <th...@day.com>.
Hi,

This is a known issue. See
http://issues.apache.org/jira/browse/JCR-1366

Regards,
Thomas


On Tue, Jun 24, 2008 at 4:00 PM, viz06 <vi...@yahoo.com> wrote:
>
> Don't know why the configuration is appearing as this. I am using tablePrefix
> as 'CMR_' in my configuration. If I remove the tablePrefix (set it to blank)
> everything works fine as exptected looking at the code.
> --
> View this message in context: http://www.nabble.com/DataStore-table-name-tp18091039p18091675.html
> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>
>

Re: DataStore table name

Posted by viz06 <vi...@yahoo.com>.
Don't know why the configuration is appearing as this. I am using tablePrefix
as 'CMR_' in my configuration. If I remove the tablePrefix (set it to blank)
everything works fine as exptected looking at the code.
-- 
View this message in context: http://www.nabble.com/DataStore-table-name-tp18091039p18091675.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.