首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用apache CXF建立安全soap服务器时出现Unable to load class org.eclipse.jetty.server.Connector错误

使用apache CXF建立安全soap服务器时出现Unable to load class org.eclipse.jetty.server.Connector错误
EN

Stack Overflow用户
提问于 2018-12-25 17:50:43
回答 1查看 204关注 0票数 0

我正在尝试将受保护的SOAP服务器发布为JBoss Fuse camel路由上的消费端点。我的Blueprint配置中有以下端点和Jetty-security描述:

代码语言:javascript
复制
...
<cxf:cxfEndpoint
        xmlns:crm="http://www.bank.com/CRM"
        id="crmOutboundService"
        address="https://localhost:9001/cxf/CRMOutbound"
        serviceName="crm:CRMOutboundRq"
        endpointName="crm:ASBOCRMOutPort"
        wsdlURL="model/ASBOCRMOut/CRMOutboundRq.wsdl"
        serviceClass="com.bank.SAXSourceService">
    <cxf:properties>
        <entry key="dataFormat" value="PAYLOAD"/>
    </cxf:properties>
</cxf:cxfEndpoint>

<httpj:engine-factory bus="cxf">
    <httpj:engine port="9001">
        <httpj:tlsServerParameters secureSocketProtocol="TLSv1">
            <sec:keyManagers keyPassword="password">
                <sec:keyStore type="JKS" password="password"
                file="/opt/esb/security/keystore.jks"/>
            </sec:keyManagers>
            <sec:trustManagers>
                <sec:keyStore type="JKS" password="password"
                              file="/opt/esb/security/truststore.jks"/>
            </sec:trustManagers>
            <sec:cipherSuitesFilter>
                <sec:include>.*_WITH_3DES_.*</sec:include>
                <sec:include>.*_WITH_DES_.*</sec:include>
                <sec:exclude>.*_WITH_NULL_.*</sec:exclude>
                <sec:exclude>.*_DH_anon_.*</sec:exclude>
            </sec:cipherSuitesFilter>
            <sec:clientAuthentication want="true" required="true"/>
        </httpj:tlsServerParameters>
    </httpj:engine>
</httpj:engine-factory>
...

这里的所有内容都是手册中的:https://access.redhat.com/documentation/en-us/red_hat_jboss_fuse/6.2/pdf/apache_cxf_security_guide/Red_Hat_JBoss_Fuse-6.2-Apache_CXF_Security_Guide-en-US.pdf

我在pom.xml中有以下依赖项(以及其他):

代码语言:javascript
复制
<dependency>
    <groupId>org.apache.camel</groupId>
    <artifactId>camel-blueprint</artifactId>
</dependency>
<dependency>
    <groupId>org.apache.camel</groupId>
    <artifactId>camel-cxf</artifactId>
</dependency>
<dependency>
    <groupId>org.apache.cxf</groupId>
    <artifactId>cxf-rt-transports-http-jetty</artifactId>
</dependency>    

当应用程序捆绑包部署到JBoss Fuse中时,会出现以下异常:

代码语言:javascript
复制
org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to load class org.eclipse.jetty.server.Connector from recipe MapRecipe[name='#recipe-11850']"

问题是:为什么会发生这样的错误,在JBoss Fuse中建立安全的SOAP服务器的正确方法是什么?

EN

回答 1

Stack Overflow用户

发布于 2019-01-25 14:17:44

我们最终将以下指令添加到Blueprint描述符中:

代码语言:javascript
复制
<bean id="server" class="org.eclipse.jetty.server.Server"/>

错误已经消失,应用程序工作正常,但我们实际上并不理解其中的原因,因为没有任何对新bean的引用。我们正在尝试弄清楚,这个指令是否会启动Jetty服务器的新实例。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/53921199

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档