You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Harald Scheckenbacher (Created) (JIRA)" <ji...@apache.org> on 2012/03/16 17:27:40 UTC

[jira] [Created] (JCR-3262) Oracle JDBC Class Cast Exception

Oracle JDBC Class Cast Exception
--------------------------------

                 Key: JCR-3262
                 URL: https://issues.apache.org/jira/browse/JCR-3262
             Project: Jackrabbit Content Repository
          Issue Type: Bug
          Components: jackrabbit-core
    Affects Versions: 2.2.11
         Environment: Windows (32-bit, 64-bit), Unix/Linux, JBoss AS 4.0.1sp1
            Reporter: Harald Scheckenbacher
             Fix For: 2.2.12


When utilizing the OraclePersistenceManager (package org.apache.jackrabbit.core.persistence.db) (I realize this is marked as deprecated) we noticed during our migration from Jackrabbit 1.6.1 to 2.2.10/11 that when starting the application server an error message is displayed to us that indicates that the Connection object passed to the createTemporaryBlob method of the BLOB class can't be cast to oracle.jdbc.OracleConnection

Here the interesting lines from our log:
2012-03-15 17:15:47,926 ERROR [org.apache.jackrabbit.core.persistence.db.OraclePersistenceManager] failed to write node state: cafebabe-cafe-babe-cafe-babecafebabe
java.lang.ClassCastException: org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper cannot be cast to oracle.jdbc.OracleConnection
	at oracle.sql.BLOB.createTemporary(BLOB.java:708)
	at org.apache.jackrabbit.core.persistence.db.OraclePersistenceManager.createTemporaryBlob(OraclePersistenceManager.java:375)

I want to highlight at this point that the do not see the issue when using the Oracle Bundled persistence manager, however due to the fact that we haven't used the bundled version in the past we have a lot of customers with repo layouts that can not be used by the bundled persistence manager - we ran some tests and noticed that the consistency check fails.
-> At the moment there is no good upgrade path to move a repo to the bundled structure, the paths provided thus far are shaky at best.

I did find a solution to the problem that has shown no issues thus far and wanted to share this with you:

It is a one line change that can be made before the wrapped connection is passed to the Oracle driver:
org.apache.jackrabbit.core.util.db.ConnectionFactory.unwrap(con);

This then solves the problem, I also wanted to share that we are using an XA datasource.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (JCR-3262) Oracle JDBC Class Cast Exception

Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-3262?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jukka Zitting updated JCR-3262:
-------------------------------

    Fix Version/s: 2.5
    
> Oracle JDBC Class Cast Exception
> --------------------------------
>
>                 Key: JCR-3262
>                 URL: https://issues.apache.org/jira/browse/JCR-3262
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 2.2.11
>         Environment: Windows (32-bit, 64-bit), Unix/Linux, JBoss AS 4.0.1sp1
>            Reporter: Harald Scheckenbacher
>            Assignee: Jukka Zitting
>             Fix For: 2.2.12, 2.4.2, 2.5
>
>
> When utilizing the OraclePersistenceManager (package org.apache.jackrabbit.core.persistence.db) (I realize this is marked as deprecated) we noticed during our migration from Jackrabbit 1.6.1 to 2.2.10/11 that when starting the application server an error message is displayed to us that indicates that the Connection object passed to the createTemporaryBlob method of the BLOB class can't be cast to oracle.jdbc.OracleConnection
> Here the interesting lines from our log:
> 2012-03-15 17:15:47,926 ERROR [org.apache.jackrabbit.core.persistence.db.OraclePersistenceManager] failed to write node state: cafebabe-cafe-babe-cafe-babecafebabe
> java.lang.ClassCastException: org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper cannot be cast to oracle.jdbc.OracleConnection
> 	at oracle.sql.BLOB.createTemporary(BLOB.java:708)
> 	at org.apache.jackrabbit.core.persistence.db.OraclePersistenceManager.createTemporaryBlob(OraclePersistenceManager.java:375)
> I want to highlight at this point that the do not see the issue when using the Oracle Bundled persistence manager, however due to the fact that we haven't used the bundled version in the past we have a lot of customers with repo layouts that can not be used by the bundled persistence manager - we ran some tests and noticed that the consistency check fails.
> -> At the moment there is no good upgrade path to move a repo to the bundled structure, the paths provided thus far are shaky at best.
> I did find a solution to the problem that has shown no issues thus far and wanted to share this with you:
> It is a one line change that can be made before the wrapped connection is passed to the Oracle driver:
> org.apache.jackrabbit.core.util.db.ConnectionFactory.unwrap(con);
> This then solves the problem, I also wanted to share that we are using an XA datasource.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (JCR-3262) Oracle JDBC Class Cast Exception

Posted by "Jukka Zitting (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-3262?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jukka Zitting resolved JCR-3262.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 2.4.2
         Assignee: Jukka Zitting

Thanks! I committed the fix in revision 1307456 and merged it to the 2.4 branch in revision 1307458 and to the 2.2 branch in revision 1307460.
                
> Oracle JDBC Class Cast Exception
> --------------------------------
>
>                 Key: JCR-3262
>                 URL: https://issues.apache.org/jira/browse/JCR-3262
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 2.2.11
>         Environment: Windows (32-bit, 64-bit), Unix/Linux, JBoss AS 4.0.1sp1
>            Reporter: Harald Scheckenbacher
>            Assignee: Jukka Zitting
>             Fix For: 2.2.12, 2.4.2
>
>
> When utilizing the OraclePersistenceManager (package org.apache.jackrabbit.core.persistence.db) (I realize this is marked as deprecated) we noticed during our migration from Jackrabbit 1.6.1 to 2.2.10/11 that when starting the application server an error message is displayed to us that indicates that the Connection object passed to the createTemporaryBlob method of the BLOB class can't be cast to oracle.jdbc.OracleConnection
> Here the interesting lines from our log:
> 2012-03-15 17:15:47,926 ERROR [org.apache.jackrabbit.core.persistence.db.OraclePersistenceManager] failed to write node state: cafebabe-cafe-babe-cafe-babecafebabe
> java.lang.ClassCastException: org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper cannot be cast to oracle.jdbc.OracleConnection
> 	at oracle.sql.BLOB.createTemporary(BLOB.java:708)
> 	at org.apache.jackrabbit.core.persistence.db.OraclePersistenceManager.createTemporaryBlob(OraclePersistenceManager.java:375)
> I want to highlight at this point that the do not see the issue when using the Oracle Bundled persistence manager, however due to the fact that we haven't used the bundled version in the past we have a lot of customers with repo layouts that can not be used by the bundled persistence manager - we ran some tests and noticed that the consistency check fails.
> -> At the moment there is no good upgrade path to move a repo to the bundled structure, the paths provided thus far are shaky at best.
> I did find a solution to the problem that has shown no issues thus far and wanted to share this with you:
> It is a one line change that can be made before the wrapped connection is passed to the Oracle driver:
> org.apache.jackrabbit.core.util.db.ConnectionFactory.unwrap(con);
> This then solves the problem, I also wanted to share that we are using an XA datasource.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira