org.apache.openjpa.persistence.ArgumentException: Filter invalid. Cannot compare field oid of type long to value of type java.lang.Comparable. Numeric comparisons must be between numeric types only. To enable such comparisons for backwards-compatibility, add "QuotedNumbersInQueries=true" to the org.apache.openjpa.Compatibility setting in your configuration.

Spring JIRA | Marc Logemann | 5 years ago
  1. 0

    Following Method: {code} List<Order> findByStorageLocationAndOrderPositions_OidGreaterThan(StorageLocation sl, long oid); {code} {{Order}} has a {{List}} of {{OrderPosition}} and {{OderPosition}} has the attribute {{oid}}. {{oid}} is {{@Id}} attribute of type {{long}}. Issueing this query results in an OpenJPA Exception and i really dont want to use some weird compatibility setting. To me it seems the query generation of Spring Data JPA is the issue. {code} org.springframework.dao.InvalidDataAccessApiUsageException: Filter invalid. Cannot compare field oid of type long to value of type java.lang.Comparable. Numeric comparisons must be between numeric types only. To enable such comparisons for backwards-compatibility, add "QuotedNumbersInQueries=true" to the org.apache.openjpa.Compatibility setting in your configuration.; nested exception is <openjpa-2.1.1-r422266:1148538 nonfatal user error> org.apache.openjpa.persistence.ArgumentException: Filter invalid. Cannot compare field oid of type long to value of type java.lang.Comparable. Numeric comparisons must be between numeric types only. To enable such comparisons for backwards-compatibility, add "QuotedNumbersInQueries=true" to the org.apache.openjpa.Compatibility setting in your configuration. at org.springframework.orm.jpa.EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible(EntityManagerFactoryUtils.java:286) at org.springframework.orm.jpa.DefaultJpaDialect.translateExceptionIfPossible(DefaultJpaDialect.java:120) at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.translateExceptionIfPossible(AbstractEntityManagerFactoryBean.java:368) at org.springframework.dao.support.ChainedPersistenceExceptionTranslator.translateExceptionIfPossible(ChainedPersistenceExceptionTranslator.java:58) at org.springframework.dao.support.DataAccessUtils.translateIfNecessary(DataAccessUtils.java:213) at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:163) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at $Proxy72.findByStorageLocationAndOrderPositions_OidGreaterThan(Unknown Source) at de.logentis.bwh.actions.pda.QandaPosScanAction.getStorageLocationForBarcode(QandaPosScanAction.java:304) at de.logentis.bwh.actions.pda.QandaPosScanAction.execute(QandaPosScanAction.java:98) 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:597) at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:452) at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:291) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:254) at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:176) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:263) at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:133) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:207) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:207) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:190) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:243) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:270) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:145) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:171) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:176) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:190) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:187) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at de.logentis.bwh.util.interceptors.AuthenticationInterceptor.intercept(AuthenticationInterceptor.java:143) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52) at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:498) at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77) at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:619) Caused by: <openjpa-2.1.1-r422266:1148538 nonfatal user error> org.apache.openjpa.persistence.ArgumentException: Filter invalid. Cannot compare field oid of type long to value of type java.lang.Comparable. Numeric comparisons must be between numeric types only. To enable such comparisons for backwards-compatibility, add "QuotedNumbersInQueries=true" to the org.apache.openjpa.Compatibility setting in your configuration. at org.apache.openjpa.kernel.exps.AbstractExpressionBuilder.convertTypes(AbstractExpressionBuilder.java:435) at org.apache.openjpa.kernel.exps.AbstractExpressionBuilder.setImplicitTypes(AbstractExpressionBuilder.java:386) at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.setImplicitTypes(JPQLExpressionBuilder.java:1551) at org.apache.openjpa.persistence.criteria.Expressions.setImplicitTypes(Expressions.java:70) at org.apache.openjpa.persistence.criteria.Expressions$GreaterThan.toKernelExpression(Expressions.java:912) at org.apache.openjpa.persistence.criteria.PredicateImpl.toKernelExpression(PredicateImpl.java:153) at org.apache.openjpa.persistence.criteria.CriteriaExpressionBuilder.evalFilter(CriteriaExpressionBuilder.java:216) at org.apache.openjpa.persistence.criteria.CriteriaExpressionBuilder.getQueryExpressions(CriteriaExpressionBuilder.java:75) at org.apache.openjpa.persistence.criteria.CriteriaQueryImpl.getQueryExpressions(CriteriaQueryImpl.java:418) at org.apache.openjpa.persistence.criteria.CriteriaBuilderImpl.eval(CriteriaBuilderImpl.java:83) at org.apache.openjpa.kernel.ExpressionStoreQuery$DataStoreExecutor.<init>(ExpressionStoreQuery.java:762) at org.apache.openjpa.kernel.ExpressionStoreQuery.newDataStoreExecutor(ExpressionStoreQuery.java:179) at org.apache.openjpa.kernel.QueryImpl.createExecutor(QueryImpl.java:749) at org.apache.openjpa.kernel.QueryImpl.compileForDataStore(QueryImpl.java:707) at org.apache.openjpa.kernel.QueryImpl.compileForExecutor(QueryImpl.java:689) at org.apache.openjpa.kernel.QueryImpl.getOperation(QueryImpl.java:1529) at org.apache.openjpa.kernel.DelegatingQuery.getOperation(DelegatingQuery.java:124) at org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:309) at org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:331) 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:597) at org.springframework.orm.jpa.SharedEntityManagerCreator$DeferredQueryInvocationHandler.invoke(SharedEntityManagerCreator.java:310) at $Proxy312.getResultList(Unknown Source) at org.springframework.data.jpa.repository.query.JpaQueryExecution$CollectionExecution.doExecute(JpaQueryExecution.java:81) at org.springframework.data.jpa.repository.query.JpaQueryExecution.execute(JpaQueryExecution.java:55) at org.springframework.data.jpa.repository.query.AbstractJpaQuery.doExecute(AbstractJpaQuery.java:100) at org.springframework.data.jpa.repository.query.AbstractJpaQuery.execute(AbstractJpaQuery.java:89) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:336) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:155) ... 72 more {code}

    Spring JIRA | 5 years ago | Marc Logemann
    org.apache.openjpa.persistence.ArgumentException: Filter invalid. Cannot compare field oid of type long to value of type java.lang.Comparable. Numeric comparisons must be between numeric types only. To enable such comparisons for backwards-compatibility, add "QuotedNumbersInQueries=true" to the org.apache.openjpa.Compatibility setting in your configuration.
  2. 0

    Following Method: {code} List<Order> findByStorageLocationAndOrderPositions_OidGreaterThan(StorageLocation sl, long oid); {code} {{Order}} has a {{List}} of {{OrderPosition}} and {{OderPosition}} has the attribute {{oid}}. {{oid}} is {{@Id}} attribute of type {{long}}. Issueing this query results in an OpenJPA Exception and i really dont want to use some weird compatibility setting. To me it seems the query generation of Spring Data JPA is the issue. {code} org.springframework.dao.InvalidDataAccessApiUsageException: Filter invalid. Cannot compare field oid of type long to value of type java.lang.Comparable. Numeric comparisons must be between numeric types only. To enable such comparisons for backwards-compatibility, add "QuotedNumbersInQueries=true" to the org.apache.openjpa.Compatibility setting in your configuration.; nested exception is <openjpa-2.1.1-r422266:1148538 nonfatal user error> org.apache.openjpa.persistence.ArgumentException: Filter invalid. Cannot compare field oid of type long to value of type java.lang.Comparable. Numeric comparisons must be between numeric types only. To enable such comparisons for backwards-compatibility, add "QuotedNumbersInQueries=true" to the org.apache.openjpa.Compatibility setting in your configuration. at org.springframework.orm.jpa.EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible(EntityManagerFactoryUtils.java:286) at org.springframework.orm.jpa.DefaultJpaDialect.translateExceptionIfPossible(DefaultJpaDialect.java:120) at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.translateExceptionIfPossible(AbstractEntityManagerFactoryBean.java:368) at org.springframework.dao.support.ChainedPersistenceExceptionTranslator.translateExceptionIfPossible(ChainedPersistenceExceptionTranslator.java:58) at org.springframework.dao.support.DataAccessUtils.translateIfNecessary(DataAccessUtils.java:213) at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:163) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at $Proxy72.findByStorageLocationAndOrderPositions_OidGreaterThan(Unknown Source) at de.logentis.bwh.actions.pda.QandaPosScanAction.getStorageLocationForBarcode(QandaPosScanAction.java:304) at de.logentis.bwh.actions.pda.QandaPosScanAction.execute(QandaPosScanAction.java:98) 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:597) at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:452) at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:291) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:254) at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:176) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:263) at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:133) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:207) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:207) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:190) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:243) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:270) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:145) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:171) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:176) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:190) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:187) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at de.logentis.bwh.util.interceptors.AuthenticationInterceptor.intercept(AuthenticationInterceptor.java:143) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52) at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:498) at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77) at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:619) Caused by: <openjpa-2.1.1-r422266:1148538 nonfatal user error> org.apache.openjpa.persistence.ArgumentException: Filter invalid. Cannot compare field oid of type long to value of type java.lang.Comparable. Numeric comparisons must be between numeric types only. To enable such comparisons for backwards-compatibility, add "QuotedNumbersInQueries=true" to the org.apache.openjpa.Compatibility setting in your configuration. at org.apache.openjpa.kernel.exps.AbstractExpressionBuilder.convertTypes(AbstractExpressionBuilder.java:435) at org.apache.openjpa.kernel.exps.AbstractExpressionBuilder.setImplicitTypes(AbstractExpressionBuilder.java:386) at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.setImplicitTypes(JPQLExpressionBuilder.java:1551) at org.apache.openjpa.persistence.criteria.Expressions.setImplicitTypes(Expressions.java:70) at org.apache.openjpa.persistence.criteria.Expressions$GreaterThan.toKernelExpression(Expressions.java:912) at org.apache.openjpa.persistence.criteria.PredicateImpl.toKernelExpression(PredicateImpl.java:153) at org.apache.openjpa.persistence.criteria.CriteriaExpressionBuilder.evalFilter(CriteriaExpressionBuilder.java:216) at org.apache.openjpa.persistence.criteria.CriteriaExpressionBuilder.getQueryExpressions(CriteriaExpressionBuilder.java:75) at org.apache.openjpa.persistence.criteria.CriteriaQueryImpl.getQueryExpressions(CriteriaQueryImpl.java:418) at org.apache.openjpa.persistence.criteria.CriteriaBuilderImpl.eval(CriteriaBuilderImpl.java:83) at org.apache.openjpa.kernel.ExpressionStoreQuery$DataStoreExecutor.<init>(ExpressionStoreQuery.java:762) at org.apache.openjpa.kernel.ExpressionStoreQuery.newDataStoreExecutor(ExpressionStoreQuery.java:179) at org.apache.openjpa.kernel.QueryImpl.createExecutor(QueryImpl.java:749) at org.apache.openjpa.kernel.QueryImpl.compileForDataStore(QueryImpl.java:707) at org.apache.openjpa.kernel.QueryImpl.compileForExecutor(QueryImpl.java:689) at org.apache.openjpa.kernel.QueryImpl.getOperation(QueryImpl.java:1529) at org.apache.openjpa.kernel.DelegatingQuery.getOperation(DelegatingQuery.java:124) at org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:309) at org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:331) 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:597) at org.springframework.orm.jpa.SharedEntityManagerCreator$DeferredQueryInvocationHandler.invoke(SharedEntityManagerCreator.java:310) at $Proxy312.getResultList(Unknown Source) at org.springframework.data.jpa.repository.query.JpaQueryExecution$CollectionExecution.doExecute(JpaQueryExecution.java:81) at org.springframework.data.jpa.repository.query.JpaQueryExecution.execute(JpaQueryExecution.java:55) at org.springframework.data.jpa.repository.query.AbstractJpaQuery.doExecute(AbstractJpaQuery.java:100) at org.springframework.data.jpa.repository.query.AbstractJpaQuery.execute(AbstractJpaQuery.java:89) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:336) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:155) ... 72 more {code}

    Spring JIRA | 5 years ago | Marc Logemann
    org.apache.openjpa.persistence.ArgumentException: Filter invalid. Cannot compare field oid of type long to value of type java.lang.Comparable. Numeric comparisons must be between numeric types only. To enable such comparisons for backwards-compatibility, add "QuotedNumbersInQueries=true" to the org.apache.openjpa.Compatibility setting in your configuration.
  3. 0

    Pax Exam synchronisation issues

    Stack Overflow | 3 years ago | Christina
    org.apache.openjpa.persistence.ArgumentException: Failed to execute query "XXX". Check the query syntax for correctness. See nested exception for details.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    No metadata found for type using OpenJPA with RuntimeUnenhancedClasses

    Stack Overflow | 6 years ago
    org.apache.openjpa.persistence.ArgumentException: No metadata was found for type "class com.XYZ.cloud.bss.client.db.data.Serviceoffering". Ensure that the class is enhanced (if necessary), that the class has appropriate metadata, and that if you list your persistent classes, the class is included in your list.
  6. 0

    OpenJPA enhancer or load-time weaver

    Stack Overflow | 4 years ago | user888263
    org.apache.openjpa.persistence.ArgumentException: Could not locate metadata for the class using alias "Customer". This could mean that the OpenJPA enhancer or load-time weaver was not run on the type whose alias is "Customer". Registered alias mappings: "{Customer=null}"

    1 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.apache.openjpa.persistence.ArgumentException

      Filter invalid. Cannot compare field oid of type long to value of type java.lang.Comparable. Numeric comparisons must be between numeric types only. To enable such comparisons for backwards-compatibility, add "QuotedNumbersInQueries=true" to the org.apache.openjpa.Compatibility setting in your configuration.

      at org.apache.openjpa.kernel.exps.AbstractExpressionBuilder.convertTypes()
    2. OpenJPA Aggregate Jar
      QueryImpl.getResultList
      1. org.apache.openjpa.kernel.exps.AbstractExpressionBuilder.convertTypes(AbstractExpressionBuilder.java:435)
      2. org.apache.openjpa.kernel.exps.AbstractExpressionBuilder.setImplicitTypes(AbstractExpressionBuilder.java:386)
      3. org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.setImplicitTypes(JPQLExpressionBuilder.java:1551)
      4. org.apache.openjpa.persistence.criteria.Expressions.setImplicitTypes(Expressions.java:70)
      5. org.apache.openjpa.persistence.criteria.Expressions$GreaterThan.toKernelExpression(Expressions.java:912)
      6. org.apache.openjpa.persistence.criteria.PredicateImpl.toKernelExpression(PredicateImpl.java:153)
      7. org.apache.openjpa.persistence.criteria.CriteriaExpressionBuilder.evalFilter(CriteriaExpressionBuilder.java:216)
      8. org.apache.openjpa.persistence.criteria.CriteriaExpressionBuilder.getQueryExpressions(CriteriaExpressionBuilder.java:75)
      9. org.apache.openjpa.persistence.criteria.CriteriaQueryImpl.getQueryExpressions(CriteriaQueryImpl.java:418)
      10. org.apache.openjpa.persistence.criteria.CriteriaBuilderImpl.eval(CriteriaBuilderImpl.java:83)
      11. org.apache.openjpa.kernel.ExpressionStoreQuery$DataStoreExecutor.<init>(ExpressionStoreQuery.java:762)
      12. org.apache.openjpa.kernel.ExpressionStoreQuery.newDataStoreExecutor(ExpressionStoreQuery.java:179)
      13. org.apache.openjpa.kernel.QueryImpl.createExecutor(QueryImpl.java:749)
      14. org.apache.openjpa.kernel.QueryImpl.compileForDataStore(QueryImpl.java:707)
      15. org.apache.openjpa.kernel.QueryImpl.compileForExecutor(QueryImpl.java:689)
      16. org.apache.openjpa.kernel.QueryImpl.getOperation(QueryImpl.java:1529)
      17. org.apache.openjpa.kernel.DelegatingQuery.getOperation(DelegatingQuery.java:124)
      18. org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:309)
      19. org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:331)
      19 frames
    3. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:597)
      4 frames
    4. Spring ORM
      SharedEntityManagerCreator$DeferredQueryInvocationHandler.invoke
      1. org.springframework.orm.jpa.SharedEntityManagerCreator$DeferredQueryInvocationHandler.invoke(SharedEntityManagerCreator.java:310)
      1 frame
    5. Unknown
      $Proxy312.getResultList
      1. $Proxy312.getResultList(Unknown Source)
      1 frame
    6. Spring Data JPA
      AbstractJpaQuery.execute
      1. org.springframework.data.jpa.repository.query.JpaQueryExecution$CollectionExecution.doExecute(JpaQueryExecution.java:81)
      2. org.springframework.data.jpa.repository.query.JpaQueryExecution.execute(JpaQueryExecution.java:55)
      3. org.springframework.data.jpa.repository.query.AbstractJpaQuery.doExecute(AbstractJpaQuery.java:100)
      4. org.springframework.data.jpa.repository.query.AbstractJpaQuery.execute(AbstractJpaQuery.java:89)
      4 frames
    7. Spring Data Core
      RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke
      1. org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:336)
      1 frame
    8. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      1 frame
    9. Spring Tx
      TransactionInterceptor.invoke
      1. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
      1 frame
    10. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      1 frame
    11. Spring Tx
      PersistenceExceptionTranslationInterceptor.invoke
      1. org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:155)
      1 frame