在我的STS应用程序中实现Apache Ivy后收到以下控制台错误。
14:56:19,987 WARN XmlWebApplicationContext:544 - Exception encountered during context initialization - cancelling refresh attempt
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter#0': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter]: Constructor threw exception; nested exception is java.lang.NoSuchMethodError: com.fasterxml.jackson.core.JsonFactory.requiresPropertyOrdering()Z
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1105)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1050)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:305)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:301)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:196)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:772)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:834)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:537)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:446)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:328)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4939)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter]: Constructor threw exception; nested exception is java.lang.NoSuchMethodError: com.fasterxml.jackson.core.JsonFactory.requiresPropertyOrdering()Z
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:163)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:89)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1098)
... 22 more
Caused by: java.lang.NoSuchMethodError: com.fasterxml.jackson.core.JsonFactory.requiresPropertyOrdering()Z
at com.fasterxml.jackson.databind.ObjectMapper.<init>(ObjectMapper.java:445)
at com.fasterxml.jackson.databind.ObjectMapper.<init>(ObjectMapper.java:366)
at org.springframework.http.converter.json.Jackson2ObjectMapperBuilder.build(Jackson2ObjectMapperBuilder.java:538)
at org.springframework.http.converter.json.MappingJackson2HttpMessageConverter.<init>(MappingJackson2HttpMessageConverter.java:56)
at org.springframework.http.converter.support.AllEncompassingFormHttpMessageConverter.<init>(AllEncompassingFormHttpMessageConverter.java:61)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.<init>(RequestMappingHandlerAdapter.java:187)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:147)
... 24 more
14:56:20,018 INFO EhCacheManagerFactoryBean:181 - Shutting down EhCache CacheManager
14:56:20,044 ERROR ContextLoader:353 - Context initialization failed
我添加了以下jar文件:
<dependency org="org.hibernate" name="hibernate-core" rev="5.0.11.Final" conf="default"/>
<dependency org="org.springframework" name="spring-core" rev="4.2.1.RELEASE" conf="default"/>
<dependency org="org.springframework" name="spring-web" rev="4.2.1.RELEASE" conf="default"/>
<dependency org="org.springframework" name="spring-orm" rev="4.2.1.RELEASE" conf="default"/>
<dependency org="org.springframework" name="spring-context" rev="4.2.1.RELEASE" conf="default"/>
<dependency org="org.springframework" name="spring-context-support" rev="4.2.1.RELEASE" conf="default"/>
<dependency org="org.springframework" name="spring-test" rev="4.2.1.RELEASE" conf="default"/>
<dependency org="org.springframework" name="spring-oxm" rev="4.2.1.RELEASE" conf="default"/>
<dependency org="org.springframework" name="spring-webmvc" rev="4.2.1.RELEASE" conf="default"/>
<dependency org="org.springframework" name="spring-webmvc-portlet" rev="4.2.1.RELEASE" conf="default"/>
<dependency org="org.springframework" name="spring-aspects" rev="4.2.1.RELEASE" conf="default"/>
<dependency org="joda-time" name="joda-time" rev="2.8.2" conf="default"/>
<dependency org="org.apache.shiro" name="shiro-all" rev="1.2.6" conf="default"/>
<dependency org="org.apache.poi" name="poi" rev="3.14" conf ="default" />
<dependency org="org.apache.poi" name="poi-ooxml" rev="3.14" conf ="default" />
<dependency org="org.apache.commons" name="commons-exec" rev="1.3" conf="default"/>
<dependency org="org.apache.geronimo.specs" name="geronimo-jta_1.1_spec" rev="1.1.1" conf="default"/>
<dependency org="javax.el" name="javax.el-api" rev="2.2.5" conf="default"/>
<dependency org="javax.jdo" name="jdo-api" rev="3.0.1" conf="default"/>
<dependency org="javax.servlet.jsp.jstl" name="jstl-api" rev="1.2" conf="default"/>
<dependency org="javax.mail" name="mail" rev="1.4.7" conf="default"/>
<dependency org="javax.inject" name="javax.inject" rev="1" conf="default"/>
<dependency org="org.slf4j" name="slf4j-api" rev="1.7.12" conf="default"/>
<dependency org="org.slf4j" name="slf4j-log4j12" rev="1.7.12" conf="default"/>
<dependency org="org.primefaces" name="primefaces" rev="5.1" conf="default"/>
<dependency org="com.sun.faces" name="jsf-api" rev="2.1.29" conf="default"/>
<dependency org="com.sun.faces" name="jsf-impl" rev="2.1.29" conf="default"/>
<dependency org="com.google.api-client" name="google-api-client" rev="1.20.0" conf ="default" />
<dependency org="com.google.apis" name="google-api-services-calendar" rev="v3-rev77-1.17.0-rc" conf ="default" />
<dependency org="com.google.code.gson" name="gson" rev="2.3.1" conf="default"/>
<dependency org="org.mnode.ical4j" name="ical4j" rev="1.0.5" conf ="default" />
<dependency org="net.sourceforge.jexcelapi" name="jxl" rev="2.6.12" conf="default"/>
<dependency org="org.quartz-scheduler" name="quartz" rev="2.2.3" conf="default"/>
<dependency org="org.seleniumhq.selenium" name="selenium-java" rev="2.53.1"/>
<dependency org="com.ocpsoft" name="prettyfaces-jsf2" rev="3.3.3" conf="default"/>
<dependency org="org.mindrot" name="jbcrypt" rev="0.3m" conf="default"/>
<dependency org="org.omnifaces" name="omnifaces" rev="1.6.3" conf="default"/>
<dependency org="commons-collections" name="commons-collections" rev="3.2.2" conf="default"/>
<dependency org="org.mockito" name="mockito-all" rev="1.10.19" conf="default"/>
<dependency org="org.xerial" name="sqlite-jdbc" rev="3.8.10.1" conf="default"/>
从您提供的堆栈跟踪中,我看到以下错误:
<代码>java。lang.NoSuchMethodError:com。fasterxml。杰克逊。果心JsonFactory。requirePropertyOrdering()
在pom中添加以下依赖项,然后重试。
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>${jackson.version}</version>
</dependency>
注:
我刚刚在各种版本的jackson core jars中检查了JsonFactory的源代码。我发现方法requirepropertyordering是在2.3.0版本中首次添加的。因此,请确保您使用的版本至少为2.3.0。
我正在将一个项目从GF 3.1.2(Eclipselink2.3.2)迁移到Payara 4.1.1.162(Eclipselink2.6.2)。 在部署war存档时,我遇到以下异常:
我们正在从WAS 8.5(使用OpenJPA2.0,Hibernate4.2.x[last JPA2.0version])迁移到WAS 9.0(使用eclipseLink[last JPA2.1version])),除了一件事之外,迁移是成功的。 为了在服务器上多次部署同一个应用程序并针对不同的数据库运行,我们在中定义了一个变量引用: 对于WAS8.5/openJPA来说,这一切都很好。但是在使用
当我尝试启动我的应用程序时,我的 MainActivity 在 oncreate() 方法中的“setContentView(R.layout.activity_main);” 中抛出此错误: 这个错误出现在迁移到androidx之后,经过进一步检查,我注意到Bottomnavigationview类中的导入语句已经过时(没有androidx格式,而是旧格式)。Bottomnavigationvi
我正在将一个相当大的monolith spring boot应用程序从Java 8迁移到Java 11。在修复了删除的JEE模块后,由于新引入的模块系统概念的强封装,我遇到了几个反射错误。 启动应用程序可以使用Java11,但是,通过Maven执行干净的安装不起作用。由于反射和强封装,由于无法访问对象异常导致了几个测试失败。 我已经尝试了那篇文章中建议的解决方案如何在Java9上解决不可用对象异常
我有一个飞行路线例外: 我在文档和论坛上查找,但没有找到这个异常的含义。请有人告诉我这些异常的原因是什么!谢谢
我正在使用Android Studio 3.2 Canary 14,并试图迁移现有项目以使用AndroidX。从https://developer.android.com/topic/libraries/support-library/androidx-rn听起来,我必须设置(这是在选择“重构到AndroidX…”选项时自动完成的)。我还将目标API级别更新为28。还有人看到这个问题吗? 未能转换