Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1194257

Summary: OSGi: NoClassDefFound when KIE-CI attempts to download artifact via https
Product: [Retired] JBoss BRMS Platform 6 Reporter: Marek Winkler <mwinkler>
Component: BREAssignee: Mario Fusco <mfusco>
Status: CLOSED EOL QA Contact: Marek Winkler <mwinkler>
Severity: high Docs Contact:
Priority: high    
Version: 6.1.0CC: mwinkler
Target Milestone: ER6   
Target Release: 6.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-27 18:34:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Maven project with reproducer none

Description Marek Winkler 2015-02-19 12:34:11 UTC
Created attachment 993594 [details]
Maven project with reproducer

Description of problem:

When KIE-CI attempts to download a kjar from a remote repository, the following exception is thrown. Please note that KIE-CI works fine when it is retrieving artifacts from local Maven repository.

Exception in thread "DefaultMetadataResolver-1-2" java.lang.NoClassDefFoundError: javax/security/auth/x500/X500Principal
	at org.apache.http.conn.ssl.AbstractVerifier.getCNs(AbstractVerifier.java:263)
	at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:157)
	at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:140)
	at org.apache.http.conn.ssl.SSLSocketFactory.verifyHostname(SSLSocketFactory.java:561)
	at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:536)
	at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:403)
	at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:177)
	at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:304)
	at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:611)
	at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:446)
	at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:863)
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:72)
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:57)
	at org.apache.http.impl.client.DecompressingHttpClient.execute(DecompressingHttpClient.java:158)
	at org.eclipse.aether.transport.http.HttpTransporter.execute(HttpTransporter.java:279)
	at org.eclipse.aether.transport.http.HttpTransporter.implGet(HttpTransporter.java:235)
	at org.eclipse.aether.spi.connector.transport.AbstractTransporter.get(AbstractTransporter.java:59)
	at org.eclipse.aether.connector.basic.BasicRepositoryConnector$GetTaskRunner.runTask(BasicRepositoryConnector.java:447)
	at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:350)
	at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:67)
	at org.eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExecutor.execute(BasicRepositoryConnector.java:581)
	at org.eclipse.aether.connector.basic.BasicRepositoryConnector.get(BasicRepositoryConnector.java:222)
	at org.eclipse.aether.internal.impl.DefaultMetadataResolver$ResolveTask.run(DefaultMetadataResolver.java:607)
	at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:67)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)
Exception in thread "DefaultMetadataResolver-1-1" java.lang.NoClassDefFoundError: javax/security/auth/x500/X500Principal
	at org.apache.http.conn.ssl.AbstractVerifier.getCNs(AbstractVerifier.java:263)
	at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:157)
	at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:140)
	at org.apache.http.conn.ssl.SSLSocketFactory.verifyHostname(SSLSocketFactory.java:561)
	at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:536)
	at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:403)
	at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:177)
	at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:304)
	at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:611)
	at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:446)
	at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:863)
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:72)
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:57)
	at org.apache.http.impl.client.DecompressingHttpClient.execute(DecompressingHttpClient.java:158)
	at org.eclipse.aether.transport.http.HttpTransporter.execute(HttpTransporter.java:279)
	at org.eclipse.aether.transport.http.HttpTransporter.implGet(HttpTransporter.java:235)
	at org.eclipse.aether.spi.connector.transport.AbstractTransporter.get(AbstractTransporter.java:59)
	at org.eclipse.aether.connector.basic.BasicRepositoryConnector$GetTaskRunner.runTask(BasicRepositoryConnector.java:447)
	at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:350)
	at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:67)
	at org.eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExecutor.execute(BasicRepositoryConnector.java:581)
	at org.eclipse.aether.connector.basic.BasicRepositoryConnector.get(BasicRepositoryConnector.java:222)
	at org.eclipse.aether.internal.impl.DefaultMetadataResolver$ResolveTask.run(DefaultMetadataResolver.java:607)
	at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:67)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)

Version-Release number of selected component (if applicable):
BRMS 6.1.0 ER5
Fuse 6.1.1

How reproducible:
always

Steps to Reproduce:
1. unzip the attached reproducer project and install into into local Maven repo using 'mvn clean install'
2. start Fuse 6.1.1 and install Drools features:
  - features:addurl mvn:org.drools/drools-karaf-features/6.2.0.Final-redhat-1/xml/features
  - features:install drools-module
  - features:install kie-ci
3. install the reproducer bundle and start it:
  - osgi:install mvn:org.kie.examples/kie-ci-osgi-sample/1.0.0-SNAPSHOT
    -- will output bundle id
  - osgi:start <bundle id>
4. to prevent mess in Fuse bundles, uninstall the bundle using:
  - osgi:uninstall <bundle id>


Actual results:
NoClassDefFoundError is thrown when attempting to connect to remote Maven repository.

Expected results:
Connection to remote Maven repository is successfully made, the reproducer would then fail because no artifact with given GAV exists.

Comment 1 Edson Tirelli 2015-02-19 13:58:37 UTC
Marek, the stack trace suggests this is using HTTPS (instead of HTTP, as in the header description). Is this the case?

Comment 2 Mario Fusco 2015-02-19 15:37:00 UTC
Marek, I couldn't reproduce the problem, but Edson has a good point there. So the question is why is it trying to use https instead of http on your machine? Is it something you have configured in your settings.xml file? Should I attempt the same?

Comment 3 Marek Winkler 2015-02-20 07:23:31 UTC
Mario, yes, you and Edson are right - I have verified that I have configured a repository accessed by https in my ~/.m2/settings.xml. I have also verified that if I remove that repository, I also cannot reproduce the problem.

Sorry for not having found that earlier.

Comment 5 Mario Fusco 2015-02-20 09:47:01 UTC
Fixed by https://github.com/droolsjbpm/drools/commit/d0b8392de

Comment 6 Marek Winkler 2015-03-05 15:24:54 UTC
Verified in BRMS 6.1.0 ER6.