在我的Web项目中,我正在使用以下代码
response = target.request().accept(MediaType.APPLICATION_XML_TYPE).header(USERTOKEN, request.getTgtToken()).post(Entity.entity(request.getXmlObject(),MediaType.APPLICATION_XML_TYPE));
并且在将war部署到本地计算机Jboss服务器时不会产生任何问题。但是,当我试图进入服务器JBOSS机器时,我却遇到了以下异常
19:30:59,737 ERROR
[org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/sure-admin-web].[Faces
Servlet]] (http-/0.0.0.0:8080-5) JBWEB000236: Servlet.service() for
servlet Faces Servlet threw exception: java.lang.IllegalAccessError:
tried to access class javax.ws.rs.core.MediaType$2 from class
javax.ws.rs.core.MediaType
at javax.ws.rs.core.MediaType.<init>(MediaType.java:271) [javax.ws.rs-api-2.1.jar:2.1]
at javax.ws.rs.core.MediaType.<init>(MediaType.java:262) [javax.ws.rs-api-2.1.jar:2.1]
at javax.ws.rs.core.MediaType.<clinit>(MediaType.java:81) [javax.ws.rs-api-2.1.jar:2.1]
at com.alu.ipprd.mdf.soa.portal.integration.restapi.MdoRestManagerImpl.fetchData(MdoRestManagerImpl.java:53)
[mdf-portal-integration-0.0.1-SNAPSHOT.jar:]
at com.alu.ipprd.bsm.soa.portal.business.sure.TemplatesWorkOrder.processBusinessLogic(TemplatesWorkOrder.java:205)
[mdf-portal-business-0.0.1-SNAPSHOT.jar:]
at com.alu.ipprd.bsm.soa.portal.business.sure.TemplatesWorkOrder.processBusinessLogic(TemplatesWorkOrder.java:77)
[mdf-portal-business-0.0.1-SNAPSHOT.jar:]
at com.alu.ipprd.bsm.soa.portal.common.business.BaseWorkOrder.submitWorkOrder(BaseWorkOrder.java:75)
[mdf-portal-common-0.0.1-SNAPSHOT.jar:]
at com.alu.ipprd.bsm.soa.portal.common.business.BaseWorkOrder.submitWorkOrder(BaseWorkOrder.java:34)
[mdf-portal-common-0.0.1-SNAPSHOT.jar:]
at com.alu.ipprd.bsm.soa.portal.bean.template.LinkCatalogCreateBean.fetchLinkSpecification(LinkCatalogCreateBean.java:2045)
[classes:]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_162]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [rt.jar:1.8.0_162]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [rt.jar:1.8.0_162]
at java.lang.reflect.Method.invoke(Unknown Source) [rt.jar:1.8.0_162]
at org.apache.el.parser.AstValue.invoke(AstValue.java:258) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:278)
[jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
[jsf-impl-2.1.28.redhat-8.jar:2.1.28.redhat-8]
at com.sun.faces.facelets.tag.jsf.core.DeclarativeSystemEventListener.processEvent(EventHandler.java:128)
[jsf-impl-2.1.28.redhat-8.jar:2.1.28.redhat-8]
at javax.faces.component.UIComponent$ComponentSystemEventListenerAdapter.processEvent(UIComponent.java:2526)
[jboss-jsf-api_2.1_spec-2.1.28.Final-redhat-1.jar:2.1.28.Final-redhat-1]
at javax.faces.event.SystemEvent.processListener(SystemEvent.java:106)
[jboss-jsf-api_2.1_spec-2.1.28.Final-redhat-1.jar:2.1.28.Final-redhat-1]
at com.sun.faces.application.ApplicationImpl.processListeners(ApplicationImpl.java:2166)
[jsf-impl-2.1.28.redhat-8.jar:2.1.28.redhat-8]
at com.sun.faces.application.ApplicationImpl.invokeComponentListenersFor(ApplicationImpl.java:2111)
[jsf-impl-2.1.28.redhat-8.jar:2.1.28.redhat-8]
at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:289)
[jsf-impl-2.1.28.redhat-8.jar:2.1.28.redhat-8]
at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:247)
[jsf-impl-2.1.28.redhat-8.jar:2.1.28.redhat-8]
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:107)
[jsf-impl-2.1.28.redhat-8.jar:2.1.28.redhat-8]
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) [jsf-impl-2.1.28.redhat-8.jar:2.1.28.redhat-8]
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
[jsf-impl-2.1.28.redhat-8.jar:2.1.28.redhat-8]
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
[jboss-jsf-api_2.1_spec-2.1.28.Final-redhat-1.jar:2.1.28.Final-redhat-1]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295)
[jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
[jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
at com.alu.ipprd.bsm.soa.portal.edgefilter.EdgeFilter.doFilter(EdgeFilter.java:29)
[classes:]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
[jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
[jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
at org.apache.catalina.core.Stand