Ibm mobilefirst IBM Worklight 5.0.5-authenticationConfig.xml中未定义领域

Ibm mobilefirst IBM Worklight 5.0.5-authenticationConfig.xml中未定义领域,ibm-mobilefirst,websphere-liberty,Ibm Mobilefirst,Websphere Liberty,以下是我从运行Worklight server的WebSphere application server liberty配置文件收到的错误: defaultOptions:onFailure过程调用错误。运行时:authenticationConfig.xml中未定义领域“SingleStepAuthRealm”。 这在我的本地服务器上运行良好 我已将服务器自定义WAR文件重新构建并部署到服务器,并重新启动了它 这可能是因为远程服务器的版本与本地服务器的版本不匹配吗?本地服务器版本为:5.0.5

以下是我从运行Worklight server的WebSphere application server liberty配置文件收到的错误:

defaultOptions:onFailure过程调用错误。运行时:authenticationConfig.xml中未定义领域“SingleStepAuthRealm”。

这在我的本地服务器上运行良好

我已将服务器自定义WAR文件重新构建并部署到服务器,并重新启动了它

这可能是因为远程服务器的版本与本地服务器的版本不匹配吗?本地服务器版本为:5.0.5.20121129-1027

以下是我的authenticationConfig.xml:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<tns:loginConfiguration xmlns:tns="http://www.worklight.com/auth/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

        <!-- Licensed Materials - Property of IBM
             5725-G92 (C) Copyright IBM Corp. 2006, 2012. All Rights Reserved.
             US Government Users Restricted Rights - Use, duplication or
             disclosure restricted by GSA ADP Schedule Contract with IBM Corp. -->  

    <!-- Uncomment the next element to protect the worklight console -->
    <!-- <staticResources>
        <resource id="worklightConsole" securityTest="WorklightConsole">
            <urlPatterns>/console*</urlPatterns>
        </resource>
    </staticResources> -->

   <!--  Sample security tests  
         Even if not used there will be some default  webSecurityTest and mobileSecurityTest 
         Attention: if using <testAppAuthenticity/> test below ,<publicSigningKey> element must be added to application-descriptor.xml as well. -->   
         
    <!-- <securityTests>
        
        <mobileSecurityTest name="mobileTests">
            <testAppAuthenticity/> 
            <testDeviceId provisioningType="none" />
            <testUser realm="myMobileLoginForm" />
        </mobileSecurityTest>

        <webSecurityTest name="webTests">
            <testUser realm="myWebLoginForm"/>
        </webSecurityTest>

        <customSecurityTest name="customTests">
            <test realm="wl_antiXSRFRealm" step="1"/>
            <test realm="wl_authenticityRealm" step="1"/>
            <test realm="wl_remoteDisableRealm" step="1"/>
            <test realm="wl_anonymousUserRealm" isInternalUserID="true" step="1"/>
            <test realm="wl_deviceNoProvisioningRealm" isInternalDeviceID="true" step="2"/>
        </customSecurityTest>
        
        <customSecurityTest name="WorklightConsole">
            <test realm="WorklightConsole" isInternalUserID="true"/>
        </customSecurityTest>

    </securityTests> -->
    
    <realms>
          <realm name="SingleStepAuthRealm" loginModule="SingleStepAuthLoginModule">
            <className>com.worklight.integration.auth.AdapterAuthenticator</className>
            <parameter name="login-function" value="SingleStepAuthAdapter.onAuthRequired" />
            <parameter name="logout-function" value="SingleStepAuthAdapter.onLogout" />
          </realm>
        
        <!-- For websphere -->
        <!-- realm name="WASLTPARealm" loginModule="WASLTPAModule">
            <className>com.worklight.core.auth.ext.WebSphereFormBasedAuthenticator</className>
            <parameter name="login-page" value="/login.html"/>
            <parameter name="error-page" value="/loginError.html"/>
        </realm -->
    </realms>

    <loginModules>
          <loginModule name="SingleStepAuthLoginModule">
            <className>com.worklight.core.auth.ext.NonValidatingLoginModule</className>
          </loginModule>
        
        <!-- For websphere -->
        <!-- loginModule name="WASLTPAModule">
            <className>com.worklight.core.auth.ext.WebSphereLoginModule</className>
        </loginModule -->
    </loginModules>

</tns:loginConfiguration>

com.worklight.integration.auth.AdapterAuthenticator
com.worklight.core.auth.ext.NonValidatingLoginModule

更新:

多亏了奥兰多的回答,我才能够分辨出服务器版本:
服务器版本:5.0.5.20121130-0919
本地版本:5.0.5.20121129-1027

版本(可能是版本号,不确定WL版本如何工作)不同;但是,我怀疑版本不匹配不是问题所在

以下是我迄今为止试图调试此问题的内容:

  • 我按照worklight文档中的步骤构建服务器自定义文件并将其上载到服务器上的适当目录

    您可以在“部署项目”标题下找到这些步骤

  • 我打开WAR文件,注意到authenticationConfig.xml不在其中!因此,我想我应该手动将XML推送到它驻留在本地服务器上的同一个文件夹中。在我的情况下,此目录是: /opt/IBM/Worklight/server/wlp/usr/servers/worklightServer/Worklight.home/app_name/conf

  • 我想这可能是权限问题,所以我在文件上设置了+rwx。还是没有骰子

  • 可能是在我的本地服务器上查找该目录中的其他文件?我上传了所有这些文件,并再次尝试了权限。不走运

  • 我还在每一个步骤之后重新启动了服务器(在步骤4的情况下,重新启动了两次,一次使用默认perms,一次使用完全perms)

  • 首先获取(远程)服务器版本,如下所述:

    Worklight Server(所有版本)

    如果服务器已启动并正在运行,则可以通过以下步骤找到版本。否则继续下一节

    • 确保Worklight服务器正在运行
    • 打开Worklight控制台(http://:/Worklight/Console)
    • 点击屏幕右上角的“关于”链接
    • 将显示一个弹出窗口,显示当前服务器版本
    如果服务器未运行,可以通过以下步骤查找版本

    • 找到安装Worklight Server的目录(示例:C:\IBM\Worklight)
    • 导航到\WorklightServer
    • 使用任何支持“zip”格式的归档工具打开文件“worklight jee library.jar”
    • 一旦jar被扩展,打开“conf/worklight.properties”文件
    • 在该文件中,版本号由“build.version”属性定义
    首先获取(远程)服务器版本,如下所述:

    Worklight Server(所有版本)

    如果服务器已启动并正在运行,则可以通过以下步骤找到版本。否则,请继续下一节

    • 确保Worklight服务器正在运行
    • 打开Worklight控制台(http://:/Worklight/Console)
    • 点击屏幕右上角的“关于”链接
    • 将显示一个弹出窗口,显示当前服务器版本
    如果服务器未运行,可以通过以下步骤查找版本

    • 找到安装Worklight Server的目录(示例:C:\IBM\Worklight)
    • 导航到\WorklightServer
    • 使用任何支持“zip”格式的归档工具打开文件“worklight jee library.jar”
    • 一旦jar被扩展,打开“conf/worklight.properties”文件
    • 在该文件中,版本号由“build.version”属性定义

      • 你试过这个建议了吗

        基本上:

        您在应用服务器中部署了多少.war文件?

        在Worklight 5中只能有1个。请确保情况如此。

        您尝试过该建议吗

        基本上:

        您在应用服务器中部署了多少.war文件?

        在Worklight 5中只能有1个。请确保情况如此。

        我尝试从app_name.war中删除其他war文件并运行服务器,但我收到一个关于Worklight项目未初始化的错误。今天晚些时候或周一,我将回顾整个过程并仔细检查所有内容。似乎这就是解决方案(我可能只是在配置中遗漏了一些明显的东西),我将在它运行后接受答案。不幸的是,我无法解决此问题。但是,我们升级到Worklight 6后,此问题消失了。我将接受此答案,因为它似乎仍然是最有可能的解决方案。我尝试删除其他war文件并从app_name.war运行服务器,但出现错误关于Worklight项目未初始化。今天晚些时候或周一,我将回顾整个过程,并仔细检查所有内容。看起来这就是解决方案(我可能只是错过了配置中的一些明显内容),我将在它工作后接受答案。不幸的是,我无法解决此问题。但是,我们升级到Worklight 6后,此问题消失了。我