【问题标题】:Failed deploying application using Worklight Console: "Failed to deploy application <appName>.wlapp'. : ERROR使用 Worklight Console 部署应用程序失败:“无法部署应用程序 <appName>.wlapp”。:错误
【发布时间】:2013-05-17 04:59:34
【问题描述】:

我正在使用 Worklight 5.0.6.20130311-0918,在 RedHat Linux 上的 WebSphere 应用程序服务器 (7.0.0.21) 上运行,我正在尝试使用 Worklight Console 部署应用程序。我收到一个错误:

'部署应用失败 'CitizenCollaboration-android-1.0.5.wlapp'。 : 错误'

WebSphere 的 SystemOut.log 中没有太多信息。我尝试在 App Server Admin Console 中增加跟踪级别,但仍然没有足够的错误信息。

注意:我能够成功部署工作灯适配器

身份验证.xml

<staticResources>
    <resource id="worklightConsole" securityTest="WorklightConsole">
        <urlPatterns>/console*</urlPatterns>
    </resource>
</staticResources>


<securityTests>

   <customSecurityTest name="WorklightConsole">
     <test realm="WorklightConsole" isInternalUserID="true"/>
   </customSecurityTest>

    <mobileSecurityTest name="WAS-mobileSecurityTest">
        <testDeviceId provisioningType="none" />
        <!-- <testUser realm="wl_remoteDisableRealm"/>  -->
        <testUser realm="WASLTPARealm"/>
    </mobileSecurityTest>

    <webSecurityTest name="WAS-webSecurityTest">
        <testUser realm="WASLTPARealm"/> 
    </webSecurityTest>

    <customSecurityTest name="pushSecurityTest">
        <test realm="PushBackendRealm" isInternalUserID="true"/>
    </customSecurityTest>

</securityTests>

<realms>
    <realm loginModule="StrongDummy" name="SampleAppRealm">
        <className>com.worklight.core.auth.ext.FormBasedAuthenticator</className>
    </realm>
    <realm loginModule="requireLogin" name="WorklightConsole">
        <className>com.worklight.core.auth.ext.FormBasedAuthenticator</className>
        <onLoginUrl>/console</onLoginUrl>
    </realm>
    <realm loginModule="requireLogin" name="PushBackendRealm">
        <className>com.worklight.core.auth.ext.BasicAuthenticator</className>
        <parameter name="basic-realm-name" value="CitizenCollaboration" />
    </realm>
     <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="StrongDummy">
        <className>com.worklight.core.auth.ext.NonValidatingLoginModule</className>
    </loginModule>
    <loginModule name="requireLogin">
        <className>com.worklight.core.auth.ext.SingleIdentityLoginModule</className>
    </loginModule>
    <loginModule name="WASLTPAModule">
        <className>com.worklight.core.auth.ext.WebSphereLoginModule</className>
    </loginModule>
</loginModules>

【问题讨论】:

  • 在您的WAS 安装中找到Worklight 的server.log,看看那里是否有任何信息。添加有关您的应用程序/项目的一些信息。它是一个空白应用程序吗?你在那里有什么特别的事情吗?您是否更改了 worklight.properties 或 authenticationConfig.xml?如果是,您必须将 .war 文件重新部署到 WAS。使用此信息编辑问题。
  • 奇怪的是,我在linux环境下找不到server.log。如果我在 WebSphere 中为 worklight 类打开跟踪级别,信息将转到 trace.log。除了 worklight 核心类文件正在工作以及 phase3 和回滚之外,我看不到任何东西。是的,我重新部署了 war 文件,但在部署过程中我仍然没有收到太多错误信息。
  • 使用写入 SystemOut.log 的少量信息编辑问题,也请将 worklight.properties 从上面的评论移至问题...最后,添加您的 application-descriptor.xml。

标签: websphere-7 ibm-mobilefirst


【解决方案1】:

要做的一些实验:

  1. 确保您在两个 WAS 中使用相同的 Worklight 版本 (您已在其上安装的 Worklight Server)和 Worklight Studio (您用于最终生成 .wlapp 的 Eclipse 插件)。

    要找出您在 WAS 中安装的 Worklight 版本, 加载 Worklight Console 并单击右上角的“关于”链接。版本号显示在那里。

    要找出您安装的 Worklight 版本 Eclipse,进入帮助菜单>>关于>>单击Worklight图标。 版本号显示在那里。

    不建议使用不匹配的 Worklight 版本,并且可能/将会导致此类错误。

  2. 删除你在application-descriptor.xml中的各种环境元素中放置的securityTests,并生成一个新的.wlapp;尝试部署它,看看现在部署是否通过。

    另外,如果您在 application-descriptor.xml 中设置了 securityTests,请确保它们是正确编写的(与 authenticationConfig.xml 中定义的匹配)。

    这表明authenticationConfig.xml 中可能存在问题。

【讨论】:

  • 抓好伊丹。版本是问题所在。我在 5.0.6 服务器上使用 5.0.3 Studio。我将我的工作室升级到 5.0.6,一切正常。非常感谢
猜你喜欢
  • 2017-12-17
  • 2016-06-04
  • 2017-02-05
  • 2016-10-20
  • 2014-07-06
  • 1970-01-01
  • 2018-10-11
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多