JDA WMS — mocaserver.log naming convention on Windows Server

Ali Ahmed
3 min readNov 9, 2019

--

As a RedPrairie/JDA WMS Application Administrator or Developer, there’s a constant need to look at trace files to identify the underlying cause of an issue. You also may need to look at mocaconmgr.log (for RP 2005–2009) or mocaserver.log (for RP 2011+) for clues. The naming convention, however, is different on Redhat (Linux) than it is on Windows Server. For Linux, it’s pretty straight forward–the standard naming convention is mocaserver.log. This can be changed from the MOCA Registry by uncommenting the output variable and changing the directory path and filename.

Below is the Service Section of the RP/JDA WMS registry.

#Service section
#
#The service section is used to define how the server is started up when started via rp start on Linux/UNIX platforms. For Windows, you must use the services.xml. See the Developer Guide for more information.
#

[SERVICE]
#The command that is ran when the service starts up. To enable full tracing set this to mocaserver -t* -o
#command=mocaserver
#
#The file that standard output is written to that comes from the server.
#output=%LESDIR%\log\mocaserver.log

But what if you’re running RP/JDA WMS Application on a Windows Server? What do you do?

Unfortunately, the MOCA Developer guide may not be easy to interpret and it only briefly goes down into the services.xml file (which by the way is located in MOCADIR\data)

Here’s an excerpt from the MOCA Developer Guide:

“ These log files are written to by the Apache Commons Daemon when a service is installed, uninstalled, started or stopped:

• %LESDIR%/log/<application name>.<environment name>.YYYY-MM-DD.log

• %LESDIR%/log/<application name>.<environment name>-stdout.YYYY-MM-DD.log

  • %LESDIR%/log/<application name>.<environment name>-stderr.YYYY-MM-DD.log ”

However, the MOCA Developer guide gives no hints or instructions on how to change the naming convention. For developers who don’t have access to the Windows Server or even those who do, need to find out the last time the MOCA Services were started to identify the latest log file and with a Production or Integrated Test system, there can be thousands of log files from which a user needs to identify the correct file.

Then, how do you do it? Is it even possible?

Yes, the solution is rather simple, we can configure a fixed name of log files to know which one to open. To do this, open Windows Registry (You can type regedit from Start > Run) and go to:

HKLM\SOFTWARE\WOW6432Node\Apache Software Foundation\Procrun 2.0\moca.instancename\Parameters\Log

and change the “StdError” and “StdOutput” parameters as shown below:

That’s it! , restart the MOCA Services and you should see the new files created. You can now easily create a script to read moca server log files using Oracular MOCA Client as shown below:

Reading Log files using Oracular MOCA Client

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Ali Ahmed
Ali Ahmed

Written by Ali Ahmed

I am an experienced IT Consultant who has a knack to solve complex problems. Want to connect? Reach out to me on: http://www.linkedin.com/in/ali-ahmed-jdawms

No responses yet

Write a response