-
Bug
-
Resolution: Done
-
Critical
-
fuse-7.8-GA
-
None
-
False
-
False
-
%
-
-
+
-
Undefined
-
Fuse Standalone
-
- start karaf (fuse 7.8)
- feature:install camel-cxf
- deploy the bundle (reproducer project is attached on this ticket)
- check fuse.log
-
org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:376) throws java.lang.reflect.UndeclaredThrowableException
Caused by: java.lang.NoSuchMethodException: com.sun.codemodel.internal.JCodeModel.build(java.lang.Object) at java.lang.Class.getMethod(Class.java:1786) ~[?:1.8.0_275] at org.apache.cxf.common.util.ReflectionInvokationHandler.invoke(ReflectionInvokationHandler.java:84) ~[?:?] at com.sun.proxy.$Proxy108.build(Unknown Source) ~[?:?] at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:373) ~[?:?] ... 50 more
With Fuse 7.7 or older versions, it works fine.
The behavior was changed even cxf uses the same source code between Fuse 7.7 and Fuse 7.8:
part of org.apache.cxf.common.util.ReflectionInvokationHandler.invoke()
} catch (NoSuchMethodException e) { for (Method m2 : targetClass.getMethods()) { if (m2.getName().equals(method.getName()) && m2.getParameterTypes().length == method.getParameterTypes().length) { boolean found = true; for (int x = 0; x < m2.getParameterTypes().length; x++) { if (args[x] != null && !m2.getParameterTypes()[x].isInstance(args[x])) { //*** Please focus on this part!!! found = false; } } if (found) { ReflectionUtil.setAccessible(m2); return wrapReturn(wr, m2.invoke(target, args)); } } } throw e; }
- With Fuse 7.8, "!m2.getParameterTypes()[x].isInstance(args[x])" ends up with "true", so could not go into the "wrapReturn()" code block, then throw e.
- With Fuse 7.7, "!m2.getParameterTypes()[x].isInstance(args[x])" ends up with "false", so could go into the "wrapReturn()" code block.
- relates to
-
ENTESB-15642 Candidate permutation failed due to a conflict between imports when migrating from Fuse 7.7 to 7.8 BOM
- Done