Hi Charles,

> I know this is a bit bizarro, so any ideas or theories are appreciated.
> Should I consider trying to write my own PlatformLDAPImpl class?  Just a
> thought.

I think currently this will be the easiest way to go. Implement
PlatformLdapJdbcImpl.initializeJdbcConnection and
PlatformLdapJdbcImpl.changeAutoCommitState
as a noop-method. Within these methods OJB try to set the autoCommit state of the connection.
I think in future releases of OJB the ConnectionFactoryAbstractImpl.initializeJdbcConnection method should be removed, but currently it was used.



regards, Armin



Charles N. Harvey III wrote:
Ok.  I know this is a weird one, but here goes.

I downloaded the ldapJdbc driver from openldap.org the other day. It allows
one to write SQL queries which are then translated into LDAP requests. Its
pretty neat so far. I am trying to use OJB like I would in any other project
and just put the ldapJdbc jar in for the driver.


   <jdbc-connection-descriptor
           jcd-alias="test-ldap"
           default-connection="true"
           platform=""
           jdbc-level="4.0"
           driver="com.octetstring.jdbcLdap.sql.JdbcLdapDriver"
           protocol="jdbc"
           subprotocol="ldap"
           dbalias="//192.168.195.2:389/?SEARCH_SCOPE:=subTreeScope"
           username="domain\jauthenticator"
           password="mypassword"
           eager-release="false">

What should I use for the "platform"?  If I leave it blank I am pretty sure
that OJB falls back on whatever the default is.

But, that isn't where I am getting a problem. OJB is trying to use transactions
and the LDAP driver doesn't allow that.


-----------------------------------------------------------------------------------

Caused by: org.apache.ojb.broker.accesslayer.LookupException: Platform dependent initialization of connection failed at org.apache.ojb.broker.accesslayer.ConnectionFactoryAbstractImpl.initializeJdbcConnection(ConnectionFactoryAbstractImpl.java:157)

at org.apache.ojb.broker.accesslayer.ConnectionFactoryAbstractImpl.newConnectionFromDriverManager(ConnectionFactoryAbstractImpl.java:272)

at org.apache.ojb.broker.accesslayer.ConnectionFactoryNotPooledImpl.getConnectionFromPool(ConnectionFactoryNotPooledImpl.java:40)

at org.apache.ojb.broker.accesslayer.ConnectionFactoryAbstractImpl.lookupConnection(ConnectionFactoryAbstractImpl.java:116)

at org.apache.ojb.broker.accesslayer.ConnectionManagerImpl.getConnection(ConnectionManagerImpl.java:105)

at org.apache.ojb.broker.accesslayer.StatementManager.getPreparedStatement(StatementManager.java:637)

... 55 more
Caused by: org.apache.ojb.broker.platforms.PlatformException: Connection initializing: setAutoCommit(true) failed
at org.apache.ojb.broker.platforms.PlatformDefaultImpl.initializeJdbcConnection(PlatformDefaultImpl.java:160)


at org.apache.ojb.broker.accesslayer.ConnectionFactoryAbstractImpl.initializeJdbcConnection(ConnectionFactoryAbstractImpl.java:153)

... 60 more
Caused by: java.sql.SQLException: LDAP Does Not Support Transactions
at com.octetstring.jdbcLdap.jndi.JndiLdapConnection.setAutoCommit(JndiLdapConnection.java:478)


at org.apache.ojb.broker.platforms.PlatformDefaultImpl.initializeJdbcConnection(PlatformDefaultImpl.java:154)

... 61 more
-----------------------------------------------------------------------------------




At the base of it is the SQLException about LDAP not supporting transactions.
Can I turn that off somewhere in the OJB.properties?


I know this is a bit bizarro, so any ideas or theories are appreciated.
Should I consider trying to write my own PlatformLDAPImpl class? Just a thought.


Thanks a lot.



Charlie



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to