java.lang.ClassCastException: org.sonatype.appcontext.internal.AppContextImpl cannot be cast to org.sonatype.appcontext.AppContext

Sonatype JIRA | Rich Seddon | 5 years ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    After installing the nexus-migration-plugin-packaging-2.1 nexus will not start. {quote} jvm 1 | 2012-07-19 12:01:16 WARN [y-main-thread-1] - org.eclipse.jetty.util.component.AbstractLifeCycle - FAILED org.eclipse.jetty.server.handler.ContextHandlerCollection@6ebbd7d: java.lang.ClassCastException: org.sonatype.appcontext.internal.AppContextImpl cannot be cast to org.sonatype.appcontext.AppContext jvm 1 | java.lang.ClassCastException: org.sonatype.appcontext.internal.AppContextImpl cannot be cast to org.sonatype.appcontext.AppContext jvm 1 | at org.sonatype.nexus.web.PlexusContainerContextListener.contextInitialized(PlexusContainerContextListener.java:82) ~[na:na] jvm 1 | at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:764) ~[jetty-server-8.1.3.v20120416.jar:8.1.3.v20120416] jvm 1 | at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:406) ~[jetty-servlet-8.1.3.v20120416.jar:8.1.3.v20120416] jvm 1 | at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:756) ~[jetty-server-8.1.3.v20120416.jar:8.1.3.v20120416] jvm 1 | at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:242) ~[jetty-servlet-8.1.3.v20120416.jar:8.1.3.v20120416] jvm 1 | at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1221) ~[jetty-webapp-8.1.3.v20120416.jar:8.1.3.v20120416] jvm 1 | at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:699) ~[jetty-server-8.1.3.v20120416.jar:8.1.3.v20120416] jvm 1 | at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:454) ~[jetty-webapp-8.1.3.v20120416.jar:8.1.3.v20120416] jvm 1 | at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59) [jetty-util-8.1.3.v20120416.jar:8.1.3.v20120416] jvm 1 | at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:224) ~[jetty-server-8.1.3.v20120416.jar:8.1.3.v20120416] jvm 1 | at org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:167) ~[jetty-server-8.1.3.v20120416.jar:8.1.3.v20120416] jvm 1 | at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59) [jetty-util-8.1.3.v20120416.jar:8.1.3.v20120416] jvm 1 | at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:90) [jetty-server-8.1.3.v20120416.jar:8.1.3.v20120416] jvm 1 | at org.eclipse.jetty.server.Server.doStart(Server.java:262) [jetty-server-8.1.3.v20120416.jar:8.1.3.v20120416] jvm 1 | at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59) [jetty-util-8.1.3.v20120416.jar:8.1.3.v20120416] jvm 1 | at org.sonatype.sisu.jetty.Jetty8$JettyWrapperThread.run(Jetty8.java:145) [sisu-jetty8-1.3.jar:na] jvm 1 | 2012-07-19 12:01:16 WARN [y-main-thread-1] - org.eclipse.jetty.util.component.AbstractLifeCycle - FAILED org.eclipse.jetty.server.Server@5ee55d17: java.lang.ClassCastException: org.sonatype.appcontext.internal.AppContextImpl cannot be cast to org.sonatype.appcontext.AppContext jvm 1 | java.lang.ClassCastException: org.sonatype.appcontext.internal.AppContextImpl cannot be cast to org.sonatype.appcontext.AppContext jvm 1 | at org.sonatype.nexus.web.PlexusContainerContextListener.contextInitialized(PlexusContainerContextListener.java:82) ~[na:na] jvm 1 | at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:764) ~[jetty-server-8.1.3.v20120416.jar:8.1.3.v20120416] jvm 1 | at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:406) ~[jetty-servlet-8.1.3.v20120416.jar:8.1.3.v20120416] jvm 1 | at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:756) ~[jetty-server-8.1.3.v20120416.jar:8.1.3.v20120416] jvm 1 | at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:242) ~[jetty-servlet-8.1.3.v20120416.jar:8.1.3.v20120416] jvm 1 | at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1221) ~[jetty-webapp-8.1.3.v20120416.jar:8.1.3.v20120416] jvm 1 | at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:699) ~[jetty-server-8.1.3.v20120416.jar:8.1.3.v20120416] jvm 1 | at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:454) ~[jetty-webapp-8.1.3.v20120416.jar:8.1.3.v20120416] jvm 1 | at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59) ~[jetty-util-8.1.3.v20120416.jar:8.1.3.v20120416] jvm 1 | at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:224) ~[jetty-server-8.1.3.v20120416.jar:8.1.3.v20120416] jvm 1 | at org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:167) ~[jetty-server-8.1.3.v20120416.jar:8.1.3.v20120416] jvm 1 | at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59) ~[jetty-util-8.1.3.v20120416.jar:8.1.3.v20120416] jvm 1 | at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:90) ~[jetty-server-8.1.3.v20120416.jar:8.1.3.v20120416] jvm 1 | at org.eclipse.jetty.server.Server.doStart(Server.java:262) ~[jetty-server-8.1.3.v20120416.jar:8.1.3.v20120416] jvm 1 | at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59) ~[jetty-util-8.1.3.v20120416.jar:8.1.3.v20120416] jvm 1 | at org.sonatype.sisu.jetty.Jetty8$JettyWrapperThread.run(Jetty8.java:145) [sisu-jetty8-1.3.jar:na] jvm 1 | java.lang.ClassCastException: org.sonatype.appcontext.internal.AppContextImpl cannot be cast to org.sonatype.appcontext.AppContext jvm 1 | at org.sonatype.nexus.web.PlexusContainerContextListener.contextInitialized(PlexusContainerContextListener.java:82) jvm 1 | at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:764) jvm 1 | at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:406) jvm 1 | at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:756) jvm 1 | at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:242) jvm 1 | at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1221) jvm 1 | at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:699) jvm 1 | at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:454) jvm 1 | at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59) jvm 1 | at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:224) jvm 1 | at org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:167) jvm 1 | at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59) jvm 1 | at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:90) jvm 1 | at org.eclipse.jetty.server.Server.doStart(Server.java:262) jvm 1 | at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59) jvm 1 | at org.sonatype.sisu.jetty.Jetty8$JettyWrapperThread.run(Jetty8.java:145) jvm 1 | Unable to start Jetty: org.sonatype.appcontext.internal.AppContextImpl cannot be cast to org.sonatype.appcontext.AppContext {quote}

    Sonatype JIRA | 5 years ago | Rich Seddon
    java.lang.ClassCastException: org.sonatype.appcontext.internal.AppContextImpl cannot be cast to org.sonatype.appcontext.AppContext

    Root Cause Analysis

    1. java.lang.ClassCastException

      org.sonatype.appcontext.internal.AppContextImpl cannot be cast to org.sonatype.appcontext.AppContext

      at org.sonatype.nexus.web.PlexusContainerContextListener.contextInitialized()
    2. ${project.groupId}:${project.artifactId}
      PlexusContainerContextListener.contextInitialized
      1. org.sonatype.nexus.web.PlexusContainerContextListener.contextInitialized(PlexusContainerContextListener.java:82)
      1 frame
    3. Jetty
      AbstractLifeCycle.start
      1. org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:764)
      2. org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:406)
      3. org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:756)
      4. org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:242)
      5. org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1221)
      6. org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:699)
      7. org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:454)
      8. org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
      9. org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:224)
      10. org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:167)
      11. org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
      12. org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:90)
      13. org.eclipse.jetty.server.Server.doStart(Server.java:262)
      14. org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
      14 frames
    4. org.sonatype.sisu
      Jetty8$JettyWrapperThread.run
      1. org.sonatype.sisu.jetty.Jetty8$JettyWrapperThread.run(Jetty8.java:145)
      1 frame