- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
由于这个问题,几天以来我一直在用头撞墙。
我开发了一个基于 CXF 的测试客户端(契约优先服务)并从控制台运行它。它工作得很好,只需按照有关客户端的 CXF 教程并将 CXF jar 添加到类路径
主.java
XmlValidator_Service service = new XmlValidator_Service(new URL("http://localhost:50501/edwin?wsdl"));
XmlValidator proxy = service.getXmlValidationService();
BindingProvider provider = (BindingProvider) proxy;
provider.getRequestContext()
.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, "http://localhost:50501/edwin/XmlValidator");
ValidationResult result = proxy.validate("C:\\phoenix\\edwin\\filerepository\\2014\\03\\17\\15\\09\\EDWIN_20140317_150913.xml",
XsdSchema.EDWIN_CONSUMER_CREDIT);
System.out.println(new ObjectMapper().writeValueAsString(result));
第 4 步:我将该代码集成到在 Tomcat 6 上运行的 Web 应用程序项目中,但是当我访问 Web 服务时,我收到了主题中的错误。
从 Tomcat 项目运行主类使用以下类路径:
15/11/2013 11:01 55.147 activation-1.0.2.jar
15/11/2013 10:59 443.432 antlr-2.7.6.jar
15/11/2013 10:59 4.467 aopalliance-1.0.jar
15/11/2013 10:59 200.050 asm-all-3.1.jar
15/11/2013 11:02 114.980 aspectjrt-1.5.4.jar
15/11/2013 11:02 1.894.165 aspectjweaver-1.5.4.jar
23/02/2011 05:10 174.074 bcpg-jdk16-1.46.jar
15/11/2013 11:02 1.876.535 bcprov-jdk16-1.46.jar
15/11/2013 10:59 608.376 c3p0-0.9.1.jar
15/11/2013 11:00 278.682 cglib-2.2.jar
15/11/2013 11:00 176.447 chartserver-3.0.1.jar
15/11/2013 11:00 188.671 commons-beanutils-1.7.0.jar
15/11/2013 11:00 46.725 commons-codec-1.3.jar
15/11/2013 11:00 575.389 commons-collections-3.2.1.jar
15/11/2013 11:00 121.757 commons-dbcp-1.2.2.jar
15/11/2013 11:00 143.602 commons-digester-1.8.jar
15/11/2013 11:00 57.779 commons-fileupload-1.2.1.jar
15/11/2013 11:00 109.043 commons-io-1.4.jar
15/11/2013 11:00 132.165 commons-jexl-1.1.jar
15/11/2013 11:00 261.809 commons-lang-2.4.jar
05/01/2014 18:01 385.091 commons-lang3-3.2.1.jar
15/11/2013 11:00 60.686 commons-logging-1.1.1.jar
15/11/2013 11:00 269.014 commons-net-3.0.1.jar
15/11/2013 11:00 62.086 commons-pool-1.3.jar
15/11/2013 11:00 138.956 commons-validator-1.3.1.jar
06/02/2014 12:42 7.143.253 cxf-2.7.10.jar
15/11/2013 11:02 6.920.452 cxf-2.7.3.jar
06/02/2014 12:52 14.479 cxf-manifest.jar
29/01/2013 01:08 379.396 cxf-rt-frontend-jaxws-2.7.3.jar
06/02/2014 12:36 246.342 cxf-services-sts-core-2.7.10.jar
06/02/2014 12:39 63.317 cxf-services-ws-discovery-api-2.7.10.jar
06/02/2014 12:39 9.983 cxf-services-ws-discovery-service-2.7.10.jar
06/02/2014 12:38 233.305 cxf-services-wsn-api-2.7.10.jar
06/02/2014 12:38 62.446 cxf-services-wsn-core-2.7.10.jar
16/07/2013 17:22 13.883 cxf-xjc-boolean-2.6.2.jar
16/07/2013 17:23 11.193 cxf-xjc-bug671-2.6.2.jar
16/07/2013 17:21 15.769 cxf-xjc-dv-2.6.2.jar
16/07/2013 17:23 11.574 cxf-xjc-runtime-2.6.2.jar
16/07/2013 17:22 12.190 cxf-xjc-ts-2.6.2.jar
15/11/2013 11:00 313.898 dom4j-1.6.1.jar
17/03/2014 13:57 30.327.080 edwin-services.jar
09/01/2014 11:02 1.346.296 ehcache-core-2.6.6.jar
09/01/2014 11:02 47.650 ehcache-jgroups3replication-1.7.4.jar
04/01/2013 13:47 60.171 geronimo-jaxws_2.2_spec-1.1.jar
15/11/2013 11:02 28.592 geronimo-stax-api_1.0_spec-1.0.jar
15/11/2013 11:02 3.894.821 hibernate-3.5.1.jar
15/11/2013 11:02 100.884 hibernate-jpa-2.0-api-1.0.0.jar
15/11/2013 11:02 1.256.297 hsqldb-2.0.0.jar
17/02/2014 21:47 157.516 httpasyncclient-4.0.1.jar
17/07/2013 09:48 433.368 httpclient-4.2.5.jar
12/02/2014 21:44 282.269 httpcore-4.3.2.jar
12/02/2014 21:45 316.524 httpcore-nio-4.3.2.jar
15/11/2013 11:00 1.117.661 itext-2.1.5.jar
15/11/2013 11:00 157.240 itext-rtf-2.1.5.jar
15/11/2013 11:02 1.107.440 jackson-all-1.9.2.jar
01/12/2008 23:29 2.202.189 jasperreports-3.1.2.jar
23/11/2010 08:21 597.476 javassist-3.9.0.GA.jar
15/11/2013 11:01 99.570 jaxb-api-2.2.6.jar
30/07/2012 16:45 1.112.659 jaxb-impl-2.2.6.jar
30/07/2012 16:46 2.078.376 jaxb-xjc-2.2.6.jar
15/11/2013 11:01 296.672 jcommon-1.0.0.jar
15/11/2013 11:02 153.115 jdom-1.1.jar
15/11/2013 11:01 1.074.536 jfreechart-1.0.0.jar
15/11/2013 11:01 581.571 joda-time-2.3.jar
15/11/2013 11:01 1.876.578 jpedalSTD-1.0.jar
15/11/2013 11:01 20.682 jstl-1.1.2.jar
15/11/2013 11:01 15.071 jta-1.1.jar
15/11/2013 11:01 237.344 junit-4.8.2.jar
15/11/2013 11:01 391.834 log4j-1.2.15.jar
15/11/2013 11:02 1.034.173 lucene-core-3.0.3.jar
15/11/2013 11:01 447.676 mail-1.4.1.jar
29/01/2014 12:01 71.487 neethi-3.0.3.jar
15/11/2013 11:03 321.190 org.springframework.aop-3.0.5.RELEASE.jar
15/11/2013 11:03 53.082 org.springframework.asm-3.0.5.RELEASE.jar
15/11/2013 11:03 555.410 org.springframework.beans-3.0.5.RELEASE.jar
15/11/2013 11:03 668.861 org.springframework.context-3.0.5.RELEASE.jar
15/11/2013 11:03 100.870 org.springframework.context.support-3.0.5.RELEASE.jar
15/11/2013 11:03 382.442 org.springframework.core-3.0.5.RELEASE.jar
15/11/2013 11:03 169.752 org.springframework.expression-3.0.5.RELEASE.jar
15/11/2013 11:03 385.712 org.springframework.jdbc-3.0.5.RELEASE.jar
15/11/2013 11:03 334.327 org.springframework.orm-3.0.5.RELEASE.jar
15/11/2013 11:03 231.922 org.springframework.transaction-3.0.5.RELEASE.jar
15/11/2013 11:03 395.587 org.springframework.web-3.0.5.RELEASE.jar
15/11/2013 11:03 398.282 org.springframework.web.servlet-3.0.1.RELEASE.jar
07/03/2014 15:35 1.376.142 phoenix-web-1.8.9.jar
15/11/2013 11:02 1.539.291 poi-3.6-20091214.jar
15/11/2013 11:02 69.137 poi-contrib-3.6-20091214.jar
15/11/2013 11:02 412.783 poi-ooxml-3.6-20091214.jar
15/11/2013 11:02 3.774.332 poi-ooxml-schemas-3.6-20091214.jar
15/11/2013 11:02 795.888 poi-scratchpad-3.6-20091214.jar
15/11/2013 11:04 431.466 quartz-1.6.6.jar
15/11/2013 11:02 23.671 slf4j-api-1.5.11.jar
15/11/2013 11:02 9.693 slf4j-log4j12-1.5.11.jar
15/11/2013 11:03 338.222 spring-ldap-1.3.1.RELEASE-all.jar
15/11/2013 11:03 199.892 spring-security-config-3.1.0.RC2.jar
15/11/2013 11:03 340.643 spring-security-core-3.1.0.RC2.jar
15/11/2013 11:03 93.041 spring-security-ldap-3.1.0.RC2.jar
15/11/2013 11:03 20.513 spring-security-taglibs-3.1.0.RC2.jar
15/11/2013 11:03 252.718 spring-security-web-3.1.0.RC2.jar
15/11/2013 11:04 205.278 spring-test-3.0.5.RELEASE.jar
20/10/2010 23:50 395.587 spring-web-3.0.5.RELEASE.jar
15/11/2013 11:02 119.823 sqltool-2.0.0.jar
15/11/2013 11:04 393.259 standard-1.1.2.jar
04/01/2013 13:47 182.112 stax2-api-3.1.1.jar
15/11/2013 11:01 499.949 stripes-1.5.3.jar
15/11/2013 11:04 2.386.434 testng-5.12.1.jar
15/11/2013 11:02 449.505 velocity-1.7.jar
28/03/2013 12:41 482.245 woodstox-core-asl-4.2.0.jar
19/06/2006 21:27 5.881 ws-commons-java5-1.0.1.jar
10/03/2014 12:56 186.758 wsdl4j-1.6.3.jar
29/01/2014 12:02 443.391 wss4j-1.6.14.jar
22/11/2005 19:28 109.318 xml-apis-1.0.b2.jar
15/11/2013 11:02 2.666.695 xmlbeans-2.3.0.jar
22/09/2010 22:32 148.829 XmlSchema-1.4.7.jar
29/01/2014 14:10 165.787 xmlschema-core-2.1.0.jar
19/11/2013 15:56 639.643 xmlsec-1.5.6.jar
15/11/2013 11:00 851.219 yuicompressor-2.4.2.jar
从独立项目运行使用以下类路径。
13/09/2013 17:14 959.897 activemq-broker-5.8.0.jar
13/09/2013 17:14 1.143.233 activemq-client-5.8.0.jar
13/09/2013 17:14 587.589 activemq-openwire-legacy-5.8.0.jar
04/01/2013 13:48 445.288 antlr-2.7.7.jar
04/01/2013 13:47 4.467 aopalliance-1.0.jar
04/01/2013 13:47 43.581 asm-3.3.1.jar
29/01/2014 14:10 263.965 commons-codec-1.9.jar
04/01/2013 13:47 575.389 commons-collections-3.2.1.jar
04/01/2013 13:47 284.220 commons-lang-2.6.jar
04/01/2013 13:47 60.686 commons-logging-1.1.1.jar
06/02/2014 12:42 7.143.253 cxf-2.7.10.jar
06/02/2014 12:52 14.479 cxf-manifest.jar
06/02/2014 12:36 246.342 cxf-services-sts-core-2.7.10.jar
06/02/2014 12:39 63.317 cxf-services-ws-discovery-api-2.7.10.jar
06/02/2014 12:39 9.983 cxf-services-ws-discovery-service-2.7.10.jar
06/02/2014 12:38 233.305 cxf-services-wsn-api-2.7.10.jar
06/02/2014 12:38 62.446 cxf-services-wsn-core-2.7.10.jar
16/07/2013 17:22 13.883 cxf-xjc-boolean-2.6.2.jar
16/07/2013 17:23 11.193 cxf-xjc-bug671-2.6.2.jar
16/07/2013 17:21 15.769 cxf-xjc-dv-2.6.2.jar
16/07/2013 17:23 11.574 cxf-xjc-runtime-2.6.2.jar
16/07/2013 17:22 12.190 cxf-xjc-ts-2.6.2.jar
04/01/2013 13:49 1.224.612 ehcache-core-2.5.1.jar
19/11/2013 18:40 296.714 FastInfoset-1.2.13.jar
04/01/2013 13:48 20.220 geronimo-j2ee-management_1.1_spec-1.0.1.jar
04/01/2013 13:48 223.298 geronimo-javamail_1.4_spec-1.7.1.jar
04/01/2013 13:47 60.171 geronimo-jaxws_2.2_spec-1.1.jar
04/01/2013 13:48 32.359 geronimo-jms_1.1_spec-1.1.1.jar
04/01/2013 13:49 96.323 geronimo-servlet_3.0_spec-1.0.jar
13/09/2013 17:14 50.139 hawtbuf-1.9.jar
04/01/2013 16:19 82.423 httpasyncclient-4.0-beta3.jar
17/07/2013 09:48 433.368 httpclient-4.2.5.jar
17/07/2013 09:48 227.275 httpcore-4.2.4.jar
17/07/2013 09:48 289.773 httpcore-nio-4.2.4.jar
04/01/2013 13:48 192.602 isorelax-20030108.jar
04/01/2013 16:19 110.928 javax.ws.rs-api-2.0-m10.jar
04/01/2013 16:36 99.570 jaxb-api-2.2.6.jar
04/01/2013 16:36 1.112.659 jaxb-impl-2.2.6.jar
04/01/2013 16:36 2.078.376 jaxb-xjc-2.2.6.jar
20/12/2013 11:25 81.899 jettison-1.3.5.jar
19/11/2013 18:43 21.162 jetty-continuation-8.1.14.v20131031.jar
19/11/2013 18:43 96.122 jetty-http-8.1.14.v20131031.jar
19/11/2013 18:43 104.219 jetty-io-8.1.14.v20131031.jar
19/11/2013 18:43 89.923 jetty-security-8.1.14.v20131031.jar
19/11/2013 18:43 357.704 jetty-server-8.1.14.v20131031.jar
19/11/2013 18:43 287.680 jetty-util-8.1.14.v20131031.jar
04/01/2013 13:49 543.044 joda-time-1.6.2.jar
04/01/2013 13:49 871.260 js-1.7R2.jar
03/05/2013 22:57 644.786 mina-core-2.0.7.jar
04/01/2013 13:48 681.905 msv-core-2011.1.jar
29/01/2014 12:01 71.487 neethi-3.0.3.jar
04/01/2013 13:49 44.209 oauth-20100527.jar
04/01/2013 13:49 11.744 oauth-provider-20100527.jar
04/01/2013 13:49 1.352.924 opensaml-2.5.1-1.jar
04/01/2013 13:49 565.330 openws-1.4.2-1.jar
04/01/2013 13:48 19.255 relaxngDatatype-20020414.jar
28/03/2013 12:50 26.084 slf4j-api-1.7.5.jar
28/03/2013 12:52 7.900 slf4j-jdk14-1.7.5.jar
04/01/2013 13:53 321.435 spring-aop-3.0.7.RELEASE.jar
04/01/2013 13:53 53.082 spring-asm-3.0.7.RELEASE.jar
04/01/2013 13:53 556.747 spring-beans-3.0.7.RELEASE.jar
04/01/2013 13:53 670.388 spring-context-3.0.7.RELEASE.jar
04/01/2013 13:53 383.621 spring-core-3.0.7.RELEASE.jar
04/01/2013 13:53 169.749 spring-expression-3.0.7.RELEASE.jar
04/01/2013 13:54 185.555 spring-jms-3.0.7.RELEASE.jar
04/01/2013 13:54 232.066 spring-tx-3.0.7.RELEASE.jar
04/01/2013 13:54 398.383 spring-web-3.0.7.RELEASE.jar
04/01/2013 13:47 182.112 stax2-api-3.1.1.jar
04/01/2013 13:47 449.505 velocity-1.7.jar
06/02/2014 12:18 3.647 WHICH_JARS
28/03/2013 12:41 482.245 woodstox-core-asl-4.2.0.jar
20/03/2013 10:25 186.758 wsdl4j-1.6.3.jar
29/01/2014 12:02 443.391 wss4j-1.6.14.jar
04/01/2013 13:48 84.091 xml-resolver-1.2.jar
04/01/2013 16:19 2.730.866 xmlbeans-2.6.0.jar
22/09/2010 22:32 148.829 XmlSchema-1.4.7.jar
29/01/2014 14:10 165.787 xmlschema-core-2.1.0.jar
19/11/2013 15:56 639.643 xmlsec-1.5.6.jar
04/01/2013 13:49 610.865 xmltooling-1.3.2-1.jar
04/01/2013 13:48 229.348 xsdlib-2010.1.jar
我想知道有罪的 JAR 在哪里缺少 QUALIFIED
属性(可能在 javax.xml.bind.annotation.XmlNsForm
中)
异常详情:
Exception in thread "main" java.lang.NoSuchFieldError: QUALIFIED
at org.apache.cxf.service.model.SchemaInfo.setSchema(SchemaInfo.java:146)
at org.apache.cxf.wsdl11.SchemaUtil.extractSchema(SchemaUtil.java:136)
at org.apache.cxf.wsdl11.SchemaUtil.getSchemas(SchemaUtil.java:73)
at org.apache.cxf.wsdl11.SchemaUtil.getSchemas(SchemaUtil.java:65)
at org.apache.cxf.wsdl11.SchemaUtil.getSchemas(SchemaUtil.java:60)
at org.apache.cxf.wsdl11.WSDLServiceBuilder.getSchemas(WSDLServiceBuilder.java:372)
at org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuilder.java:339)
at org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuilder.java:203)
at org.apache.cxf.wsdl11.WSDLServiceFactory.create(WSDLServiceFactory.java:175)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromWSDL(ReflectionServiceFactoryBean.java:416)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:538)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:252)
at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:205)
at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:101)
at org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:90)
at org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:156)
at org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create(JaxWsProxyFactoryBean.java:156)
at org.apache.cxf.jaxws.ServiceImpl.createPort(ServiceImpl.java:465)
at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:332)
at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:319)
at javax.xml.ws.Service.getPort(Service.java:92)
at my.package.XmlValidator_Service.getXmlValidationService(XmlValidator_Service.java:67)
at test.ws.Main.main(Main.java:21)
最佳答案
您需要删除:XmlSchema-1.4.7.jar
CXF 2.7.x 需要 XmlSchema 的 2.x 版本(您拥有:xmlschema-core-2.1.0.jar),但它选择的是 1.4.7 版本。
关于java - NoSuchFieldError : QUALIFIED when integrating web service in Tomcat project 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22457508/
我正在尝试更新我正在从2.4.3版开发到2.5.2版的Android应用程序上的Room数据库,这些是我的gradle.build文件中的Room依赖项。该应用程序成功编译和构建,但不幸的是,在运行时
我刚刚升级了一个库,另一个库开始抛出 NoSuchFieldError。如果删除该字段,那会很好。但它留下来了。它只是被弃用了。 Hibernate.TIMESTAMP.nullSafeGet(nul
输出:javap -s SomeClass public org.someapp.SomeClass$_data data; Signature: Lorg/someapp/SomeClass$_
我正在尝试修改我在 ClassA 中创建的 public static final String[] 字段,然后在 ClassB 中使用反射对其进行修改。但是我得到了一个 NoSuchFieldExc
我目前正在摆弄 javassist 并遇到了这个问题。我正在尝试使用 javassist 更改字段类型。但是,当代码在我更改后尝试访问该字段时,结果是 NoSuchFieldException。 所以
我的代码中出现 NoSuchFieldError,现在 oracle 不太清楚为什么会抛出此错误,只是说:如果类的定义发生不兼容的更改,此错误只会在运行时发生。 有人可以向我解释如何“不兼容地改变”一
我有一个 Spring Boot 2 项目。 该模型是 @Entity @SequenceGenerator(name = "climate_gen", sequenceName = "climate
我最近遇到了 Eclipse SWT GUI 应用程序的问题。我试图使用以下代码获取窗口句柄: Display.getDefault().syncExec(()->{ hand
我在初始化 web 应用程序时收到以下错误。有人见过这个吗? 这发生在 spring 尝试加载 SimpleUrlHandlerMapping 的地方 Caused by: java.lang.NoS
启动 NeoServer 时出现以下异常 - Exception in thread "main" java.lang.NoSuchFieldError: cypher_parser_version
网上有一个关于如何在 Hibernate 中使用注释的示例(在此之前我也研究过相同的示例,但它使用了 .xml。并且我已经成功地使其正常工作)。所以现在我有: Initial session fact
这个问题在这里已经有了答案: JNI: NoSuchFieldError (1 个回答) 关闭 9 年前。 我正在创建一个使用 JNI 的 Java 应用程序。 JNI 函数之一接受枚举作为参数。但
与 GEM API 集成时,我在 runtime java.lang.NoSuchFieldError: gostR28147_cbc 处收到错误。请让我知道我缺少什么。我已经包含了以下 jar :
请任何人告诉我如何解决此错误, 我正在使用 spring-webmvc.3.2.17 和 freemarker.2.3.16 Caused by: org.springframework.beans.
我目前正在使用 vscode 和 apache poi,创建了一个程序来自动创建 .xlsx 程序,并让 A1 单元格输入一个名为“Tester”的字符串,然后弹出该错误。 我的程序中的代码: pac
我在使用 Firebase 产品时遇到 java.lang.NoSuchFieldError 错误。 应用程序随机崩溃,每次启动一次,我没有看到任何明显的原因。 Crashlytics 将其识别为两个
我已重新启动服务器,但无法让它运行。我在启动时总是出现此错误。请问有人可以告诉我如何让服务器运行吗? 我已经搜索过,但在其他地方找不到此错误。 HTTP ERROR: 500 STANDARD_IMP
在某些情况下,当从匿名类访问 Activity 字段时,我在运行时收到 NoSuchFieldError:java.lang.NoSuchFieldError: MyActivity.myField
我开发了一个 Spring Boot 应用程序,我试图包含一个 Optional ( java.lang ) 字段在我的一个模型中,所以如果 @RestController我正在使用 with 不会得
我今天遇到了一个异常,并设法消除了错误。首先,让我给你一个示例代码。 public class Foo () { protected String var; } public class Ba
我是一名优秀的程序员,十分优秀!