0

I deployed a war file to MobileFirst WAS Liberty server using this tutorial: https://www.ibm.com/support/knowledgecenter/SSHS8R_7.0.0/com.ibm.worklight.deploy.doc/devref/t_ant_tasks_configure_appserver.html

It says build successful, but I can't see the war file being deployed in the Server Configuration Tool, the runtime environment is still empty.

Is it due to the tools.jar not being installed? or there should be an existing runtime environment? then run "ant -f configure-liberty-oracle.xml" and the war file there will just be updated?

Here's the logs:

C:\IBM\MobileFirst_Platform_Server\shortcuts>ant -f configure-liberty-oracle.xml
 install
Unable to locate tools.jar. Expected to find it in C:\IBM\Installation Manager\e
clipse\jre_7.0.9030.20160210_1426\lib\tools.jar
Buildfile: C:\IBM\MobileFirst_Platform_Server\shortcuts\configure-liberty-oracle
.xml

> install:
[configureapplicationserver] Logging output of task <configureApplicationServer>
 to file C:\Users\fphmfpdev\Documents\IBM MobileFirst Platform Server Data\Confi
guration Logs\configureApplicationServer_2016_04_14_11_10_19.log
[configureapplicationserver] ** Creating migrated war file
[configureapplicationserver] Apr 14, 2016 11:10:28 AM com.worklight.ant.migratio
n.MigrationTask MigrationTask.execute
[configureapplicationserver] INFO: FWLST2014I: The migration process was bypasse
d, because the project WAR file of version 7.0.0.00.20150312-0731 is compatible
with the server version 7.0.0.00.20150312-0731.
[configureapplicationserver] Apr 14, 2016 11:10:28 AM com.worklight.ant.migratio
n.MigrationTask MigrationTask.execute
[configureapplicationserver] INFO: FWLST2015I: The project WAR file was successf
ully copied to the destination location 'C:\Users\FPHMFP~1\AppData\Local\Temp\wl
a5127457410\Sunlife.war'.
[configureapplicationserver] ** Created migrated war file
[configureapplicationserver] Copying C:\IBM\WebSphere\Liberty\usr\shared\resourc
es\wladmin\oracle\ojdbc6.jar to C:\IBM\WebSphere\Liberty\usr\shared\resources\Su
nlifeTestApp\oracle\ojdbc6.jar
[configureapplicationserver] Copying C:\IBM\WebSphere\Liberty\usr\servers\wrklgh
t\server.xml to C:\IBM\WebSphere\Liberty\usr\servers\wrklght\server.xml.bak161
[configureapplicationserver] Encoding password for Liberty
[configureapplicationserver] Encoding password for Liberty
[configureapplicationserver] Modifying C:\IBM\WebSphere\Liberty\usr\servers\wrkl
ght\server.xml
[configureapplicationserver] Copying C:\Users\FPHMFP~1\AppData\Local\Temp\wla512
7457410\Sunlife.war to C:\IBM\WebSphere\Liberty\usr\servers\wrklght\apps\Sunlife
.war
[configureapplicationserver] *** INFO: ***
[configureapplicationserver] The MobileFirst Project WAR file has been installed
 on the application server,
[configureapplicationserver] but it will not work until the application server h
as been restarted.
[configureapplicationserver] You now need to restart it.
[configureapplicationserver] *************

BUILD SUCCESSFUL
Total time: 9 seconds
black1011
  • 284
  • 3
  • 18
  • The admin is installed first followed by the runtime installation.You have execute ant "install" which installs a runtime to an existing administration services component. Have you installed the administration services already? – Vivin K Apr 14 '16 at 10:49
  • @VivinK I've installed the Configuration already. Is that what you mean by administration services? – black1011 Apr 14 '16 at 10:59
  • I meant this step - "ant -f ${ant.file.basename} adminstall" – Vivin K Apr 14 '16 at 11:09

1 Answers1

3

When you have created a configuration the tool creates a corresponding Ant script that is run when you deploy this configuration. During this operation, the admin component is installed along with the console unless you deselected the option in the creation wizard.

Once this configuration is created, you may add one or several runtimes to this configuration still in the Server Configuration Tool by selecting the configuration in the configuration tree and select "Add a MobileFirst runtime environment" from the contextual menu. By doing so, a new Ant script is created and executed at the end of the runtime creation wizard to deploy this runtime.

The point is that the Server Configuration Tool is only aware of the runtimes that you creates using its wizards. It is by no means synchronized with the execution of other Ant scripts that you execute outside of this graphical environment. This explains why you can't see the runtime you deployed whereas your Ant script execution ends up with a "Build Success" state.