开发者

How to fix Sonatype Nexus upgrade failure (NoClassDefFoundError)?

开发者 https://www.devze.com 2023-03-26 22:45 出处:网络
I\'m trying to upgrade a Nexus server from version 1开发者_如何学编程.7.2 to the latest, 1.9.2. I\'m using the war distribution on my own Tomcat installation (Tomcat 6.0.18, Sun Java 1.6.0_14, on Linu

I'm trying to upgrade a Nexus server from version 1开发者_如何学编程.7.2 to the latest, 1.9.2. I'm using the war distribution on my own Tomcat installation (Tomcat 6.0.18, Sun Java 1.6.0_14, on Linux).

What I've done is undeployed the old version of the webapp , and then deployed the new version of nexus.war (via Tomcat's HTML manager). This all seems to go fine, the webapp gets deployed, but when I then try to access it I get a 500 Internal Server Error.

Looking in the nexus logs, I see the following messages:

2011-08-10 23:57:42 WARN  [http-8080-4    ] - o.s.g.b.r.LoadedCla~          - Error     injecting: org.sonatype.nexus.plugins.mac.api.MacRepositoryPlexusResource
java.lang.NoClassDefFoundError: org/sonatype/nexus/index/ArtifactInfoFilter
    at java.lang.Class.getDeclaredConstructors0(Native Method)
    at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
    at java.lang.Class.getDeclaredConstructors(Class.java:1836)
    at com.google.inject.spi.InjectionPoint.forConstructorOf(InjectionPoint.java:243)
    at com.google.inject.internal.ConstructorBindingImpl.create(ConstructorBindingImpl.java:96)
    at com.google.inject.internal.InjectorImpl.createUninitializedBinding(InjectorImpl.java:628)
(....)

and

2011-08-10 23:57:42 ERROR [http-8080-4    ] - o.a.c.c.C.[.[.[/nex~          - nexus: Error during the starting of the Restlet Application
com.google.inject.ProvisionException: Guice provision errors:

1) Error injecting: org.sonatype.nexus.plugins.mac.api.MacRepositoryPlexusResource
   at ClassRealm[org.sonatype.nexus.plugins:nexus-archetype-plugin:1.0.1-SNAPSHOT, parent: ClassRealm[plexus.core, parent: null]]
   while locating org.sonatype.plexus.rest.resource.PlexusResource annotated with   @com.google.inject.name.Named(value=org.sonatype.nexus.plugins.mac.api.MacRepositoryPlexusResource)

1 error
    at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:977)
    at com.google.inject.Scopes$1$1.get(Scopes.java:59)
    at org.sonatype.guice.bean.locators.LazyBeanEntry.getValue(LazyBeanEntry.java:79)
    at org.sonatype.guice.plexus.locators.LazyPlexusBean.getValue(LazyPlexusBean.java:53)
   (...)

I have googled around a bit to see if this is a known problem but couldn't really find anything... Has anyone experienced a similar problem when upgrading Nexus, and/or know what to do about it?


Found the answer to this (via the Sonatype community forum): I had an old nexus-archetype plugin installed (located in sonatype-work/nexus/plugin-repository). Apparently this functionality now ships with Nexus itself. Removing the plugin fixed the problem.

0

精彩评论

暂无评论...
验证码 换一张
取 消