4 Replies Latest reply on Jul 23, 2005 8:24 PM by Emmanuel Bernard

    Weird problem with Oracle database

    Steve Rose Newbie

      I Have a one to many relationship in some of my entity beans. I used to use Bean objects,load them up in the session bean then pass them to the client. However In order to limit the amount of rmi calls, we decided to pass the entity bean objects and then pull the collection of objects it has relationships with straight from the bean. The old method worked fine but now, with this new method, on certain tables I am getting this error:

      ----------------------------------------------------------------------------------
      org.hibernate.exception.GenericJDBCException: could not load an entity: [com.airit.fidsdb.entity.SpLocations#612]
      at org.hibernate.exception.ErrorCodeConverter.handledNonSpecificException(ErrorCodeConverter.java:92)
      at org.hibernate.exception.ErrorCodeConverter.convert(ErrorCodeConverter.java:80)
      at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
      at org.hibernate.loader.Loader.loadEntity(Loader.java:1624)
      at org.hibernate.loader.entity.EntityLoader.load(EntityLoader.java:117)
      at org.hibernate.loader.entity.EntityLoader.load(EntityLoader.java:102)
      at org.hibernate.persister.entity.BasicEntityPersister.load(BasicEntityPersister.java:2476)
      at org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:358)
      at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:339)
      at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:116)
      at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:170)
      at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:82)
      at org.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:661)
      at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:270)
      at org.hibernate.type.EntityType.resolve(EntityType.java:305)
      at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:105)
      at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:791)
      at org.hibernate.loader.Loader.doQuery(Loader.java:689)
      at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:221)
      at org.hibernate.loader.Loader.doList(Loader.java:1858)
      at org.hibernate.loader.Loader.list(Loader.java:1842)
      at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:407)
      at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:273)
      at org.hibernate.impl.SessionImpl.list(SessionImpl.java:850)
      at org.hibernate.impl.QueryImpl.list(QueryImpl.java:74)
      at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:41)
      at com.airit.fidsdb.session.ArriveBean.displayArrive(ArriveBean.java:273)
      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:585)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:99)
      at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:33)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88)
      at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:66)
      at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:134)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88)
      at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:72)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88)
      at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:39)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88)
      at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:63)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88)
      at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:93)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88)
      at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:148)
      at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:65)
      at $Proxy107.displayArrive(Unknown Source)
      at com.airit.fidsdb.web.ArriveWeb.showArrive(ArriveWeb.java:747)
      at com.airit.fidsdb.web.ArriveWeb.doPost(ArriveWeb.java:77)
      at com.airit.fidsdb.web.ArriveWeb.doGet(ArriveWeb.java:57)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:153)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
      at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
      at java.lang.Thread.run(Thread.java:595)
      Caused by: java.sql.SQLException: ORA-01792: maximum number of columns in a table or view is 1000

      at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
      at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
      at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
      at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
      at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(TTC7Protocol.java:830)
      at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2391)
      at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2672)
      at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)
      at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:527)
      at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:296)
      at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:120)
      at org.hibernate.loader.Loader.getResultSet(Loader.java:1537)
      at org.hibernate.loader.Loader.doQuery(Loader.java:638)
      at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:221)
      at org.hibernate.loader.Loader.loadEntity(Loader.java:1610)
      -----------------------------------------------------------------------------------
      If I empty out the tables, I do not get this error. Non of my tables have 1000 columns so I am not sure what is going on. I am using jboss 4.0.3 Rc1. Any ideas?