Hi,
our db-system is not able to execute inner-joins on views.
Our mapping bases on views and hibernate produces an
inner-join on these views, which does not work.
Are there any workarounds?
Hibernate version:
hibernate-2.1.6
OS-Veriosn:
AIX 4
Name and version of the database you are using:
Oracle 9.2.0.5
The generated SQL (show_sql=true):
Code:
select * from ( select ...) - inner-join on views
Debug level Hibernate log excerpt:info
Hibernate Properties: Code:
#################
### Platforms ###
#################
## Oracle
Hibernate.properties are set as followed:
hibernate.dialect net.sf.hibernate.dialect.Oracle9Dialect
hibernate.connection.driver_class oracle.jdbc.driver.OracleDriver
###########################
### C3P0 Connection Pool###
###########################
hibernate.c3p0.max_size 10
hibernate.c3p0.min_size 5
hibernate.c3p0.timeout 500
hibernate.c3p0.max_statements 100
hibernate.c3p0.idle_test_period 3000
hibernate.c3p0.acquire_increment 2
#################################
### Plugin ConnectionProvider ###
#################################
hibernate.connection.provider_class net.sf.hibernate.connection.C3P0ConnectionProvider
Full stack trace of any exception that occurs:Code:
(util.JDBCExceptionReporter 57 ) SQL Error: 17410, SQLState: null
(util.JDBCExceptionReporter 58 ) Keine weiteren Daten aus Socket zu lesen
(util.JDBCExceptionReporter 57 ) SQL Error: 17410, SQLState: null
(util.JDBCExceptionReporter 58 ) Keine weiteren Daten aus Socket zu lesen
(impl.TransactionManager 236 ) Entering TransactionManager#rollbackTransaction
[DEBUG]com.mchange.v2.c3p0.impl.C3P0PooledConnection@69695f: while closing a PooledConnection known to be invalid, some exceptions occurred. This is probably not a problem:
[ exceptions: java.sql.SQLException: Keine weiteren Daten aus Socket zu lesen ]
com.mchange.v2.c3p0.impl.C3P0PooledConnection@69695f invalidated by Exception: java.sql.SQLException: Keine weiteren Daten aus Socket zu lesen
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:1160)
at oracle.jdbc.ttc7.MAREngine.unmarshalUB1(MAREngine.java:963)
at oracle.jdbc.ttc7.MAREngine.unmarshalSB1(MAREngine.java:893)
at oracle.jdbc.ttc7.Ocommoncall.receive(Ocommoncall.java:104)
at oracle.jdbc.ttc7.TTC7Protocol.rollback(TTC7Protocol.java:487)
at oracle.jdbc.driver.OracleConnection.rollback(OracleConnection.java:1376)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.mchange.v2.c3p0.impl.C3P0PooledConnection$ProxyConnectionInvocationHandler.invoke(C3P0PooledConnection.java:712)
at com.mchange.v2.c3p0.impl.$Proxy0.rollback(Unknown Source)
at net.sf.hibernate.transaction.JDBCTransaction.rollback(JDBCTransaction.java:86)
at com.kn.gvs.inv.integration.impl.TransactionManager.rollbackTransaction(TransactionManager.java:241)
at com.kn.gvs.inv.business.impl.AbstractGVSSelector.search(AbstractGVSSelector.java:114)
at com.kn.gvs.inv.business.impl.AbstractGVSPagingSelector.search(AbstractGVSPagingSelector.java:84)
at com.kn.gvs.inv.presentation.action.result.InventorySummaryResultAvailableAction.unspecified(InventorySummaryResultAvailableAction.java:67)
at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:258)
at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:196)
at com.kn.gvs.inv.presentation.action.AbstractGVSDispatchAction.execute(AbstractGVSDispatchAction.java:62)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
at com.kn.gvs.inv.presentation.GVSActionServlet.process(GVSActionServlet.java:109)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:696)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146)
at com.kn.gvs.inv.presentation.util.BusinessSessionFilter.doFilter(BusinessSessionFilter.java:59)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:144)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2358)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:534)
CONNECTION ERROR OCCURRED!
(transaction.JDBCTransaction 90 ) Rollback failed
java.sql.SQLException: Keine weiteren Daten aus Socket zu lesen
at com.mchange.v2.c3p0.impl.C3P0PooledConnection$ProxyConnectionInvocationHandler.invoke(C3P0PooledConnection.java:733)
at com.mchange.v2.c3p0.impl.$Proxy0.rollback(Unknown Source)
at net.sf.hibernate.transaction.JDBCTransaction.rollback(JDBCTransaction.java:86)
at com.kn.gvs.inv.integration.impl.TransactionManager.rollbackTransaction(TransactionManager.java:241)
at com.kn.gvs.inv.business.impl.AbstractGVSSelector.search(AbstractGVSSelector.java:114)
at com.kn.gvs.inv.business.impl.AbstractGVSPagingSelector.search(AbstractGVSPagingSelector.java:84)
at com.kn.gvs.inv.presentation.action.result.InventorySummaryResultAvailableAction.unspecified(InventorySummaryResultAvailableAction.java:67)
at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:258)
at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:196)
at com.kn.gvs.inv.presentation.action.AbstractGVSDispatchAction.execute(AbstractGVSDispatchAction.java:62)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
at com.kn.gvs.inv.presentation.GVSActionServlet.process(GVSActionServlet.java:109)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:696)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146)
at com.kn.gvs.inv.presentation.util.BusinessSessionFilter.doFilter(BusinessSessionFilter.java:59)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:144)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2358)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:534)
(impl.TransactionManager 158 ) Entering TransactionManager#closeSession
(impl.TransactionManager 172 ) Leaving TransactionManager#closeSession with status NORMAL
(util.ExceptionHandler 27 ) Unhandled exception
com.kn.gvs.inv.integration.IntegrationException: error rolling back a hibernate transaction
at com.kn.gvs.inv.integration.impl.TransactionManager.rollbackTransaction(TransactionManager.java:245)
at com.kn.gvs.inv.business.impl.AbstractGVSSelector.search(AbstractGVSSelector.java:114)
at com.kn.gvs.inv.business.impl.AbstractGVSPagingSelector.search(AbstractGVSPagingSelector.java:84)
at com.kn.gvs.inv.presentation.action.result.InventorySummaryResultAvailableAction.unspecified(InventorySummaryResultAvailableAction.java:67)
at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:258)
at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:196)
at com.kn.gvs.inv.presentation.action.AbstractGVSDispatchAction.execute(AbstractGVSDispatchAction.java:62)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
at com.kn.gvs.inv.presentation.GVSActionServlet.process(GVSActionServlet.java:109)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:696)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146)
at com.kn.gvs.inv.presentation.util.BusinessSessionFilter.doFilter(BusinessSessionFilter.java:59)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:144)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2358)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:534)
Caused by: net.sf.hibernate.TransactionException: Rollback failed with SQL exception:
at net.sf.hibernate.transaction.JDBCTransaction.rollback(JDBCTransaction.java:91)
at com.kn.gvs.inv.integration.impl.TransactionManager.rollbackTransaction(TransactionManager.java:241)
... 45 more
Caused by: java.sql.SQLException: Keine weiteren Daten aus Socket zu lesen
at com.mchange.v2.c3p0.impl.C3P0PooledConnection$ProxyConnectionInvocationHandler.invoke(C3P0PooledConnection.java:733)
at com.mchange.v2.c3p0.impl.$Proxy0.rollback(Unknown Source)
at net.sf.hibernate.transaction.JDBCTransaction.rollback(JDBCTransaction.java:86)
... 46 more