0
votes

I used a very basic build file taken from the sample configure-was-derby.xml:

<property name="worklight.server.install.dir" value="C:/Worklight70"/>
<property name="config.migration.tool.enable" value="true"/>
<target name="minimal-update">
<updateapplicationserver id="" contextroot="/AreaClienti">
<project warfile="C:/temp/AreaClienti.war"/>
<applicationserver>
<websphereapplicationserver installdir="C:/WebSphere85/AppServer"/" profile="AppSrv01" user="wasuser" password="xxxxx">
<server name="server1"/>
</websphereapplicationserver>
</applicationserver>
</updateapplicationserver>
</target>

Recently I was able to reproduce the issue on my laptop installation and I believe I found the cause: please review the following analysis and confirm the results.

I originally installed the war file manually from WAS admin console, and when I run the Ant minimal-update with the above build file it failed with the mentioned error

The MobileFirst Project WAR file is not currently deployed in the WAS profile at ...

Then I removed the manually installed war file and reinstalled it using Ant install target. At this point the minimal-update run successfully.

I found out that the Ant installation created into WAS config structure

profile_root/config/cells/cell_name/nodes/node_name/servers/server1

a new Worklight directory containing the worklight-jee-library.jar file and a derby subdir with the derby driver jar.

Apparently the minimal-update Ant task makes a preliminary check on the existence of the Worklight directory and it fails if it's missing. Can you please confirm that this is true ?

Of course the Worklight directory is not created by the standard WAS installation process. So, after a console installation of the runtime war the Ant minimal-update always fails!

If I manually add the Worklight dir in WAS config, then the Ant minimal-update starts running just fine. IMHO, altering in such way the standard WAS config structure is not very clean. Said that, is it a valid workaround in case we initially install the runtime war with standard WAS admin procedures ?

Furthemore, also the returned error message could have been a bit more clear: please let me know if there is any debug option to make the Ant tasks more verbose.

At last, let me ask one further question.

I noticed that the Ant execution writes log files in the directory

user_root/.mobilefirst_platform_server

Is there any way to redirect those logs into a different dir to avoid the risk of filling up the user root ?

1
Can you edit into your question (without exposing anything confidential) the XML segment where you call updateapplicationserver? Maybe we can spot what's wrong.Andrew Ferrier

1 Answers

0
votes

Apparently the minimal-update Ant task makes a preliminary check on the existence of the Worklight directory and it fails if it's missing. Can you please confirm that this is true ?

That's correct.

Is there any way to redirect those logs into a different dir to avoid the risk of filling up the user root ?

Unfortunately not.