jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Graeme Steyn (JIRA)" <j...@apache.org>
Subject [jira] Commented: (JCR-2664) OraclePersistenceManager does not work with JNDI resource
Date Thu, 29 Jul 2010 02:15:16 GMT

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

Graeme Steyn commented on JCR-2664:
-----------------------------------

Tha patch file appears as an attachement to this case, i.e. OraclePersistenceManager.patch.

First check out the source code from the released tag that you are going to be patching, e.g.
1.6.1.

svn co http://svn.apache.org/repos/asf/jackrabbit/tags/1.6.1/ jackrabbit

You can refer to this article on the application for the application of the patch: http://ariejan.net/2007/07/03/how-to-create-and-apply-a-patch-with-subversion/

Basically, all it is doing is editing the following file in the checked out source code and
removing the user and password field initialisation from the contructor.

jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/db/OraclePersistenceManager.java

You can do this manually if you wish to.

Once this is done, simply re-build the jackrabbit-core JAR, using "mvn clean install".

> OraclePersistenceManager does not work with JNDI resource
> ---------------------------------------------------------
>
>                 Key: JCR-2664
>                 URL: https://issues.apache.org/jira/browse/JCR-2664
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 1.6.1, 1.6.2, 2.1.0
>         Environment: Oracle 11g Rel1, SpringSource tc Server 2.0.0.SR01, JDK 1.6.0 Update
20, LIferay 5.2 EE SP4, Jackrabbit 1.6.1.
>            Reporter: Graeme Steyn
>         Attachments: OraclePersistenceManager.patch
>
>
> The OraclePersistenceManager will not work correctly with a JNDI resource due to the
default values provided in the constructor. I noticed this problem when configuring LIferay
5.2 EE SP4 (which uses jackrabbit-core.jar v 1.6.1).  This problem has been touched on in
different areas in JCR-1703.
> Patch:
> Index: jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/db/OraclePersistenceManager.java
> ===================================================================
> --- jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/db/OraclePersistenceManager.java
(revision 956161)
> +++ jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/db/OraclePersistenceManager.java
(working copy)
> @@ -107,8 +107,6 @@
>          schema = "oracle";
>          driver = "oracle.jdbc.OracleDriver";
>          schemaObjectPrefix = "";
> -        user = "";
> -        password = "";
>          initialized = false;
>      }
>  
> The patch attached basically allows the following configuration in repository.xml to
work correctly.
> <?xml version="1.0"?>
> <Repository> 
>  
>     <!--
>     Database File System (Cluster Configuration)
>  
>     This is sample configuration for mysql persistence that can be used for
>     clustering Jackrabbit. For other databases, change the connection,
>     credentials, and schema settings.
>     --> 
>  
>     <FileSystem class="org.apache.jackrabbit.core.fs.db.OracleFileSystem"> 
>         <param name="driver" value="javax.naming.InitialContext"/> 
>         <param name="url" value="java:comp/env/jdbc/LiferayPool"/>
>         <param name="schemaObjectPrefix" value="J_R_FS_"/> 
>     </FileSystem> 
>     <Security appName="Jackrabbit"> 
>         <AccessManager class="org.apache.jackrabbit.core.security.SimpleAccessManager"
/> 
>         <LoginModule class="org.apache.jackrabbit.core.security.SimpleLoginModule">

>         <param name="anonymousId" value="anonymous" /> 
>         </LoginModule> 
>     </Security> 
>     <Workspaces rootPath="${rep.home}/workspaces" defaultWorkspace="liferay" />

>     <Workspace name="${wsp.name}"> 
>         <!-- 
>         Database File System and Persistence (Cluster Configuration)
>         This is sample configuration for mysql persistence that can be used for
>         clustering Jackrabbit. For other databases, change the  connection,
>         credentials, and schema settings.
>         --> 
>         <PersistenceManager class="org.apache.jackrabbit.core.persistence.db.OraclePersistenceManager">

>             <param name="driver" value="javax.naming.InitialContext" /> 
>             <param name="url" value="java:comp/env/jdbc/LiferayPool"/>
>             <param name="schemaObjectPrefix" value="J_PM_${wsp.name}_" /> 
>             <param name="schema" value="oracle"/>
>             <param name="externalBLOBs" value="false" /> 
>         </PersistenceManager> 
>         <FileSystem class="org.apache.jackrabbit.core.fs.db.OracleFileSystem">

>             <param name="driver" value="javax.naming.InitialContext"/> 
>             <param name="url" value="java:comp/env/jdbc/LiferayPool"/>
>             <param name="schemaObjectPrefix" value="J_FS_${wsp.name}_"/> 
>         </FileSystem> 
>     </Workspace> 
>     <Versioning rootPath="${rep.home}/version"> 
>         <!--
>         Database File System and Persistence (Cluster Configuration)
>         This is sample configuration for mysql persistence that can be used for
>         clustering Jackrabbit. For other databases, change the connection,
>         credentials, and schema settings.
>         --> 
>         <FileSystem class="org.apache.jackrabbit.core.fs.db.OracleFileSystem">

>             <param name="driver" value="javax.naming.InitialContext"/> 
>             <param name="url" value="java:comp/env/jdbc/LiferayPool"/>
>             <param name="schemaObjectPrefix" value="J_V_FS_"/> 
>         </FileSystem> 
>         <PersistenceManager class="org.apache.jackrabbit.core.persistence.db.OraclePersistenceManager">

>             <param name="driver" value="javax.naming.InitialContext" /> 
>             <param name="url" value="java:comp/env/jdbc/LiferayPool"/>
>             <param name="schemaObjectPrefix" value="J_V_PM_" /> 
>             <param name="schema" value="oracle"/>
>             <param name="externalBLOBs" value="false" /> 
>         </PersistenceManager> 
>     </Versioning> 
>     <!--
>     Cluster Configuration
>     This is sample configuration for mysql persistence that can be used for
>     clustering Jackrabbit. For other databases, change the  connection,
>     credentials, and schema settings.
>     --> 
>     <Cluster id="node1" syncDelay="5"> 
>         <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:comp/env/jdbc/LiferayPool"/>
>             <param name="databaseType" value="oracle"/>
>         </Journal> 
>     </Cluster> 
> </Repository> 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message