October 2004
The LawsonGuru Letter is a free periodic newsletter containing provocative commentary about issues important to the Lawson Software community. The LawsonGuru Letter is published by-and is solely the opinion of-John Henley of Decision Analytics. Visit Decision Analytics at https://www.danalytics.com. For subscription information, see the bottom of this message.
The LawsonGuru Letter is not affiliated with Lawson Software.
In this issue:
1. Guest Spot: TOMCAT troubleshooting-demystified (for UNIX)
2. Reporting, Part 6: Crystal Reports from ... Lawson Reports?
3. Worthwhile Reading
4. Lawson Tips & Tricks
This month we welcome Alex Tsekhansky from Analysts International (AIC) for
his second guest article.
Have an idea for a Guest Spot article? Ready to write your own? Send me an email at
letter-editor@lawsonguru.com.
1. Guest Spot: TOMCAT troubleshooting-demystified (for UNIX)
(by Alex Tsekhansky, Analysts International)
"Why doesn't my Tomcat work"?
"Where can I get mod_jk"?
These are some of the frequent questions I've been asked on my recent projects. In this article, I will try to give some general directions for Tomcat troubleshooting on UNIX. On a Windows configuration, is a bit simpler (and perhaps, it is a good material for a different article).
I'd like to note that the current version of Lawson documentation (after March 2004) is pretty good. Most Tomcat-related issues are due to a typo in a configuration file. There is only one task that I do different from documentation - I usually do not rename xerces.jar in $CATALINA_HOME in Tomcat 4.0.6 installations.
Tomcat should be installed on the same physical server as your web server.
Your web server is the main product "talking" to Tomcat. In your browser you instruct the web server to manipulate Lawson data (e.g. inquire on a form in Portal). That causes web server to talk to Tomcat. The Tomcat contacts RMI server located on the Lawson application server, which contacts the Lawson application, manipulates data, and passes the result (along with the data retrieved) back to Tomcat, web server and finally your browser.
When troubleshooting, I separate the Lawson servlets into four groups:
- Servlets that do not contact RMI to retrieve data from Lawson
If such servlet (/servlet/servletsetup) works as described in Lawson installation manual, Tomcat is "talking" to the web server and is running correctly without trying to contact Lawson application.
Another such servlet - /servlet/What - shows versions of .jar files. Errors in it may mean you did not move servlets into 'lib' directory, or specified incorrect CLASSPATH.
- Servlets that may contact RMI but do not retrieve much Lawson data
/servlet/SysEnv shows a lot of useful information about Java, Tomcat, eli.properties and Lawson directories. It will show errors at the bottom of the screen if RMI is down or misconfigured.
- Servlets that retrieve information from forms
/servlet/Xpress has parameters that allow one to view XML presentation of the form. If this servlet works, you tested the complete path from web server to lawson application. Note that security issues (web or 'laua') may prevent you from getting the right result.
- Servlets that go through security
The ability to run /servlet/Profile often signals success in setting up Tomcat as this servlet tests "login process". Note that Portal login may still fail even if this servlet works if you did not install appropriate MSXML patches on your IE browser as described in the Lawson letter posted on the support.lawson.com web site.
If "servletsetup" does not work, other servlets will probably not work as well. In troubleshooting always try to get "servletsetup" working first. Re-check your setup and compare it with Lawson documentation. Try to run servlets directly via Tomcat HTTP port.
If 'servletsetup' works, but 'SysEnv' gives you errors at the end, check the settings you typed in 'servletsetup' and compare them with RMI configuration (PoolMgr.properties). Enable extended RMI log and see whether it even tries to contact RMI. Check network connections on a web server (netstat -na) and see if any connections are going to the RMI port of the web server. Such issues are best troubleshooting with a help of a system or network administrator.
An interesting fact is that the RMI server should "know about itself" by the same IP address as listed in the /etc/hosts file for the server name. I've seen situations in AIX and HPUX clusters where hostname on the Lawson application server was referring to an inaccessible IP, hence Tomcat could not contact it. Forcing the right IP via 'servletsetup' does not help. Network or system administrator would be the person to ask in such case.
If SysEnv works but Xpress or Profile does not, most probably it's not a Tomcat configuration issue. Check your security and RD30 form. Make sure everything is set per Lawson specifications, especially logan.env and PoolMgr.properties. Try it with security 'off'. Check for patches on support.lawson.com.
If all servlets work but you cannot login into Portal, most probably you did not apply the IE patch. Again, not a Tomcat issue.
Finally if Portal works, but you have issues with job scheduler, check logan.env, file permissions and Java sizing in your PoolMgr.properties. There are other possibilities related to the job scheduler that are beyond the scope of this document, but none of them I found to be a Tomcat issue.
For very adventurous people I can provide in-depth Tomcat troubleshooting instructions on request, which will produce large amount of logging by the Tomcat itself. However I very rarely find such extended logging useful.
TOMCAT 4.0.6 Troubleshooting Diagrams
Diagram #1
Diagram #2
Diagram #3
Diagram #4
2. Reporting, Part 6: Crystal Reports from ... Lawson Reports?
In August's installment (see https://www.danalytics.com/guru/letter/archive/2004-08.htm) in our on-going series on reporting options for Lawson, we looked at ways to use the Lawson OLE DB Provider with Crystal Reports. Although I generally advocate using your native database provider where appropriate, I told you there's one important advantage to using the Lawson OLE DB Provider. And, it's called Xtra. It's part of the Lawson OLE DB Provider, which can be purchased separately, or bundled as part of Lawson Enterprise Reporting, Lawson Reporting Services, or /Lawson Reporting Suite.
Remember that a key part of designing a report involves selecting your data source(s). You can use the native OLE DB provider or ODBC driver for the backend database you are using to store your Lawson data, such as Oracle, or SQL Server, or DB2, etc. Or, you can use the Lawson OLE DB Provider to read the data from Lawson's tables.
But, regardless, you're still reading raw data. What if the report you want already exists in Lawson and all you want to do is reformat it a little bit differently?
Transforming your Reports
Well, you can. And that's what I promised to show you. Here's an example:
BN245 produces Employee Benefit Enrollment Forms, which look like this:
|
|
What if all you want to do is transform the report into something more readable, which you can give to an employee in order to have them make their benefit selections:
|
Sure, you could implement Employee Self Service's Benefit Enrollment features, but there are some circumstances that make that impossible.
Enter XTRA
Lawson's OLE DB Provider makes that possible, because you can generate report data not only from Lawson data tables and application forms, but also from Lawson reports/print files, using Lawson's Xtra feature:
Report queries are based on standard reports that have already been created with Lawson standard reports, as well as reports generated by the GL Report Writer, RW100. The print files for a particular user (or any print files that the user has access to) are available to be selected from the list of reports. The corresponding report job must be submitted in Lawson before the print files are available to Crystal Reports. The contents of the report can then be read by Crystal Reports, and you can use Crystal's advanced capabilities to make cosmetic changes, combine reports, delete or rearrange columns, and add sorting/subtotaling that is not contained in the original report.
According to the Lawson OLE DB Provider documentation, the report query feature requires Lawson Environment/IOS 8.0.2 or higher and Lawson Applications 8.0.3 or higher. If you don't have these requirements, the Reports tab does not appear in Query Builder. Note that I have successfully used this with Applications 8.0.2 as well.
Behind the scenes of the XTRA Data Source
There are a few Xtra command URLs you can use to see what the XML schema and data will look like for the report:
The first command displays the underlying XML schema for the report (top example); the second command displays the report, in XML format (bottom example):
http://<lawsonwebserver>/cgi-lawson/xtra.exe?_USR=<username>&_JOB=<jobname>&_STEP=1&_FN=<token>.prt&_CMD=GETCRPROPERTIES&_OUT=CR&_CTYPE=text/xml
http://<lawsonwebserver>/cgi-lawson/xtra.exe?xtra:_USR=<username>&_JOB=<jobname>&_STEP=1&_FN=<token>.prt
Getting from the XML to the Crystal Report
Crystal Reports loads the XML report schema as database fields, from which you can build the report:
Adding Additional Data when Designing the Report
Since XML is hierarchical rather than columnar, not all columns may exist in all rows when the XML document is transformed into a data source for Crystal. You might need to use auxiliary queries to supplement when rows don't contain all columns.
For example, SSN/FICA number is in the header of this report, but is not in each row once the XML is transformed. However, company and employee ARE part of each row. So I needed to add an extra (no pun intended, of course!) query against the EMPLOYEE table to retrieve additional information:
Additional Setup Requirements
There are a couple of added one-time configuration steps that you need to take before you can use the Lawson OLE DB Provider to generate XTRA reports:
- Create a TOUCH file, called CRYSTAL, in the /lawson/xtra directory on the web server (e.g. $WEBDIR/lawson/xtra on Unix or %WEBDIR/lawson/xtra on Windows).
- Make sure you install the latest version of xmlrptgen.exe and su_xmlrptgen.exe on the Lawson IOS server, and that they include the fix for PT 117893 -_OUT=CR causes xtra call to fail if '&' is used in data:
- On 8.0.2, this version is 8.0.2.9.864, which is included in IOS 8.0.2.SP9.
- On 8.0.3, this version is 8.0.3.1.278, which is included in IOS 8.0.3.SP1.
Troubleshooting
There may be cases where the data you're reading from the report causes Crystal to fail, and you'll get a generic Crystal error, "Unable to load result set". I found that the majority of these problems were caused by ampersands ('&') in the data--which you've probably discovered is a pervasive and lingering problem in many of Lawson's web products.
If you do get this error, you can issue an Xtra command in the browser to load the XML document, and it will fail at the offending spot:
http://<lawsonwebserver>/cgi-lawson/xtra.exe?_USR=<username>&_JOB=<jobname>&_STEP=1&_FN=<token>.prt&_OPT=INCLUDECRPROPERTIES&_OUT=CR&_CTYPE=text/xml
In this instance, the problem is that CopCovDesc_1 contains the value 'PARENT & CHILD'. The solution was simply to change the benefit plan option description to remove '&' on BN17, and re-run the report.
Summary
Utilizing Xtra with Crystal Reports provides a unique capability. Although I generally advocate using your native database provider when creating complex reports, the Xtra feature-in addition to the Lawson OLE DB Provider's ability to apply built-in security when reporting against Lawson's tables-makes the Lawson OLE DB Provider a compelling choice for many reports.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- QUOTE OF THE ISSUE -
"The best way to predict the future is to invent it."
- Alan Kay
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3. Worthwhile Reading
Is your Business in Control?
Business rules systems put managers back in charge-saving IT time, money, and pain
Infoworld, June 28, 2004
http://www.infoworld.com/reports/26SRbizrules.html
Spreadsheet Hell
CFOs are interested in the many new technologies being pitched to them, but are they really trapped in spreadsheet hell?
CFO IT, Summer 2004
http://www.cfo.com/article/1,5309,14202||M|946,00.html?f=home_featured
RFID and data: Here's what's next
It is a tough row to hoe for those who received Wal-Mart's invitation to RFID. What to do with all that "radio" data is the real question.
Application Development Trends, July 2004
http://www.adtmag.com/article.asp?id=9666
4. Lawson Tips & Tricks
Share your tips. Send them to
mailto:letter-tips@lawsonguru.com.
Create a Server Drop-Down List in LID
This tip is an "oldie-but-a-goodie"! If you're running Lawson on UNIX servers, and using the LID Desktop
Client (just for administration, of course, you're using Portal for applications, right???), create a drop-down selection list. That way, you don't have to keep typing in the server name or address. This is especially handy whether you connect to one server or if you have multiple servers:
Create a folder, called NFS, in the same folder location as Lawson (LID), and create a text file, called "hosts" (no extension!):
In the hosts file, enter one line for each server, with the IP address on the left and corresponding server name or address, if no name, on the right:
The LawsonGuru Letter is a free periodic newsletter providing provocative commentary on issues important to the Lawson Software community. The LawsonGuru Letter is published by--and is solely the opinion of--John Henley of Decision Analytics. Visit Decision Analytics at
https://www.danalytics.com.
To subscribe, visit https://www.danalytics.com/guru/letter/
© Copyright 2004, Decision Analytics. All rights reserved. Please share The LawsonGuru Letter in whole or in part as long as copyright and attribution are always included.
Decision Analytics is an independent consultancy, focusing on Lawson technical projects, and specializing in customization/modification, data conversion, and integration/interfaces. Please visit
https://www.danalytics.com for more information.
Decision Analytics. Integrating Lawson with the Real World.