as400 jfuse 7 setup

Latest response

I had in 6.3 this working, 7.6 causes problem, Seems as400 is not working have the needed jt400 did all the port openings, references etc but just not enough information out there.

How do I on java class resolve issue, with AS400JDBCDriver driver = new AS400JDBCDriver();
I get the below

2021-01-12 18:31:11,400 | ERROR | tion(49)-10.48.0.231 | o.a.a.b.c.BlueprintContainerImpl | 51 - org.apache.aries.blueprint.core - 1.10.2 | Unable to start container for blueprint bundle fi..salesforce..outbound.service/1.2.2.RELEASE
org.osgi.service.blueprint.container.ComponentDefinitionException: Error when instantiating bean asiakasProcessor of class fi..salesforce..outbound.processors.AsiakasProcessorBean
at org.apache.aries.blueprint.container.BeanRecipe.wrapAsCompDefEx(BeanRecipe.java:362) ~[?:?]
at org.apache.aries.blueprint.container.BeanRecipe.getInstanceFromType(BeanRecipe.java:352) ~[?:?]
at org.apache.aries.blueprint.container.BeanRecipe.getInstance(BeanRecipe.java:283) ~[?:?]
at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:685) ~[?:?]
at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:666) ~[?:?]
at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:81) ~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_121-1-redhat]
at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:90) ~[?:?]
at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:360) ~[?:?]
at org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:190) ~[?:?]
at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:737) ~[?:?]
at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:433) ~[?:?]
at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:298) ~[?:?]
at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:311) ~[?:?]
at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:280) ~[?:?]
at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:276) ~[?:?]
at org.apache.aries.blueprint.container.BlueprintExtender.modifiedBundle(BlueprintExtender.java:266) ~[?:?]
at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:500) ~[?:?]
at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:433) ~[?:?]
at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$AbstractTracked.track(BundleHookBundleTracker.java:725) ~[?:?]
at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.bundleChanged(BundleHookBundleTracker.java:463) ~[?:?]
at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$BundleEventHook.event(BundleHookBundleTracker.java:422) ~[?:?]
at org.apache.felix.framework.util.SecureAction.invokeBundleEventHook(SecureAction.java:1179) ~[?:?]
at org.apache.felix.framework.EventDispatcher.createWhitelistFromHooks(EventDispatcher.java:730) ~[?:?]
at org.apache.felix.framework.EventDispatcher.fireBundleEvent(EventDispatcher.java:485) ~[?:?]
at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4579) ~[?:?]
at org.apache.felix.framework.Felix.startBundle(Felix.java:2174) ~[?:?]
at org.apache.felix.framework.Felix.updateBundle(Felix.java:2510) ~[?:?]
at org.apache.felix.framework.BundleImpl.update(BundleImpl.java:1018) ~[?:?]
at org.apache.karaf.bundle.core.internal.BundlesMBeanImpl.update(BundlesMBeanImpl.java:172) ~[?:?]
at org.apache.karaf.bundle.core.internal.BundlesMBeanImpl.update(BundlesMBeanImpl.java:153) ~[?:?]
at sun.reflect.GeneratedMethodAccessor113.invoke(Unknown Source) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_121-1-redhat]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_121-1-redhat]
at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71) ~[?:1.8.0_121-1-redhat]
at sun.reflect.GeneratedMethodAccessor39.invoke(Unknown Source) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_121-1-redhat]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_121-1-redhat]
at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:275) ~[?:1.8.0_121-1-redhat]
at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:112) ~[?:1.8.0_121-1-redhat]
at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:46) ~[?:1.8.0_121-1-redhat]
at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:237) ~[?:1.8.0_121-1-redhat]
at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138) ~[?:1.8.0_121-1-redhat]
at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:252) ~[?:1.8.0_121-1-redhat]
at javax.management.StandardMBean.invoke(StandardMBean.java:405) ~[?:1.8.0_121-1-redhat]
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819) ~[?:1.8.0_121-1-redhat]
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801) ~[?:1.8.0_121-1-redhat]
at org.apache.karaf.management.internal.EventAdminMBeanServerWrapper.invoke(EventAdminMBeanServerWrapper.java:359) ~[!/:4.2.6.fuse-760032-redhat-00001]
at sun.reflect.GeneratedMethodAccessor98.invoke(Unknown Source) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_121-1-redhat]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_121-1-redhat]
at org.apache.karaf.management.internal.MBeanInvocationHandler.invoke(MBeanInvocationHandler.java:60) ~[!/:4.2.6.fuse-760032-redhat-00001]
at com.sun.proxy.$Proxy55.invoke(Unknown Source) ~[?:?]
at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468) ~[?:?]
at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76) ~[?:?]
at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1309) ~[?:?]
at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_121-1-redhat]
at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1408) ~[?:?]
at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:829) ~[?:?]
at sun.reflect.GeneratedMethodAccessor96.invoke(Unknown Source) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_121-1-redhat]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_121-1-redhat]
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:346) ~[?:1.8.0_121-1-redhat]
at sun.rmi.transport.Transport$1.run(Transport.java:200) ~[?:1.8.0_121-1-redhat]
at sun.rmi.transport.Transport$1.run(Transport.java:197) ~[?:1.8.0_121-1-redhat]
at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_121-1-redhat]
at sun.rmi.transport.Transport.serviceCall(Transport.java:196) ~[?:1.8.0_121-1-redhat]
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568) ~[?:1.8.0_121-1-redhat]
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826) ~[?:1.8.0_121-1-redhat]
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:683) ~[?:1.8.0_121-1-redhat]
at java.security.AccessController.doPrivileged(Native Method) [?:1.8.0_121-1-redhat]
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682) [?:1.8.0_121-1-redhat]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_121-1-redhat]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_121-1-redhat]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_121-1-redhat]
Caused by: java.lang.NoClassDefFoundError: com/ibm/as400/access/AS400JDBCDriver
at fi..salesforce..outbound.processors.AsiakasProcessorBean.(AsiakasProcessorBean.java:24) ~[?:?]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_121-1-redhat]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_121-1-redhat]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_121-1-redhat]
at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_121-1-redhat]
at org.apache.aries.blueprint.utils.ReflectionUtils.newInstance(ReflectionUtils.java:369) ~[?:?]
at org.apache.aries.blueprint.container.BeanRecipe.newInstance(BeanRecipe.java:839) ~[?:?]
at org.apache.aries.blueprint.container.BeanRecipe.getInstanceFromType(BeanRecipe.java:350) ~[?:?]
... 73 more
Caused by: java.lang.ClassNotFoundException: com.ibm.as400.access.AS400JDBCDriver not found by fi..salesforce..outbound.service [442]
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:357) ~[?:1.8.0_121-1-redhat]
at fi..salesforce..outbound.processors.AsiakasProcessorBean.(AsiakasProcessorBean.java:24) ~[?:?]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_121-1-redhat]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_121-1-redhat]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_121-1-redhat]
at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_121-1-redhat]
at org.apache.aries.blueprint.utils.ReflectionUtils.newInstance(ReflectionUtils.java:369) ~[?:?]
at org.apache.aries.blueprint.container.BeanRecipe.newInstance(BeanRecipe.java:839) ~[?:?]
at org.apache.aries.blueprint.container.BeanRecipe.getInstanceFromType(BeanRecipe.java:350) ~[?:?]
... 73 more

Responses

Hello,

You seem to be running Fuse 7.6 on Karaf? Have a look at the lowest level exception:

"Caused by: java.lang.ClassNotFoundException: com.ibm.as400.access.AS400JDBCDriver not found by fi..salesforce..outbound.service [442]"

I presume the bundle 442 is your application bundle that wants to use AS400. Please check the package imports of this bundle 442 (using either packages:imports 442 or osgi:headers 442). Does your bundle declar to import the required Java package com.ibm.as400.access?

If not, please add it to your package imports in the maven-bundle-plugin in your project pom.xml.

For a test you may also enable dev:dynamic-import 442 in your Karaf runtime, and refresh the 442 bundle to see what additional classes where wired during the enabling of dynamic imports. When disabling dev:dynamic-import again it will print out the additional packages that it wired.

Hope that helps, Torsten Mielke

After doing so I get the below

java.io.IOException : Start of bundle with id 502 failed with message: Unable to resolve fi..salesforce..outbound.service [502](R 502.0): missing requirement [fi..salesforce..outbound.service [502](R 502.0)] osgi.wiring.package; (osgi.wiring.package=com.ibm.as400.access.AS400JDBCDriver) Unresolved requirements: [[fi..salesforce..outbound.service [502](R 502.0)] osgi.wiring.package; (osgi.wiring.package=com.ibm.as400.access.AS400JDBCDriver)]

I even put in com.ibm.as400.access.AS400JDBCDriver to the Inspect Classloading section and load class and I get Loading class com.ibm.as400.access.AS400JDBCDriver in Bundle 502. Class can not be loaded from this bundle.

but if I check bundle where I have jt400 and try same with class loading i get Loading class com.ibm.as400.access.AS400JDBCDriver in Bundle 501. Class is served from Bundle 501

I checked in IDE and the project finds the class file but when I try to run on server this issue. I added as you suggested and application doesnt start so is there some reference needed in pom xml to assure it is attached or something else?

Have you installed the Karaf feature camel-jt400 beforehand? feature:install camel-jt400

It installs these two bundles

mvn:org.apache.camel/camel-jt400/2.21.0.fuse-760027-redhat-00001
mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jt400/9.4_2

The latter of the two does export the Java package com.ibm.as400.access.

Also, it may be useful to run this Karaf command to find out which bundle export the class you need

  find-class AS400JDBCDriver
  camel-jt400 (247)
  com/ibm/as400/access/AS400JDBCDriver.class
  Apache ServiceMix :: Bundles :: jt400 (248)
  com/ibm/as400/access/AS400JDBCDriver.class

I see it as below, but when I run the find-class you suggested nothing comes in search

Details ID camel-jt400/2.21.0.fuse-760027-redhat-00001 Name camel-jt400 State Installed Repository Name camel-2.21.0.fuse-760027-redhat-00001 Repository URI mvn:org.apache.camel.karaf/apache-camel/2.21.0.fuse-760027-redhat-00001/xml/features Version 2.21.0.fuse-760027-redhat-00001 Dependencies camel-core/2.21.0.fuse-760027-redhat-00001 transaction/2.0.0 Bundles mvn:javax.servlet/javax.servlet-api/4.0.1 mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jt400/9.4_2 mvn:org.apache.camel/camel-jt400/2.21.0.fuse-760027-redhat-00001 Configurations

I checked and the bundle also has 402 active camel-jt400 org.apache.camel.camel-jt400 2.21.0.fuse-760027-redhat-00001

Does your bundle declare an import for the Java package com.ibm.as400.access.? Also, perhaps run the above find-class command to verify that the class is correctly exported (which by default it should be).

Firstly thank you for the responses and aid here. I had the import as generic access.* but when I change to exact Drier class below error

                    <Import-Package>javax.persistence.*,
                        com.ibm.as400.access.AS400JDBCDriver,
                        org.hibernate.proxy,

javax.ejb;resolution:=optional, javassist.util.proxy, org.apache.camel.*, org.osgi.service.*, org.slf4j,bsh.;resolution:=optional,com.ibm.as400.ui.;resolution:=optional,com.ibm.cfwk.;resolution:=optional, com.ibm.db2.;resolution:=optional,com.ibm.gsk.;resolution:=optional, com.ibm.sslight;resolution:=optional,com.ibm.uvu;resolution:=optional, com.ibm.uvm.;resolution:=optional, sun.;resolution:=optional, *, org.hibernate.proxy, javassist.util.proxy,com.ibm.as400.access.AS400JDBCDriver META-INF/persistence.xml

java.io.IOException : Start of bundle with id 517 failed with message: Unable to resolve fi.teosto.salesforce.tepa.outbound.service [517](R 517.1): missing requirement [fi.teosto.salesforce.tepa.outbound.service [517](R 517.1)] osgi.wiring.package; (osgi.wiring.package=com.ibm.as400.access.AS400JDBCDriver) Unresolved requirements: [[fi.teosto.salesforce.tepa.outbound.service [517](R 517.1)] osgi.wiring.package; (osgi.wiring.package=com.ibm.as400.access.AS400JDBCDriver)]

I know I am close and yes bundles etc should generate but it just does not. is there possibility to have hour session or some offering to aid in helping resolving this?

Do you have a support subscription for Red Hat Fuse or Red Hat Integration? If yes, please open a support ticket and we will be happy to help you further. If not, then I would need a small, self contained reproducer to check further. Note, I won't have any access to an AS400 system but that may not be needed since the bundle is failing for you at deployment time.

no support currently. yes as400 connection is irrelevent as such as the driver causing issue on start. I can send mention reproducer but i have never done before not much knowledge on steps is there some instructions I could follow? Also after doing do I send to email box?

Please try to condense your use case into an OSGi bundle that has no other external dependencies than Fuse related (i.e. Camel, etc) so dependencies I can resolve. Remove any business code and then send me the project in source code format with build files (Maven preferred) to tmielke_at_redhat.com. I will then have a look.