FUSE ESB 6.0包启动错误:Bundle xxx正在等待命名空间处理程序[http://www.springframework.org/schema/security/oauth]

时间:2014-06-06 15:52:37

标签: spring oauth spring-security fuseesb blueprint

Fuse 2.3.0.redhat-60024和Spring命名空间

我正在尝试使用使用oauth1的Spring实现(mvn:org.springframework.security.oauth / spring-security-oauth / 1.0.5.RELEASE)的fuse开发解决方案。这个spring bundle似乎拥有我发现的最好的客户端支持,我已经在spring中实现了它(在tomcat中运行),但不是在Fuse中。

spring bundle的名称空间和架构位置是: http://www.springframework.org/schema/security/oauth http://www.springframework.org/schema/security/spring-security-oauth-1.0.xsd

但是,当我在blueprint.xml文件中使用此命名空间并安装捆绑包时,捆绑包未启动。在控制台上," GracePeriod"显示。在日志中,我得到以下内容:

17:23:44,490 |信息| NAPSHOT-thread-1 | BlueprintContainerImpl | 14 - org.apache.aries.blueprint.core - 1.0.1.redhat-60024 | Bundle com.transverse.tract.connect.tc-core-auth-oauth正在等待命名空间处理程序[http://www.springframework.org/schema/security/oauth]

我尝试了很多解决方案,但是没有一个允许oauth命名空间类注册或链接到OSGi服务,我总是得到这个消息。

请给我一些指示。我在下面列出了蓝图文件。如果您还有其他需要,请告诉我。

<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
    xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.1.0"
    xmlns:oauth1="http://www.springframework.org/schema/security/oauth"
    xsi:schemaLocation="
        http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
        http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0 http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.1.0.xsd
        http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.1.0 http://aries.apache.org/schemas/blueprint-ext/blueprint-ext-1.1.xsd
        http://www.springframework.org/schema/security/oauth http://www.springframework.org/schema/security/spring-security-oauth-1.0.xsd">
    <ext:property-placeholder placeholder-prefix="${[" placeholder-suffix="]}"/>

    <!--  
    <mvc:default-servlet-handler/>

    <sec:debug/>
    <sec:http auto-config="true" security="none" pattern="/**"/>

    <ctx:spring-configured/>
    <ctx:annotation-config/>
    -->
    <bean id="protectedResourceDetailsService" class="org.springframework.security.oauth.consumer.InMemoryProtectedResourceDetailsService"/>
    <bean id="oauthConsumer" class="org.springframework.security.oauth.consumer.client.CoreOAuthConsumerSupport"/>

    <oauth1:consumer resource-details-service-ref="tcOAuth10aResourceDetails" support-ref="oauthConsumer">
        <oauth1:url pattern="cxf/oauth/request_token" resources="oauthProvider" httpMethod="GET"/>
        <oauth1:url pattern="cxf/oauth/access_token" resources="oauthProvider" httpMethod="GET"/>
    </oauth1:consumer>


    <oauth1:consumer-details-service id="tcOAuth10aConsumerDetails">
        <oauth1:consumer name="oauthConsumerDetails"
                        resourceName="oauthProvider"
                        key="..."
                        secret="..."
                        requiredToObtainAuthenticatedToken="true"
                        typeOfSecret="shared"
                        resourceDescription="OAuth"/>
    </oauth1:consumer-details-service>
    <oauth1:resource-details-service id="tcOAuth10aResourceDetails">
        <oauth1:resource id="quickbooksOnlineProvider"
                        key="..."
                        secret="..."
                        user-authorization-callback-param="oauth_callback"
                        user-authorization-token-param="requestToken"
                        request-token-url="https://oauth.intuit.com/oauth/v1/get_request_token"
                        user-authorization-url="https://appcenter.intuit.com/Connect/Begin"
                        access-token-url="https://oauth.intuit.com/oauth/v1/get_access_token"
                        signature-method="HMAC-SHA1"
                        accepts-authorization-header="true"
                        use10a="true"
                        access-token-method="POST"
                        request-token-method="POST"/>
    </oauth1:resource-details-service>
</blueprint>

1 个答案:

答案 0 :(得分:0)

不完全确定,因为我从未在FUSE中使用过OAuth。但是,似乎您的FUSE安装中没有安装Spring OAuth OSGI功能。您是否检查了Spring OAuth库是否启用了OSGI以及是否退出了Spring OAuth OSGI功能?如果有这样的功能,您可以使用features:list | grep oauth验证它是否在您的FUSE安装中正确安装。

如果Spring OAuth库不是OSGI,那么您可以使用CXF-RS实现。请参阅here如何做到这一点。