我试图将一个简单的spring boot 2 hello world应用程序部署到weblogic 12.2.1。以下是我使用的文件:
这是我的主要课程:
@SpringBootApplication
public class SpringBootAndAngularApplication extends SpringBootServletInitializer implements WebApplicationInitializer {
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application){
return application.sources(SpringBootAndAngularApplication.class);
}
public static void main(String[] args) {
SpringApplication.run(SpringBootAndAngularApplication.class, args);
}
}
这是我的hello控制器:
@RestController
public class HelloController {
@RequestMapping("/")
public String helloWorld(){
return "hello";
}
}
这是我的pom.xml文件:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.test</groupId>
<artifactId>SpringBootAndAngular</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>SpringBootAndAngular</name>
<description>Demo project for Spring Boot</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.0.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<finalName>angularBoot</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
这是我的weblogic.xml文件:
<wls:weblogic-web-app
xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-web-app"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.oracle.com/weblogic/weblogic-web-app
http://xmlns.oracle.com/weblogic/weblogic-web-app/1.4/weblogic-web-app.xsd">
<wls:context-root>/angularBoot</wls:context-root>
<wls:container-descriptor>
<wls:prefer-application-packages>
<wls:package-name>org.slf4j.*</wls:package-name>
<wls:package-name>org.springframework.*</wls:package-name>
</wls:prefer-application-packages>
</wls:container-descriptor>
但是,当我将创建的项目war文件部署到weblogic 12.2.1中时,我收到此错误:
org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'httpPutFormContentFilter' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.web.servlet.filter.OrderedHttpPutFormContentFilter]: Factory method 'httpPutFormContentFilter' threw exception; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.fasterxml.jackson.datatype.jsr310.JavaTimeModule]: Constructor threw exception; nested exception is java.lang.IllegalAccessError: tried to access method com.fasterxml.jackson.databind.ser.std.StdSerializer.<init>(Ljava/lang/Class;)V from class com.fasterxml.jackson.datatype.jsr310.JavaTimeModule
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:155) ~[spring-boot-2.0.0.RELEASE.jar:2.0.0.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543) ~[spring-context-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140) ~[spring-boot-2.0.0.RELEASE.jar:2.0.0.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:752) ~[spring-boot-2.0.0.RELEASE.jar:2.0.0.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:388) ~[spring-boot-2.0.0.RELEASE.jar:2.0.0.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:327) ~[spring-boot-2.0.0.RELEASE.jar:2.0.0.RELEASE]
at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.run(SpringBootServletInitializer.java:155) [spring-boot-2.0.0.RELEASE.jar:2.0.0.RELEASE]
at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:135) [spring-boot-2.0.0.RELEASE.jar:2.0.0.RELEASE]
at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:87) [spring-boot-2.0.0.RELEASE.jar:2.0.0.RELEASE]
at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:172) [spring-web-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at weblogic.servlet.internal.WebAppServletContext.initContainerInitializer(WebAppServletContext.java:1421) [com.oracle.weblogic.servlet.jar:12.2.1.2]
at weblogic.servlet.internal.WebAppServletContext.initContainerInitializers(WebAppServletContext.java:1360) [com.oracle.weblogic.servlet.jar:12.2.1.2]
at weblogic.servlet.internal.WebAppServletContext.initContainerInitializers(WebAppServletContext.java:1341) [com.oracle.weblogic.servlet.jar:12.2.1.2]
at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1907) [com.oracle.weblogic.servlet.jar:12.2.1.2]
at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3091) [com.oracle.weblogic.servlet.jar:12.2.1.2]
at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1823) [com.oracle.weblogic.servlet.jar:12.2.1.2]
at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:882) [com.oracle.weblogic.servlet.jar:12.2.1.2]
at weblogic.application.internal.ExtensibleModuleWrapper$StartStateChange.next(ExtensibleModuleWrapper.java:360) [com.oracle.weblogic.application.jar:12.2.1.2]
at weblogic.application.internal.ExtensibleModuleWrapper$StartStateChange.next(ExtensibleModuleWrapper.java:356) [com.oracle.weblogic.application.jar:12.2.1.2]
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:45) [com.oracle.weblogic.application.jar:12.2.1.2]
at weblogic.application.internal.ExtensibleModuleWrapper.start(ExtensibleModuleWrapper.java:138) [com.oracle.weblogic.application.jar:12.2.1.2]
at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:124) [com.oracle.weblogic.application.jar:12.2.1.2]
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:233) [com.oracle.weblogic.application.jar:12.2.1.2]
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:228) [com.oracle.weblogic.application.jar:12.2.1.2]
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:45) [com.oracle.weblogic.application.jar:12.2.1.2]
at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:78) [com.oracle.weblogic.application.jar:12.2.1.2]
at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:52) [com.oracle.weblogic.application.jar:12.2.1.2]
at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:750) [com.oracle.weblogic.application.jar:12.2.1.2]
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:45) [com.oracle.weblogic.application.jar:12.2.1.2]
at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:260) [com.oracle.weblogic.application.jar:12.2.1.2]
at weblogic.application.internal.SingleModuleDeployment.activate(SingleModuleDeployment.java:52) [com.oracle.weblogic.application.jar:12.2.1.2]
at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:165) [com.oracle.weblogic.application.jar:12.2.1.2]
at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:90) [com.oracle.weblogic.deploy.jar:12.2.1.2]
at weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:265) [com.oracle.weblogic.deploy.jar:12.2.1.2]
at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:481) [com.oracle.weblogic.deploy.jar:12.2.1.2]
at weblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(DeploymentAdapter.java:53) [com.oracle.weblogic.deploy.jar:12.2.1.2]
at weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:202) [com.oracle.weblogic.deploy.jar:12.2.1.2]
at weblogic.management.deploy.internal.AppTransition$2.transitionApp(AppTransition.java:52) [com.oracle.weblogic.deploy.jar:12.2.1.2]
at weblogic.management.deploy.internal.ConfiguredDeployments$2.doItem(ConfiguredDeployments.java:684) [com.oracle.weblogic.deploy.jar:12.2.1.2]
at weblogic.management.deploy.internal.parallel.BucketInvoker.invoke(BucketInvoker.java:138) [com.oracle.weblogic.deploy.jar:12.2.1.2]
at weblogic.management.deploy.internal.ConfiguredDeployments.transitionAppsParallel(ConfiguredDeployments.java:692) [com.oracle.weblogic.deploy.jar:12.2.1.2]
at weblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:341) [com.oracle.weblogic.deploy.jar:12.2.1.2]
at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:203) [com.oracle.weblogic.deploy.jar:12.2.1.2]
at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:207) [com.oracle.weblogic.deploy.jar:12.2.1.2]
at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:129) [com.oracle.weblogic.deploy.jar:12.2.1.2]
at weblogic.server.AbstractServerService.postConstruct(AbstractServerService.java:76) [com.bea.core.weblogic.lifecycle.jar:12.2.1.2]
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source) ~[na:na]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_77]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_77]
at org.glassfish.hk2.utilities.reflection.ReflectionHelper.invoke(ReflectionHelper.java:1262) [org.glassfish.hk2.hk2-utils.jar:na]
at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:332) [org.glassfish.hk2.hk2-locator.jar:na]
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:374) [org.glassfish.hk2.hk2-locator.jar:na]
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:471) [org.glassfish.hk2.hk2-locator.jar:na]
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:232) [org.glassfish.hk2.hk2-runlevel.jar:na]
at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:85) [org.glassfish.hk2.hk2-runlevel.jar:na]
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2020) [org.glassfish.hk2.hk2-locator.jar:na]
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:114) [org.glassfish.hk2.hk2-locator.jar:na]
at org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:693) [org.glassfish.hk2.hk2-locator.jar:na]
at org.jvnet.hk2.internal.ThreeThirtyResolver.resolve(ThreeThirtyResolver.java:78) [org.glassfish.hk2.hk2-locator.jar:na]
at org.jvnet.hk2.internal.ClazzCreator.resolve(ClazzCreator.java:211) [org.glassfish.hk2.hk2-locator.jar:na]
at org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:234) [org.glassfish.hk2.hk2-locator.jar:na]
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:357) [org.glassfish.hk2.hk2-locator.jar:na]
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:471) [org.glassfish.hk2.hk2-locator.jar:na]
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:232) [org.glassfish.hk2.hk2-runlevel.jar:na]
at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:85) [org.glassfish.hk2.hk2-runlevel.jar:na]
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2020) [org.glassfish.hk2.hk2-locator.jar:na]
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:114) [org.glassfish.hk2.hk2-locator.jar:na]
at org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:693) [org.glassfish.hk2.hk2-locator.jar:na]
at org.jvnet.hk2.internal.ThreeThirtyResolver.resolve(ThreeThirtyResolver.java:78) [org.glassfish.hk2.hk2-locator.jar:na]
at org.jvnet.hk2.internal.ClazzCreator.resolve(ClazzCreator.java:211) [org.glassfish.hk2.hk2-locator.jar:na]
at org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:234) [org.glassfish.hk2.hk2-locator.jar:na]
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:357) [org.glassfish.hk2.hk2-locator.jar:na]
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:471) [org.glassfish.hk2.hk2-locator.jar:na]
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:232) [org.glassfish.hk2.hk2-runlevel.jar:na]
at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:85) [org.glassfish.hk2.hk2-runlevel.jar:na]
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2020) [org.glassfish.hk2.hk2-locator.jar:na]
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:114) [org.glassfish.hk2.hk2-locator.jar:na]
at org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:693) [org.glassfish.hk2.hk2-locator.jar:na]
at org.jvnet.hk2.internal.ThreeThirtyResolver.resolve(ThreeThirtyResolver.java:78) [org.glassfish.hk2.hk2-locator.jar:na]
at org.jvnet.hk2.internal.ClazzCreator.resolve(ClazzCreator.java:211) [org.glassfish.hk2.hk2-locator.jar:na]
at org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:234) [org.glassfish.hk2.hk2-locator.jar:na]
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:357) [org.glassfish.hk2.hk2-locator.jar:na]
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:471) [org.glassfish.hk2.hk2-locator.jar:na]
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:232) [org.glassfish.hk2.hk2-runlevel.jar:na]
at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:85) [org.glassfish.hk2.hk2-runlevel.jar:na]
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2020) [org.glassfish.hk2.hk2-locator.jar:na]
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:114) [org.glassfish.hk2.hk2-locator.jar:na]
at org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:693) [org.glassfish.hk2.hk2-locator.jar:na]
at org.jvnet.hk2.internal.ThreeThirtyResolver.resolve(ThreeThirtyResolver.java:78) [org.glassfish.hk2.hk2-locator.jar:na]
at org.jvnet.hk2.internal.ClazzCreator.resolve(ClazzCreator.java:211) [org.glassfish.hk2.hk2-locator.jar:na]
at org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:234) [org.glassfish.hk2.hk2-locator.jar:na]
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:357) [org.glassfish.hk2.hk2-locator.jar:na]
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:471) [org.glassfish.hk2.hk2-locator.jar:na]
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:232) [org.glassfish.hk2.hk2-runlevel.jar:na]
at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:85) [org.glassfish.hk2.hk2-runlevel.jar:na]
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2020) [org.glassfish.hk2.hk2-locator.jar:na]
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:114) [org.glassfish.hk2.hk2-locator.jar:na]
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:88) [org.glassfish.hk2.hk2-locator.jar:na]
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:1213) [org.glassfish.hk2.hk2-runlevel.jar:na]
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:1144) [org.glassfish.hk2.hk2-runlevel.jar:na]
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:666) [com.bea.core.weblogic.workmanager.jar:12.2.1.2]
at weblogic.invocation.ComponentInvocationContextManager._runAs(ComponentInvocationContextManager.java:348) [com.bea.core.utils.full.jar:12.2.1.2]
at weblogic.invocation.ComponentInvocationContextManager.runAs(ComponentInvocationContextManager.java:333) [com.bea.core.utils.full.jar:12.2.1.2]
at weblogic.work.LivePartitionUtility.doRunWorkUnderContext(LivePartitionUtility.java:54) [com.oracle.weblogic.work.jar:12.2.1.2]
at weblogic.work.PartitionUtility.runWorkUnderContext(PartitionUtility.java:41) [com.bea.core.weblogic.workmanager.jar:12.2.1.2]
at weblogic.work.SelfTuningWorkManagerImpl.runWorkUnderContext(SelfTuningWorkManagerImpl.java:640) [com.bea.core.weblogic.workmanager.jar:12.2.1.2]
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:406) [com.bea.core.weblogic.workmanager.jar:12.2.1.2]
at weblogic.work.ExecuteThread.run(ExecuteThread.java:346) [com.bea.core.weblogic.workmanager.jar:12.2.1.2]
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'httpPutFormContentFilter' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.web.servlet.filter.OrderedHttpPutFormContentFilter]: Factory method 'httpPutFormContentFilter' threw exception; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.fasterxml.jackson.datatype.jsr310.JavaTimeModule]: Constructor threw exception; nested exception is java.lang.IllegalAccessError: tried to access method com.fasterxml.jackson.databind.ser.std.StdSerializer.<init>(Ljava/lang/Class;)V from class com.fasterxml.jackson.datatype.jsr310.JavaTimeModule
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:587) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1250) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1099) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:502) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:312) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:310) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:205) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.boot.web.servlet.ServletContextInitializerBeans.getOrderedBeansOfType(ServletContextInitializerBeans.java:226) ~[spring-boot-2.0.0.RELEASE.jar:2.0.0.RELEASE]
at org.springframework.boot.web.servlet.ServletContextInitializerBeans.addAsRegistrationBean(ServletContextInitializerBeans.java:182) ~[spring-boot-2.0.0.RELEASE.jar:2.0.0.RELEASE]
at org.springframework.boot.web.servlet.ServletContextInitializerBeans.addAsRegistrationBean(ServletContextInitializerBeans.java:177) ~[spring-boot-2.0.0.RELEASE.jar:2.0.0.RELEASE]
at org.springframework.boot.web.servlet.ServletContextInitializerBeans.addAdaptableBeans(ServletContextInitializerBeans.java:159) ~[spring-boot-2.0.0.RELEASE.jar:2.0.0.RELEASE]
at org.springframework.boot.web.servlet.ServletContextInitializerBeans.<init>(ServletContextInitializerBeans.java:80) ~[spring-boot-2.0.0.RELEASE.jar:2.0.0.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.getServletContextInitializerBeans(ServletWebServerApplicationContext.java:250) ~[spring-boot-2.0.0.RELEASE.jar:2.0.0.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.selfInitialize(ServletWebServerApplicationContext.java:237) ~[spring-boot-2.0.0.RELEASE.jar:2.0.0.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:183) ~[spring-boot-2.0.0.RELEASE.jar:2.0.0.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:152) ~[spring-boot-2.0.0.RELEASE.jar:2.0.0.RELEASE]
... 107 common frames omitted
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.web.servlet.filter.OrderedHttpPutFormContentFilter]: Factory method 'httpPutFormContentFilter' threw exception; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.fasterxml.jackson.datatype.jsr310.JavaTimeModule]: Constructor threw exception; nested exception is java.lang.IllegalAccessError: tried to access method com.fasterxml.jackson.databind.ser.std.StdSerializer.<init>(Ljava/lang/Class;)V from class com.fasterxml.jackson.datatype.jsr310.JavaTimeModule
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:579) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
... 124 common frames omitted
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.fasterxml.jackson.datatype.jsr310.JavaTimeModule]: Constructor threw exception; nested exception is java.lang.IllegalAccessError: tried to access method com.fasterxml.jackson.databind.ser.std.StdSerializer.<init>(Ljava/lang/Class;)V from class com.fasterxml.jackson.datatype.jsr310.JavaTimeModule
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:182) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:124) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.http.converter.json.Jackson2ObjectMapperBuilder.registerWellKnownModulesIfAvailable(Jackson2ObjectMapperBuilder.java:749) ~[spring-web-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.http.converter.json.Jackson2ObjectMapperBuilder.configure(Jackson2ObjectMapperBuilder.java:624) ~[spring-web-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.http.converter.json.Jackson2ObjectMapperBuilder.build(Jackson2ObjectMapperBuilder.java:608) ~[spring-web-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.http.converter.json.MappingJackson2HttpMessageConverter.<init>(MappingJackson2HttpMessageConverter.java:59) ~[spring-web-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.http.converter.support.AllEncompassingFormHttpMessageConverter.<init>(AllEncompassingFormHttpMessageConverter.java:74) ~[spring-web-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.web.filter.HttpPutFormContentFilter.<init>(HttpPutFormContentFilter.java:64) ~[spring-web-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.boot.web.servlet.filter.OrderedHttpPutFormContentFilter.<init>(OrderedHttpPutFormContentFilter.java:29) ~[spring-boot-2.0.0.RELEASE.jar:2.0.0.RELEASE]
at org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration.httpPutFormContentFilter(WebMvcAutoConfiguration.java:163) ~[spring-boot-autoconfigure-2.0.0.RELEASE.jar:2.0.0.RELEASE]
at org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration$$EnhancerBySpringCGLIB$$a5de70f4.CGLIB$httpPutFormContentFilter$0(<generated>) ~[spring-boot-autoconfigure-2.0.0.RELEASE.jar:2.0.0.RELEASE]
at org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration$$EnhancerBySpringCGLIB$$a5de70f4$$FastClassBySpringCGLIB$$8ac67dc3.invoke(<generated>) ~[spring-boot-autoconfigure-2.0.0.RELEASE.jar:2.0.0.RELEASE]
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) ~[spring-core-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:361) ~[spring-context-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration$$EnhancerBySpringCGLIB$$a5de70f4.httpPutFormContentFilter(<generated>) ~[spring-boot-autoconfigure-2.0.0.RELEASE.jar:2.0.0.RELEASE]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_77]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_77]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_77]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_77]
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
... 125 common frames omitted
Caused by: java.lang.IllegalAccessError: tried to access method com.fasterxml.jackson.databind.ser.std.StdSerializer.<init>(Ljava/lang/Class;)V from class com.fasterxml.jackson.datatype.jsr310.JavaTimeModule
at com.fasterxml.jackson.datatype.jsr310.JavaTimeModule.<init>(JavaTimeModule.java:168) ~[jackson-datatype-jsr310-2.9.4.jar:2.9.4]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_77]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_77]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_77]
at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[na:1.8.0_77]
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:170) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
... 144 common frames omitted
但是当我将弹簧启动版本更改为1.5.10.RELEASE一切正常!
答案 0 :(得分:0)
此回复可能会晚,但我希望它可以对其他人有所帮助。
根据我在堆栈跟踪中看到的内容,似乎您缺少com.fasterxml.jackson.datatype依赖项。
尝试使用最新的com.fasterxml.jackson.core / jackson-datatype。
如:
facet_wrap(~BUILDING_AGE, ncol = 2, scales = 'free')