tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From William Wragg <will...@datapro.co.uk>
Subject Informix and JDBCRealm
Date Thu, 01 May 2003 14:07:18 GMT
Hi,

I have just started using Tomcat4 authentication (JDBCRealm) in 
my  applications. Trying to use this with an INFORMIX database, I get the 
following error in stdout.log file when starting Tomcat:

Create Catalina server
Starting service Tomcat-Standalone
Apache Tomcat/4.0.4
Catalina.start: LifecycleException:  Exception opening database
connection:  java.sql.SQLException: Transactions not supported
LifecycleException:  Exception opening database connection:
java.sql.SQLException: Transactions not supported
	at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:615)
	at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1108)
	at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343)
	at
org.apache.catalina.core.StandardService.start(StandardService.java:388)
	at
org.apache.catalina.core.StandardServer.start(StandardServer.java:506)
	at
org.apache.catalina.startup.CatalinaService.start(CatalinaService.java:2
61)
	at
org.apache.catalina.startup.CatalinaService.execute(CatalinaService.java
:172)
	at
org.apache.catalina.startup.Catalina.process(Catalina.java:179)
	at java.lang.reflect.Method.invoke(Native Method)
	at
org.apache.catalina.startup.BootstrapService.main(BootstrapService.java:
428)
----- Root Cause -----
java.sql.SQLException: Transactions not supported
	at
com.informix.util.IfxErrMsg.getSQLException(IfxErrMsg.java:348)
	at
com.informix.jdbc.IfxSqliConnect.setAutoCommit(IfxSqliConnect.java:1454)
	at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:549)
	at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:613)
	at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1108)
	at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343)
	at
org.apache.catalina.core.StandardService.start(StandardService.java:388)
	at
org.apache.catalina.core.StandardServer.start(StandardServer.java:506)
	at
org.apache.catalina.startup.CatalinaService.start(CatalinaService.java:2
61)
	at
org.apache.catalina.startup.CatalinaService.execute(CatalinaService.java
:172)
	at
org.apache.catalina.startup.Catalina.process(Catalina.java:179)
	at java.lang.reflect.Method.invoke(Native Method)
	at
org.apache.catalina.startup.BootstrapService.main(BootstrapService.java:
428)

JDBCRealm is configured in server.xml as follows:

<Realm  className="org.apache.catalina.realm.JDBCRealm" debug="99"
              driverName="com.informix.jdbc.IfxDriver"
           connectionURL="jdbc:informix-sqli://10.0.0.6:1536/ 
/databases/v6/PDA/universe:INFORMIXSERVER=se_jdbc"
          connectionName="name" connectionPassword="password"
               userTable="pda_user" userNameCol="user_name" 
userCredCol="user_pass"
           userRoleTable="pda_user_role" roleNameCol="role_name" />

I have traced the problem to the following object in the 
$CATALINA_HOME/server/lib/catalina.jar jar:

org.apache.catalina.realm.JDBCRealm.open() has the line;
dbConnection.setAutoCommit(false);

This is fine when the Informix database supports logging, but when it 
doesn't you get the above 'Transactions not supported' error. I cannot turn 
logging on, on the database, for various reasons.
I would very much like not to recompile catalina.jar, does anyone have any 
ideas?
I noticed that if a connection to the database is already active, then this 
problem line will not be executed, does anyone know how I could create a 
connection, BEFORE the <Realm .../> section?

Regards,

Wm.

Mime
View raw message