jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From AnatoliyDilov <anato...@adilov.net>
Subject Re: Jackrabbit, JBoss, Oracle and JNDI Datasource lookup
Date Wed, 04 Nov 2009 11:11:56 GMT


Thomas Müller-2 wrote:
> 
> Hi,
> 
> The problem is here:
> org.jboss.resource.adapter.jdbc.WrappedConnection
>        at oracle.sql.BLOB.createTemporary(BLOB.java:587)
> 
> I can't get the repository.xml file you posted (I get Error 500).
> 
> It looks like you try to use a JNDI connection (some kind of JBoss
> connection) with OracleFileSystem. This is not supported with this
> file system, sorry. You need to use the the JDBC driver / database URL
> in the file system configuration, or you need to use another
> persistence manager (I'm not sure if DbFileSystem would work).
> 
> Regards,
> Thomas
> 
> 

Hi Thomas,

I found a workaround. The solution is really in a custom class, that extends
OracleFileSystem. Maybe in my first try I messed up something, but
everything is OK now. Here is a working FS class file, used in the
repository.xml (FileSystem class="path.to.ExtendedOracleFileSystem"):

public class ExtendedOracleFileSystem extends OracleFileSystem {

    @Override
    protected Connection getConnection() throws RepositoryException,
SQLException {
        Connection connection = super.getConnection();
        if (connection != null && connection instanceof WrappedConnection) {
            return ((WrappedConnection)
connection).getUnderlyingConnection();
        }

        return connection;
    }

}

Many thanks for the replies.

Cheers,
Anatoliy
-- 
View this message in context: http://old.nabble.com/Jackrabbit%2C-JBoss%2C-Oracle-and-JNDI-Datasource-lookup-tp26029101p26194430.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Mime
View raw message