Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-16157

indexof in an OData $filter throws an OQueryParsingException

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 3.7.1
    • Fix Version/s: None
    • Component/s: NuGet
    • Labels:
    • Environment:
      Windows 2012 R2
    • Story Points:
      0

      Description

      Use of "indexof" in an OData $filter throws an OQueryParsingException:

      http://server/repository/nuget-group/Packages()?$filter=indexof(Dependencies,'Fsg.Crypto.Base:5.0.0') 
      

       

      2018-02-08 12:45:32,382+0000 ERROR [qtp1079128237-2560] *UNKNOWN com.orientechnologies.orient.core.storage.impl.local.paginated.OLocalPaginatedStorage - $ANSI\{green \{db=component}} Exception `6A8B3041` in storage `plocal:E:/Nexus/sonatype-work/nexus3/db/component`: 2.2.30 (build 43d850df23c0fd1edca7279761c2238fdc6cc576, branch 2.2.x)
      com.orientechnologies.orient.core.exception.OQueryParsingException: Error on parsing query at position #45: Error on parsing query
      Query: LOCATE('Fsg.Crypto.Base:5.0.0', DEPENDENCIES) - 1
      --------------------------------------------------^
      DB name="component"
      at com.orientechnologies.orient.core.sql.filter.OSQLPredicate.text(OSQLPredicate.java:107)
      at com.orientechnologies.orient.core.sql.filter.OSQLPredicate.<init>(OSQLPredicate.java:60)
      at com.orientechnologies.orient.core.sql.filter.OSQLPredicate.extractConditionItem(OSQLPredicate.java:300)
      at com.orientechnologies.orient.core.sql.filter.OSQLPredicate.extractCondition(OSQLPredicate.java:180)
      at com.orientechnologies.orient.core.sql.filter.OSQLPredicate.extractConditions(OSQLPredicate.java:143)
      at com.orientechnologies.orient.core.sql.filter.OSQLPredicate.text(OSQLPredicate.java:95)
      at com.orientechnologies.orient.core.sql.filter.OSQLPredicate.<init>(OSQLPredicate.java:60)
      at com.orientechnologies.orient.core.sql.filter.OSQLPredicate.extractConditionItem(OSQLPredicate.java:300)
      at com.orientechnologies.orient.core.sql.filter.OSQLPredicate.extractCondition(OSQLPredicate.java:180)
      at com.orientechnologies.orient.core.sql.filter.OSQLPredicate.extractConditions(OSQLPredicate.java:143)
      at com.orientechnologies.orient.core.sql.filter.OSQLPredicate.text(OSQLPredicate.java:95)
      at com.orientechnologies.orient.core.sql.filter.OSQLPredicate.<init>(OSQLPredicate.java:60)
      at com.orientechnologies.orient.core.sql.filter.OSQLPredicate.extractConditionItem(OSQLPredicate.java:300)
      at com.orientechnologies.orient.core.sql.filter.OSQLPredicate.extractCondition(OSQLPredicate.java:180)
      at com.orientechnologies.orient.core.sql.filter.OSQLPredicate.extractConditions(OSQLPredicate.java:143)
      at com.orientechnologies.orient.core.sql.filter.OSQLPredicate.text(OSQLPredicate.java:95)
      at com.orientechnologies.orient.core.sql.filter.OSQLFilter.<init>(OSQLFilter.java:53)
      at com.orientechnologies.orient.core.sql.OSQLEngine.parseCondition(OSQLEngine.java:460)
      at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.parse(OCommandExecutorSQLSelect.java:294)
      at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.parse(OCommandExecutorSQLSelect.java:93)
      at com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.parse(OCommandExecutorSQLDelegate.java:53)
      at com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.parse(OCommandExecutorSQLDelegate.java:34)
      at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.command(OAbstractPaginatedStorage.java:3323)
      at com.orientechnologies.orient.core.command.OCommandRequestTextAbstract.execute(OCommandRequestTextAbstract.java:69)
      at org.sonatype.nexus.repository.storage.MetadataNodeEntityAdapter.browseByQuery(MetadataNodeEntityAdapter.java:178)
      at org.sonatype.nexus.repository.storage.StorageTxImpl.findAssets(StorageTxImpl.java:360)
      at org.sonatype.nexus.repository.storage.StorageTxImpl.findAssets(StorageTxImpl.java:366)
      at sun.reflect.GeneratedMethodAccessor69.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.sonatype.nexus.common.stateguard.SimpleMethodInvocation.proceed(SimpleMethodInvocation.java:53)
      at org.sonatype.nexus.common.stateguard.MethodInvocationAction.run(MethodInvocationAction.java:39)
      at org.sonatype.nexus.common.stateguard.StateGuard$GuardImpl.run(StateGuard.java:270)
      at org.sonatype.nexus.common.stateguard.GuardedInterceptor.invoke(GuardedInterceptor.java:53)
      at org.sonatype.nexus.common.stateguard.StateGuardAspect$1.invoke(StateGuardAspect.java:63)
      at com.sun.proxy.$Proxy195.findAssets(Unknown Source)
      at com.sonatype.nexus.repository.nuget.internal.NugetLocalGalleryFacetSupport.findAssetsForQuery(NugetLocalGalleryFacetSupport.java:238)
      at com.sonatype.nexus.repository.nuget.internal.NugetLocalGalleryFacetSupport.queryFeed(NugetLocalGalleryFacetSupport.java:205)
      at com.sonatype.nexus.repository.nuget.internal.NugetGroupGalleryFacet$$EnhancerByGuice$$6af21741.CGLIB$queryFeed$36(<generated>)
      at com.sonatype.nexus.repository.nuget.internal.NugetGroupGalleryFacet$$EnhancerByGuice$$6af21741$$FastClassByGuice$$17426d72.invoke(<generated>)
      at com.google.inject.internal.cglib.proxy.$MethodProxy.invokeSuper(MethodProxy.java:228)
      at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:76)
      at org.sonatype.nexus.transaction.TransactionalWrapper.proceedWithTransaction(TransactionalWrapper.java:56)
      at org.sonatype.nexus.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:54)
      at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:77)
      at com.google.inject.internal.InterceptorStackCallback.intercept(InterceptorStackCallback.java:55)
      at com.sonatype.nexus.repository.nuget.internal.NugetGroupGalleryFacet$$EnhancerByGuice$$6af21741.queryFeed(<generated>)
      at com.sonatype.nexus.repository.nuget.internal.NugetRemoteGalleryFacetSupport.feed(NugetRemoteGalleryFacetSupport.java:209)
      at com.sonatype.nexus.repository.nuget.internal.NugetFeedHandler.feed(NugetFeedHandler.java:69)
      at com.sonatype.nexus.repository.nuget.internal.NugetFeedHandler.doHandle(NugetFeedHandler.java:49)
      at com.sonatype.nexus.repository.nuget.internal.AbstractNugetHandler.handle(AbstractNugetHandler.java:46)
      at com.sonatype.nexus.repository.nuget.internal.NugetFeedHandler.handle(NugetFeedHandler.java:1)
      at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
      at org.sonatype.nexus.repository.storage.UnitOfWorkHandler.handle(UnitOfWorkHandler.java:39)
      at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
      at org.sonatype.nexus.repository.security.SecurityHandler.handle(SecurityHandler.java:52)
      at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
      at org.sonatype.nexus.repository.view.handlers.TimingHandler.handle(TimingHandler.java:46)
      at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
      at org.sonatype.nexus.repository.view.Context.start(Context.java:114)
      at org.sonatype.nexus.repository.view.Router.dispatch(Router.java:63)
      at org.sonatype.nexus.repository.view.ConfigurableViewFacet.dispatch(ConfigurableViewFacet.java:52)
      at org.sonatype.nexus.repository.view.ConfigurableViewFacet.dispatch(ConfigurableViewFacet.java:43)
      at org.sonatype.nexus.repository.httpbridge.internal.ViewServlet.dispatchAndSend(ViewServlet.java:200)
      at org.sonatype.nexus.repository.httpbridge.internal.ViewServlet.doService(ViewServlet.java:162)
      at org.sonatype.nexus.repository.httpbridge.internal.ViewServlet.service(ViewServlet.java:119)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
      at com.google.inject.servlet.ServletDefinition.doServiceImpl(ServletDefinition.java:286)
      at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:276)
      at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:181)
      at com.google.inject.servlet.DynamicServletPipeline.service(DynamicServletPipeline.java:71)
      at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:85)
      at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:112)
      at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
      at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)
      at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
      at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
      at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
      at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
      at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
      at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
      at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
      at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
      at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
      at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
      at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
      at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
      at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
      at org.sonatype.nexus.security.SecurityFilter.executeChain(SecurityFilter.java:85)
      at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
      at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
      at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
      at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
      at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
      at org.sonatype.nexus.security.SecurityFilter.doFilterInternal(SecurityFilter.java:101)
      at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
      at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
      at org.sonatype.nexus.repository.httpbridge.internal.ExhaustRequestFilter.doFilter(ExhaustRequestFilter.java:71)
      at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
      at com.sonatype.nexus.licensing.internal.LicensingRedirectFilter.doFilter(LicensingRedirectFilter.java:108)
      at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
      at com.codahale.metrics.servlet.AbstractInstrumentedFilter.doFilter(AbstractInstrumentedFilter.java:97)
      at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
      at org.sonatype.nexus.internal.web.ErrorPageFilter.doFilter(ErrorPageFilter.java:68)
      at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
      at org.sonatype.nexus.internal.web.EnvironmentFilter.doFilter(EnvironmentFilter.java:102)
      at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
      at org.sonatype.nexus.internal.web.HeaderPatternFilter.doFilter(HeaderPatternFilter.java:98)
      at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
      at com.google.inject.servlet.DynamicFilterPipeline.dispatch(DynamicFilterPipeline.java:104)
      at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:135)
      at org.sonatype.nexus.bootstrap.osgi.DelegatingFilter.doFilter(DelegatingFilter.java:73)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1751)
      at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:582)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
      at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
      at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
      at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180)
      at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512)
      at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
      at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
      at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:175)
      at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)
      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
      at org.eclipse.jetty.server.Server.handle(Server.java:534)
      at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:320)
      at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
      at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:283)
      at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:108)
      at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
      at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
      at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
      at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
      at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
      at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
      at java.lang.Thread.run(Unknown Source)
      Caused by: com.orientechnologies.orient.core.sql.OCommandSQLParsingException: No function with name 'locate', available names are : [date,encode,distance,document,distinct,traversedelement,sum,contentexpression,decode,uuid,mode,sysdate,avg,min,traversededge,ifnull,symmetricdifference,traversedvertex,stddev,if,map,unionall,set,intersect,last,max,lower,coalesce,count,format,concat,list,sequence,eval,percentile,abs,median,variance,contentauth,difference,decimal,first]
      DB name="component"
      at com.orientechnologies.orient.core.sql.OSQLEngine.getFunction(OSQLEngine.java:420)
      at com.orientechnologies.orient.core.sql.functions.OSQLFunctionRuntime.setRoot(OSQLFunctionRuntime.java:208)
      at com.orientechnologies.orient.core.sql.filter.OSQLFilterItemAbstract.<init>(OSQLFilterItemAbstract.java:61)
      at com.orientechnologies.orient.core.sql.functions.OSQLFunctionRuntime.<init>(OSQLFunctionRuntime.java:57)
      at com.orientechnologies.orient.core.sql.OSQLHelper.getFunction(OSQLHelper.java:253)
      at com.orientechnologies.orient.core.sql.OSQLHelper.parseValue(OSQLHelper.java:231)
      at com.orientechnologies.orient.core.sql.OSQLHelper.parseValue(OSQLHelper.java:218)
      at com.orientechnologies.orient.core.sql.OSQLHelper.parseValue(OSQLHelper.java:214)
      at com.orientechnologies.orient.core.sql.filter.OSQLPredicate.extractConditionItem(OSQLPredicate.java:351)
      at com.orientechnologies.orient.core.sql.filter.OSQLPredicate.extractCondition(OSQLPredicate.java:180)
      at com.orientechnologies.orient.core.sql.filter.OSQLPredicate.extractConditions(OSQLPredicate.java:143)
      at com.orientechnologies.orient.core.sql.filter.OSQLPredicate.text(OSQLPredicate.java:95)
      ... 137 common frames omitted
      
      

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            mikevanoo Mike van Oorschot
            Last Updated By:
            Joseph Stephens Joseph Stephens
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Date of First Response:

                tigCommentSecurity.panel-title