【问题标题】:FUSE ESB 6.0 bundle start error: Bundle xxx is waiting for namespace handlers [http://www.springframework.org/schema/security/oauth]FUSE ESB 6.0 捆绑启动错误:捆绑 xxx 正在等待命名空间处理程序 [http://www.springframework.org/schema/security/oauth]
【发布时间】:2014-06-06 15:52:37
【问题描述】:

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

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

spring 包的命名空间和模式位置是: http://www.springframework.org/schema/security/oauthhttp://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]

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

请给我一些指示。我在下面包含了蓝图文件。如果您还需要什么,请告诉我。

<?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>

【问题讨论】:

    标签: spring oauth spring-security fuseesb blueprint


    【解决方案1】:

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

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-02-02
      • 1970-01-01
      • 1970-01-01
      • 2018-06-28
      • 2020-01-29
      • 2014-05-04
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多