sonatype / nexus-ruby-support

26 stars 7 forks source link

Null pointer for 'bundle install' on a group repository #8

Closed trhodeos closed 11 years ago

trhodeos commented 11 years ago

Nexus version 2.2-01

The group repository contains one hosted and one proxy repo.

The hosted repo is listed before the proxy repo

This is the stacktrace I get in logs/wrapper.log:

 2013-03-19 14:46:45 ERROR [qtp431709193-50] - org.sonatype.nexus.rest.ContentPlexusResource - Got exception during processing request "GET http://localhost:8081/nexus/content/groups/gems/api/v1/dependencies?gems=ha-internal-services,rake,redcarpet,yard,vcr,webmock,rspec,ha-gem-release,octokit,httparty,cachetastic":
jvm 1    | java.lang.NullPointerException: null
jvm 1    |  at org.sonatype.nexus.plugins.ruby.group.DefaultRubyGroupRepository.prepareDependencies(DefaultRubyGroupRepository.java:180) ~[na:na]
jvm 1    |  at org.sonatype.nexus.plugins.ruby.group.DefaultRubyGroupRepository.retrieveItem(DefaultRubyGroupRepository.java:143) ~[na:na]
jvm 1    |  at org.sonatype.nexus.proxy.router.DefaultRepositoryRouter.retrieveItem(DefaultRepositoryRouter.java:183) ~[nexus-proxy-2.2-01.jar:na]
jvm 1    |  at org.sonatype.nexus.rest.AbstractResourceStoreContentPlexusResource.get(AbstractResourceStoreContentPlexusResource.java:170) ~[nexus-rest-api-2.2-01.jar:na]
jvm 1    |  at org.sonatype.plexus.rest.resource.RestletResource.represent(RestletResource.java:260) [plexus-restlet-bridge-1.22.jar:na]
jvm 1    |  at org.sonatype.nexus.rest.NexusRestletResource.represent(NexusRestletResource.java:44) [nexus-rest-api-2.2-01.jar:na]
jvm 1    |  at org.restlet.resource.Resource.getRepresentation(Resource.java:302) [org.restlet-1.1.6-SONATYPE-5348-V4.jar:na]
jvm 1    |  at org.restlet.resource.Resource.handleGet(Resource.java:464) [org.restlet-1.1.6-SONATYPE-5348-V4.jar:na]
jvm 1    |  at org.restlet.Finder.handle(Finder.java:353) [org.restlet-1.1.6-SONATYPE-5348-V4.jar:na]
jvm 1    |  at org.restlet.Filter.doHandle(Filter.java:150) [org.restlet-1.1.6-SONATYPE-5348-V4.jar:na]
jvm 1    |  at org.restlet.Filter.handle(Filter.java:195) [org.restlet-1.1.6-SONATYPE-5348-V4.jar:na]
jvm 1    |  at org.restlet.Filter.doHandle(Filter.java:150) [org.restlet-1.1.6-SONATYPE-5348-V4.jar:na]
jvm 1    |  at org.restlet.Filter.handle(Filter.java:195) [org.restlet-1.1.6-SONATYPE-5348-V4.jar:na]```
mkristian commented 11 years ago

hmm - I made a clean nexus-2.2-01 install, configured the plugins as you did and made the following request

$ wget http://localhost:4711/nexus/content/gems/gems/api/v1/dependencies?gems=ha-internal-services,rake,redcarpet,yard,vcr,webmock,rspec,ha-gem-release,octokit,httparty,cachetastic"

and all went OK. dito with the same request on ruby-host and ruby-proxy directly.

the NPE happens in nested loop over all repos and all the "versions' found for each gemname.

was the storage for those repos all empty ?

trhodeos commented 11 years ago

Ah, now that I think about it, the gem I was looking for wasn't in either repo... Is error handling still a work-in-progress for bundler api support?

mkristian commented 11 years ago

the biggest thing for me was "dead locks". since I added

sisu-resource-locks=local

into conf/nexus.properties I haven't seem any - yet. and once there are some corrupted files bundler needs to fall back on full index - see #11

if you still can reproduce that NPE - maybe you can narrow it down to a minimal Gemfile. the url from stacktrace did not trigger any errors with me.

trhodeos commented 11 years ago

Hmmm, I'm pretty sure that was the issue. I haven't seen it since.. Closing this issue.