1 Reply Latest reply on Apr 5, 2004 9:19 AM by Alexey Loubyansky

    18:09:04,765 ERROR [STDERR] javax.ejb.FinderException: Find

    xsam_jboss_user Newbie

      Hi

      I am using jboss dynamic-ql to generate runtime jbossql.
      In the dynamic-ql I am using IN statement :

      public Collection ejbHomeSelectInStates(Set states)
      throws FinderException {
      // generate JBossQL query

      StringBuffer jbossQl = new StringBuffer();
      jbossQl.append("SELECT OBJECT(obj) ");
      jbossQl.append("FROM table1 obj ");
      jbossQl.append("WHERE obj.objId IN (");
      for (int i = 0; i < states.size(); i++) {
      if (i > 0) {
      jbossQl.append(", ");
      }
      jbossQl.append("?").append(i + 1);
      }
      jbossQl.append(")");
      // pack arguments into an Object[]
      Object[] args = states.toArray(new Object[states.size()]);
      // call dynamic-ql query

      return ejbSelectGeneric(jbossQl.toString(), args) ;

      }


      But whenever the argument in the IN Statement exceed more then 1000 I get following exception mentioned below.
      Its works fine for 999 argument in the IN statement.

      Is there any setting by which i can increase it to more value.

      18:09:04,765 ERROR [STDERR] javax.ejb.FinderException: Find failed: java.sql.SQLException: ORA-01795
      : maximum number of expressions in a list is 1000
      18:09:04,765 ERROR [STDERR] at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractQueryCommand.execute(J
      DBCAbstractQueryCommand.java:259)
      18:09:04,765 ERROR [STDERR] at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractQueryCommand.execute(J
      DBCAbstractQueryCommand.java:106)
      18:09:04,765 ERROR [STDERR] at org.jboss.ejb.plugins.cmp.jdbc.JDBCDynamicQLQuery.execute(JDBCDyn
      amicQLQuery.java:130)
      18:09:04,765 ERROR [STDERR] at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCSelectorBridge.execute(
      JDBCSelectorBridge.java:64)
      18:09:04,765 ERROR [STDERR] at org.jboss.ejb.plugins.cmp.bridge.EntityBridgeInvocationHandler.in
      voke(EntityBridgeInvocationHandler.java:91)
      18:09:04,765 ERROR [STDERR] at org.jboss.proxy.compiler.Runtime.invoke(Runtime.java:59)
      18:09:04,765 ERROR [STDERR] at com.mobilgw.sam.definition.WorkFlowDefBean$Proxy.ejbSelectGeneric
      ()
      18:09:04,765 ERROR [STDERR] at com.mobilgw.sam.definition.WorkFlowDefBean.ejbHomeSelectInStates(
      WorkFlowDefBean.java:139)
      18:09:04,765 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      18:09:04,765 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorI
      mpl.java:39)
      18:09:04,765 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodA
      ccessorImpl.java:25)
      18:09:04,765 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:324)
      18:09:04,765 ERROR [STDERR] at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(Ent
      ityContainer.java:1053)
      18:09:04,765 ERROR [STDERR] at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInte
      rceptor.java:88)
      18:09:04,765 ERROR [STDERR] at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome
      (EntitySynchronizationInterceptor.java:197)
      18:09:04,765 ERROR [STDERR] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.
      invokeHome(CachedConnectionInterceptor.java:214)
      18:09:04,765 ERROR [STDERR] at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInte
      rceptor.java:88)
      18:09:04,765 ERROR [STDERR] at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(Entity
      InstanceInterceptor.java:89)
      18:09:04,765 ERROR [STDERR] at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLock
      Interceptor.java:61)
      18:09:04,765 ERROR [STDERR] at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(Entity
      CreationInterceptor.java:28)
      18:09:04,765 ERROR [STDERR] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTx
      Interceptor.java:88)
      18:09:04,765 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInte
      rceptorCMT.java:267)
      18:09:04,781 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCM
      T.java:98)
      18:09:04,781 ERROR [STDERR] at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInte
      rceptor.java:92)
      18:09:04,781 ERROR [STDERR] at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.ja
      va:120)
      18:09:04,781 ERROR [STDERR] at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(Pr
      oxyFactoryFinderInterceptor.java:93)
      18:09:04,781 ERROR [STDERR] at org.jboss.ejb.EntityContainer.internalInvokeHome(EntityContainer.
      java:484)
      18:09:04,781 ERROR [STDERR] at org.jboss.ejb.Container.invoke(Container.java:720)
      18:09:04,781 ERROR [STDERR] at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invokeHome(Base
      LocalProxyFactory.java:293)
      18:09:04,781 ERROR [STDERR] at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.
      java:110)
      18:09:04,781 ERROR [STDERR] at $Proxy94.selectInStates(Unknown Source)
      18:09:04,781 ERROR [STDERR] at _unittest._testejbdate__jsp._jspService(_testejbdate__jsp.java:85
      )
      18:09:04,781 ERROR [STDERR] at com.caucho.jsp.JavaPage.service(JavaPage.java:75)
      18:09:04,781 ERROR [STDERR] at com.caucho.jsp.Page.subservice(Page.java:506)
      18:09:04,781 ERROR [STDERR] at com.caucho.server.http.FilterChainPage.doFilter(FilterChainPage.j
      ava:182)
      18:09:04,781 ERROR [STDERR] at com.caucho.server.http.Invocation.service(Invocation.java:315)
      18:09:04,781 ERROR [STDERR] at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java
      :246)
      18:09:04,781 ERROR [STDERR] at com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.j
      ava:163)
      18:09:04,781 ERROR [STDERR] at com.caucho.server.TcpConnection.run(TcpConnection.java:139)
      18:09:04,781 ERROR [STDERR] at java.lang.Thread.run(Thread.java:534)



      Thanks
      Sourabh Lahoti