My problem is,in my table, we have 18 records, we are not able to fetch the data from table, while fetching, we are getting the exception like below mentioned. i have enabled hibernate API log file, there i got to know that, the sql query, which is generated by hibernate runs fine in DB, but programatically, it is not running fine,
[2016-02-11 15:17:30,347] [allTriggeredJobsExecutor-19] [AbstractBatcher] [DEBUG] - Executing batch size: 1
[2016-02-11 15:17:30,347] [allTriggeredJobsExecutor-19] [AbstractBatcher] [DEBUG] - Executing batch size: 1
[2016-02-11 15:17:30,347] [allTriggeredJobsExecutor-19] [AbstractBatcher] [DEBUG] - about to close PreparedStatement (open PreparedStatements: 1, globally: 2)
[2016-02-11 15:17:30,347] [allTriggeredJobsExecutor-19] [AbstractBatcher] [DEBUG] - about to close PreparedStatement (open PreparedStatements: 1, globally: 2)
[2016-02-11 15:17:30,348] [allTriggeredJobsExecutor-19] [JDBCTransaction] [DEBUG] - re-enabling autocommit
[2016-02-11 15:17:30,348] [allTriggeredJobsExecutor-19] [JDBCTransaction] [DEBUG] - re-enabling autocommit
[2016-02-11 15:17:30,348] [allTriggeredJobsExecutor-19] [JDBCTransaction] [DEBUG] - committed JDBC Connection [2016-02-11 15:17:30,348] [allTriggeredJobsExecutor-19] [JDBCTransaction] [DEBUG] - committed JDBC Connection
[2016-02-11 15:17:30,348] [allTriggeredJobsExecutor-19] [ConnectionManager] [DEBUG] - transaction completed on session with on_close connection release mode; be sure to close the session to release JDBC resources!
[2016-02-11 15:17:30,348] [allTriggeredJobsExecutor-19] [ConnectionManager] [DEBUG] - transaction completed on session with on_close connection release mode; be sure to close the session to release JDBC resources!
[2016-02-11 15:17:30,348] [allTriggeredJobsExecutor-19] [ConnectionManager] [DEBUG] - releasing JDBC connection [ (open PreparedStatements: 0, globally: 1) (open ResultSets: 0, globally: 1)] [2016-02-11 15:17:30,348] [allTriggeredJobsExecutor-19] [ConnectionManager] [DEBUG] - releasing JDBC connection [ (open PreparedStatements: 0, globally: 1) (open ResultSets: 0, globally: 1)]
[2016-02-11 15:17:30,348] [allTriggeredJobsExecutor-19] [ConnectionManager] [DEBUG] - transaction completed on session with on_close connection release mode; be sure to close the session to release JDBC resources!
[2016-02-11 15:17:30,348] [allTriggeredJobsExecutor-19] [ConnectionManager] [DEBUG] - transaction completed on session with on_close connection release mode; be sure to close the session to release JDBC resources!
[2016-02-11 15:17:30,401] [http-nio-443-exec-4] [AbstractBatcher] [DEBUG] - about to close ResultSet (open ResultSets: 1, globally: 1)
[2016-02-11 15:17:30,401] [http-nio-443-exec-4] [AbstractBatcher] [DEBUG] - about to close ResultSet (open ResultSets: 1, globally: 1)
[2016-02-11 15:17:30,401] [http-nio-443-exec-4] [AbstractBatcher] [DEBUG] - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
[2016-02-11 15:17:30,401] [http-nio-443-exec-4] [AbstractBatcher] [DEBUG] - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
[2016-02-11 15:17:30,401] [http-nio-443-exec-4] [JDBCExceptionReporter] [DEBUG] - could not execute query [select this_.ID as ID2123_0_, this_.InstanceUuid as Instance2_2123_0_, this_.ClusterId as ClusterId2123_0_, this_.DataCenterId as DataCent4_2123_0_, this_.DataCenterName as DataCent5_2123_0_, this_.OperStatus as OperStatus2123_0_, this_.Name as Name2123_0_, this_.VirinfraName as Virinfra8_2123_0_, this_.VmotionEvents as VmotionE9_2123_0_, this_.VCenterName as VCenter10_2123_0_, this_.HostCount as HostCount2123_0_, this_.TotalVMCount as TotalVM12_2123_0_, this_.ActiveVMCount as ActiveV13_2123_0_, this_.InactiveVMCount as Inactiv14_2123_0_, this_.SuspendedVMCount as Suspend15_2123_0_, this_.DataCollection as DataCol16_2123_0_, this_.AuthEntityId as AuthEnt17_2123_0_, this_.AuthEntityClass as AuthEnt18_2123_0_ from ClusterListView this_ order by lower(this_.Name) asc]
java.sql.SQLRecoverableException: No more data to read from socket at oracle.jdbc.driver.T4CMAREngineStream.unmarshalUB1(T4CMAREngineStream.java:456) at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:397) at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:257) at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:587) at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:225) at oracle.jdbc.driver.T4CPreparedStatement.fetch(T4CPreparedStatement.java:1066) at oracle.jdbc.driver.OracleStatement.fetchMoreRows(OracleStatement.java:3716) at oracle.jdbc.driver.InsensitiveScrollableResultSet.fetchMoreRows(InsensitiveScrollableResultSet.java:1015) at oracle.jdbc.driver.InsensitiveScrollableResultSet.absoluteInternal(InsensitiveScrollableResultSet.java:979) at oracle.jdbc.driver.InsensitiveScrollableResultSet.next(InsensitiveScrollableResultSet.java:579) at org.apache.commons.dbcp.DelegatingResultSet.next(DelegatingResultSet.java:169) at org.hibernate.loader.Loader.doQuery(Loader.java:825) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274) at org.hibernate.loader.Loader.doList(Loader.java:2542) at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2276) at org.hibernate.loader.Loader.list(Loader.java:2271) at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:121) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1716) at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:347) at com.cisco.ifm.datacenter.inventory.service.DataCenterInventoryServiceImpl.getDCListView(DataCenterInventoryServiceImpl.java:518) at com.cisco.ifm.datacenter.inventory.service.DataCenterInventoryServiceImpl.getClusters(DataCenterInventoryServiceImpl.java:221) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) 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:150) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at com.sun.proxy.$Proxy285.getClusters(Unknown Source) at com.cisco.ifm.datacenter.inventory.rest.InventoryServiceRestProvider.getClusters(InventoryServiceRestProvider.java:488) at com.cisco.ifm.datacenter.inventory.rest.InventoryServiceRestProvider$$FastClassByCGLIB$$d805e7d7.invoke() at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149) at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:617) at com.cisco.ifm.datacenter.inventory.rest.InventoryServiceRestProvider$$EnhancerByCGLIB$$2281031e.getClusters() at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)