Skip to content

Document minimum JDK 8 update version #23563

Closed
@crosslover

Description

@crosslover
  • surefire: 2.20.1
  • jdk: 1.8.0_45
  • Spring: 5.0.15.RELEASE
  • mvn: 3.6.1

When I run mvn test with the maven-surefire-plugin, this happens:

[2019-09-02T09:28:48.807Z] java.lang.IllegalStateException: Failed to load ApplicationContext

[2019-09-02T09:28:48.807Z] Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'requestMappingHandlerAdapter' defined in class path resource [org/springframework/web/servlet/config/annotation/DelegatingWebMvcConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter]: Factory method 'requestMappingHandlerAdapter' threw exception; nested exception is java.lang.BootstrapMethodError: call site initialization exception

[2019-09-02T09:28:48.807Z] Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter]: Factory method 'requestMappingHandlerAdapter' threw exception; nested exception is java.lang.BootstrapMethodError: call site initialization exception

[2019-09-02T09:28:48.807Z] Caused by: java.lang.BootstrapMethodError: call site initialization exception

[2019-09-02T09:28:48.807Z] Caused by: java.lang.ClassCastException: Cannot cast org.springframework.http.converter.xml.SourceHttpMessageConverter$$Lambda$81/217380081 to org.xml.sax.EntityResolver

mvn clean test -U -X -T 4

the error code slice:

public class SourceHttpMessageConverter<T extends Source> extends AbstractHttpMessageConverter<T> {

	private static final EntityResolver NO_OP_ENTITY_RESOLVER =
			(publicId, systemId) -> new InputSource(new StringReader(""));

However, when I used the jdk of version jdk1.8.0_211, it didn't happen any more. It probably could be caused by jdk type inference mechanism(which may be fixed in later version) under the surefire class loader.

Just report the issue, btw are there some documents related to it?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions