You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Jacek Prucia (JIRA)" <ji...@apache.org> on 2012/12/19 15:43:13 UTC

[jira] [Commented] (JCR-2414) Problem with multiple SCHEMA

    [ https://issues.apache.org/jira/browse/JCR-2414?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13536002#comment-13536002 ] 

Jacek Prucia commented on JCR-2414:
-----------------------------------

Sorry, to jump in here so late, but i've been stuck with basically the same problem. The problem in my personal opinion lies with misleading property name: schemaObjectPrefix. Schema is an entity allegedly defined by SQL ANSII standard. Haven't read the spec, but the reality these days is that scheme in most RDMS'es means simply namespace for usual db elements (tables, views, indexes etc). People use it like namespace everywhere else: to group simillar elements which for some reason must live in the same database.

So some people (myself included) when they see word "schema" used in conjunction with "database" assume it means usual database schema. And just like original bug reporter we get really confused if things don't work the way we expect them to. Personally i think that changing property into DbObjectPrefix would solve this problem (although, changing things that affect configuration file is kinda opening pandora box...)

As for schemas themselves, they simply allows for neat data organization. You could for example get Jackrabbit tables and application tables together into single database (so moving whole app around is way easier). Or you can have a master database for all Jackrabbit instances (to be able to issue some query against it and get summary information). One can argue that you can achieve that with separate databases, but the reality is that schemas do exists and are quite widely used.

I think Jackrabbit could still support schemas with additional property: schemaName. Assuming following scenario:

schemaName = scott1
dbObjectPrefix = filesystem_

...Jackrabbit would for example issue: CREATE TABLE scott1.filesystem_fsentry ...

That would allow to achieve what bug reporter and myself wanted and still escape dot in object prefix. My situation allows me to stick with dedicated database, so it is not really a big problem for me. Just wanted to sort things out a bit, as my impression is this bug was left without a closure of some sort.
                
> Problem with multiple SCHEMA
> ----------------------------
>
>                 Key: JCR-2414
>                 URL: https://issues.apache.org/jira/browse/JCR-2414
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>         Environment: Oracle 9i, Windows XP/Linux
>            Reporter: premkumar
>            Priority: Minor
>             Fix For: 1.6
>
>         Attachments: repository.xml, workspace.xml
>
>
> I'm having 2 schema (scott & scott1) for a single instance orcl. I Inserted all Jackrabbit dll and made schemaCheckEnabled to false for scott schema and its working fine for scott. But when I try for scott1 Its throwing exception (ORA-00942: table or view does not exist). Attached repository.xml for your reference. 
> javax.jcr.RepositoryException: File system initialization failure.: failed to initialize file system: failed to initialize file system
> 	at org.apache.jackrabbit.core.config.RepositoryConfigurationParser$4.getFileSystem(RepositoryConfigurationParser.java:825)
> 	at org.apache.jackrabbit.core.config.RepositoryConfig.getFileSystem(RepositoryConfig.java:778)
> 	at org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:268)
> 	at org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:627)
> 	at org.apache.jackrabbit.core.jndi.BindableRepository.createRepository(BindableRepository.java:141)
> 	at org.apache.jackrabbit.core.jndi.BindableRepository.init(BindableRepository.java:117)
> 	at org.apache.jackrabbit.core.jndi.BindableRepository.<init>(BindableRepository.java:106)
> 	at org.apache.jackrabbit.core.jndi.BindableRepositoryFactory.getObjectInstance(BindableRepositoryFactory.java:51)
> 	at org.apache.jackrabbit.core.jndi.RegistryHelper.registerRepository(RegistryHelper.java:74)
> 	at com.jcr.test.ContentRepository.<clinit>(ContentRepository.java:65)
> Caused by: org.apache.jackrabbit.core.fs.FileSystemException: failed to initialize file system
> 	at org.apache.jackrabbit.core.fs.db.DatabaseFileSystem.init(DatabaseFileSystem.java:226)
> 	at org.apache.jackrabbit.core.fs.db.OracleFileSystem.init(OracleFileSystem.java:137)
> 	at org.apache.jackrabbit.core.config.RepositoryConfigurationParser$4.getFileSystem(RepositoryConfigurationParser.java:818)
> 	... 9 more
> Caused by: org.apache.jackrabbit.core.fs.FileSystemException: failed to check existence of file system root entry
> 	at org.apache.jackrabbit.core.fs.db.DatabaseFileSystem.verifyRootExists(DatabaseFileSystem.java:1387)
> 	at org.apache.jackrabbit.core.fs.db.DatabaseFileSystem.init(DatabaseFileSystem.java:220)
> 	... 11 more
> Caused by: java.sql.SQLException: ORA-00942: table or view does not exist
> 	at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
> 	at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
> 	at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
> 	at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743)
> 	at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:216)
> 	at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:799)
> 	at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1039)
> 	at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:839)
> 	at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1132)
> 	at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3285)
> 	at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3390)
> 	at org.apache.jackrabbit.core.fs.db.DatabaseFileSystem.executeStmt(DatabaseFileSystem.java:1101)
> 	at org.apache.jackrabbit.core.fs.db.DatabaseFileSystem.verifyRootExists(DatabaseFileSystem.java:1375)
> 	... 12 more

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira