You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Prasad Bodapati <pr...@pb.com> on 2015/02/17 11:20:37 UTC

Oracle Cluster configuration tablespace is variable is not resolved.

Hi,
I have been trying to configure Jackrabbit with Oracle. I get exception while schema check is performed for version table in cluster.
While the cluster configuration is being initialized.It calls the init() method in DataBaseJournal class. In there it calls checkLocalRevisionSchema(); That method in turns call CheckSchemaOperation .run() to check whether the LOCAL_REVISIONS table exists if not it creates it. At first time it does not have the table so it tries to create the table with query
create table ${schemaObjectPrefix}JOURNAL (REVISION_ID number(20,0) NOT NULL, JOURNAL_ID varchar(255), PRODUCER_ID varchar(255), REVISION_DATA blob) ${tablespace}

Before executing the query the variable c${schemOBjectPrefix} is replaced with PBVP_Journal but the  ${tablespace} is being replaced. I am not sure what I am doing wrong. I did
The whole repository.xml is attached.

My file system and persistence manager configuration looks like

<Versioning rootPath="${rep.home}/version">
<FileSystem class="org.apache.jackrabbit.core.fs.db.OracleFileSystem">
                                             <param name="driver" value="javax.naming.InitialContext"/>
                                             <param name="url" value="java:/jcr/repositoryDB"/>
                                             <param name="schemaObjectPrefix" value="PBVP_version_"/>
                                             <param name="schema" value="oracle"/>
                                             <param name="tablespace" value="default"/>
                              </FileSystem>
                              <PersistenceManager class="org.apache.jackrabbit.core.persistence.pool.OraclePersistenceManager">
                                             <param name="driver" value="javax.naming.InitialContext"/>
                                             <param name="url" value="java:/jcr/repositoryDB"/>
                                             <param name="databaseType" value="oracle"/>
                                             <param name="schemaObjectPrefix" value="PBVP_version_"/>
                                             <param name="bundleCacheSize" value="32"/>
                                             <param name="tableSpace" value="default"/>
                              </PersistenceManager>
</Versioning>

My cluster configuration looks like


<Cluster id="node1" syncDelay="2000">
                              <Journal class="org.apache.jackrabbit.core.journal.OracleDatabaseJournal">
                                             <param name="revision" value="${rep.home}/revision.log"/>
                                             <param name="driver" value="javax.naming.InitialContext"/>
                                             <param name="url" value="java:/jcr/repositoryDB"/>
                                             <param name="schemaObjectPrefix" value="PBVP_journal_"/>
                                             <param name="databaseType" value="oracle"/>
                                             <param name="schemaCheckEnabled" value="false"/>
                                             <param name="tablespace" value="default"/>
                              </Journal>
               </Cluster>






Thanks & Regards
Prasad Bodapati, Software Engineer
Pitney Bowes Software
6 Hercules Way, Leavesden Park, Watford, Herts WD25 7GS
D: +441923 279174 | M: +447543399223 www.pb.com/software<http://www.pb.com/software>

prasad.bodapati@pb.com<ma...@pb.com>

Every connection is a new opportunity(tm)

[Pitney Bowes]


Please consider the environment before printing or forwarding this email. If you do print this email, please recycle the paper.

This email message may contain confidential, proprietary and/or privileged information. It is intended only for the use of the intended recipient(s). If you have received it in error, please immediately advise the sender by reply email and then delete this email message. Any disclosure, copying, distribution or use of the information contained in this email message to or by anyone other than the intended recipient is strictly prohibited.


________________________________


RE: Oracle Cluster configuration tablespace is variable is not resolved.

Posted by Prasad Bodapati <pr...@pb.com>.
It would be great if some could help me why I am unable to create LOCAL_REVISIONS table in Oracle.

From: Prasad Bodapati
Sent: 17 February 2015 10:21
To: 'users@jackrabbit.apache.org'
Subject: Oracle Cluster configuration tablespace is variable is not resolved.

Hi,
I have been trying to configure Jackrabbit with Oracle. I get exception while schema check is performed for version table in cluster.
While the cluster configuration is being initialized.It calls the init() method in DataBaseJournal class. In there it calls checkLocalRevisionSchema(); That method in turns call CheckSchemaOperation .run() to check whether the LOCAL_REVISIONS table exists if not it creates it. At first time it does not have the table so it tries to create the table with query
create table ${schemaObjectPrefix}JOURNAL (REVISION_ID number(20,0) NOT NULL, JOURNAL_ID varchar(255), PRODUCER_ID varchar(255), REVISION_DATA blob) ${tablespace}

Before executing the query the variable c${schemOBjectPrefix} is replaced with PBVP_Journal but the  ${tablespace} is being replaced. I am not sure what I am doing wrong. I did
The whole repository.xml is attached.

My file system and persistence manager configuration looks like

<Versioning rootPath="${rep.home}/version">
<FileSystem class="org.apache.jackrabbit.core.fs.db.OracleFileSystem">
                                             <param name="driver" value="javax.naming.InitialContext"/>
                                             <param name="url" value="java:/jcr/repositoryDB"/>
                                             <param name="schemaObjectPrefix" value="PBVP_version_"/>
                                             <param name="schema" value="oracle"/>
                                             <param name="tablespace" value="default"/>
                              </FileSystem>
                              <PersistenceManager class="org.apache.jackrabbit.core.persistence.pool.OraclePersistenceManager">
                                             <param name="driver" value="javax.naming.InitialContext"/>
                                             <param name="url" value="java:/jcr/repositoryDB"/>
                                             <param name="databaseType" value="oracle"/>
                                             <param name="schemaObjectPrefix" value="PBVP_version_"/>
                                             <param name="bundleCacheSize" value="32"/>
                                             <param name="tableSpace" value="default"/>
                              </PersistenceManager>
</Versioning>

My cluster configuration looks like


<Cluster id="node1" syncDelay="2000">
                              <Journal class="org.apache.jackrabbit.core.journal.OracleDatabaseJournal">
                                             <param name="revision" value="${rep.home}/revision.log"/>
                                             <param name="driver" value="javax.naming.InitialContext"/>
                                             <param name="url" value="java:/jcr/repositoryDB"/>
                                             <param name="schemaObjectPrefix" value="PBVP_journal_"/>
                                             <param name="databaseType" value="oracle"/>
                                             <param name="schemaCheckEnabled" value="false"/>
                                             <param name="tablespace" value="default"/>
                              </Journal>
               </Cluster>






Thanks & Regards
Prasad Bodapati, Software Engineer
Pitney Bowes Software
6 Hercules Way, Leavesden Park, Watford, Herts WD25 7GS
D: +441923 279174 | M: +447543399223 www.pb.com/software<http://www.pb.com/software>

prasad.bodapati@pb.com<ma...@pb.com>

Every connection is a new opportunity(tm)

[Pitney Bowes]


Please consider the environment before printing or forwarding this email. If you do print this email, please recycle the paper.

This email message may contain confidential, proprietary and/or privileged information. It is intended only for the use of the intended recipient(s). If you have received it in error, please immediately advise the sender by reply email and then delete this email message. Any disclosure, copying, distribution or use of the information contained in this email message to or by anyone other than the intended recipient is strictly prohibited.


________________________________


Re: Oracle Cluster configuration tablespace is variable is not resolved.

Posted by prasad <pr...@pb.com>.
Finally now I know what is going on.The Jackrabbit configuration loading
mechanism goes through two routes

When jackrabbit is deployed for the first time it executes table creation
statements through the class OracleDatabaseJournal which is aware of
${tablespace} so it resolves it.
When it is deployed second time and the first deployment fails it executes
through DatabaseJournal class which is base class of OracleDatabaseJournal
it does not know about ${tablespace} so it does not resolve it.
When I debugged I was following the second route so I concentrated on why
does not it try to resolve the ${tablespace} in the sql statement. It should
not take the second route if the first deployment is success. In our case
the first deployment failed because of the length of table name. If we
change the length of the table name it deploys ok so it should never come to
second scenario





--
View this message in context: http://jackrabbit.510166.n4.nabble.com/Oracle-Cluster-configuration-tablespace-is-variable-is-not-resolved-tp4662015p4662051.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

Re: Oracle Cluster configuration tablespace is variable is not resolved.

Posted by prasad <pr...@pb.com>.
It sounds like clearly bug in jackrabbit, I can not figure out any other way.



--
View this message in context: http://jackrabbit.510166.n4.nabble.com/Oracle-Cluster-configuration-tablespace-is-variable-is-not-resolved-tp4662015p4662037.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.