2 Replies Latest reply on Nov 18, 2002 8:10 AM by Ciaran Duffy

    Transactions not supported

    Ciaran Duffy Newbie

      Hello All

      When using a servlet or ordinary beans within a war package in the JBoss3/Tomcat bundle to connect to an informix SE 7.2 database via the ifxjdbc driver I get the following sql exception "Transactions not supported".

      This happens when I try to execute a sql statement. I can connect to the database via JNDI but i cannot execute the sql statement. Is it a case that I need to update the ifxjdbc driver I am using or have I configured somthing wrong.

      I Hope someone can answer my query and thanks in advance.

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

      The following is the trace from the jboss server.log.
      In the first part of the log you can see that I issue a sql query(Select) direct to the database via the ifxjdbc driver.

      But in the second part of the log I use JNDI to get a connection and then I execute the same query command but I get the Transaction not support error. It looks as if I can connect to the database but I can issue sql commands. Maybe JBoss is issuing extra commands not supported by the database. Any ideas would be much appreciated.


      2002-11-12 11:14:22,686 INFO [STDOUT] Got Driver class
      2002-11-12 11:14:22,788 INFO [STDOUT] Now Loading database driver
      2002-11-12 11:14:25,116 INFO [STDOUT] Connected to Database
      2002-11-12 11:14:25,122 INFO [STDOUT] Getting query
      2002-11-12 11:14:25,490 INFO [STDOUT] Got query
      2002-11-12 11:14:25,515 INFO [STDOUT] executed query
      2002-11-12 11:14:25,520 INFO [STDOUT] in displayresultset
      2002-11-12 11:14:25,630 INFO [STDOUT] in displayresultset creating table
      2002-11-12 11:14:25,635 INFO [STDOUT] in get details got resultset

      **************************************************
      2002-11-12 11:15:08,163 INFO [STDOUT] Got Initial Context
      2002-11-12 11:15:08,172 INFO [STDOUT] Got DataSource via JNDI
      2002-11-12 11:15:08,338 DEBUG [org.jboss.resource.connectionmanager.IdleRemover] internalRegisterPool: registering pool with interval 900000 old interval: 9223372036854775807
      2002-11-12 11:15:08,340 DEBUG [org.jboss.resource.connectionmanager.IdleRemover] internalRegisterPool: about to notify thread: old next: 1037100158339, new next: 1037100158339
      2002-11-12 11:15:08,341 DEBUG [org.jboss.resource.connectionmanager.IdleRemover] run: IdleRemover notifying pools, interval: 450000
      2002-11-12 11:15:08,362 DEBUG [org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory] Using properties: {user=informix, password=informix}
      2002-11-12 11:15:08,362 DEBUG [org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory] Checking driver for URL: jdbc:informix-sqli://223.0.1.16:1536/WEB_DBS/roadload:INFORMIXSERVER=icarus_se
      2002-11-12 11:15:08,365 DEBUG [org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory] Driver already registered for url: jdbc:informix-sqli://223.0.1.16:1536/WEB_DBS/roadload:INFORMIXSERVER=icarus_se
      2002-11-12 11:15:09,163 INFO [STDOUT] Got connection from DataSource via JNDI
      2002-11-12 11:15:09,169 INFO [STDOUT] Connected to Database
      2002-11-12 11:15:09,173 INFO [STDOUT] Getting query
      2002-11-12 11:15:09,256 INFO [STDOUT] Got query
      2002-11-12 11:15:09,340 INFO [STDOUT] in get details Sql Exception
      2002-11-12 11:15:09,345 INFO [STDOUT] Transactions not supported
      2002-11-12 11:15:09,351 ERROR [STDERR] java.sql.SQLException: Transactions not supported
      2002-11-12 11:15:09,487 ERROR [STDERR] at com.informix.util.IfxErrMsg.getSQLException(IfxErrMsg.java)
      2002-11-12 11:15:09,492 ERROR [STDERR] at com.informix.jdbc.IfxSqliConnect.setAutoCommit(IfxSqliConnect.java)
      2002-11-12 11:15:09,503 ERROR [STDERR] at org.jboss.resource.adapter.jdbc.local.LocalManagedConnection.checkTransaction(LocalManagedConnection.java:426)
      2002-11-12 11:15:09,508 ERROR [STDERR] at org.jboss.resource.adapter.jdbc.local.LocalConnection.checkTransaction(LocalConnection.java:756)
      2002-11-12 11:15:09,513 ERROR [STDERR] at org.jboss.resource.adapter.jdbc.local.LocalStatement.checkTransaction(LocalStatement.java:771)
      2002-11-12 11:15:09,518 ERROR [STDERR] at org.jboss.resource.adapter.jdbc.local.LocalPreparedStatement.executeQuery(LocalPreparedStatement.java:286)
      2002-11-12 11:15:09,523 ERROR [STDERR] at Msgdbs3.getTableDetails(Msgdbs3.java:249)
      2002-11-12 11:15:09,528 ERROR [STDERR] at Msgdbs3.SendHtml(Msgdbs3.java:60)
      2002-11-12 11:15:09,532 ERROR [STDERR] at Msgdbs3.doGet(Msgdbs3.java:47)
      2002-11-12 11:15:09,538 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
      2002-11-12 11:15:09,543 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      2002-11-12 11:15:09,548 ERROR [STDERR] at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:446)
      2002-11-12 11:15:09,549 ERROR [STDERR] at org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:180)
      2002-11-12 11:15:09,550 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
      2002-11-12 11:15:09,551 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      2002-11-12 11:15:09,551 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
      2002-11-12 11:15:09,552 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
      2002-11-12 11:15:09,553 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
      2002-11-12 11:15:09,554 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
      2002-11-12 11:15:09,555 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
      2002-11-12 11:15:09,556 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
      2002-11-12 11:15:09,557 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
      2002-11-12 11:15:09,557 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
      2002-11-12 11:15:09,558 ERROR [STDERR] at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
      2002-11-12 11:15:09,559 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      2002-11-12 11:15:09,560 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
      2002-11-12 11:15:09,569 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
      2002-11-12 11:15:09,574 ERROR [STDERR] at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
      2002-11-12 11:15:09,580 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
      2002-11-12 11:15:09,584 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
      2002-11-12 11:15:09,589 ERROR [STDERR] at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
      2002-11-12 11:15:09,590 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      2002-11-12 11:15:09,591 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
      2002-11-12 11:15:09,592 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      2002-11-12 11:15:09,593 ERROR [STDERR] at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
      2002-11-12 11:15:09,593 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      2002-11-12 11:15:09,594 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
      2002-11-12 11:15:09,595 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
      2002-11-12 11:15:09,601 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
      2002-11-12 11:15:09,601 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
      2002-11-12 11:15:09,602 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
      2002-11-12 11:15:09,603 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
      2002-11-12 11:15:09,604 ERROR [STDERR] at org.apache.catalina.connector.warp.WarpRequestHandler.handle(WarpRequestHandler.java:217)
      2002-11-12 11:15:09,605 ERROR [STDERR] at org.apache.catalina.connector.warp.WarpConnection.run(WarpConnection.java:194)
      2002-11-12 11:15:09,605 ERROR [STDERR] at java.lang.Thread.run(Thread.java:479)

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


      The following is my informix-service.xml config. I put the config file in the deploy directory and the ifxjdbc.jar in the lib directory.

      <?xml version="1.0" encoding="UTF-8"?>

      <!-- ===================================================================== -->
      <!-- -->
      <!-- JBoss Server Configuration -->
      <!-- -->
      <!-- ===================================================================== -->



      <!-- ==================================================================== -->
      <!-- ConnectionManager setup for local informix dbs -->
      <!-- Thanks to Larry Sanderson (larrys@mrstock.com) -->
      <!-- Build jmx-api (build/build.sh all) and view for config documentation -->
      <!-- ==================================================================== -->



      <!-- Include a login module configuration named InformixDbRealm.
      Update your login-conf.xml, here is an example for a
      ConfiguredIdentityLoginModule:

      <application-policy name = "InformixDbRealm">

      <login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule" flag = "required">
      <module-option name = "principal">yourprincipal</module-option>
      <module-option name = "userName">informix</module-option>
      <module-option name = "password">informix</module-option>
      <module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=InformixDS</module-option>
      </login-module>

      </application-policy>

      NOTE: the application-policy name attribute must match SecurityDomainJndiName, and the
      module-option name = "managedConnectionFactoryName"
      must match the object name of the ConnectionManager you are configuring here.
      -->
      <!--uncomment out this line if you are using the Informix DbRealm above
      InformixDbRealm
      -->

      <depends optional-attribute-name="ManagedConnectionFactoryName">
      <!--embedded mbean-->


      InformixDS



      <config-property name="ConnectionURL" type="java.lang.String">jdbc:informix-sqli://myipaddress:1536/WEB_DBS/testdbs:INFORMIXSERVER=icarus_se</config-property>
      <config-property name="DriverClass" type="java.lang.String">com.informix.jdbc.IfxDriver</config-property>
      <!--set these only if you want only default logins, not through JAAS -->
      <config-property name="UserName" type="java.lang.String">informix</config-property>
      <config-property name="Password" type="java.lang.String">informix</config-property>


      <!--hack-->
      <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=JBoss LocalTransaction JDBC Wrapper


      <depends optional-attribute-name="ManagedConnectionPool">
      <!--embedded mbean-->


      0
      50
      5000
      15
      <!--criteria indicates if Subject (from security domain) or app supplied
      parameters (such as from getConnection(user, pw)) are used to distinguish
      connections in the pool. Choices are
      ByContainerAndApplication (use both),
      ByContainer (use Subject),
      ByApplication (use app supplied params only),
      ByNothing (all connections are equivalent, usually if adapter supports
      reauthentication)-->
      ByContainer


      <depends optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedConnectionManager

      <depends optional-attribute-name="JaasSecurityManagerService">jboss.security:name=JaasSecurityManager


      java:/TransactionManager
      <!--make the rar deploy! hack till better deployment-->
      jboss.jca:service=RARDeployer





        • 1. Re: Transactions not supported
          Frank Langelage Master

          Your database was created without logging and therefore does not support transactions now.
          You'll have to enable logging for the database.
          Don't know about Informix-SE, but with Informix-IDS I would do "ontape -s -L 0 -U ". This performs an Backup first and then enables unbuffered logging for the named database.
          If it is a small database you may do "dbexport ", drop database and "dbimport -l".

          • 2. Re: Transactions not supported
            Ciaran Duffy Newbie

            Hello IAFR

            You hit the nail right on the head!!. It is always the simple things to look out for. My database indeed did not have any logging set!Doh!. So anyway I have my connections working properly and thanks very much for your help.

            CPD