如何在JAX-RS应用程序中更改Jackson版本(WebSphere Liberty)(How to change Jackson version in JAX-RS app (WebSphere Liberty))
我将一个JAX-RS应用程序从WebSphere 8.0迁移到WebSphere Liberty 8.5.5。
在WebSphere 8.0中,Jackson由WebSphere提供。 我可以在
jackson-core-asl-1.9.12.jar
找到jackson-core-asl-1.9.12.jar
,jackson-jaxrs-1.9.12.jar
,jackson-mapper-asl-1.9.12.jar
和jackson-xc-1.9.12.jar
文件AppServer\plugins\
目录。在新的应用程序服务器(WebSphere Liberty)中,出现以下异常:
org.codehaus.jackson.map.exc.UnrecognizedPropertyException: Unrecognized field "myPropertyName"
。 我认为发生这种异常是因为序列化类中的注释@JsonIgnoreProperties(ignoreUnknown = true)
不起作用。 我的猜测是,它发生是因为WebSphere Liberty 8.5.5提供了一个老版本的Jackson。我试图用我的应用程序部署我需要的Jackson版本,但它没有帮助(我仍然有例外)。 我如何让WebSphere Liberty使用我需要的Jackson版本?
I am migrating a JAX-RS application from WebSphere 8.0 to WebSphere Liberty 8.5.5.
In WebSphere 8.0, Jackson was provided by WebSphere. I can find
jackson-core-asl-1.9.12.jar
,jackson-jaxrs-1.9.12.jar
,jackson-mapper-asl-1.9.12.jar
andjackson-xc-1.9.12.jar
files in theAppServer\plugins\
directory.In the new application server (WebSphere Liberty), I get the following exception:
org.codehaus.jackson.map.exc.UnrecognizedPropertyException: Unrecognized field "myPropertyName"
. I think that this exception happens because the annotation@JsonIgnoreProperties(ignoreUnknown = true)
on the serialized classes does not work. My guess is that it happens because WebSphere Liberty 8.5.5 provides an older version of Jackson.I tried to deploy the version of Jackson which I need with my application, but it did not help (I still have exceptions). How can I make WebSphere Liberty use the version of Jackson that I need?
原文:https://stackoverflow.com/questions/39388651
最满意答案
在IntelliJ中的应用程序的运行配置中未选中JavasScript调试器复选框。
The JavasScript debugger checkbox was not checked in run configuration for the application in IntelliJ.
相关问答
更多-
GWT开发模式性能问题?(GWT dev mode performance problems?)[2020-11-19]
您可以尝试通过以下方式增加PermGen内存大小:-XX:MaxPermSize = 256m。 它应该有所帮助。 我遇到了同样的问题,分析了Visual VM的用尽情况,结果发现PermGen是问题所在。 当然-Xmx也有帮助。 You can try to increase PermGen memory size via: -XX:MaxPermSize=256m. It should help. I had the same problem, analyzed what's becoming exha ... -
SuperDevMode为JavaScript提供渐进式编译,因此不需要浏览器插件。 这意味着SuperDevMode适用于所有平台上的所有浏览器(包括您的手机!),当“经典”DevMode目前仅适用于桌面Windows上的Internet Explorer时(或多或少;您仍然可以使用一年前版本的Firefox,或者一个6个月大的Chromium版本) SuperDevMode provides incremental compilation to JavaScript, and therefore doe ...
-
在IntelliJ中的应用程序的运行配置中未选中JavasScript调试器复选框。 The JavasScript debugger checkbox was not checked in run configuration for the application in IntelliJ.
-
IntelliJ 14.0.2打破了GWT super dev模式代码服务器(IntelliJ 14.0.2 breaks GWT super dev mode code server)[2023-07-26]
原来,我的本地maven缓存中没有更新jetty服务器。 当我删除并让maven再次下载它,它工作! It turned out that jetty server was not updated in my local maven cache. When I removed in and let maven download it again, it worked!! -
在GWT 2.5中添加了SuperDevMode; 2.2你被迫使用传统的DevMode,浏览器插件,这意味着Internet Explorer或旧的Firefox。 After a few hours of trying a bunch of different things (updated IDE, change JDK, recreate project, etc) the "culprit" turned out to be my VCS: I copied a colleague's local ...
-
GWT开发模式应用程序,显示来自GWT dev的调试消息(GWT development mode application, display debug messages from GWT dev)[2021-12-17]
我正在使用gwt-maven-plugin。 您可以在配置设置中添加“logLevel = DEBUG”以增加GWT开发模式的日志记录。 I was using the gwt-maven-plugin. You can add 'logLevel=DEBUG' to the configuration settings to increase the logging for the GWT development mode. -
有一个像GWT.isProdMode()这样的公共访问器的公开问题 。 同时,如果您确实需要知道,则可以在
或 规则中使用名为superdevmode的延迟绑定属性。 There's an open issue about having a public accessor like GWT.isProdMode(). In the mean time, if you really need to know, there's a deferred bind ... -
我没有找到任何文档,但我成功开始了。 以下是我必须做的事情: 实际上我根本不需要更改我的启动器/开发模式代码。 必须修改Eclipse * .launch文件以添加-nosuperDevMode参数。 由于其自己的嵌入式容器与我的新版本之间存在冲突,我无法让super dev模式在其中工作,我不想花时间解决这个问题。 使用以下参数创建一种独立启动com.google.gwt.dev.codeserver.CodeServer的新方法:-bindAddress [same-address-as-for-mai ...
-
您应该将此依赖项添加到您的pom.xml文件中: gwt-dev (gwt-dev具有所需的所有依赖项) 如果您创建一个新的GWT 2.8.0模块,您可以检查它在pom文件中包含gwt-dev依赖项。 You should add this dependency to your pom.xml file : gwt-dev (gwt-dev has all the dependencies needed) If you create a new GWT 2.8.0 module, you can check ...
-
Intellij会对Maven pom.xml文件中的更改做出反应。 Maven不会对IntelliJ项目模块设置的更改做出反应。 你应该遵循的步骤是 关闭IntelliJ 在命令shell中,克隆您的Github存储库。 使用IntelliJ外部的编辑器(如VI或Notepad),在根目录中创建一个pom.xml 。 更好的是,使用Maven Archetype生成你的pom.xml 。 现在打开IntelliJ。 从现有来源中选择文件 , 新建 , 项目 。 导航到您的pom.xml并按照提示操作。 我 ...