[
https://issues.apache.org/jira/browse/JCLOUDS-1156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15425861#comment-15425861
]
Andrew Phillips commented on JCLOUDS-1156:
------------------------------------------
[~nacx]: OK, I think I understand what is going on here - it's basically a
variant of https://github.com/ymnk/jsch-agent-proxy/pull/23, but the "problem
bundle" in question this time is
{{org.apache.servicemix.bundles.jsch-agentproxy-jsch-0.0.9_1}}.
The {{jsch-agentproxy-jsch}} has exactly the same problem of bundling its
dependencies and exporting them again:
https://github.com/ymnk/jsch-agent-proxy/blob/master/jsch-agent-proxy-jsch/pom.xml
This causes OSGi to think it's "done" importing {{com.jcraft.jsch.agentproxy}}
as soon as it's loaded this bundle, so it never gets to try
{{jsch.agentproxy.connector-factory-0.0.9.jar}}.
The same fix seems to work: I was able to get the commands to run by replacing
the {{org.apache.servicemix.bundles.jsch-agentproxy-jsch-0.0.9_1}} JAR in the
CLI distribution with the attached version, which has a patched MANIFEST.MF
(also attached) that does **not** export the {{com.jcraft.jsch.agentproxy}}.
The trickier question is what a proper fix might be, given that the
https://github.com/ymnk/jsch-agent-proxy/ project no longer seems to be
maintained. Thoughts on that?
> jclouds-cli fails to run compute service commands
> -------------------------------------------------
>
> Key: JCLOUDS-1156
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1156
> Project: jclouds
> Issue Type: Bug
> Components: jclouds-cli, jclouds-karaf
> Affects Versions: 2.0.0
> Reporter: Andrew Phillips
> Assignee: Ignasi Barrera
>
> Attempts to run commands such as {{jclouds> jclouds:compute-service-create
> --provider aws-ec2 --identity foo --credential bar}} fail with exceptions
> similar to:
> {code}
> 2016-08-17 22:38:39,950 | ERROR | a2-363af5a2b3c3) | configadmin
> | ? ? | 5 -
> org.apache.felix.configadmin - 1.8.0 |
> [org.osgi.service.cm.ManagedServiceFactory,
> org.jclouds.osgi.ProviderListener, org.jclouds.osgi.ApiListener, id=50,
> bundle=51/mvn:org.apache.jclouds.karaf/services/2.0.0-SNAPSHOT]: Unexpected
> problem updating configuration
> org.jclouds.compute.30bd6f52-44bc-49c3-aaa2-363af5a2b3c3
> java.lang.NoClassDefFoundError: com/jcraft/jsch/agentproxy/ConnectorFactory
> at java.lang.Class.getDeclaredConstructors0(Native Method)
> ...
> at com.google.inject.Guice.createInjector(Guice.java:95)
> at org.jclouds.ContextBuilder.buildInjector(ContextBuilder.java:404)
> at org.jclouds.ContextBuilder.buildInjector(ContextBuilder.java:327)
> at org.jclouds.ContextBuilder.buildView(ContextBuilder.java:614)
> at org.jclouds.ContextBuilder.buildView(ContextBuilder.java:594)
> at org.jclouds.ContextBuilder.build(ContextBuilder.java:587)
> at
> org.jclouds.karaf.services.internal.ComputeServiceFactory.updated(ComputeServiceFactory.java:171)
> at
> org.apache.felix.cm.impl.helper.ManagedServiceFactoryTracker.provideConfiguration(ManagedServiceFactoryTracker.java:88)[5:org.apache.felix.configadmin:1.8.0]
> at
> org.apache.felix.cm.impl.ConfigurationManager$UpdateConfiguration.run(ConfigurationManager.java:1744)[5:org.apache.felix.configadmin:1.8.0]
> at
> org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:103)[5:org.apache.felix.configadmin:1.8.0]
> at java.lang.Thread.run(Thread.java:724)[:1.7.0_40]
> Caused by: java.lang.ClassNotFoundException:
> com.jcraft.jsch.agentproxy.ConnectorFactory not found by
> org.apache.servicemix.bundles.jsch-agentproxy-jsch [38]
> ...
> {code}
> See http://markmail.org/thread/ksrn6dwg57ldsctx for more details
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)