i2b2 Developer's Forum
Space shortcuts
Space Tools
Skip to end of metadata
Go to start of metadata

With the introduction of i2b2 1.7 and the upgrade of the underlying software components (i.e. JBoss 4.2.2 to JBoss 7), some users have reported receiving connection errors when using cells that query data from Sql Server databases. The problem may present itself in various ways, but many times shows up as an "Attempted to read from closed stream" error on the server side.  The source of the error appears to be related to a connection pool issue when using the default datasource validation rules. The error occurs when a server side cell attempts to read from a connection in the connection pool that has been closed.  The datasource validation rules are meant to validate the connection status before running the query, but when using the sample validation rules, the connection does not get re-established and an error occurs. This error can most predictable recreated by briefly disconnecting the i2b2 server from the network.  In order to stop this error from occurring, the validation parameters can to be changed.  Below is a new sample datasource with the changed validation settings highlighted in bold:

<datasource jta="false" jndi-name="java:/i2b2DemoDB" pool-name="i2b2DemoDB" enabled="true" use-ccm="false">

<connection-url>jdbc:sqlserver://localhost:1433;databasename=i2b2demodata</connection-url>

              <driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>

              <driver>sqljdbc4.jar</driver>

              <security>

                <user-name>username</user-name>

                           <password>password</password>

              </security>

              <validation>

                           <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.mssql.MSSQLValidConnectionChecker"></valid-connection-checker>

<validate-on-match>false</validate-on-match>

              </validation>

              <statement>

                           <share-prepared-statements>false</share-prepared-statements>

              </statement>

</datasource>

  • No labels