blackducksoftware / blackduck-nexus3

Apache License 2.0
4 stars 1 forks source link

ClassNotFound exception when running plugin tasks from Nexus 3 pro #12

Closed cpj-radian closed 4 years ago

cpj-radian commented 4 years ago

Issue template

Expected behavior

Update and repo scan tasks should execute without throwing ClassNotFound exceptions.

Actual behavior

ClassNotFoundException thrown when running either Black Duck update or repo scan tasks. Missing import in OSGi bundle?

Steps to Reproduce

Stack Trace

2020-04-09 17:29:20,010-0400 ERROR [quartz-6-thread-19] node-01 *SYSTEM org.quartz.core.ErrorLogger - Job (nexus.d1c6afe1-7a6d-4310-a3c6-ddbbb135ea2b threw an exception.
org.quartz.SchedulerException: Job threw an unhandled exception.
    at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
    at org.sonatype.nexus.quartz.internal.QuartzThreadPool.lambda$0(QuartzThreadPool.java:143)
    at org.sonatype.nexus.thread.internal.MDCAwareRunnable.run(MDCAwareRunnable.java:40)
    at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120)
    at org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NoClassDefFoundError: javax/naming/NamingException
    at org.apache.http.conn.ssl.SSLConnectionSocketFactory.getDefaultHostnameVerifier(SSLConnectionSocketFactory.java:163)
    at com.synopsys.integration.rest.client.IntHttpClient.addBuilderSSLContext(IntHttpClient.java:213)
    at com.synopsys.integration.rest.client.IntHttpClient.<init>(IntHttpClient.java:108)
    at com.synopsys.integration.rest.client.AuthenticatingIntHttpClient.<init>(AuthenticatingIntHttpClient.java:37)
    at com.synopsys.integration.blackduck.rest.BlackDuckHttpClient.<init>(BlackDuckHttpClient.java:48)
    at com.synopsys.integration.blackduck.rest.ApiTokenBlackDuckHttpClient.<init>(ApiTokenBlackDuckHttpClient.java:47)
    at com.synopsys.integration.blackduck.configuration.BlackDuckServerConfig.createApiTokenBlackDuckHttpClient(BlackDuckServerConfig.java:215)
    at com.synopsys.integration.blackduck.configuration.BlackDuckServerConfig.createBlackDuckHttpClient(BlackDuckServerConfig.java:204)
    at com.synopsys.integration.blackduck.configuration.BlackDuckServerConfig.createBlackDuckServicesFactory(BlackDuckServerConfig.java:198)
    at com.synopsys.integration.blackduck.nexus3.BlackDuckConnection.getBlackDuckServicesFactory(BlackDuckConnection.java:91)
    at com.synopsys.integration.blackduck.nexus3.task.common.CommonRepositoryTaskHelper.getBlackDuckServicesFactory(CommonRepositoryTaskHelper.java:92)
    at com.synopsys.integration.blackduck.nexus3.task.scan.ScanTask.execute(ScanTask.java:126)
    at org.sonatype.nexus.repository.RepositoryTaskSupport.execute(RepositoryTaskSupport.java:79)
    at org.sonatype.nexus.scheduling.TaskSupport.call(TaskSupport.java:100)
    at org.sonatype.nexus.quartz.internal.task.QuartzTaskJob.doExecute(QuartzTaskJob.java:143)
    at org.sonatype.nexus.quartz.internal.task.QuartzTaskJob.execute(QuartzTaskJob.java:106)
    at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
    ... 9 common frames omitted
Caused by: java.lang.ClassNotFoundException: javax.naming.NamingException not found by blackduck-nexus3 [274]
    at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1639)
    at org.apache.felix.framework.BundleWiringImpl.access$200(BundleWiringImpl.java:80)
    at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2053)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
    ... 26 common frames omitted

Version

Project Version:

OS:

jamesrichard91 commented 4 years ago

@cpj-radian thank you for filing this issue. We are looking into this and will create a new release once this has been resolved. It looks like we just missed an import in the OSGI bundling.

jamesrichard91 commented 4 years ago

@cpj-radian we released version 1.2.2 on April 16 that should have resolved this issue. Please open a new issue if you still experience this problem.