在Worklight中部署工作灯适配器失败 [英] Failed to deploy worklight adapter in Worklight

查看:140
本文介绍了在Worklight中部署工作灯适配器失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在开发中部署 BPM项目时环境,一切都奏效。但是,当尝试将项目移动到WAS应用程序服务器时,适配器部署失败(.war和.wlapp部署成功传递):

 无法部署适配器'BPMAdapter.adapter'。 :适配器BPMAdapter中的过程getRest需要在authenticationConfig.xml中未定义的安全测试BPMAdapter-securityTest。 

我们已经验证了authenticationConfig.xml中存在的安全测试,以下是测试的部分,因此实际上是这样的:

 < securityTests> 
< customSecurityTest name =BPMAdapter-securityTest>
< test isInternalUserID =truerealm =BPMAuthRealm/>
< / customSecurityTest>
< webSecurityTest name =BPMApp-web-securityTest>
< testUser realm =BPMAuthRealm/>
< / webSecurityTest>
< mobileSecurityTest name =BPMApp-strong-mobile-securityTest>
< testUser realm =BPMAuthRealm/>
< testDeviceId provisioningType =none/>
< / mobileSecurityTest>
< mobileSecurityTest name =BPMApp-mobile-securityTest>
< testUser realm =BPMAuthRealm/>
< / mobileSecurityTest>
< / securityTests>

这些是我们采取的步骤:



测试服务器:Windows 2008 R2 Datacenter

数据库:DB2 10.1

应用服务器:WAS 8.0.0.3 ND


  1. 成功安装了具有DB2数据库的Worklight Server Enterprise 5.0.5。 (Worklight正在工作: http:// internal:9082


  2. 安装在服务器中为了在构建过程中没有JDBC问题)Worklight Studio Enterprise 5.0.5成功。


  3. 将项目导入Studio中的新工作区。 >


  4. 成功部署工作灯适配器BPMAdapter.xml


  5. 右键单击应用程序(BPMApp)和建立所有和部署成功。


  6. 打开 http:// internalIP:8080 / console 开发基于Jetty的工作台控制台)来查看应用程序是否已部署,确实显示在列表中(应用程序和适配器两者)。


  7. 预览为常见资源验证应用程序是否正常,成功。



    现在我们继续对WAS部署所需的文件进行调整:


  8. 将application-descriptor.xml文件从
    更改为http:// $ {local.IPAddress} :8080 http:// internalIP:9082 / worklight (此示例显示了相同的方法 http://goo.gl/xbynL


  9. 那时我们打开bin目录并复制到桌面上的所有* .wlapp文件和BPMAdapter.adapter文件的文件夹。


  10. 现在我们在worklight.properties文件中进行更改:



    publicWorkLightHostname =工作灯服务器的操作主机名
    publicWorkLightProtocol = http
    publicWorkLightPort = 9082
    publicWorkLightContext = / worklight
    wl.db.jndi.name = jdbc / WorklightDS
    wl.db.type = DB2
    wl.db.url = jdbc:db2:工作灯
    wl.db.username = wluser
    wl.db.password = correctpassword
    wl.reports.db.jndi.name = jdbc / WorklightReportsDS
    wl.reports.db.type = $ {wl.db.type}
    wl.reports.db.url = $ {wl.db.url}
    wl.reports.db.username = $ {wl.db.username}
    wl.reports.db.password = $ {wl.db.password}


  11. 保存工作ight.properties,然后立即* .war重新生成,我们将* .war复制到部署文件夹以供以后上传到WAS。


  12. 在WAS中创建企业应用程序根据:(Infocenter for WL 5.0.5 - 将定制.war文件部署到WebSphere Application Server完整配置文件),确保在类加载器顺序窗格中,单击首先加载本地类加载器的类(父进程)在模块部分的类加载器顺序窗格中,首先单击加载本地类加载器的类(父类最后)。
    WAR上传和启动成功。


  13. 使用.war上传(上下文根BPMWorklight),我们在浏览器中进入 http:// internalIP:9082 / BPMWorklight / console /#catalog
    并上传BPMApp-all.wlapp(我们不会上传其他三个iPhone,android或common ,只是-all.wlapp)上传成功。


  14. 我们继续上传 http:// internalIP:9082 / BPMdapter.adapter中的BPMdapter.adapter适配器失败:在适配器'BPMAdapter'中的过程'getRest'需要安全性testBPMAdapter-securityTest,它在authenticationConfig.xml中未定义。



解决方案

请参阅我的答案:使用方式部署应用程序失败工作灯Conso le:无法部署应用程序< appName> .wlapp'。 :错误



确保在WebSphere上安装的Worklight Server版本与用于创建.war的Worklight Studio Eclipse插件的Worklight Server版本相匹配, .wapapps和.adapter文件。



另外,请确保:


  1. 您使用相同的上下文根(BPMWorklight):




    • 在application-descriptor.xml

    • in worklight.properties

    • .war文件的名称


  2. 您已经删除了WAS上的Worklight安装默认安装的.war


感觉你有几个Worklight .war文件部署,他们以某种方式使用错误的.war,因此没有找到/使用正确的authenticationConfig.xml,这可能解释不能找到securityTest。



在Worklight 5.0.x中,一次只能有一个Worklight .war文件。


When deploying the BPM project in a development environment, everything works. However, when trying to move the project to the WAS application server, the adapter deployment fails (.war and .wlapp deployment passes successfully):

Failed to deploy adapter 'BPMAdapter.adapter'. : Procedure 'getRest' in adapter 'BPMAdapter' requires security test 'BPMAdapter-securityTest' which is not defined in authenticationConfig.xml.

We've verified the security test exists in authenticationConfig.xml, here's the portion of the tests, so it is, in fact present:

<securityTests>
    <customSecurityTest name="BPMAdapter-securityTest">
        <test isInternalUserID="true" realm="BPMAuthRealm"/>
    </customSecurityTest>
    <webSecurityTest name="BPMApp-web-securityTest">
        <testUser realm="BPMAuthRealm"/>
    </webSecurityTest>
    <mobileSecurityTest name="BPMApp-strong-mobile-securityTest">
        <testUser realm="BPMAuthRealm"/>
        <testDeviceId provisioningType="none"/>
    </mobileSecurityTest>
    <mobileSecurityTest name="BPMApp-mobile-securityTest">
        <testUser realm="BPMAuthRealm"/>
    </mobileSecurityTest>
</securityTests>

These are the steps we've taken:

Testing server: Windows 2008 R2 Datacenter
Database: DB2 10.1
Application Server: WAS 8.0.0.3 ND

  1. Installed Worklight Server Enterprise 5.0.5 with DB2 databases successfully. (Worklight is working at: http://internal:9082

  2. Installed in the server (for the sake of not having problems with JDBC during build) Worklight Studio Enterprise 5.0.5 successfully.

  3. Imported the project into a new workspace inside Studio.

  4. Deployed worklight adapter BPMAdapter.xml successfully.

  5. Right click on the app (BPMApp) and "Build All and Deploy" successfully.

  6. Opened http://internalIP:8080/console (Development Jetty based worklight console) to see if the application deployed, and indeed it's shown in the list (Both the apps and the adapter).

  7. Tested with "Preview as common resources" to verify the application works, success.

    Now we proceed to make the adjustments to the files needed for WAS deployment:

  8. Changed the in the application-descriptor.xml file from http://${local.IPAddress}:8080 to http://internalIP:9082/worklight (this example shows the same approach http://goo.gl/xbynL)

  9. At that point we open the bin dir and copy to a folder in the desktop all the *.wlapp files and the BPMAdapter.adapter file.

  10. Now we make the changes in the worklight.properties file:

    publicWorkLightHostname=the operational hostname for the worklight server publicWorkLightProtocol=http publicWorkLightPort=9082 publicWorkLightContext=/worklight wl.db.jndi.name=jdbc/WorklightDS wl.db.type=DB2 wl.db.url=jdbc:db2:Worklight wl.db.username=wluser wl.db.password=correctpassword wl.reports.db.jndi.name=jdbc/WorklightReportsDS wl.reports.db.type=${wl.db.type} wl.reports.db.url=${wl.db.url} wl.reports.db.username=${wl.db.username} wl.reports.db.password=${wl.db.password}

  11. Saved the worklight.properties and immediately the *.war is regenerated, we copy the *.war to the deployment folder for later upload to WAS.

  12. Create in WAS the Enterprise application according to: (Infocenter for WL 5.0.5 - Deploying a customization .war file to WebSphere Application Server Full Profile) making sure that In the "Class loader order" pane, click Classes loaded with local class loader first (parent last) and In the modules section the "Class loader order" pane, click Classes loaded with local class loader first (parent last). WAR upload and start-up is successful.

  13. With the .war uploaded (context root BPMWorklight) we go in the browser to http://internalIP:9082/BPMWorklight/console/#catalog and upload the BPMApp-all.wlapp (we don't upload the other three iPhone, android or common, just the -all.wlapp) the upload is successful.

  14. We proceed to upload in http://internalIP:9082/BPMWorklight/console/#catalog the adapter BPMAdapter.adapter, we get the error "Failed to deploy adapter 'BPMAdapter.adapter'. : Procedure 'getRest' in adapter 'BPMAdapter' requires security test 'BPMAdapter-securityTest' which is not defined in authenticationConfig.xml."

解决方案

See my answer here: Failed deploying application using Worklight Console: "Failed to deploy application <appName>.wlapp'. : ERROR

Make sure that the Worklight Server version that is installed on WebSphere matches that of the Worklight Studio Eclipse plug-in used to create the .war, .wlapps and .adapter files.

In addition, make sure that:

  1. you use the same context root ("BPMWorklight") for all:

    • in application-descriptor.xml
    • in worklight.properties
    • name of the .war file
  2. you have removed the previous .war installed by default by the Worklight installation on WAS

I am getting the feeling that you have several Worklight .war files deployed and they are somehow using the wrong .war, thus not finding/using the correct authenticationConfig.xml, which could explain not finding the securityTest.

In Worklight 5.0.x, there should be only 1 Worklight .war file at a time.

这篇关于在Worklight中部署工作灯适配器失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆