简体   繁体   English

本地是否可以使用IBM JRE发布Web服务端点

[英]Is there a way localy publish Webservice Endpoints With IBM JRE

I'm trying to write a test for a Webservice using the approach described at http://antoniogoncalves.org/2012/10/24/no-you-dont-need-to-mock-your-soap-web-service-to-test-it/ 我正在尝试使用http://antoniogoncalves.org/2012/10/24/no-you-dont-need-to-mock-your-soap-web-service-中描述的方法为Web服务编写测试测试/

But on calling Endpoint.publish I get the following exception 但是在调用Endpoint.publish出现以下异常

java.lang.NoClassDefFoundError: com.ibm.ffdc.impl.Ffdc
    at com.ibm.ffdc.Manager.<clinit>(Unknown Source)
    at java.lang.J9VMInternals.initializeImpl(Native Method)
    at java.lang.J9VMInternals.initialize(J9VMInternals.java:235)
    at com.ibm.ws.ffdc.FFDCFilter.processException(FFDCFilter.java:82)
    at com.ibm.ws.webservices.engine.components.logger.LogFactory$2.run(LogFactory.java:159)
    at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:63)
    at com.ibm.ws.webservices.engine.components.logger.LogFactory.createLogFactory(LogFactory.java:141)
    at com.ibm.ws.webservices.engine.components.logger.LogFactory.<clinit>(LogFactory.java:98)
    at java.lang.J9VMInternals.initializeImpl(Native Method)
    at java.lang.J9VMInternals.initialize(J9VMInternals.java:235)
    at com.ibm.ws.webservices.engine.soap.MessageFactoryImpl.<clinit>(MessageFactoryImpl.java:103)
    at java.lang.J9VMInternals.initializeImpl(Native Method)
    at java.lang.J9VMInternals.initialize(J9VMInternals.java:235)
    at com.ibm.ws.webservices.engine.soap.SAAJMetaFactoryImpl.newMessageFactory(SAAJMetaFactoryImpl.java:56)
    at javax.xml.soap.MessageFactory.newInstance(MessageFactory.java:143)
    at com.sun.xml.internal.ws.api.SOAPVersion.<init>(SOAPVersion.java:179)
    at com.sun.xml.internal.ws.api.SOAPVersion.<clinit>(SOAPVersion.java:84)
    at java.lang.J9VMInternals.initializeImpl(Native Method)
    at java.lang.J9VMInternals.initialize(J9VMInternals.java:235)
    at com.sun.xml.internal.ws.api.BindingID.<clinit>(BindingID.java:336)
    at java.lang.J9VMInternals.initializeImpl(Native Method)
    at java.lang.J9VMInternals.initialize(J9VMInternals.java:235)
    at com.sun.xml.internal.ws.spi.ProviderImpl.createAndPublishEndpoint(ProviderImpl.java:104)
    at javax.xml.ws.Endpoint.publish(Endpoint.java:181)
    at <junit stuff>
Caused by: java.lang.ClassNotFoundException: com.ibm.ffdc.impl.Ffdc
    at java.net.URLClassLoader.findClass(URLClassLoader.java:434)
    at java.lang.ClassLoader.loadClassHelper(ClassLoader.java:701)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:680)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:358)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:663)
    ... 48 more

Which is I assume because I'm running in an IBM JRE (Websphere 8.0.x) (Thx for the condolence) 我认为这是因为我正在IBM JRE(Websphere 8.0.x)中运行(哀悼表示感谢)

Can I use Endpoint.publish in a IBM JRE, without starting a complete Websphere? 是否可以在不启动完整的Websphere的情况下在IBM JRE中使用Endpoint.publish?

The test or the JRE configuration that produced this stack trace has somehow included com.ibm.ws classes that are shipped with Websphere. 产生此堆栈跟踪的测试或JRE配置以某种方式包含了Websphere附带的com.ibm.ws类。 If you have removed all reference to Websphere classes from your test, then you could get a standalone JRE with no Websphere changes to test with. 如果您从测试中删除了对Websphere类的所有引用,那么您可以获得一个没有Websphere更改即可测试的独立JRE。 You can download for AIX, Linux or z/OS from: 您可以从以下位置下载AIX,Linux或z / OS:

https://www.ibm.com/developerworks/java/jdk/ https://www.ibm.com/developerworks/java/jdk/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM