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

startup race condition ClassNotFoundException javax.ws.rs-api RHC can prevent startup

    XMLWordPrintable

    Details

    • Sprint:
      Sprint 68 - Föhn

      Description

      Rebooted NX3 while testing for NEXUS-9544 and had this in log:

      2016-01-13 16:40:22,530+0100 WARN  [quartz-2-thread-1] *SYSTEM org.sonatype.nexus.quartz.internal.task.QuartzTaskJob - Task 2ed53269-fe92-4050-b2bc-6acd1928716f : 'Health Check: nuget.org-proxy' [healthcheck] execution failure
      java.lang.RuntimeException: java.lang.ClassNotFoundException: org.glassfish.jersey.internal.RuntimeDelegateImpl not found by javax.ws.rs-api [83]
      	at javax.ws.rs.ext.RuntimeDelegate.findDelegate(RuntimeDelegate.java:152) [na:na]
      	at javax.ws.rs.ext.RuntimeDelegate.getInstance(RuntimeDelegate.java:120) [na:na]
      	at javax.ws.rs.core.UriBuilder.newInstance(UriBuilder.java:95) [na:na]
      	at javax.ws.rs.core.UriBuilder.fromPath(UriBuilder.java:148) [na:na]
      	at com.sonatype.nexus.plugins.healthcheck.service.impl.UrlServiceImpl.buildInsightUrl(UrlServiceImpl.java:90) [na:na]
      	at com.sonatype.nexus.plugins.healthcheck.service.impl.UrlServiceImpl.getReportUrl(UrlServiceImpl.java:55) [na:na]
      	at com.sonatype.nexus.plugins.healthcheck.service.impl.InsightServiceImpl.getHealthCheckBundle(InsightServiceImpl.java:93) [na:na]
      	at com.sonatype.nexus.plugins.healthcheck.task.HealthCheckTask.doDownload(HealthCheckTask.java:392) [na:na]
      	at com.sonatype.nexus.plugins.healthcheck.task.HealthCheckTask.doRunSafe(HealthCheckTask.java:229) [na:na]
      	at com.sonatype.nexus.plugins.healthcheck.task.HealthCheckTask.execute(HealthCheckTask.java:119) [na:na]
      	at com.sonatype.nexus.plugins.healthcheck.task.HealthCheckTask.execute(HealthCheckTask.java:1) [na:na]
      	at org.sonatype.nexus.scheduling.TaskSupport.call(TaskSupport.java:89) [org.sonatype.nexus.scheduling:3.0.0.SNAPSHOT]
      	at org.sonatype.nexus.quartz.internal.task.QuartzTaskJob.doExecute(QuartzTaskJob.java:140) [org.sonatype.nexus.quartz:3.0.0.SNAPSHOT]
      	at org.sonatype.nexus.quartz.internal.task.QuartzTaskJob.execute(QuartzTaskJob.java:102) [org.sonatype.nexus.quartz:3.0.0.SNAPSHOT]
      	at org.quartz.core.JobRunShell.run(JobRunShell.java:202) [org.quartz-scheduler.quartz:2.2.2]
      	at org.sonatype.nexus.thread.internal.MDCAwareRunnable.run(MDCAwareRunnable.java:40) [org.sonatype.nexus.thread:3.0.0.SNAPSHOT]
      	at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120) [org.apache.shiro.core:1.2.4]
      	at org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108) [org.apache.shiro.core:1.2.4]
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_66]
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_66]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_66]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_66]
      	at java.lang.Thread.run(Thread.java:745) [na:1.8.0_66]
      Caused by: java.lang.ClassNotFoundException: org.glassfish.jersey.internal.RuntimeDelegateImpl not found by javax.ws.rs-api [83]
      	at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1574) [na:na]
      	at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:79) [na:na]
      	at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2018) [na:na]
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:357) [na:1.8.0_66]
      	at java.lang.Class.forName0(Native Method) [na:1.8.0_66]
      	at java.lang.Class.forName(Class.java:264) [na:1.8.0_66]
      	at javax.ws.rs.ext.FactoryFinder.newInstance(FactoryFinder.java:114) [na:na]
      	at javax.ws.rs.ext.FactoryFinder.find(FactoryFinder.java:207) [na:na]
      	at javax.ws.rs.ext.RuntimeDelegate.findDelegate(RuntimeDelegate.java:135) [na:na]
      	... 22 common frames omitted
      2016-01-13 16:40:22,540+0100 INFO  [quartz-2-thread-1] *SYSTEM org.sonatype.nexus.quartz.internal.task.QuartzTaskInfo - Task 'Health Check: nuget.org-proxy' [healthcheck] state change RUNNING -> WAITING (FAILED)
      2016-01-13 16:40:22,544+0100 INFO  [event-1-thread-1] *SYSTEM org.sonatype.nexus.quartz.internal.task.QuartzTaskInfo - Task 'Health Check: maven-central1' [healthcheck] : state=WAITING
      2016-01-13 16:40:22,563+0100 INFO  [event-1-thread-1] *SYSTEM org.sonatype.nexus.scheduling.internal.TaskSchedulerImpl - Task 'Health Check: maven-central1' [healthcheck] scheduled: hourly
      2016-01-13 16:40:22,564+0100 INFO  [event-1-thread-1] *SYSTEM com.sonatype.nexus.plugins.healthcheck.service.impl.HealthCheckTaskManagerImpl - Enabled health check for repository maven-central1
      2016-01-13 16:40:22,576+0100 INFO  [event-1-thread-1] *SYSTEM org.sonatype.nexus.quartz.internal.task.QuartzTaskInfo - Task 'Health Check: maven-proxy3' [healthcheck] removed
      2016-01-13 16:40:22,590+0100 INFO  [event-1-thread-1] *SYSTEM org.sonatype.nexus.quartz.internal.task.QuartzTaskInfo - Task 'Health Check: maven-proxy3' [healthcheck] : state=WAITING
      2016-01-13 16:40:22,594+0100 INFO  [event-1-thread-1] *SYSTEM org.sonatype.nexus.scheduling.internal.TaskSchedulerImpl - Task 'Health Check: maven-proxy3' [healthcheck] scheduled: hourly
      2016-01-13 16:40:22,594+0100 INFO  [event-1-thread-1] *SYSTEM com.sonatype.nexus.plugins.healthcheck.service.impl.HealthCheckTaskManagerImpl - Enabled health check for repository maven-proxy3
      2016-01-13 16:40:22,649+0100 INFO  [jetty-main-1] *SYSTEM org.sonatype.nexus.plugins.siesta.SiestaServlet - JAX-RS RuntimeDelegate: org.sonatype.nexus.plugins.siesta.internal.resteasy.SisuResteasyProviderFactory@627a6b84
      2016-01-13 16:40:22,685+0100 INFO  [jetty-main-1] *SYSTEM org.jboss.resteasy.plugins.validation.AbstractValidatorContextResolver - Unable to find CDI supporting ValidatorFactory. Using default ValidatorFactory
      2016-01-13 16:40:22,701+0100 INFO  [jetty-main-1] *SYSTEM org.sonatype.nexus.plugins.siesta.SiestaServlet - Initialized
      2016-01-13 16:40:22,720+0100 INFO  [jetty-main-1] *SYSTEM org.sonatype.nexus.repository.httpbridge.internal.ViewServlet - Initialized
      2016-01-13 16:40:22,731+0100 INFO  [jetty-main-1] *SYSTEM org.eclipse.jetty.server.handler.ContextHandler - Started o.e.j.w.WebAppContext@7348a89{/,file:///Users/cstamas/tmp/nexus/oss/master/nexus-3.0.0-SNAPSHOT/public/,AVAILABLE}
      2016-01-13 16:40:22,773+0100 INFO  [jetty-main-1] *SYSTEM org.eclipse.jetty.server.ServerConnector - Started ServerConnector@66339247{HTTP/1.1,[http/1.1]}{0.0.0.0:8081}
      2016-01-13 16:40:22,774+0100 INFO  [jetty-main-1] *SYSTEM org.eclipse.jetty.server.Server - Started @13286ms
      2016-01-13 16:40:22,774+0100 INFO  [jetty-main-1] *SYSTEM org.sonatype.nexus.bootstrap.jetty.JettyServer - 
      -------------------------------------------------
      
      Started Sonatype Nexus OSS 3.0.0-SNAPSHOT
      
      -------------------------------------------------
      

      Seems like Jersey boots after task is being run, unsure why (task scheduler is enabled when NexusStartedEvent is fired).

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              cstamas Tamás Cservenák
              Last Updated By:
              Joe Tom
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Date of First Response: