Closed davsclaus closed 8 years ago
[14:51:02]
I get a classload error in fabric8-forge on the web with logger / forge
Caused by:
java.lang.LinkageError: loader constraint violation: when resolving method "org.slf4j.impl.StaticLoggerBinder.getLoggerFactory()Lorg/slf4j/ILoggerFactory;" the class loader (instance of org/jboss/modules/ModuleClassLoader) of the current class, org/slf4j/LoggerFactory, and the class loader (instance of org/jboss/modules/ModuleClassLoader) for the method's defining class, org/slf4j/impl/StaticLoggerBinder, have different Class objects for the type org/slf4j/ILoggerFactory used in the signature
at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:335)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:283)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:304)
at io.fabric8.kubernetes.client.Config.<clinit>(Config.java:40)
at io.fabric8.kubernetes.client.ConfigBuilder.<init>(ConfigBuilder.java:16)
at io.fabric8.kubernetes.client.ConfigBuilder.<init>(ConfigBuilder.java:13)
at io.fabric8.kubernetes.client.BaseClient.<init>(BaseClient.java:37)
at io.fabric8.kubernetes.client.DefaultKubernetesClient.<init>(DefaultKubernetesClient.java:103)
at io.fabric8.cdi.bean.KubernetesClientBean.create(KubernetesClientBean.java:31)
at io.fabric8.cdi.bean.KubernetesClientBean.create(KubernetesClientBean.java:23)
at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:96)
at org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstanceStrategy.get(ContextualInstanceStrategy.java:100)
at org.jboss.weld.bean.ContextualInstance.get(ContextualInstance.java:50)
at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:99)
at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:99)
at io.fabric8.kubernetes.client.KubernetesClient$418356913$Proxy$_$$_WeldClientProxy.getNamespace(Unknown Source)
at io.fabric8.cdi.Services.toServiceUrl(Services.java:36)
at io.fabric8.cdi.producers.ServiceUrlProducer.produce(ServiceUrlProducer.java:47)
at io.fabric8.cdi.producers.ServiceUrlProducer.produce(ServiceUrlProducer.java:26)
at io.fabric8.cdi.bean.ProducerBean.create(ProducerBean.java:43)
at org.jboss.weld.context.unbound.DependentContextImpl.get(DependentContextImpl.java:70)
at org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstanceStrategy.get(ContextualInstanceStrategy.java:100)
at org.jboss.weld.bean.ContextualInstance.get(ContextualInstance.java:50)
at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:744)
at org.jboss.weld.manager.BeanManagerImpl.getInjectableReference(BeanManagerImpl.java:844)
at org.jboss.weld.injection.FieldInjectionPoint.inject(FieldInjectionPoint.java:92)
at org.jboss.weld.util.Beans.injectBoundFields(Beans.java:362)
at org.jboss.weld.util.Beans.injectFieldsAndInitializers(Beans.java:373)
at org.jboss.weld.injection.producer.ResourceInjector$1.proceed(ResourceInjector.java:70)
at org.jboss.weld.injection.InjectionContextImpl.run(InjectionContextImpl.java:48)
at org.jboss.weld.injection.producer.ResourceInjector.inject(ResourceInjector.java:72)
at org.jboss.weld.injection.producer.BasicInjectionTarget.inject(BasicInjectionTarget.java:117)
at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:159)
at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:96)
at org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstanceStrategy.get(ContextualInstanceStrategy.java:100)
at org.jboss.weld.bean.ContextualInstanceStrategy$ApplicationScopedContextualInstanceStrategy.get(ContextualInstanceStrategy.java:140)
at org.jboss.weld.bean.ContextualInstance.get(ContextualInstance.java:50)
at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:99)
at org.jboss.weld.bean.proxy.ProxyMethodHandler.getInstance(ProxyMethodHandler.java:125)
at io.fabric8.forge.ipaas.repository.NexusConnectionRepository$Proxy$_$$_WeldClientProxy.search(Unknown Source)
at io.fabric8.forge.ipaas.ConnectionSearchCommand.execute(ConnectionSearchCommand.java:72)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.jboss.forge.furnace.proxy.ClassLoaderInterceptor$1.call(ClassLoaderInterceptor.java:87)
at org.jboss.forge.furnace.util.ClassLoaders.executeIn(ClassLoaders.java:42)
at org.jboss.forge.furnace.proxy.ClassLoaderInterceptor.invoke(ClassLoaderInterceptor.java:103)
at io.fabric8.forge.ipaas.ConnectionSearchCommand_$$_javassist_5e0355bd-abf0-4315-a8cc-2f450703b719.execute(ConnectionSearchCommand_$$_javassist_5e0355bd-abf0-4315-a8cc-2f450703b719.java)
at org.jboss.forge.addon.ui.impl.controller.SingleCommandControllerImpl.execute(SingleCommandControllerImpl.java:94)
I may temporary just use ENV to lookup the nexus service.
There is a search-connector-command now that searches nexus.
It currently return verbose details. We can reduce the information returned to what is needed in the UI. The details returned is the same details you get with the connector-details command, which includes all the options and so on. However we could remove that so the returned search result is only the meta-data about the connector.
In the example below there are 2 connectors (foo and bar)
[ {
"baseScheme" : "log",
"baseGroupId" : "org.apache.camel",
"baseArtifactId" : "camel-core",
"baseVersion" : "2.17.3",
"baseJavaType" : "org.apache.camel.component.log.LogComponent",
"name" : "Bar",
"scheme" : "bar",
"javaType" : "org.bar.connector.BarComponent",
"groupId" : "io.fabric8.django",
"artifactId" : "bar-connector",
"version" : "1.0.0",
"description" : "Love going to bars",
"labels" : [ "bar", "beer" ],
"source" : "To",
"endpointOptions" : [ "loggerName", "level" ],
"endpointValues" : {
"multiline" : "true",
"showAll" : "true",
"style" : "Tab"
}
}, {
"baseScheme" : "timer",
"baseGroupId" : "org.apache.camel",
"baseArtifactId" : "camel-core",
"baseVersion" : "2.17.3",
"baseJavaType" : "org.apache.camel.component.timer.TimerComponent",
"name" : "Foo",
"scheme" : "foo",
"javaType" : "org.foo.connector.FooComponent",
"groupId" : "io.fabric8.django",
"artifactId" : "foo-connector",
"version" : "1.0.0",
"description" : "Something cool",
"labels" : [ "foo", "timer" ],
"source" : "From",
"endpointOptions" : [ "timerName", "period" ],
"endpointValues" : {
"fixedRate" : "true",
"period" : "5000"
}
} ]
Currently to add connectors manually to the nexus repo you can do this from the nexus repo.
Open nexus in the cluster. And login with admin/admin123
.
Checkout the django-examples repo to your laptop: https://github.com/fabric8io/django-examples
Build the project with mvn clean install
from the root path.
Then you can install the foo, bar and wine connectors from the nexus ui as shown:
And then click Add Artifact
button.
Its important that the GAV and other input details is as shown in the screenshot. When you use the wizard to select the built JAR from your local computer. Make sure to pick the xxx-camel-connector
JAR. And then edit the values as Nexus guess wrong in some places.
And then click Upload Artifact(s)
button in the bottom. You should then find the connector if you click the Browse Index
tab.
And make sure to use the Release
repository.
So you can find a connector and add to the project.
It should look for -connector JARs