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
Installed Worklight Server Enterprise 5.0.5 with DB2 databases successfully. (Worklight is working at:
http://internal:9082
Installed in the server (for the sake of not having problems with JDBC during build) Worklight Studio Enterprise 5.0.5 successfully.
Imported the project into a new workspace inside Studio.
Deployed worklight adapter BPMAdapter.xml successfully.
Right click on the app (BPMApp) and "Build All and Deploy" successfully.
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).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:
Changed the in the application-descriptor.xml file from
http://${local.IPAddress}:8080
tohttp://internalIP:9082/worklight
(this example shows the same approach http://goo.gl/xbynL)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.
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}
Saved the worklight.properties and immediately the *.war is regenerated, we copy the *.war to the deployment folder for later upload to WAS.
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.
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.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:
you use the same context root ("BPMWorklight") for all:
- in application-descriptor.xml
- in worklight.properties
- name of the .war file
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.
来源:https://stackoverflow.com/questions/16683749/failed-to-deploy-worklight-adapter-in-worklight