gpt4 book ai didi

java - Weblogic 配置错误 - 未找到 Java 类、Java 类型类和 MIME 媒体类型 application/json 的消息正文编写器

转载 作者:行者123 更新时间:2023-12-01 12:20:41 25 4
gpt4 key购买 nike

我的应用程序在 Weblogic 服务器上运行时遇到问题。奇怪的是,该应用程序在其他 3 个 JVM(6 个托管服务器)上运行良好。有一个 JVM 和 2 个托管服务器都给出了此错误:

####<Oct 31, 2014 3:58:43 PM EDT> <Notice> <StdErr> <physaddress> <managedServer> <[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1414
785523072> <BEA-000000> <Oct 31, 2014 3:58:43 PM com.sun.jersey.spi.container.ContainerResponse write
SEVERE: The registered message body writers compatible with the MIME media type are:
*/* ->
com.sun.jersey.core.impl.provider.entity.FormProvider
com.sun.jersey.core.impl.provider.entity.MimeMultipartProvider
com.sun.jersey.core.impl.provider.entity.StringProvider
com.sun.jersey.core.impl.provider.entity.ByteArrayProvider
com.sun.jersey.core.impl.provider.entity.FileProvider
com.sun.jersey.core.impl.provider.entity.InputStreamProvider
com.sun.jersey.core.impl.provider.entity.DataSourceProvider
com.sun.jersey.core.impl.provider.entity.XMLJAXBElementProvider$General
com.sun.jersey.core.impl.provider.entity.ReaderProvider
com.sun.jersey.core.impl.provider.entity.DocumentProvider
com.sun.jersey.core.impl.provider.entity.StreamingOutputProvider
com.sun.jersey.core.impl.provider.entity.SourceProvider$SourceWriter
com.sun.jersey.server.impl.template.ViewableMessageBodyWriter
com.sun.jersey.core.impl.provider.entity.XMLRootElementProvider$General
com.sun.jersey.core.impl.provider.entity.XMLListElementProvider$General>
####<Oct 31, 2014 3:58:43 PM EDT> <Notice> <StdErr> <physaddress> <managedServer> <[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1414785523072> <BEA-000000> <Oct 31, 2014 3:58:43 PM com.sun.jersey.spi.container.ContainerResponse logException
SEVERE: Mapped exception to response: 500 (Internal Server Error)
javax.ws.rs.WebApplicationException: com.sun.jersey.api.MessageException: A message body writer for Java class xVO, and Java type class xVO, and MIME media type application/json was not found
at com.sun.jersey.spi.container.ContainerResponse.write(ContainerResponse.java:285)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1479)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1391)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1381)
at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:716)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:184)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3741)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3705)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2282)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2181)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1491)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
Caused by: com.sun.jersey.api.MessageException: A message body writer for Java class xVO, and Java type class xVO, and MIME media type application/json was not found
... 21 more>

我不确定还有哪些其他信息会有所帮助。服务器工作正常。我的想法是,有某种配置更改导致事情失败,但我不确定它是什么。同样,该应用程序在其他 3 个 weblogic 实例上运行良好。此特定实例无法正常工作,我们不确定原因。

如有任何帮助,我们将不胜感激。我很乐意根据要求提供更多信息。谢谢!

最佳答案

Weblogic 在极少数情况下会在暂存目录中保留旧的部署文件(当然这也取决于文件的部署方式)。一般来说,如果存在与一台 weblogic 服务器相关的问题,而不是另一台 weblogic 服务器,请停止托管服务器,删除 tmp、stage 或将其移动到新目录,然后重新启动托管服务器,使托管服务器拉取最新文件并解压缩( stage 保留 war/ear 文件,tmp 保留解压版本)。这通常可以解决问题。

关于java - Weblogic 配置错误 - 未找到 Java 类、Java 类型类和 MIME 媒体类型 application/json 的消息正文编写器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26683225/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com