Fuse Integration Services - ClassNotFound
Hi,
I have deployed a bundled app (camel route) with Openshift using the fis-karaf-openshift image, however I am running into issues.
I will start off by saying that the app runs fine in a standalone JBoss Fuse instance on a virtual machine.
It requires a few private custom bundles which I have hosted in a private artifact repository.
I have added the required bundles to both the pom file for the maven build and for the karaf maven plugin.
The build is successful within OpenShift, but the when the app goes to run I get a class not found error.
Here is the error from the pod's log:
2016-11-04 09:54:49,514 | ERROR | ExtenderThread-2 | ContextLoaderListener | 41 - org.springframework.osgi.extender - 1.2.1 | Application context refresh failed (OsgiBundleXmlApplicationContext(bundle=
, config=osgibundle:/META-INF/spring/*.xml)) org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'beanName' defined in URL [bundle://48.0:0/META-INF/spring/camelContext.xml]: Invocation of init method failed; nested exception is javax.naming.NoInitialContextException: Cannot instantiate class: com.sample. [Root exception is java.lang.ClassNotFoundException: com.sample. not found from bundle [ ]] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1514)[25:org.apache.servicemix.bundles.spring-beans:3.2.12.RELEASE_2] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521)[25:org.apache.servicemix.bundles.spring-beans:3.2.12.RELEASE_2] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)[25:org.apache.servicemix.bundles.spring-beans:3.2.12.RELEASE_2] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)[25:org.apache.servicemix.bundles.spring-beans:3.2.12.RELEASE_2] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)[25:org.apache.servicemix.bundles.spring-beans:3.2.12.RELEASE_2] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)[25:org.apache.servicemix.bundles.spring-beans:3.2.12.RELEASE_2] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191)[25:org.apache.servicemix.bundles.spring-beans:3.2.12.RELEASE_2] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:618)[25:org.apache.servicemix.bundles.spring-beans:3.2.12.RELEASE_2] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:934)[20:org.apache.servicemix.bundles.spring-context:3.2.12.RELEASE_2] at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:69)[27:org.springframework.osgi.core:1.2.1] at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:355)[27:org.springframework.osgi.core:1.2.1] at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)[27:org.springframework.osgi.core:1.2.1] at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)[27:org.springframework.osgi.core:1.2.1] at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:132)[41:org.springframework.osgi.extender:1.2.1] at java.lang.Thread.run(Thread.java:745)[:1.8.0_111] ~~~ **Here is my karaf-maven-plugin config (note bundle-abc and bundle-xyz)**
org.apache.karaf.tooling karaf-maven-plugin ${karaf.plugin.version} true karaf-assembly assembly install karaf-archive archive install v24 1.8 true false karaf-framework shell jaas spring camel-spring camel-jms camel-jmx camel-spring-javaconfig mvn:org.apache.karaf.bundle/org.apache.karaf.bundle.core/3.0.4 mvn:io.fabric8/fabric8-utils/2.2.0.redhat-079 mvn:com.sample/bundle-abc/7.1.2.226 mvn:com.sample/bundle-xyz/7.1.2.226 mvn:${project.groupId}/${project.artifactId}/${project.version}
~~~
The required bundles do show up in the cat /deployments/karaf/etc/startup.properties file on the pod and the jars are present on the filesystem.
Any ideas as to how to fix this? Not sure why I'm getting ClassNotFound when the class should already be deployed in a required bundle.....
Responses