0 Replies Latest reply on Jul 25, 2016 7:23 PM by Punit Kumar

    Jboss 6.4  returning empty results on queries

    Punit Kumar Newbie

      Jboss 6.4  returning empty results on queries using mybatis 3.2.2 and OJDBC6. The query statement is simple:

      select * from sae_proc_setting where name = 'formulaT-Test1';

       

      Below is the configuration:

       

      <?xml version="1.0" encoding="UTF-8"?>
      <beans xmlns="http://www.springframework.org/schema/beans"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">

       

       

         <bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean">

         <property name="jndiName" value="java:comp/env/jdbc/Fermat10"/>

         <property name="lookupOnStartup" value="false"/>

         <property name="cache" value="true"/>

         <property name="proxyInterface" value="javax.sql.DataSource"/>

         </bean>

       

         <bean id="mybatisSqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">

         <property name="configLocation"
         value="classpath:/resources/ibatis/sqlmap-mybatis-config.xml"/>

         <property name="dataSource" ref="dataSource"/>

         </bean>

       

         <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">

         <property name="dataSource" ref="dataSource"/>

         </bean>

       

         <bean id="abstractLoggingInterceptor" abstract="true">

         <property name="prettyLogging" value="true"/>

         </bean>

         <bean id="loggingInInterceptor" class="org.apache.cxf.interceptor.LoggingInInterceptor"
         parent="abstractLoggingInterceptor"/>

         <bean id="loggingOutInterceptor" class="org.apache.cxf.interceptor.LoggingOutInterceptor"
         parent="abstractLoggingInterceptor"/>

       

      </beans>



      Below is log:


      2016-07-25 14:08:15 DEBUG DataSourceTransactionManager:365 - Creating new transaction with name [com.moodysanalytics.sae.process.service.impl.ProcessSettingServiceImpl.get]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT,readOnly

      2016-07-25 14:08:15 INFO  stdout:71 - [SACORE]|16/07/25 14:08:15|DEBUG|springframework.jdbc.datasource.DataSourceTransactionManager|Creating new transaction with name [com.moodysanalytics.sae.process.service.impl.ProcessSettingServiceImpl.get]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT,readOnly

       

       

      2016-07-25 14:08:15 DEBUG DataSourceTransactionManager:204 - Acquired Connection [org.jboss.jca.adapters.jdbc.jdk6.WrappedConnectionJDK6@5d25da11] for JDBC transaction

      2016-07-25 14:08:15 INFO  stdout:71 - [SACORE]|16/07/25 14:08:15|DEBUG|springframework.jdbc.datasource.DataSourceTransactionManager|Acquired Connection [org.jboss.jca.adapters.jdbc.jdk6.WrappedConnectionJDK6@5d25da11] for JDBC transaction

       

       

      2016-07-25 14:08:15 DEBUG DataSourceUtils:153 - Setting JDBC Connection [org.jboss.jca.adapters.jdbc.jdk6.WrappedConnectionJDK6@5d25da11] read-only

      2016-07-25 14:08:15 INFO  stdout:71 - [SACORE]|16/07/25 14:08:15|DEBUG|org.springframework.jdbc.datasource.DataSourceUtils         |Setting JDBC Connection [org.jboss.jca.adapters.jdbc.jdk6.WrappedConnectionJDK6@5d25da11] read-only

       

       

      2016-07-25 14:08:15 DEBUG DataSourceTransactionManager:221 - Switching JDBC Connection [org.jboss.jca.adapters.jdbc.jdk6.WrappedConnectionJDK6@5d25da11] to manual commit

      2016-07-25 14:08:15 INFO  stdout:71 - [SACORE]|16/07/25 14:08:15|DEBUG|springframework.jdbc.datasource.DataSourceTransactionManager|Switching JDBC Connection [org.jboss.jca.adapters.jdbc.jdk6.WrappedConnectionJDK6@5d25da11] to manual commit

       

       

      2016-07-25 14:08:15 DEBUG DataSourceTransactionManager:470 - Participating in existing transaction

      2016-07-25 14:08:15 INFO  stdout:71 - [SACORE]|16/07/25 14:08:15|DEBUG|springframework.jdbc.datasource.DataSourceTransactionManager|Participating in existing transaction

       

       

      2016-07-25 14:08:15 INFO  ProcessSettingDaoImpl:35 - Getting processSetting by id 1421

      2016-07-25 14:08:15 INFO  stdout:71 - [SACORE]|16/07/25 14:08:15| INFO|odysanalytics.sae.dataservice.dao.impl.ProcessSettingDaoImpl|Getting processSetting by id 1421

       

       

      2016-07-25 14:08:15 DEBUG SqlMapClientTemplate:168 - Opened SqlMapSession [com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl@600fc1dd] for iBATIS operation

      2016-07-25 14:08:15 INFO  stdout:71 - [SACORE]|16/07/25 14:08:15|DEBUG|org.springframework.orm.ibatis.SqlMapClientTemplate         |Opened SqlMapSession [com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl@600fc1dd] for iBATIS operation

       

       

      2016-07-25 14:08:15 DEBUG Connection:27 - {conn-100192} Connection

      2016-07-25 14:08:15 INFO  stdout:71 - [SACORE]|16/07/25 14:08:15|DEBUG|java.sql.Connection                                         |{conn-100192} Connection

       

       

      2016-07-25 14:08:15 DEBUG SqlMapClientTemplate:185 - Obtained JDBC Connection [Transaction-aware proxy for target Connection  from DataSource [org.jboss.jca.adapters.jdbc.WrapperDataSource@11cfef28]] for iBATIS operation

      2016-07-25 14:08:15 INFO  stdout:71 - [SACORE]|16/07/25 14:08:15|DEBUG|org.springframework.orm.ibatis.SqlMapClientTemplate         |Obtained JDBC Connection [Transaction-aware proxy for target Connection  from DataSource [org.jboss.jca.adapters.jdbc.WrapperDataSource@11cfef28]] for iBATIS operation

       

       

      2016-07-25 14:08:15 DEBUG Connection:27 - {conn-100192} Preparing Statement:          SELECT ID,NAME,SETTINGS,CREATED_BY,UPDATED_BY,CREATED_DATE,UPDATED_DATE, WF_CONFIG_ID, WF_CONFIG_LABEL, VERSION From SAE_PROC_SETTING where ID = ?    

      2016-07-25 14:08:15 INFO  stdout:71 - [SACORE]|16/07/25 14:08:15|DEBUG|java.sql.Connection                                         |{conn-100192} Preparing Statement:          SELECT ID,NAME,SETTINGS,CREATED_BY,UPDATED_BY,CREATED_DATE,UPDATED_DATE, WF_CONFIG_ID, WF_CONFIG_LABEL, VERSION From SAE_PROC_SETTING where ID = ?    

       

       

      2016-07-25 14:08:15 DEBUG PreparedStatement:27 - {pstm-100193} Executing Statement:          SELECT ID,NAME,SETTINGS,CREATED_BY,UPDATED_BY,CREATED_DATE,UPDATED_DATE, WF_CONFIG_ID, WF_CONFIG_LABEL, VERSION From SAE_PROC_SETTING where ID = ?    

      2016-07-25 14:08:15 INFO  stdout:71 - [SACORE]|16/07/25 14:08:15|DEBUG|java.sql.PreparedStatement                                  |{pstm-100193} Executing Statement:          SELECT ID,NAME,SETTINGS,CREATED_BY,UPDATED_BY,CREATED_DATE,UPDATED_DATE, WF_CONFIG_ID, WF_CONFIG_LABEL, VERSION From SAE_PROC_SETTING where ID = ?    

       

       

      2016-07-25 14:08:15 DEBUG PreparedStatement:27 - {pstm-100193} Parameters: [1421]

      2016-07-25 14:08:15 INFO  stdout:71 - [SACORE]|16/07/25 14:08:15|DEBUG|java.sql.PreparedStatement                                  |{pstm-100193} Parameters: [1421]

       

       

      2016-07-25 14:08:15 DEBUG PreparedStatement:27 - {pstm-100193} Types: [java.lang.Long]

      2016-07-25 14:08:15 INFO  stdout:71 - [SACORE]|16/07/25 14:08:15|DEBUG|java.sql.PreparedStatement                                  |{pstm-100193} Types: [java.lang.Long]

       

       

      2016-07-25 14:08:15 DEBUG ResultSet:27 - {rset-100194} ResultSet

      2016-07-25 14:08:15 INFO  stdout:71 - [SACORE]|16/07/25 14:08:15|DEBUG|java.sql.ResultSet                                          |{rset-100194} ResultSet

       

       

      2016-07-25 14:08:15 DEBUG DataSourceTransactionManager:752 - Initiating transaction commit

      2016-07-25 14:08:15 INFO  stdout:71 - [SACORE]|16/07/25 14:08:15|DEBUG|springframework.jdbc.datasource.DataSourceTransactionManager|Initiating transaction commit

       

       

       

       

      As we can see we are getting empty resultset. However, the tricky part is there are other queries which are running fine and returning valid results.

       

      Any help?