[ https://issues.apache.org/jira/browse/CXF-8932?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17769046#comment-17769046 ]
Laurent SCHOELENS commented on CXF-8932: ---------------------------------------- [~reta] sorry to reping, but found out that 4.0.2 works well on jdk11, so it seems more a regression in 4.0.2-4.0.3 changelog > [WSDL2JAVA] Not working on JDK11 > -------------------------------- > > Key: CXF-8932 > URL: https://issues.apache.org/jira/browse/CXF-8932 > Project: CXF > Issue Type: Bug > Affects Versions: 4.0.3 > Reporter: Laurent SCHOELENS > Assignee: Andriy Redko > Priority: Major > Fix For: 4.0.4 > > Attachments: cxf-8932.zip, image-2023-09-21-07-39-06-219.png > > > > I get the following error when running wsdl2java with cxf 4.0.3 and jdk11 : > {code:java} > [WARNING] Exception in thread "main" java.lang.UnsupportedClassVersionError: > org/springframework/context/ApplicationContext has been compiled by a more > recent version of the Java Runtime (class file version 61.0), this version of > the Java Runtime only recognizes class file versions up to 55.0 > [WARNING] at java.base/java.lang.ClassLoader.defineClass1(Native Method) > [WARNING] at > java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016) > [WARNING] at > java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174) > [WARNING] at > java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:800) > [WARNING] at > java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:698) > [WARNING] at > java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:621) > [WARNING] at > java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:579) > [WARNING] at > java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) > [WARNING] at > java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) > [WARNING] at > org.apache.cxf.BusFactory.getBusFactoryClass(BusFactory.java:392) > [WARNING] at org.apache.cxf.BusFactory.newInstance(BusFactory.java:315) > [WARNING] at org.apache.cxf.BusFactory.newInstance(BusFactory.java:303) > [WARNING] at org.apache.cxf.BusFactory.getDefaultBus(BusFactory.java:107) > [WARNING] at org.apache.cxf.BusFactory.getDefaultBus(BusFactory.java:96) > {code} > It seems CXF tries to load org.apache.cxf.bus.spring.SpringBusFactory as > default BusFactory (defined here > {color:#1d1c1d}cxf-core-4.0.3.jar!/META-INF/services/org.apache.cxf.bus.factory) > but with spring jdk17 baseline, it fails.{color} > CXF should not use SpringBusFactory if intended to support JDK11+ > -- This message was sent by Atlassian Jira (v8.20.10#820010)