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

JPQLGenerator.toJpqlLiteral NullPointerException for NuGet /Packages() resource as submitted by OctopusDeploy

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.2.0, 3.3.1
    • Fix Version/s: 3.4.0
    • Component/s: NuGet
    • Labels:
      None
    • Story Points:
      1
    • Release Note:
      Yes

      Description

      An end user has reported that OctopusDeploy submitted the following query to their NuGet repository in Nexus 3:

      /Packages()?$filter=(substringof('bellrock',tolower(Id))%20or%20((Title%20ne%20null)%20and%20substringof('bellrock',tolower(Title))))%20and%20(IsLatestVersion%20or%20IsAbsoluteLatestVersion)&$top=10
      

      This results in an NPE (see below). I'm not sure if something is wrong with this query or not, but even if something is wrong Nexus should not get an NPE.

      This problem can be reproduced by sending the above query to any NuGet repository in Nexus 3.2.

      2017-01-11 08:22:20,743-0600 INFO  [elasticsearch[05AEC5B0-F7E55614-A1162F50-C7BD9DE1-DEBAD0A3][clusterService#updateTask][T#1]] *SYSTEM org.elasticsearch.cluster.routing.allocation - [05AEC5B0-F7E55614-A1162F50-C7BD9DE1-DEBAD0A3] Cluster health status changed from [RED] to [GREEN] (reason: [shards started [[f4f760a96600549fd806bd908b01b9d6ea5e3bb5][0]] ...]).
      2017-01-11 08:23:21,699-0600 ERROR [qtp908176036-385] admin com.sonatype.nexus.repository.nuget.internal.NugetFeedHandler - Unknown error
      java.lang.NullPointerException: null
      	at org.odata4j.producer.jpa.JPQLGenerator.toJpqlLiteral(JPQLGenerator.java:93) [wrap_file__Users_rseddon_temp_nexus-3.2.0-01_system_org_sonatype_sisu_sisu-odata4j_0.0.7_sisu-odata4j-0.0.7.jar:0.0.0]
      	at com.sonatype.nexus.repository.nuget.odata.ODataUtils$CaseInsensitiveJPQLGenerator.toJpqlLiteral(ODataUtils.java:332) [com.sonatype.nexus.plugins.nexus-repository-nuget:3.2.0.01]
      	at com.sonatype.nexus.repository.nuget.odata.ODataUtils$CaseInsensitiveJPQLGenerator.toJpql(ODataUtils.java:311) [com.sonatype.nexus.plugins.nexus-repository-nuget:3.2.0.01]
      	at org.odata4j.producer.jpa.JPQLGenerator.binaryCommonExpressionToJpql(JPQLGenerator.java:389) [wrap_file__Users_rseddon_temp_nexus-3.2.0-01_system_org_sonatype_sisu_sisu-odata4j_0.0.7_sisu-odata4j-0.0.7.jar:0.0.0]
      	at org.odata4j.producer.jpa.JPQLGenerator.toJpql(JPQLGenerator.java:260) [wrap_file__Users_rseddon_temp_nexus-3.2.0-01_system_org_sonatype_sisu_sisu-odata4j_0.0.7_sisu-odata4j-0.0.7.jar:0.0.0]
      	at org.odata4j.producer.jpa.JPQLGenerator.toJpql(JPQLGenerator.java:99) [wrap_file__Users_rseddon_temp_nexus-3.2.0-01_system_org_sonatype_sisu_sisu-odata4j_0.0.7_sisu-odata4j-0.0.7.jar:0.0.0]
      	at com.sonatype.nexus.repository.nuget.odata.ODataUtils$CaseInsensitiveJPQLGenerator.toJpql(ODataUtils.java:324) [com.sonatype.nexus.plugins.nexus-repository-nuget:3.2.0.01]
      	at org.odata4j.producer.jpa.JPQLGenerator.toJpql(JPQLGenerator.java:373) [wrap_file__Users_rseddon_temp_nexus-3.2.0-01_system_org_sonatype_sisu_sisu-odata4j_0.0.7_sisu-odata4j-0.0.7.jar:0.0.0]
      	at org.odata4j.producer.jpa.JPQLGenerator.toJpql(JPQLGenerator.java:264) [wrap_file__Users_rseddon_temp_nexus-3.2.0-01_system_org_sonatype_sisu_sisu-odata4j_0.0.7_sisu-odata4j-0.0.7.jar:0.0.0]
      	at org.odata4j.producer.jpa.JPQLGenerator.toJpql(JPQLGenerator.java:99) [wrap_file__Users_rseddon_temp_nexus-3.2.0-01_system_org_sonatype_sisu_sisu-odata4j_0.0.7_sisu-odata4j-0.0.7.jar:0.0.0]
      	at com.sonatype.nexus.repository.nuget.odata.ODataUtils$CaseInsensitiveJPQLGenerator.toJpql(ODataUtils.java:324) [com.sonatype.nexus.plugins.nexus-repository-nuget:3.2.0.01]
      	at org.odata4j.producer.jpa.JPQLGenerator.toJpql(JPQLGenerator.java:373) [wrap_file__Users_rseddon_temp_nexus-3.2.0-01_system_org_sonatype_sisu_sisu-odata4j_0.0.7_sisu-odata4j-0.0.7.jar:0.0.0]
      	at org.odata4j.producer.jpa.JPQLGenerator.toJpql(JPQLGenerator.java:272) [wrap_file__Users_rseddon_temp_nexus-3.2.0-01_system_org_sonatype_sisu_sisu-odata4j_0.0.7_sisu-odata4j-0.0.7.jar:0.0.0]
      	at org.odata4j.producer.jpa.JPQLGenerator.toJpql(JPQLGenerator.java:99) [wrap_file__Users_rseddon_temp_nexus-3.2.0-01_system_org_sonatype_sisu_sisu-odata4j_0.0.7_sisu-odata4j-0.0.7.jar:0.0.0]
      	at com.sonatype.nexus.repository.nuget.odata.ODataUtils$CaseInsensitiveJPQLGenerator.toJpql(ODataUtils.java:324) [com.sonatype.nexus.plugins.nexus-repository-nuget:3.2.0.01]
      	at org.odata4j.producer.jpa.JPQLGenerator.toJpql(JPQLGenerator.java:373) [wrap_file__Users_rseddon_temp_nexus-3.2.0-01_system_org_sonatype_sisu_sisu-odata4j_0.0.7_sisu-odata4j-0.0.7.jar:0.0.0]
      	at org.odata4j.producer.jpa.JPQLGenerator.toJpql(JPQLGenerator.java:264) [wrap_file__Users_rseddon_temp_nexus-3.2.0-01_system_org_sonatype_sisu_sisu-odata4j_0.0.7_sisu-odata4j-0.0.7.jar:0.0.0]
      	at com.sonatype.nexus.repository.nuget.odata.ODataUtils.query(ODataUtils.java:155) [com.sonatype.nexus.plugins.nexus-repository-nuget:3.2.0.01]
      	at com.sonatype.nexus.repository.nuget.internal.NugetGalleryFacetImpl.queryFeed(NugetGalleryFacetImpl.java:204) [com.sonatype.nexus.plugins.nexus-repository-nuget:3.2.0.01]
      	at org.sonatype.nexus.transaction.TransactionalWrapper.proceedWithTransaction(TransactionalWrapper.java:56) [org.sonatype.nexus.transaction:3.2.0.01]
      	at org.sonatype.nexus.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:54) [org.sonatype.nexus.transaction:3.2.0.01]
      	at com.sonatype.nexus.repository.nuget.internal.proxy.NugetProxyGalleryFacet.feed(NugetProxyGalleryFacet.java:208) [com.sonatype.nexus.plugins.nexus-repository-nuget:3.2.0.01]
      	at com.sonatype.nexus.repository.nuget.internal.NugetFeedHandler.feed(NugetFeedHandler.java:70) [com.sonatype.nexus.plugins.nexus-repository-nuget:3.2.0.01]
      	at com.sonatype.nexus.repository.nuget.internal.NugetFeedHandler.doHandle(NugetFeedHandler.java:50) [com.sonatype.nexus.plugins.nexus-repository-nuget:3.2.0.01]
      	at com.sonatype.nexus.repository.nuget.internal.AbstractNugetHandler.handle(AbstractNugetHandler.java:47) [com.sonatype.nexus.plugins.nexus-repository-nuget:3.2.0.01]
      	at com.sonatype.nexus.repository.nuget.internal.NugetFeedHandler.handle(NugetFeedHandler.java:1) [com.sonatype.nexus.plugins.nexus-repository-nuget:3.2.0.01]
      	at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80) [org.sonatype.nexus.repository:3.2.0.01]
      	at org.sonatype.nexus.repository.storage.UnitOfWorkHandler.handle(UnitOfWorkHandler.java:39) [org.sonatype.nexus.repository:3.2.0.01]
      	at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80) [org.sonatype.nexus.repository:3.2.0.01]
      	at org.sonatype.nexus.repository.security.SecurityHandler.handle(SecurityHandler.java:52) [org.sonatype.nexus.repository:3.2.0.01]
      	at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80) [org.sonatype.nexus.repository:3.2.0.01]
      	at org.sonatype.nexus.repository.view.handlers.TimingHandler.handle(TimingHandler.java:46) [org.sonatype.nexus.repository:3.2.0.01]
      	at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80) [org.sonatype.nexus.repository:3.2.0.01]
      	at org.sonatype.nexus.repository.view.Context.start(Context.java:114) [org.sonatype.nexus.repository:3.2.0.01]
      	at org.sonatype.nexus.repository.view.Router.dispatch(Router.java:63) [org.sonatype.nexus.repository:3.2.0.01]
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jstephens Joseph Stephens
              Reporter:
              rseddon Rich Seddon
              Last Updated By:
              Peter Lynch
              Team:
              Nexus - Formats
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Date of First Response:

                  tigCommentSecurity.panel-title