- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在获取 ClassCastException
。这两个类来自不同的 jar,但是JettyContinuationProviderFactory 正在实现 ContinuationProviderFactory 类。
Caused by: javax.xml.ws.WebServiceException: java.lang.ClassCastException: Cannot cast org.apache.cxf.transport.http_jetty.continuations.JettyContinuationProviderFactory to org.apache.cxf.transport.http.ContinuationProviderFactory
at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:371) [cxf-rt-frontend-jaxws-2.7.14.jar:2.7.14]
at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:251) [cxf-rt-frontend-jaxws-2.7.14.jar:2.7.14]
at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:539) [cxf-rt-frontend-jaxws-2.7.14.jar:2.7.14]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_80]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_80]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_80]
at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_80]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1612) [spring-beans-3.2.0.RELEASE.jar:3.2.0.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1553) [spring-beans-3.2.0.RELEASE.jar:3.2.0.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1483) [spring-beans-3.2.0.RELEASE.jar:3.2.0.RELEASE]
... 23 more
Caused by: java.lang.ClassCastException: Cannot cast org.apache.cxf.transport.http_jetty.continuations.JettyContinuationProviderFactory to org.apache.cxf.transport.http.ContinuationProviderFactory
at java.lang.Class.cast(Class.java:3186) [rt.jar:1.7.0_80]
at org.apache.cxf.bus.extension.ExtensionManagerImpl.getBeanOfType(ExtensionManagerImpl.java:326) [cxf-rt-core-2.7.14.jar:2.7.14]
at org.apache.cxf.bus.spring.SpringBeanLocator.getBeanOfType(SpringBeanLocator.java:138) [cxf-rt-core-2.7.14.jar:2.7.14]
at org.apache.cxf.bus.CXFBusImpl.getExtension(CXFBusImpl.java:107) [cxf-rt-core-2.7.14.jar:2.7.14]
at org.apache.cxf.transport.http.AbstractHTTPDestination.initConfig(AbstractHTTPDestination.java:519) [cxf-rt-transports-http-2.7.14.jar:2.7.14]
at org.apache.cxf.transport.http.AbstractHTTPDestination.<init>(AbstractHTTPDestination.java:149) [cxf-rt-transports-http-2.7.14.jar:2.7.14]
at org.apache.cxf.transport.servlet.ServletDestination.<init>(ServletDestination.java:52) [cxf-rt-transports-http-2.7.14.jar:2.7.14]
at org.apache.cxf.transport.servlet.ServletDestinationFactory.createDestination(ServletDestinationFactory.java:33) [cxf-rt-transports-http-2.7.14.jar:2.7.14]
at org.apache.cxf.transport.http.HTTPTransportFactory.getDestination(HTTPTransportFactory.java:305) [cxf-rt-transports-http-2.7.14.jar:2.7.14]
at org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTransportFactory.java:142) [cxf-rt-bindings-soap-2.7.14.jar:2.7.14]
at org.apache.cxf.endpoint.ServerImpl.initDestination(ServerImpl.java:83) [cxf-api-2.7.14.jar:2.7.14]
at org.apache.cxf.endpoint.ServerImpl.<init>(ServerImpl.java:62) [cxf-api-2.7.14.jar:2.7.14]
at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:170) [cxf-rt-frontend-simple-2.7.14.jar:2.7.14]
at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:211) [cxf-rt-frontend-jaxws-2.7.14.jar:2.7.14]
at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:456) [cxf-rt-frontend-jaxws-2.7.14.jar:2.7.14]
at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:334) [cxf-rt-frontend-jaxws-2.7.14.jar:2.7.14]
... 32 more
17:02:35,992 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/cisBusiness]] (ServerService Thread Pool -- 57) JBWEB000287: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'fulFillment': Invocation of init method failed; nested exception is javax.xml.ws.WebServiceException: java.lang.ClassCastException: Cannot cast org.apache.cxf.transport.http_jetty.continuations.JettyContinuationProviderFactory to org.apache.cxf.transport.http.ContinuationProviderFactory
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1486) [spring-beans-3.2.0.RELEASE.jar:3.2.0.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524) [spring-beans-3.2.0.RELEASE.jar:3.2.0.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461) [spring-beans-3.2.0.RELEASE.jar:3.2.0.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295) [spring-beans-3.2.0.RELEASE.jar:3.2.0.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223) [spring-beans-3.2.0.RELEASE.jar:3.2.0.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292) [spring-beans-3.2.0.RELEASE.jar:3.2.0.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) [spring-beans-3.2.0.RELEASE.jar:3.2.0.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:607) [spring-beans-3.2.0.RELEASE.jar:3.2.0.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932) [spring-context-3.2.0.RELEASE.jar:3.2.0.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479) [spring-context-3.2.0.RELEASE.jar:3.2.0.RELEASE]
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:383) [spring-web-3.2.0.RELEASE.jar:3.2.0.RELEASE]
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283) [spring-web-3.2.0.RELEASE.jar:3.2.0.RELEASE]
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112) [spring-web-3.2.0.RELEASE.jar:3.2.0.RELEASE]
at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3339) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3777) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
at org.jboss.as.web.deployment.WebDeploymentService.doStart(WebDeploymentService.java:156) [jboss-as-web-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]
at org.jboss.as.web.deployment.WebDeploymentService.access$000(WebDeploymentService.java:60) [jboss-as-web-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]
at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:93) [jboss-as-web-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_80]
at java.util.concurrent.FutureTask.run(FutureTask.java:262) [rt.jar:1.7.0_80]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_80]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_80]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_80]
at org.jboss.threads.JBossThread.run(JBossThread.java:122)
Caused by: javax.xml.ws.WebServiceException: java.lang.ClassCastException: Cannot cast org.apache.cxf.transport.http_jetty.continuations.JettyContinuationProviderFactory to org.apache.cxf.transport.http.ContinuationProviderFactory
at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:371) [cxf-rt-frontend-jaxws-2.7.14.jar:2.7.14]
at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:251) [cxf-rt-frontend-jaxws-2.7.14.jar:2.7.14]
at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:539) [cxf-rt-frontend-jaxws-2.7.14.jar:2.7.14]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_80]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_80]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_80]
at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_80]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1612) [spring-beans-3.2.0.RELEASE.jar:3.2.0.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1553) [spring-beans-3.2.0.RELEASE.jar:3.2.0.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1483) [spring-beans-3.2.0.RELEASE.jar:3.2.0.RELEASE]
... 23 more
Caused by: java.lang.ClassCastException: Cannot cast org.apache.cxf.transport.http_jetty.continuations.JettyContinuationProviderFactory to org.apache.cxf.transport.http.ContinuationProviderFactory
at java.lang.Class.cast(Class.java:3186) [rt.jar:1.7.0_80]
at org.apache.cxf.bus.extension.ExtensionManagerImpl.getBeanOfType(ExtensionManagerImpl.java:326) [cxf-rt-core-2.7.14.jar:2.7.14]
at org.apache.cxf.bus.spring.SpringBeanLocator.getBeanOfType(SpringBeanLocator.java:138) [cxf-rt-core-2.7.14.jar:2.7.14]
at org.apache.cxf.bus.CXFBusImpl.getExtension(CXFBusImpl.java:107) [cxf-rt-core-2.7.14.jar:2.7.14]
at org.apache.cxf.transport.http.AbstractHTTPDestination.initConfig(AbstractHTTPDestination.java:519) [cxf-rt-transports-http-2.7.14.jar:2.7.14]
at org.apache.cxf.transport.http.AbstractHTTPDestination.<init>(AbstractHTTPDestination.java:149) [cxf-rt-transports-http-2.7.14.jar:2.7.14]
at org.apache.cxf.transport.servlet.ServletDestination.<init>(ServletDestination.java:52) [cxf-rt-transports-http-2.7.14.jar:2.7.14]
at org.apache.cxf.transport.servlet.ServletDestinationFactory.createDestination(ServletDestinationFactory.java:33) [cxf-rt-transports-http-2.7.14.jar:2.7.14]
at org.apache.cxf.transport.http.HTTPTransportFactory.getDestination(HTTPTransportFactory.java:305) [cxf-rt-transports-http-2.7.14.jar:2.7.14]
at org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTransportFactory.java:142) [cxf-rt-bindings-soap-2.7.14.jar:2.7.14]
at org.apache.cxf.endpoint.ServerImpl.initDestination(ServerImpl.java:83) [cxf-api-2.7.14.jar:2.7.14]
at org.apache.cxf.endpoint.ServerImpl.<init>(ServerImpl.java:62) [cxf-api-2.7.14.jar:2.7.14]
at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:170) [cxf-rt-frontend-simple-2.7.14.jar:2.7.14]
at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:211) [cxf-rt-frontend-jaxws-2.7.14.jar:2.7.14]
at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:456) [cxf-rt-frontend-jaxws-2.7.14.jar:2.7.14]
at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:334) [cxf-rt-frontend-jaxws-2.7.14.jar:2.7.14]
... 32 more
我在 Tomcat 中制作了 SOAP Web 服务的演示,运行良好。但是这些错误是在 JBOSS EAP 6 的情况下生成的。任何人都可以提供帮助吗?
最佳答案
这可能是一个类加载问题,您的类路径上可能有 2 个不同的 jar,它们都包含 ContinuationProviderFactory.class
。
代码的不同部分现在可能使用该接口(interface)的不同版本,因此您的 JettyContinuationProviderFactory
现在正在实现一个版本,但您传递 JettyContinuationProviderFactory
实例的方法to 期待其他接口(interface)。
这会产生无法通过强制转换解决的类型冲突,因此会出现此异常。尽管这看起来很愚蠢,但从 JVM 类加载的角度来看,它非常有意义。
它在 Tomcat 上工作的原因是你的类路径可能恰好更干净。解决方案是调查类路径上的哪些 jar 正在提供 ContinuationProviderFactory
并消除重复项。
关于java - ClassCastException 原因,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50967700/
我正在编写一个 mapreduce 应用程序,它接受(键,值)格式的输入并只显示与 reducer 输出相同的数据。 这是示例输入: 1500s 1 1960s 1 Aldus 1 在下面
我不明白,我有一个典型的消息源 content.Language 我可以得到它就像 @Autowire protec
我已经为抽屉导航编写了一个运行良好的程序,但最近我尝试为个人资料图片和 TextView 放置一个 ImageView,之后它给了我一个 ClassCastException。 main_activi
这个问题不太可能帮助任何 future 的访问者;它只与一个小的地理区域、一个特定的时间点或一个非常狭窄的情况有关,这些情况并不普遍适用于互联网的全局受众。为了帮助使这个问题更广泛地适用,visit
@Override public void onPause() { super.onPause(); save(notes.itemSelected); } @Override pub
描述 我正在尝试创建一种自定义语言,我想将词法分析器规则与解析器规则分开。此外,我的目标是将词法分析器和解析器规则进一步划分为特定文件(例如,通用词法分析器规则和关键字规则)。 但我似乎无法让它发挥作
我正在尝试使用以下代码为给定的 Runnable 对象创建代理: public class WorkInvocationHandler implements InvocationHandler {
我有两个非常简单的类,一个扩展了另一个: public class LocationType implements Parcelable { protected int locid =
我遇到了 ClassCastException :Cannot cast my.package.classA to my.package.classA.请注意,(规范)类(名称)是相同的。 我知道这应
我有一个代码试图将一个函数包装在另一个执行动态类型检查的函数中: class Base class Foo extends Base class Bar extends Base object Mai
我使用hadoop 0.18.3遇到以下错误 java.lang.ClassCastException:org.apache.hadoop.io.Text无法转换为org.apache.hadoop.
在 org.dozer.BeanFactory.createBean(Object, Class, String) 的实现中我尝试将对象转换为它的类型。如果我部署所有 bundle ,即关闭并启动所有
我有这个代码: package Maven_test.Maven_project_test; public class Test { class A { int i = 10;
我一直在尝试对 Wicket 的 WebSession 进行子类化,以便可以实现基本的身份验证系统。我已遵循 Wicket 引用库中的指南。当我在网页中尝试以下操作时,出现 ClassCastExce
我正在构建一个 kotlin AAR 库,我需要在发布之前对其进行混淆。我有以下结构: package com.example.token interface TokenManager { s
Kotlin 引入了 here 中描述的声明站点差异. 在某些情况下,泛型参数的 out/in 关键字可能会导致 ClassCastException。我的程序如下所示。 fun main(args:
我正在 AnyLogic 中进行基于代理的传染病流行模拟。我的模型中有两种代理类型 - 人员和建筑物。我正在尝试编写一个函数来计算代理类型“人员”在任何给定时间点所具有的传染性接触数量。下面是我的函数
我有一个 EditContact 类。打开后,它会显示哪些复选框已选中或未选中。这是通过我的适配器中的一些代码完成的,它可以正常工作: //This is for EditContact, t
这个问题已经有答案了: 奥 git _a (2 个回答) 已关闭 5 年前。 我正在获取 ClassCastException 。这两个类来自不同的 jar,但是JettyContinuationPr
我想在 Java 中使用一组对,但是当我调用 contains() 来查看它是否已包含特定对时,我总是会得到 ClassCastException >。有没有办法避免这种行为? 它的实例化如下: pr
我是一名优秀的程序员,十分优秀!