Announcement Announcement Module
Collapse
No announcement yet.
Error With JDBC MessageStore on a clustered Websphere 7. Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Error With JDBC MessageStore on a clustered Websphere 7.

    Hi All

    I am getting the following error when deploying a war that is using Spring integration.

    Code:
    09 Sep 2011 18:25:58,369 [task-scheduler-7] ERROR org.springframework.integration.handler.LoggingHandler  - org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [SELECT MESSAGE_ID, CREATED_DATE, GROUP_KEY, MESSAGE_BYTES, MARKED from INT_MESSAGE_GROUP where GROUP_KEY=? and REGION=? order by CREATED_DATE]; SQL state [null]; error code [0]; DSRA9110E: Statement is closed.; nested exception is com.ibm.websphere.ce.cm.ObjectClosedException: DSRA9110E: Statement is closed.
                    at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:83)
                    at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
                    at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
                    at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:602)
                    at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:636)
                    at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:665)
                    at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:681)
                    at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:689)
                    at org.springframework.integration.jdbc.JdbcMessageStore.getMessageGroup(JdbcMessageStore.java:335)
                    at org.springframework.integration.store.MessageGroupQueue.getUnmarked(MessageGroupQueue.java:199)
                    at org.springframework.integration.store.MessageGroupQueue.poll(MessageGroupQueue.java:105)
                    at org.springframework.integration.store.MessageGroupQueue.poll(MessageGroupQueue.java:161)
                    at org.springframework.integration.store.MessageGroupQueue.poll(MessageGroupQueue.java:37)
                    at org.springframework.integration.channel.QueueChannel.doReceive(QueueChannel.java:91)
                    at org.springframework.integration.channel.AbstractPollableChannel.receive(AbstractPollableChannel.java:57)
                    at sun.reflect.GeneratedMethodAccessor296.invoke(Unknown Source)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
                    at java.lang.reflect.Method.invoke(Method.java:600)
                    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
                    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
                    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
                    at org.springframework.integration.monitor.PollableChannelMetrics.monitorReceive(PollableChannelMetrics.java:55)
                    at org.springframework.integration.monitor.PollableChannelMetrics.doInvoke(PollableChannelMetrics.java:45)
                    at org.springframework.integration.monitor.DirectChannelMetrics.invoke(DirectChannelMetrics.java:91)
                    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
                    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
                    at $Proxy178.receive(Unknown Source)
                    at org.springframework.integration.endpoint.PollingConsumer.doPoll(PollingConsumer.java:58)
                    at org.springframework.integration.endpoint.AbstractPollingEndpoint$1.call(AbstractPollingEndpoint.java:146)
                    at org.springframework.integration.endpoint.AbstractPollingEndpoint$1.call(AbstractPollingEndpoint.java:144)
                    at org.springframework.integration.endpoint.AbstractPollingEndpoint$Poller$1.run(AbstractPollingEndpoint.java:207)
                    at org.springframework.integration.util.ErrorHandlingTaskExecutor$1.run(ErrorHandlingTaskExecutor.java:52)
                    at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:48)
                    at org.springframework.integration.util.ErrorHandlingTaskExecutor.execute(ErrorHandlingTaskExecutor.java:49)
                    at org.springframework.integration.endpoint.AbstractPollingEndpoint$Poller.run(AbstractPollingEndpoint.java:202)
                    at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:51)
                    at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:80)
                    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:453)
                    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:315)
                    at java.util.concurrent.FutureTask.run(FutureTask.java:150)
                    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
                    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:207)
                    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:872)
                    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
                    at java.lang.Thread.run(Thread.java:736)
    Caused by: com.ibm.websphere.ce.cm.ObjectClosedException: DSRA9110E: Statement is closed.
                    at com.ibm.ws.rsadapter.jdbc.WSJdbcWrapper.createClosedException(WSJdbcWrapper.java:110)
                    at com.ibm.ws.rsadapter.jdbc.WSJdbcStatement.runtimeXIfNotClosed(WSJdbcStatement.java:1747)
                    at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.executeQuery(WSJdbcPreparedStatement.java:743)
                    at org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:643)
                    at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:586)
                    ... 41 more
    
    09 Sep 2011 18:25:58,369 [task-scheduler-7] DEBUG org.springframework.integration.channel.PublishSubscribeChannel  - postSend (sent=true) on channel 'errorChannel', message: [Payload=org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [SELECT MESSAGE_ID, CREATED_DATE, GROUP_KEY, MESSAGE_BYTES, MARKED from INT_MESSAGE_GROUP where GROUP_KEY=? and REGION=? order by CREATED_DATE]; SQL state [null]; error code [0]; DSRA9110E: Statement is closed.; nested exception is com.ibm.websphere.ce.cm.ObjectClosedException: DSRA9110E: Statement is closed.][Headers={history=errorChannel, timestamp=1315589158369, id=9b4d5200-5392-4dc6-bbd9-2b3249cd9197}]
    09 Sep 2011 18:25:58,447 [task-scheduler-10] DEBUG org.springframework.integration.endpoint.PollingConsumer  - Poll resulted in Message: null
    09 Sep 2011 18:25:58,447 [task-scheduler-10] DEBUG org.springframework.integration.endpoint.PollingConsumer  - Received no Message during the poll, returning 'false'
    09 Sep 2011 18:25:58,494 [task-scheduler-9] DEBUG org.springframework.integration.endpoint.PollingConsumer  - Poll resulted in Message: null
    09 Sep 2011 18:25:58,494 [task-scheduler-9] DEBUG org.springframework.integration.endpoint.PollingConsumer  - Received no Message during the poll, returning 'false'
    09 Sep 2011 18:25:58,525 [task-scheduler-3] DEBUG org.springframework.integration.endpoint.PollingConsumer  - Poll resulted in Message: null
    09 Sep 2011 18:25:58,525 [task-scheduler-3] DEBUG org.springframework.integration.endpoint.PollingConsumer  - Received no Message during the poll, returning 'false'
    09 Sep 2011 18:25:58,588 [task-scheduler-5] DEBUG org.springframework.integration.endpoint.PollingConsumer  - Poll resulted in Message: null
    09 Sep 2011 18:25:58,588 [task-scheduler-5] DEBUG org.springframework.integration.endpoint.PollingConsumer  - Received no Message during the poll, returning 'false'
    My applicationContext file contains the following

    Code:
    <jee:jndi-lookup id="dataSource" jndi-name="jdbc/Database" cache="true" resource-ref="true" lookup-on-startup="false" proxy-interface="javax.sql.DataSource"/>
    
        <task:scheduler id="messageHubTaskScheduler" pool-size="5"/>
    
        <int:poller id="defaultPoller" default="true" fixed-rate="1000" max-messages-per-poll="1"/>
    
        <int:message-history/>
    
        <int-jdbc:message-store id="messageStore" data-source="dataSource"/>
    
        <int:logging-channel-adapter id="logger" level="DEBUG" log-full-message="true"/>
    
        <int:wire-tap pattern="*" order="3" channel="logger"/>
    And my web.xml file has the following for the deffinition of the JNDI resource

    Code:
    	<resource-ref id="ResourceRef_3">
    		<res-ref-name>jdbc/Database</res-ref-name>
    		<res-type>javax.sql.DataSource</res-type>
    		<res-auth>CONTAINER</res-auth>
    		<res-sharing-scope>Shareable</res-sharing-scope>
    	</resource-ref>
    The same code on a non-clusterd enviroment works with out any issues. Has anyone seen this happening and can make any suggestions as to what I am doing worng.


    Regards

    DRAW
    Last edited by dr4w; Sep 9th, 2011, 04:01 PM.

  • #2
    Clustered Websphere 7

    Hello there,

    Did you reslove this issue and if yes the please let me know how you did it.
    I have the same issue for my application on a clustered WAS7

    Thanks you!

    Originally posted by dr4w View Post
    Hi All

    I am getting the following error when deploying a war that is using Spring integration.

    Code:
    09 Sep 2011 18:25:58,369 [task-scheduler-7] ERROR org.springframework.integration.handler.LoggingHandler  - org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [SELECT MESSAGE_ID, CREATED_DATE, GROUP_KEY, MESSAGE_BYTES, MARKED from INT_MESSAGE_GROUP where GROUP_KEY=? and REGION=? order by CREATED_DATE]; SQL state [null]; error code [0]; DSRA9110E: Statement is closed.; nested exception is com.ibm.websphere.ce.cm.ObjectClosedException: DSRA9110E: Statement is closed.
                    at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:83)
                    at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
                    at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
                    at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:602)
                    at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:636)
                    at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:665)
                    at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:681)
                    at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:689)
                    at org.springframework.integration.jdbc.JdbcMessageStore.getMessageGroup(JdbcMessageStore.java:335)
                    at org.springframework.integration.store.MessageGroupQueue.getUnmarked(MessageGroupQueue.java:199)
                    at org.springframework.integration.store.MessageGroupQueue.poll(MessageGroupQueue.java:105)
                    at org.springframework.integration.store.MessageGroupQueue.poll(MessageGroupQueue.java:161)
                    at org.springframework.integration.store.MessageGroupQueue.poll(MessageGroupQueue.java:37)
                    at org.springframework.integration.channel.QueueChannel.doReceive(QueueChannel.java:91)
                    at org.springframework.integration.channel.AbstractPollableChannel.receive(AbstractPollableChannel.java:57)
                    at sun.reflect.GeneratedMethodAccessor296.invoke(Unknown Source)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
                    at java.lang.reflect.Method.invoke(Method.java:600)
                    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
                    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
                    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
                    at org.springframework.integration.monitor.PollableChannelMetrics.monitorReceive(PollableChannelMetrics.java:55)
                    at org.springframework.integration.monitor.PollableChannelMetrics.doInvoke(PollableChannelMetrics.java:45)
                    at org.springframework.integration.monitor.DirectChannelMetrics.invoke(DirectChannelMetrics.java:91)
                    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
                    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
                    at $Proxy178.receive(Unknown Source)
                    at org.springframework.integration.endpoint.PollingConsumer.doPoll(PollingConsumer.java:58)
                    at org.springframework.integration.endpoint.AbstractPollingEndpoint$1.call(AbstractPollingEndpoint.java:146)
                    at org.springframework.integration.endpoint.AbstractPollingEndpoint$1.call(AbstractPollingEndpoint.java:144)
                    at org.springframework.integration.endpoint.AbstractPollingEndpoint$Poller$1.run(AbstractPollingEndpoint.java:207)
                    at org.springframework.integration.util.ErrorHandlingTaskExecutor$1.run(ErrorHandlingTaskExecutor.java:52)
                    at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:48)
                    at org.springframework.integration.util.ErrorHandlingTaskExecutor.execute(ErrorHandlingTaskExecutor.java:49)
                    at org.springframework.integration.endpoint.AbstractPollingEndpoint$Poller.run(AbstractPollingEndpoint.java:202)
                    at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:51)
                    at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:80)
                    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:453)
                    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:315)
                    at java.util.concurrent.FutureTask.run(FutureTask.java:150)
                    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
                    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:207)
                    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:872)
                    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
                    at java.lang.Thread.run(Thread.java:736)
    Caused by: com.ibm.websphere.ce.cm.ObjectClosedException: DSRA9110E: Statement is closed.
                    at com.ibm.ws.rsadapter.jdbc.WSJdbcWrapper.createClosedException(WSJdbcWrapper.java:110)
                    at com.ibm.ws.rsadapter.jdbc.WSJdbcStatement.runtimeXIfNotClosed(WSJdbcStatement.java:1747)
                    at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.executeQuery(WSJdbcPreparedStatement.java:743)
                    at org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:643)
                    at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:586)
                    ... 41 more
    
    09 Sep 2011 18:25:58,369 [task-scheduler-7] DEBUG org.springframework.integration.channel.PublishSubscribeChannel  - postSend (sent=true) on channel 'errorChannel', message: [Payload=org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [SELECT MESSAGE_ID, CREATED_DATE, GROUP_KEY, MESSAGE_BYTES, MARKED from INT_MESSAGE_GROUP where GROUP_KEY=? and REGION=? order by CREATED_DATE]; SQL state [null]; error code [0]; DSRA9110E: Statement is closed.; nested exception is com.ibm.websphere.ce.cm.ObjectClosedException: DSRA9110E: Statement is closed.][Headers={history=errorChannel, timestamp=1315589158369, id=9b4d5200-5392-4dc6-bbd9-2b3249cd9197}]
    09 Sep 2011 18:25:58,447 [task-scheduler-10] DEBUG org.springframework.integration.endpoint.PollingConsumer  - Poll resulted in Message: null
    09 Sep 2011 18:25:58,447 [task-scheduler-10] DEBUG org.springframework.integration.endpoint.PollingConsumer  - Received no Message during the poll, returning 'false'
    09 Sep 2011 18:25:58,494 [task-scheduler-9] DEBUG org.springframework.integration.endpoint.PollingConsumer  - Poll resulted in Message: null
    09 Sep 2011 18:25:58,494 [task-scheduler-9] DEBUG org.springframework.integration.endpoint.PollingConsumer  - Received no Message during the poll, returning 'false'
    09 Sep 2011 18:25:58,525 [task-scheduler-3] DEBUG org.springframework.integration.endpoint.PollingConsumer  - Poll resulted in Message: null
    09 Sep 2011 18:25:58,525 [task-scheduler-3] DEBUG org.springframework.integration.endpoint.PollingConsumer  - Received no Message during the poll, returning 'false'
    09 Sep 2011 18:25:58,588 [task-scheduler-5] DEBUG org.springframework.integration.endpoint.PollingConsumer  - Poll resulted in Message: null
    09 Sep 2011 18:25:58,588 [task-scheduler-5] DEBUG org.springframework.integration.endpoint.PollingConsumer  - Received no Message during the poll, returning 'false'
    My applicationContext file contains the following

    Code:
    <jee:jndi-lookup id="dataSource" jndi-name="jdbc/Database" cache="true" resource-ref="true" lookup-on-startup="false" proxy-interface="javax.sql.DataSource"/>
    
        <task:scheduler id="messageHubTaskScheduler" pool-size="5"/>
    
        <int:poller id="defaultPoller" default="true" fixed-rate="1000" max-messages-per-poll="1"/>
    
        <int:message-history/>
    
        <int-jdbc:message-store id="messageStore" data-source="dataSource"/>
    
        <int:logging-channel-adapter id="logger" level="DEBUG" log-full-message="true"/>
    
        <int:wire-tap pattern="*" order="3" channel="logger"/>
    And my web.xml file has the following for the deffinition of the JNDI resource

    Code:
    	<resource-ref id="ResourceRef_3">
    		<res-ref-name>jdbc/Database</res-ref-name>
    		<res-type>javax.sql.DataSource</res-type>
    		<res-auth>CONTAINER</res-auth>
    		<res-sharing-scope>Shareable</res-sharing-scope>
    	</resource-ref>
    The same code on a non-clusterd enviroment works with out any issues. Has anyone seen this happening and can make any suggestions as to what I am doing worng.


    Regards

    DRAW

    Comment


    • #3
      Hi!

      It sound like you have small DataSource connection pool. I recommend to set it to '0': http://www.ibm.com/developerworks/fo...hreadID=363019
      It will bad to say it publicly, but there are some problems with WAS connection pool .

      Take care,
      Artem

      Comment

      Working...
      X