Why is Nxlog is using up 100% cpu leaving system unusable? - nxlog

os: Windows server 2008 R2 with
Nxlog Enterprise 4.0.3550 (64bit)
When i start nxlog it takes up 100%cpu i set the logging mode to debug but i wasnt able to find meaningful information from it. Below is my nxlog configuration where logs are sent to SIEM server 192.168.0.100
define ROOT C:\Program Files\nxlog
define CERTDIR %ROOT%\cert
define CONFDIR %ROOT%\conf
define LOGDIR %ROOT%\data
define LOGFILE %LOGDIR%\nxlog.log
Moduledir %ROOT%\modules
CacheDir %ROOT%\data
Pidfile %ROOT%\data\nxlog.pid
SpoolDir %ROOT%\data
LogFile %LOGFILE%
LogLevel DEBUG
<Extension _syslog>
Module xm_syslog
</Extension>
<Extension _exec>
Module xm_exec
</Extension>
<Extension _json>
Module xm_json
</Extension>
### Define our inputs ###
<Input winlog>
Module im_msvistalog
ReadFromLast TRUE
ResolveSID TRUE
<QueryXML>
<QueryList>
<Query Id='1'>
<Select Path='Application'>*</Select>
<Select Path='Security'>*</Select>
<Select Path='System'>*</Select>
</Query>
</QueryList>
</QueryXML>
</Input>
<Output winout>
Module om_tcp
Host 192.168.0.100
Port 514
Exec to_json(); $Message = $raw_event;to_syslog_bsd();
</Output>
<Route 1>
Path winlog => winout
</Route>
include %CONFDIR%\extra.conf
The debug log looks like in the pastebin link pastebin.com

This has been fixed since in nxlog-4.0.3689.

Related

MSIX -> Local Activation permission for COM server

My package is installed in sideloaded way and keeps encountering the app-specific permission error.
Yes many suggest to alter permissions and owners manully in regedit and Component Services.
My app is actually missing in the DCOM Config under the Component Services (DCOMCNFG, DCOMCNFG -32).
I see neither errors in the proc monitor nor warnings. How can I grant permissions in this case and why isn't this specific task accomplished by the MSIX installer ?
The application-specific permission settings do not grant Local Activation permission for the COM Server application with CLSID
{2593F8B9-4EAF-457C-B68A-50F6B8EA6B54}
and APPID
{15C20B67-12E7-4BB6-92BB-7AFF07997402}
to the user PRECISION\Tommy SID (S-1-5-21-3771326467-2290839719-591499861-1001) from address LocalHost (Using LRPC) running in the application container Unavailable SID (Unavailable). This security permission can be modified using the Component Services administrative tool.
I attmepted to grant DCOM permission by using this PS modul but to no avail:
Grant, Revoke, Get DCOM permissions using PowerShell
Import-Module .\DCOMPermissions
Grant-DCOMPermission -ApplicationID "{9CA88EE3-ACB7-47C8-AFC4-AB702511C276}" -Account "SYSTEM" -Type Launch -Permissions LocalLaunch,LocalActivation -OverrideConfigurationPermissions
Keep witnessing the error in the Event Viewer and this prohibits my app to start up:
Event Viewer exhibiting the error ID 10010
I build the MSIX package with the help of this AppxManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<Package xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10">
<Identity Name="WeatherHistory" Version="0.7.0.2" Publisher="CN=Contoso Software, O=Contoso Corporation, C=US" />
<Properties>
<DisplayName>Weather History</DisplayName>
<PublisherDisplayName>Cosmic ray</PublisherDisplayName>
<Logo>Images/satelite.png</Logo>
</Properties>
<Dependencies>
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.17763.0" MaxVersionTested="10.0.18363.0" />
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.17763.0" MaxVersionTested="10.0.18363.0" />
</Dependencies>
<Resources>
<Resource Language="en-us" />
</Resources>
<Applications>
<Application Id="Weather.History" Executable="Weather.History.Splash.exe" EntryPoint="Weather.History.Splash">
<VisualElements DisplayName="Weather History" Description="Frontend" Square150x150Logo="Images/satelite.png" Square44x44Logo="Images/satelite.png" BackgroundColor="yellow" xmlns="http://schemas.microsoft.com/appx/manifest/uap/windows10" />
<Extensions>
<Extension Category="windows.fullTrustProcess" Executable="Weather.History.Stylet.exe" xmlns="http://schemas.microsoft.com/appx/manifest/desktop/windows10" />
</Extensions>
</Application>
</Applications>
<Capabilities>
<Capability Name="runFullTrust" xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities" />
<Capability Name="internetClient" />
</Capabilities>
</Package>
... and addded code to my package entry point exe as
private async void LaunchProduct()
{
try
{
if (ApiInformation.IsApiContractPresent("Windows.ApplicationModel.FullTrustAppContract", 1, 0))
{
await FullTrustProcessLauncher.LaunchFullTrustProcessForCurrentAppAsync();
}
else
{
Exit($"Your Windows version is not supported.");
}
}
catch (Exception e)
{
Exit("Failed to launch Weather History", e);
}
}
There is a WPF splash attempts to launch another WPF both are based on the common TFM .NET 4.7. The first WPF ought to launch the second as a trusted process harnessing this MSIX package extension infrastructure. Pro boostrapper mechanism. If my take on is right.
This ain't a pacage bundle, so what architecture is my package actually targeting ? I always compile Any CPU.
I finally build the package by invoking the respective tool as :
makeappx.exe pack /v /o /f mapping.map /m Appxmanifest.xml /p ./Weather.History.msix
The EntryPoint indeed must be designated as trusted.
EntryPoint="Windows.FullTrustApplication"

ovf deployment on VMWare environment with guestinfo property

I am trying to deploy a VM using OVF configuration and my goal is to pass the key-value provided by the user in the OVF environment to the VM using VMware guestinfo.
Following are the settings/attributes I have added to my OVF file
<ProductSection ovf:required="false">
<Info>Virtual Appliance</Info>
<Property ovf:userConfigurable="true" ovf:type="string"
ovf:key="guestinfo.hello" ovf:value="">
<Label>hello</Label>
<Description>enter some string</Description>
</Property>
</ProductSection>
....
<VirtualHardwareSection ovf:transport="com.vmware.guestInfo">
....
After deploying the VM, I am able to verify the property in OVF environment under VM vApp Options. Here is what I see
<?xml version="1.0" encoding="UTF-8"?>
<Environment
xmlns="http://schemas.dmtf.org/ovf/environment/1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:oe="http://schemas.dmtf.org/ovf/environment/1"
xmlns:ve="http://www.vmware.com/schema/ovfenv"
oe:id=""
ve:vCenterId="vm-xxxx">
<PlatformSection>
<Kind>VMware ESXi</Kind>
<Version>6.0.0</Version>
<Vendor>VMware, Inc.</Vendor>
<Locale>en</Locale>
</PlatformSection>
<PropertySection>
<Property oe:key="guestinfo.hello" oe:value="world"/>
</PropertySection>
<ve:EthernetAdapterSection>
<ve:Adapter ve:mac="00:50:56:b2:d2:8a" ve:network="VLAN1804-
xxx.xxx.xxx.0/25" ve:unitNumber="7"/>
<ve:Adapter ve:mac="00:50:56:b2:83:ea" ve:network="VLAN1804-
xxx.xxx.xxx.0/25" ve:unitNumber="8"/>
</ve:EthernetAdapterSection>
</Environment>
Finally, When I log in to the box and try to get the guestinfo property using vmtoolsd cmd
vmtoolsd --cmd "info-get hello"
I am getting
No value found
I need to help to debug this problem. Not really sure if I am missing something in my OVF configuration. Thanks in Advance. I appreciate your help!
I guess is there no direct way to get the key specifically but I am able to run vmtoolsd --cmd "info-get guestinfo.ovfenv" on my box and output is
<?xml version="1.0" encoding="UTF-8"?>
<Environment
xmlns="http://schemas.dmtf.org/ovf/environment/1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:oe="http://schemas.dmtf.org/ovf/environment/1"
xmlns:ve="http://www.vmware.com/schema/ovfenv"
oe:id=""
ve:vCenterId="vm-xxxx">
<PlatformSection>
<Kind>VMware ESXi</Kind>
<Version>6.0.0</Version>
<Vendor>VMware, Inc.</Vendor>
<Locale>en</Locale>
</PlatformSection>
<PropertySection>
<Property oe:key="guestinfo.hello" oe:value="world"/>
</PropertySection>
<ve:EthernetAdapterSection>
<ve:Adapter ve:mac="00:50:56:b2:d2:8a" ve:network="VLAN1804-
xxx.xxx.xxx.0/25" ve:unitNumber="7"/>
<ve:Adapter ve:mac="00:50:56:b2:83:ea" ve:network="VLAN1804-
xxx.xxx.xxx.0/25" ve:unitNumber="8"/>
</ve:EthernetAdapterSection>
</Environment>
which is what I see in OVF environment for the vm in vcenter. Assuming this can be one way to get the key-value from the vm using vmtools

How to get NLog working outside VS Development Environment

I have a bit of a conundrum here. For some reason my Nlog implementation will no longer work from an installed executable, works perfectly well from the VS2013 development environment, but nada from the installed executable.
DevEnv is VB.NET.
My first port of call in terms of diagnostics was to add:
internalLogFile="c:\log.txt" internalLogLevel="Trace"
to the nlog.config file, but this suffers from the same problem, (works in devenv but not from executable). My log files get written to a folder structure in the CommomApplicationData folder,
d:\programdata\CompanyName\AppName\Logs
nlog.config is installed in and read from:
d:\programdata\CompanyName\AppName\QueryConfig
the reason for this is that our corporate IT security prohibits writes to the C: drive (other than via authorised installs), and I have a variable in the nlog.config file 'LogId', that needs to be updated from the app. Here is my nlog.config file:
<?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" autoReload="true"
internalLogFile="c:\log.txt" internalLogLevel="Trace">
<variable name="companyName" value="Company Name"/>
<variable name="logFolder" value="${specialfolder:folder=CommonApplicationData}/${companyName}/AppName/Logs/"/>
<variable name="startDelim" value="["/>
<variable name="endDelim" value="]"/>
<variable name="filename" value="${date:format=yyyy-MM-dd}_${gdc:item=appName}.log"/>
<variable name="fieldDelim" value="|"/>
<variable name="logId" value="1"/>
<variable name="headerLayout" value="Application Name: ${processname} File Version: ${gdc:item=fileVersion} Released: ${gdc:item=releaseDate} User: ${windows-identity}" />
<variable name="normalLayout" value="${gdc:item=logId}${fieldDelim}${date:format=HH\:mm\:ss}${fieldDelim}${windows-identity}${fieldDelim}${level}${fieldDelim}${message}${exception:format=tostring}" />
<variable name="traceLayout" value="${gdc:item=logId}${fieldDelim}${date:format=HH\:mm\:ss}${fieldDelim}${windows-identity}${fieldDelim}${level}${fieldDelim}${message}${exception:format=tostring}"/>
<targets async="true">
<target name="fileHeader"
xsi:type="File"
fileName="${logFolder}${filename}"
layout="${headerLayout}"/>
<target name="normal"
xsi:type="File"
fileName="${logFolder}${filename}"
layout="${normalLayout}"/>
</targets>
<rules>
<logger name="HeaderLogger" minlevel="Info" writeTo="fileHeader" final="true"/>
<logger name="*" minlevel="Trace" writeTo="normal" />
</rules>
</nlog>
This Nlog implementation has worked fine for the last 5 years the only difference is the diversion of the nlog.config and log file destination to the CommonApplicationData folder. Testing of a windows service app that uses the same logging implementation works fine from the same machine, the only differences are that it runs as a service under the system account and does not require write access to the Nlog.config file, as a consequence of which nlog.config resides in the application folder on the C: drive. Hope somebody has some input into this because its driving me crazy...!
Edit: I should add, that I have full Admin rights on this machine under my corporate user ID, however normal users won't.
Kind Regards
Paul J.
EDITED 2018-08-14
OK, so... as suggested have altered the relevant code to launch internal logging programmatically to write to log.txt in c:\temp. Curiously, this appears to work to an extent. However content of the output is rather sparse when compared to internal log output when launched via the config file. As expected, the actual application logging remains inactive.
Sample log from log.txt when internal logging implemented programmatically:
2018-08-13 15:21:34.9302 Debug Targets for HeaderLogger by level:
2018-08-13 15:21:34.9302 Debug Trace =>
2018-08-13 15:21:34.9302 Debug Debug =>
2018-08-13 15:21:34.9302 Debug Info =>
2018-08-13 15:21:34.9412 Debug Warn =>
2018-08-13 15:21:34.9412 Debug Error =>
2018-08-13 15:21:34.9412 Debug Fatal =>
2018-08-13 15:21:37.0902 Debug Targets for HeaderLogger by level:
2018-08-13 15:21:37.0902 Debug Trace =>
2018-08-13 15:21:37.0902 Debug Debug =>
2018-08-13 15:21:37.0932 Debug Info =>
2018-08-13 15:21:37.0932 Debug Warn =>
2018-08-13 15:21:37.0932 Debug Error =>
2018-08-13 15:21:37.0932 Debug Fatal =>
2018-08-13 15:21:39.1012 Trace LogFactory.Flush(00:00:15)
...
finally when the app is closed down the log finishes with:
2018-08-13 15:35:56.9262 Info Shutting down logging...
2018-08-13 15:35:56.9262 Info Logger has been shut down.
Kind Regards
Paul.

OrientDB Update runs into JVM memory issue 'Cannot allocate memory'

I just updated my OrientDB to the latest Version. So I just took the complete folder to test it without my custom settings. Then I tried to start the new version with:
sh server.sh
OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00000000e04a0000, 357957632, 0) failed; error='Cannot allocate memory' (errno=12)
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (malloc) failed to allocate 357957632 bytes for committing reserved memory.
# An error report file with more information is saved as:
# /home/ubuntu/orientdb/bin/hs_err_pid1885.log
But as you can see there is trouble with the JVM. Something with memory. But I did not change any setting. So how can this come?
I also cannot rember to set some custom Java settings on my system. Is there a way to check it?
What I changed
<properties>
<!-- DATABASE POOL: size min/max -->
<entry name="db.pool.min" value="1"/>
<entry name="db.pool.max" value="50"/>
<!-- PROFILER: configures the profiler as <seconds-for-snapshot>,<archive-snapshot-size>,<summary-size> -->
<entry name="profiler.enabled" value="true"/>
<!-- <entry name="profiler.config" value="30,10,10" /> -->
<!-- LOG: enable/Disable logging. Levels are: finer, fine, finest, info,
warning -->
<entry name="log.console.level" value="info"/>
<entry name="log.file.level" value="fine"/>
<!-- Memory -->
<entry name="memory.chunk.size" value="‭20971520‬"/>
</properties>
You should change one line in sever.sh from ORIENTDB_OPTS_MEMORY="-Xms512m -Xmx512m" to ORIENTDB_OPTS_MEMORY="-Xms128m -Xmx256m"

MFP CLI cannot build-deploy project initially created with MFP Studio

Problem Context:
We initially created a MFP hybrid project with the iOS environment using MFP Studio plugin for Eclipse. We have this project under source control (Git on DevOps). Some team members in our team are doing iOS development for this project and since they are not familiar with Eclipse, they are wanting to use the CLI instead. Other developers in the same team will continue to use Studio since they are writing Java code for the MFP adapters and want to leverage the capabilities Eclipse provides such as compilation, code auto-completion, etc.
Problem:
After pulling down the MFP project code from Git (fresh pull), if Studio is first used to “Build All Environments” and “Run on MobileFirst Platform”, we can then run the MFP app without any problems. We can then also switch to the CLI for building and deploying artifacts and the CLI commands work just fine.
Now, say that after pulling down the code from Git (fresh pull), instead of using Studio, we start using right away the CLI for building and deploying artifacts. Under such scenario, the CLI throws errors. It seems that the CLI is missing steps that Studio knows how to do. The errors we get when using the CLI right away for building and deploying (mfp bd) after a fresh pull from Git are the following:
$ mfp bd
All apps and adapters were successfully built.
Initializing MobileFirst Console.
BUILD FAILED
/Applications/IBM/MobileFirst-CLI/mobilefirst-cli/node_modules/generator-worklight-server/lib/build.xml:147: Compile failed; see the compiler error output for details.
Total time: 1 second
Error: Build process failed. Please check the stack above for details.
BUILD FAILED
/Applications/IBM/MobileFirst-CLI/mobilefirst-cli/node_modules/generator-worklight-server/lib/build.xml:380: Element <project> inside <configureApplicationServer>: File '/Users/olivieri/git/Ready.App.3.Hatch/HatchReadyApp/bin/HatchReadyApp.war' does not exist.
Total time: 1 second
Error: Build process failed. Please check the stack above for details.
objc[81801]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home/bin/java and /Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined.
Starting server worklight.
Server worklight started with process ID 81800.
[wladm] Unexpected response from http://192.168.1.126:10080/worklightadmin/management-apis/1.0/runtimes/HatchReadyApp/adapters?locale=en_US:
[wladm] <?xml version="1.0" encoding="UTF-8"?>
[wladm] <deploy-adapter-result ok="false" productVersion="6.3.0.00-20150214-1702">
[wladm] <transaction id="168" type="UPLOAD_ADAPTER" status="FAILURE" timeCreated="2015-04-13T13:53:18.599Z" timeUpdated="2015-04-13T13:53:18.870Z" userName="admin" appServerId="Liberty">
[wladm] <project name="HatchReadyApp"/>
[wladm] <description filename="SBBAdapter.adapter" name="SBBAdapter" alreadyDeployed="false"/>
[wladm] <errors>
[wladm] <error mbeanName="com.worklight.common.server.jmx.api:qualifier=HatchReadyApp,type=ProjectManagement" date="2015-04-13T13:53:18.831Z" phase="PREPARE" code="FAILURE" exception="RuntimeException" details="Runtime synchronization failed. Cannot deploy adapter to runtime"/>
[wladm] </errors>
[wladm] <warnings/>
[wladm] </transaction>
[wladm] </deploy-adapter-result>
Error: The MobileFirst server that you have configured does not appear to be running. Start the server with 'mobilefirst start'.
More details:
If I start the MFP server first before doing a 'mfp bd', it also fails with a similar error:
$ mfp start
Initializing MobileFirst Console.
BUILD FAILED
/Applications/IBM/MobileFirst-CLI/mobilefirst-cli/node_modules/generator-worklight-server/lib/build.xml:147: Compile failed; see the compiler error output for details.
Total time: 1 second
Error: Build process failed. Please check the stack above for details.
BUILD FAILED
/Applications/IBM/MobileFirst-CLI/mobilefirst-cli/node_modules/generator-worklight-server/lib/build.xml:380: Element <project> inside <configureApplicationServer>: File '/Users/olivieri/git/Ready.App.3.Hatch/HatchReadyApp/bin/HatchReadyApp.war' does not exist.
Total time: 1 second
Error: Build process failed. Please check the stack above for details.
objc[55444]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home/bin/java and /Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined.
Starting server worklight.
Server worklight started with process ID 55443.
MFP info output:
$ mfp info
OS: darwin x64
Release: 14.1.0
System Memory: 89MB free out of 16384MB
Node: v0.10.30
MobileFirst CLI: 6.3.0.00.20150214-1708
Current directory: /Users/olivieri/git/Ready.App.3.Hatch/HatchReadyApp
Current project: /Users/olivieri/git/Ready.App.3.Hatch/HatchReadyApp
Adapter: getOffers (/Users/olivieri/git/Ready.App.3.Hatch/HatchReadyApp/adapters/SBBAdapter/SBBAdapter.xml)
Description: SBBAdapter
Type: http
Procedures: test, getUser, getAccounts, getTransactions, getGoals, getDashboardData, getFeasibility, submitAuthentication, getTradeoffSolution, getOffers
Application: Hatch (/Users/olivieri/git/Ready.App.3.Hatch/HatchReadyApp/apps/Hatch/application-descriptor.xml)
Description: Hatch
Type: hybrid application
Features:
Environments: iphone
Skins:
Server location: /Users/olivieri/.ibm/mobilefirst/6.3.0/server
Server binary: /Users/olivieri/.ibm/mobilefirst/6.3.0/server/wlp/bin/server
MobileFirst instance: /Users/olivieri/.ibm/mobilefirst/6.3.0/server/wlp/usr/servers/worklight
objc[85669]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home/bin/java and /Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined.
WebSphere Application Server 8.5.5.3 (1.0.6.cl50320140731-0257) on Java HotSpot(TM) 64-Bit Server VM, version 1.7.0_51-b13 (en_US)
Environment variables:
TERM_PROGRAM: Apple_Terminal
ANDROID_HOME: /Users/olivieri/android-sdks
SHELL: /bin/bash
TERM: xterm-256color
TMPDIR: /var/folders/c9/gf_f0_sd60q1mm9kxwgvlxsr0000gn/T/
Apple_PubSub_Socket_Render: /private/tmp/com.apple.launchd.JKtd63AtGc/Render
TERM_PROGRAM_VERSION: 343.6
TERM_SESSION_ID: D5FA1866-C7B1-4AC0-A045-B8BD0AF18A5D
ANT_HOME: /Users/olivieri/Development/apache-ant-1.9.4
USER: olivieri
SSH_AUTH_SOCK: /private/tmp/com.apple.launchd.ECR6tzx7Xe/Listeners
__CF_USER_TEXT_ENCODING: 0x1F5:0x0:0x0
PATH: /Users/olivieri/Development/apache-ant-1.9.4/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Applications/IBM/MobileFirst-CLI:/Users/olivieri/Development/gradle-1.12/bin:/Users/olivieri/android-sdks/tools:/Users/olivieri/android-sdks/platform-tools
PWD: /Users/olivieri/git/Ready.App.3.Hatch/HatchReadyApp
LANG: en_US.UTF-8
XPC_FLAGS: 0x0
XPC_SERVICE_NAME: 0
SHLVL: 2
HOME: /Users/olivieri
LOGNAME: olivieri
DISPLAY: /private/tmp/com.apple.launchd.8nfQqEAeMS/org.macosforge.xquartz:0
_: /Applications/IBM/MobileFirst-CLI/IBMnode/bin/node
WLP_USER_DIR: /Users/olivieri/.ibm/mobilefirst/6.3.0/server/wlp/usr
Thanks to the IBM folks who helped us resolve this problem. To fix this issue, we had to make two changes to the following file: /Applications/IBM/MobileFirst-CLI/mobilefirst-cli/node_modules/generator-worklight-server/lib/build.xml
We replaced the following two sections [in this file] as shown below:
1)
<!--
<path id="server-classpath">
<fileset dir="${worklight.jars.dir}" includes="worklight-jee-library.jar" />
<fileset dir="${worklight.server.install.dir}/wlp/dev" includes="**/*.jar" />
</path>
-->
<path id="server-classpath">
<fileset dir="${worklight.jars.dir}" includes="worklight-jee-library.jar" />
<fileset dir="${worklight.server.install.dir}/wlp/dev" includes="**/*.jar" />
<!-- add server/lib folder to classpath -->
<fileset dir="${worklight.app.dir}/../server/lib" includes="**/*.jar" />
</path>
2)
<!--
<target name="build-WAR" description="Build worklight WAR for project">
<echo message="Building worklight WAR for project ${ProjectName}" />
<javac
srcdir="server/java"
destdir="bin/classes"
classpathref="server-classpath"
verbose="true"
includeantruntime="false"
/>
<war-builder
projectfolder="${basedir}"
destinationfolder="bin/war"
warfile="bin/${ProjectName}.war"
classesfolder="bin/classes">
</war-builder>
</target>
-->
<target name="build-WAR" description="Build worklight WAR for project">
<echo message="Building worklight WAR for project ${ProjectName}" />
<!-- first clear out the existing bin/classes contents -->
<delete includeemptydirs="true">
<fileset dir="bin/classes" includes="**/*"/>
</delete>
<javac
srcdir="server/java"
destdir="bin/classes"
classpathref="server-classpath"
verbose="true"
includeantruntime="false"
/>
<if>
<available file="server/java/resources" />
<then>
<!-- now copy the contents of server/java/resources into bin/classes so they get included in the war -->
<copy todir="bin/classes/resources" failonerror="false">
<fileset dir="server/java/resources"/>
</copy>
</then>
</if>
<war-builder
projectfolder="${basedir}"
destinationfolder="bin/war"
warfile="bin/${ProjectName}.war"
classesfolder="bin/classes">
</war-builder>
</target>
After making the above changes, we could then run the 'mfp restart' and 'mfp bd' commands without any errors.