1 Reply Latest reply on Jul 23, 2003 3:28 PM by Adrian Brock

    Unable to identify an operator '<=' for types 'double precis

    parul Newbie

      Hello,
      I am using Jboss3 with embedded Tomcat with Postgresql 7.3 database
      my ejbSelect method encounters Exception. I have given stack trace below with element of my xml file



      <query-method>
      <method-name>ejbSelectProductByAdvanced</method-name>
      <method-params>
      <method-param>java.lang.String</method-param>
      <method-param>double</method-param>
      <method-param>double</method-param>
      </method-params>
      </query-method>
      <ejb-ql>
      <![CDATA[
      select object(p) from Product p where (LOCATE(?1, p.appName) >0 or LOCATE(?1, p.description) >0) and p.cost>=?2and p.cost<=?3
      ]]>
      </ejb-ql>


      Value for third parameter is Double.MAX_VALUE


      Stack trace at server:
      2003-07-22 18:01:53,873 ERROR [STDERR] javax.ejb.FinderException: Find failed: java.sql.SQLException: ERROR: Unable to identify an operator '<=' for types 'double precision' and 'numeric'
      You will have to retype this query using an explicit cast
      2003-07-22 18:01:53,875 ERROR [STDERR] at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractQueryCommand.execute(JDBCAbstractQueryCommand.java:148)
      2003-07-22 18:01:53,875 ERROR [STDERR] at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCSelectorBridge.execute(JDBCSelectorBridge.java:64)
      2003-07-22 18:01:53,875 ERROR [STDERR] at org.jboss.ejb.plugins.cmp.bridge.EntityBridgeInvocationHandler.invoke(EntityBridgeInvocationHandler.java:96)
      2003-07-22 18:01:53,875 ERROR [STDERR] at org.jboss.proxy.compiler.Runtime.invoke(Runtime.java:59)
      2003-07-22 18:01:53,876 ERROR [STDERR] at com.gmi.mportal.ProductBean$Proxy.ejbSelectProductByAdvanced()
      2003-07-22 18:01:53,876 ERROR [STDERR] at com.gmi.mportal.ProductBean.ejbHomeGetProductsByAdvanced(ProductBean.java:156)
      2003-07-22 18:01:53,876 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2003-07-22 18:01:53,876 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      2003-07-22 18:01:53,876 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      2003-07-22 18:01:53,877 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:324)
      2003-07-22 18:01:53,877 ERROR [STDERR] at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:1138)
      2003-07-22 18:01:53,877 ERROR [STDERR] at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:73)
      2003-07-22 18:01:53,877 ERROR [STDERR] at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:207)
      2003-07-22 18:01:53,877 ERROR [STDERR] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:215)
      2003-07-22 18:01:53,877 ERROR [STDERR] at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:73)
      2003-07-22 18:01:53,878 ERROR [STDERR] at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:91)
      2003-07-22 18:01:53,878 ERROR [STDERR] at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:79)
      2003-07-22 18:01:53,878 ERROR [STDERR] at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:44)
      2003-07-22 18:01:53,878 ERROR [STDERR] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:111)
      2003-07-22 18:01:53,878 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:237)
      2003-07-22 18:01:53,878 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:68)
      2003-07-22 18:01:53,879 ERROR [STDERR] at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:105)
      2003-07-22 18:01:53,879 ERROR [STDERR] at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:133)
      2003-07-22 18:01:53,879 ERROR [STDERR] at org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:487)
      2003-07-22 18:01:53,879 ERROR [STDERR] at org.jboss.ejb.plugins.local.BaseLocalContainerInvoker.invokeHome(BaseLocalContainerInvoker.java:230)
      2003-07-22 18:01:53,879 ERROR [STDERR] at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:110)
      2003-07-22 18:01:53,879 ERROR [STDERR] at $Proxy233.getProductsByAdvanced(Unknown Source)
      2003-07-22 18:01:53,880 ERROR [STDERR] at com.gmi.mportal.ProductSessionBean.productAdvancedSearch(ProductSessionBean.java:213)
      2003-07-22 18:01:53,880 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2003-07-22 18:01:53,880 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      2003-07-22 18:01:53,880 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      2003-07-22 18:01:53,880 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:324)
      2003-07-22 18:01:53,880 ERROR [STDERR] at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:660)
      2003-07-22 18:01:53,881 ERROR [STDERR] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
      2003-07-22 18:01:53,881 ERROR [STDERR] at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:77)
      2003-07-22 18:01:53,881 ERROR [STDERR] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:107)
      2003-07-22 18:01:53,881 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:237)
      2003-07-22 18:01:53,881 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:98)
      2003-07-22 18:01:53,882 ERROR [STDERR] at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:130)
      2003-07-22 18:01:53,882 ERROR [STDERR] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:208)
      2003-07-22 18:01:53,882 ERROR [STDERR] at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:313)
      2003-07-22 18:01:53,882 ERROR [STDERR] at org.jboss.ejb.Container.invoke(Container.java:738)
      2003-07-22 18:01:53,882 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      2003-07-22 18:01:53,882 ERROR [STDERR] at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:383)
      2003-07-22 18:01:53,883 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor83.invoke(Unknown Source)
      2003-07-22 18:01:53,883 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      2003-07-22 18:01:53,883 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:324)
      2003-07-22 18:01:53,883 ERROR [STDERR] at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
      2003-07-22 18:01:53,883 ERROR [STDERR] at sun.rmi.transport.Transport$1.run(Transport.java:148)
      2003-07-22 18:01:53,883 ERROR [STDERR] at java.security.AccessController.doPrivileged(Native Method)
      2003-07-22 18:01:53,884 ERROR [STDERR] at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
      2003-07-22 18:01:53,884 ERROR [STDERR] at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
      2003-07-22 18:01:53,884 ERROR [STDERR] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)