Troubleshooting common problems with WebSphere Business Events V6.1

Learn how to diagnose and resolve some common problems with WebSphere® Business Events V6.1 using troubleshooting techniques and available logging mechanisms.

Share:

Vivek Grover, Software Engineer, IBM

Vivek GroverVivek Grover is an Advisory Software Engineer in Level 2 Support for WebSphere Business Events and WebSphere Message Broker in RTP, NC. Vivek is also the e-Support team lead assisting knowledge engineers in designing and writing Technotes, DCFs (Document Control Facility), and quarterly e-mails to the customers describing technical issues.You can reach Vivek at vgrover@us.ibm.com.



Richard Lustig, Senior Product Manager, Phase Forward

Richard Lustig was Director of Training and Support at AptSoft prior to its acquisition by IBM. He served as Level 3 Support for WebSphere Business Events. He is currently a part of the product management team for Phase Forward's clinical trial management software solution for the pharmaceutical and biosciences industries. You can reach Richard at r.lustig@comcast.net.



05 March 2009

Also available in Japanese

Introduction

A number of logs and other sources of information are available to help you resolve problems with WebSphere Business Events V6.1 (hereafter called Business Events). This article covers some general scenarios demonstrating problems you might encounter and some methods you can use to resolve them. These scenarios provide a starting point in troubleshooting your problems with Business Events, and show you how you can use the information in the error and warning messages in the various logs to fix these problems.

This article assumes that you're familiar with the major components and configuration of Business Events V6.1. Refer to Resources for more information on Business Events.

Before you begin the troubleshooting process, there are some diagnostic questions you should ask to determine whether there any obvious causes of a problem. Answering these questions first can save a lot of work by highlighting simple errors or by narrowing down the range of possibe causes. Below are some of the preliminary diagnostic questions you should ask. As you go through the list, make a note of anything that might be relevant to your particular problem.

  1. If Business Events has never run successfully for you before, please review the following:
    • Did you encounter any problems or errors during the WebSphere Business Events install?
    • Has the <WBE install dir>/config/wbe/WbeInstall.properties populated as per options specified during the product install as described in the Installation and Operations Guide?
    • Have you completed all steps in the Installation and Operations Guide?

    If the problem persists, uninstall and reinstall the product.

  2. If WebSphere Business Events has run successfully before and is now reporting problems,then please review the following:
    • Review the changes you made before the problem was first encountered and revert those changes. For example, any service pack changes, fix packs changes or configuration changes on the machine or the product or its dependencies.
    • If any updates have been installed then check what service updates have been applied on the system or your application. If you have applied an APAR or a PTF to Business Events, WebSphere Application Server (hereafter called Application Server) or database, check that no error message was produced. If the update installation was successful, check with the IBM Support Center for any known errors with these service updates.
    • Ensure that you have followed the instructions in these service updates that affect your system. For example, you may need to redefine a resource, or stop and restart a component.
  3. Review the WebSphere Business Events System requirements to ascertain whether Websphere Business Events installation was performed as per the documented specifications. Please note that if your enviroment does not comply with these requirements, other unexpected problems may arise.
  4. Have you installed Websphere Application Server V6.1 Fix Pack 19 or later, which includes the APAR PK66053?
  5. Check that the following environment variables are configured as described in the profile of the appropriate Business Events user ID. To check the environment variables, run the set command on Windows or env command on Linux/AIX.
    • WBE_WAS_HOME should point to the WebSphere Application Server install directory. For example, for Windows: C:\Program Files\IBM\WebSphere\AppServer. For Windows/AIX: Linux/AIX: /opt/IBM/WebSphere/AppServer.
    • APTSOFT_HOME should point to the Business Events install directory. For example, for Windows: C:\Program Files\IBM\WBE. For Linux/AIX: /opt/IBM/wbe.
    • If Business Events is installed on an existing Application Server installation, ensure that the following scripts have been run from <WBE install_dir>\config\was:
      • setenv.bat
      • update_wbeprops.bat

      Refer to "Installing WebSphere Business Events on an existing WebSphere Application Server instance" in the Business Events Installation and Operations Guide for more information.

    • In the Business Events database, do the following:
      • Check the database logs to ensure that the database is started.
      • Ensure that a supported database is installed.
      • Check the database logs to see whether any errors on database have been reported.
      • Check that the database settings in the Business Events: properties are correctly configured as described in the "Configuring the environment => Configuring the Repository database" section of the Installation and Operations Guide.
    • Is there a problem with Application Server or WebSphere MQ (MQ), (whichever one is being used as the JMS provider)?

      If Application Server is used:

      • Ensure that Application Server is running by checking <WAS install directory>/profiles/<Profile name>/logs/server_name/systemout.log.
      • Ensure that the WBERuntimeEAR application is running by checking the Application Server SystemOut.log.
      • Check the Application Server SystemOut.log and SystemErr.log files to see if there are any Application Server or SI Bus errors reported.

      If MQ is used:

      • Ensure that the MQ queue manager is running by checking <WebSphere MQ install directory>/qmgrs/<qmgr name>/errors/AMQERR0x.log.
      • Ensure that the MQ broker is started by issuing by checking the AMQERR0x.log. If necessary, start it by issuing the strmqbrk command.
      • Check AMQERR0x.log and any FDC/FFST files to see whether any MQ errors have been reported.
    • Have you recently changed your user ID or password? If you've changed the password at the operating system level for the user ID that is used for either Business Events or for the Business Events repository database or for Application Server, you may have an access problem. If so, perform the following steps:
      • Updated the properties of the affected component to reflect the password change.
      • Ensure that your passwords don't contain reserved keywords, such as IBM, which is a reserved keyword in DB2®.
    • What version of WebSphere Business Events is running on your machine?

      On Windows, follow these steps to find the version and fixpack levels:

      • From a command prompt, type regedit to open the Windows registry. You should see something like this: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion \Uninstall\IBM\WebSphere Business Events V6.1.
      • From the command prompt, go to C:\Program Files\Zero G Registry\.com.zerog.registry.xml and check the xml tag for component ref_id.

      On UNIX, follow these steps to find the version and fixpack levels:

      • Check the Application Server SystemOut.log. Each time the Application Server is started, it logs an entry for the Business Events version and build number.
      • Go to /var/.com.zerog.registry.xml and check the xml tag for component ref_id.

      You can search the WebSphere Business Events Support page for error messages and problems that have been reported in the past.


Install and uninstall problems

This section describes the problems you may encounter when installing or uninstalling Business Events. The Business Events installation generates logs that can help you diagnose such problems.

The following logs are provide for install problems:

  • Business Events install log (primary): <WBE install dir>/IBM_WebSphere_Business_Events_V6.1_InstallLog.log

    For example: C:\Program Files\IBM\WBE\IBM_WebSphere_Business_Events_V6.1_InstallLog.log

  • Business Events install log (secondary): <System temp directory>/wbe_outputdebug.txt

    For example: C:\Documents and Settings\vgrover\Local Settings\Temp\wbe_outputdebug.txt

  • WebSphere Application Server install log: <WAS install dir>/logs/install/Log.txt

    For example: C:\Program Files\IBM\WBE\WAS\logs\install\Log.txt

The following logs are provide for uninstall problems:

  • Business Events uninstall log (primary): <System temp directory>\wbe_uninstall_debug.log

    For example: C:\Documents and Settings\vgrover\Local Settings\Temp\wbe_uninstall_debug.log.

  • WebSphere Business Events uninstall log (secondary): <System temp directory>\wbe_uninstall_outputdebug.txt

    For example: C:\Documents and Settings\vgrover\Local Settings\Temp\wbe_uninstall_outputdebug.txt

Often when an install problem occurs, the error displays in a pop-up window. On Unix systems, users can export the environment variable LAX_DEBUG=true in the root profile before running the install or uninstall from the UNIX prompt to capture the console output into a file. You can invoke the installer or uninstaller by issuing the following command:

<UNIX installer/uninstaller> > /tmp/debug_file.log 2>&amp;1

This logs the output to /tmp/debug_file.log.

Sample install problem: Application Server installation failure

Problem:

When installing Business Events on Windows in the console mode, the following error occurs towards the end of install: "The application server installation failed," as shown in Figure 1:

Figure 1. Application Server installation failure message
Application Server install failure

Problem determination:

  1. Open <WBE install dir>/IBM_WebSphere_Business_Events_V6.1_InstallLog.log. You'll see the following message:
    The Web Application Server failed to install
    Status: ERROR
    Additional Notes: ERROR - The Web Application Server install failed.
    Please see the WAS install log (C:\Program Files\
    IBM\WBE\WAS\logs\install\log.txt) for further details.
  2. As suggested, check the <WAS install dir>/WebSphere Application Server install log. You'll see the following error message:
    Process, com.ibm.ws.install.ni.ismp.actions.WasSilentInstallInputValidationAction,
    err, Directory C:\Program Files\IBM\WBE\WAS could not be validated as a non-existing 
    or an empty directory.
    Process, 
    com.ibm.ws.install.ni.ismp.actions.WasSilentInstallInputValidationAction, err, 
    com.ibm.ws.install.was.validators.WASInstallInvalidInputException: 
    Directory C:\Program Files\IBM\WBE\WAS could not be validated as a non-existing 
    or an empty directory.

    This message indicates that C:\Program Files\IBM\WBE\WAS was not empty at the time of installation. This would mean that either you tried installing Business Events on a machine where a prior attempt was made to install Business Events and the uninstall may not have been done properly, or something failed during the uninstall which is preventing the subsequent installation of Business Events.

Solution:

  1. Run uninstaller.exe from C:\Program Files\IBM\WBE\uninstall. If this executable doesn't exist, proceed to the next step.
  2. Uninstall Business Events by selecting Start => Control Panel => Add/Remove programs.

    If you can't find Business Events there, proceed to the next step.

  3. Manually delete the previous install residuals by completing the following steps:
    1. Go to %windir%\.nifregistry. (For example: C:\WINNT\.nifregistry.)
    2. Remove the entries that refer to the <WBE install dir>/WAS (For example, C:/Program%20Files/IBM/WBE/WAS). If there are other references of a WebSphere Application Server installation on the machine, be careful not to delete those entries.
    3. Go to %windir%\vpd.properties. (For example, C:\WINNT\vpd.properties).
    4. Again, remove those entries that deal with the <WBE install dir>/WAS. (For example, C:\Program Files\IBM\WBE\WAS).
    5. Delete com.zerog.registry.xml. (For example, C:\Program Files\Zero G Registry\com.zerog.registry.xml).
    6. Delete the Business Events install directory. (For example, C:\Program Files\IBM\WBE).
  4. After completing the appropriate steps above, reinstall Business Events. It should now successfully install on the machine.

Sample install problem: Database validation error

Problem:

A database validation error occurs when installing Business Events on a Windows machine in the GUI install mode with DB2 as the Business Events database. The error shows up as a pop-up message once the database connection information is provided in the Installer GUI as shown in Figure 2.

Figure 2. GUI install screen for entering database parameters
Enter database parameters

After clicking Next in the Connection Information dialog, you get the following error:

Figure 3. Database validation error message
Database validation error

Problem determination:

As indicated in the error message, the user ID/password combination provided in the Connection Information dialog doesn't have the proper authority to connect to the Business Events database.

Solution:

  1. Select DB2 Control Center and right-click Database, then select Authorities.
  2. Grant the userID specified in the Connection Information dialog the authority on the database specified in Connection Information dialog.
  3. Click OK in the Database Validation error message window.
  4. You are returned to the Connection Information dialog. Ensure that the password is correct and click Next.
  5. You should now see the pre-installation summary and be able to proceed with the installation.

Please note that this scenario is specific to the DB2 database. If you are using any other supported database, such as Oracle, Derby or SQL Server, you should take the equivalent steps for these databases to resolve the problem.


Configuration problems

This section describes common problems resulting from improper configuration of Business Events. Problems caused by the incorrect configuration of the following components generate messages in the corresponding logs listed in Table 1.

Table 1. Business Events components and their associated logs
Components Check these logs
Databases Application Server SystemOut.log, Application Server SystemErr.log, WBERuntime.system.log
Security Application Server SystemOut.log, Application Server SystemErr.log, WBERuntime.system.log, connectors.log
Dashboards Application Server SystemOut.log, WBERuntime.event.log, WBERuntime.system.log, Application Server SystemErr.log, connectors.log
Runtime WBERuntime.system.log, Application Server SystemOut.log, WBERuntime.event.log, Application Server SystemErr.log, connectors.log
Connectors connectors.log, WBERuntime.system.log, Application Server SystemOut.log, WBERuntime.event.log, Application Server SystemErr.log
JMS Application Server SystemOut.log, Application Server SystemErr.log, AMQErr0x.log (if WebSphere MQ is configured for JMS instead of SIBus)
Logging WBERuntime.event.log, WBERuntime.system.log

Business Events V6.1 provides a properties interface for configuring logs and security.

Business Events Properties

Configuration settings for the components listed above are specified using the Business Events Properties function. These settings are described in the Business Events Installation and Operations Guide.

Properties defined using the Business Events Properties are stored in the following files:

  • <WBE install directory>\director\cfg\aptsoft_properties.xml is an unencrypted file that contains properties without values.
  • <WBE install directory>\director\cfg\aptsoft.enc.properties is an encrypted file that contains properties and actual values.

Anytime a change is made to the Business Events Properties, a back-up xml of the above files and the new xml files are created in <WBE install directory>\director\cfg. (For example, C:\Program Files\IBM\WBE\director\cfg.)

In case you have any problems opening the Properties, you can revert back to the back-up files by doing the following:

  1. Rename aptsoft_properties.xml and aptsoft.enc.properties.
  2. Rename aptsoft_properties.xml.<Date>-<Time> to aptsoft_properties.xml.

    For example, rename aptsoft_properties.xml.2008-10-07-17-10-19 to aptsoft_properties.xml

  3. Rename the aptsoft.enc.properties.<Date>-<Time> to aptsoft.enc.properties.

    For example, rename aptsoft.enc.properties.2008-10-07-16-03-30 to aptsoft.enc.properties.

  4. Open Business Events Properties, which will open with old settings from the old date and time.

Business Events logging

Business Events uses Log4j to report logs. For design and runtime problems, Business Events generates the following logs:

  1. WBERuntime.system.log contains information about the runtime server itself.
  2. WBERuntime.event.log contains information about the events received by the runtime server, the results of evaluating those events, actions created as a result of the associated event evaluating to true, and results returned by connectors following action execution.
  3. connectors.log contains information about events and actions processed by technology connectors.

When troubleshooting Business Events problems, you may find it helpful to configure logging parameters in these logs, such as logging levels, logging intervals, location of logs, and so on. To set these parameters, do the following:

  1. In Business Events, select Properties => Full Configurator => Logging. The Properties Configurator dialog displays, as shown in Figure 4.
    Figure 4. Business Events Properties Configurator
    Properties Configurator
  2. Specify the location of log files using the as.director.server.log.path. As shown in Figure 4, the logs value maps to the default path of C:\Program Files\IBM\WBE\director.

    If you want to change this default directory, you need to specify the complete path, such as c:\logfiles.

  3. For as.director.server.log.system.interval, define the interval at which a copy of the current system log file is spun off and a new system log file is started. Click on the selection box and choose from the options, such as hour, week, and month.
  4. For as.director.server.log.event.interval, define the interval at which a copy of the current event log file is spun off and a new event log file is started.
  5. Under LOG4J settings, go to log4j.logger.com and change the settings for the system log detail level from info, C, JMS1 to debug, C, JMS1 to write messages of all severities to the WBERuntime.system.log.
  6. Under LOG4J settings, go to log4j.logger.event and change the settings for the event log detail level from info, JMS2 to debug, JMS2 to write messages of all severities to the WBERuntime.event.log.

For information on how to modify the logging levels defined in these steps to write messages of different severities to the logs, refer to the Installation and Operations Guide.

Note that as the logging level goes up, the impact on performance increases. Typically logging should stay at ERROR or lower level in production environments and increased only when diagnosing a problem that requires more detailed information. Changing a logging setting in the Business Events Properties requires you to restart the WBERuntimeEAR application in order for the changes to take effect.

You can view WBERuntime.event.log and WBERuntime.system.log from a Web browser using the Business Events administrative console. To make these log files easier to read, do the following:

  1. Open the log file in a text editor, and add a unique tag to the very beginning of the file and a corresponding closing tag at the end of the file. For example:
    	<l>	
    	event log text
    	</l>
  2. Save the file with a file type of .xml.
  3. Open the saved file in a Web browser.

Refer to Runtime problems for more information on how to analyze these logs better for effective troubleshooting.

To configure the connectors.log, perform the following steps:

  1. Open the Business Events Properties and select Full Configurator, then select Connectors.
  2. Logging information for embedded connectors is provided in the <WBE install dir>/director/logs/connectors.log file.
  3. You can change the file name by updating the as.director.connectors.log4j.appender.File.file property under Minor section:Logging, as shown in Figure 5.
Figure 5. Connectors.log configuration
Connectors.log configuration

Business Events security

If security is enabled, the user must be a member of one the following security groups under LDAP, Active Directory or Database:

  • AptsoftAdmins
  • AptsoftUsers

If any other group is to be used, the custom property as.director.common.authentication.adminGroup must be added in the properties to point to this group. For more information on security and groups, refer to the Installation and Operations Guide.

Sample configuration problem: Unable to add artifacts to Business Events repository

Problem:

If your database port for Business Events repository has a non-default value, such as 50001, (DB2 defaults to 50000), when trying to add the artifacts into the Business Events repository using the Design or Design Data tools, nothing happens. When you check the logs, you see the following errors:

The WBERuntime.system.log shows the error:

[CDATA[Caught SQL Exception while attempting to connect to db
URL: jdbc:db2://localhost:50000/WBEDB]]></message>
org.apache.commons.dbcp.SQLNestedException: Cannot create
PoolableConnectionFactory ([jcc][t4][2057][11264][3.50.152] The
application server rejected establishment of the connection.
An attempt was made to access a database, WBEDB, which was either
not found or does not support transactions. ERRORCODE=-4499,
SQLSTATE=08004)

The Application Server SystemOut.log shows the error:

[8/25/08 11:16:41:328 EDT] 0000001c SystemOut 2008-08-25 11:16:41,328
ERROR Caught SQL Exception while attempting to connect to db
URL: jdbc:db2://localhost:50000/WBEDB
org.apache.commons.dbcp.SQLNestedException: Cannot create
PoolableConnectionFactory ([jcc][t4][2057][11264][3.50.152] The
application server rejected establishment of the connection.
An attempt was made to access a database, WBEDB, which was either not
found or does not support transactions. ERRORCODE=-4499,
SQLSTATE=08004)

Also, the following authentication error occurs when trying to log in to the Business Events administrative console.

Figure 5. Authentication error
Authentication error

Problem determination:

The error message in the above logs indicates that the port number being used is 50000. However, your database is listening on a different port (in this case, 50001). Check the as.director.common.db.default.port property under Properties => Full Configurator => Common. You should find that the property is blank as shown in Figure 6. (This maps to the default value of 50000.)

Figure 6. Blank port property
Blank port property

Solution:

  1. Change as.director.common.db.default.port to the port that your database is listening on (in this case, port 50001), as shown in Figure 7.
    Figure 7. Change port value
    Change port value
  2. Restart WBERuntimeEAR and select Add in to add the project artifacts again. The problem should be resolved.

Design problems

Some problems arise because of poor design or incorrect coding. Design problems are usually uncovered during event processing. You should enable LOG4J settings for debug logs as explained in Business Events logging so you can see detailed logs in the event of a problem.

Check the following logs for fesign problems:

  • <WAS install directory>/profiles/<Profile name>/logs/server_name/WAS systemout.log
    For example: C:\Program Files\IBM\WBE\WAS\profiles\<Profile name>\logs\server1\WAS systemout.log
  • <WAS install directory>/profiles/<Profile name>/logs/server_name/WAS systemerr.log
    For example: C:\Program Files\IBM\WBE\WAS\profiles\<Profile name>\logs\server1\WAS systemerr.log
  • <WBE install directory>/director/logs/WBERuntime.event.log
    For example: C:\Program Files\IBM\WBE\director\logs\WBERuntime.event.log
  • <WBE install directory>/director/logs/WBERuntime.system.log
    For example: C:\Program Files\IBM\WBE\director\logs\WBERuntime.system.log
  • <WBE install directory>/director/logs/connectors.log
    For example: C:\Program Files\IBM\WBE\director\logs\connectors.log

Sample design problem: Action output contains missing field

Problem:

The output of the Outgoing action, as evaluated by the Retrieve Customer Data interaction set, contains a missing field. In our example, Retrieve Customer Data evaluates the Incoming event as shown in Figure 8. There is no filter, so when the event is received, the corresponding Outgoing action is always executed.

Figure 8. Retrieve Customer Data
Retrieve Customer Data

The Outgoing action contains a Discount field, which is mapped from a corresponding Intermediate object field. This field calculates its value based on the value contained in CUST_LIFETIME_VALUE field retrieved via a data fetch as shown in Figure 9.

The action uses the File System Connector. You can see these details by importing the BrokenExample_Design_scenario.xml provided with this article into the Design Data tool.

Figure 9. CUST_LIFETIME_VALUE field in Design Data tool
CUST_LIFETIME_VALUE

The Discount is calculated based on the JavaScript expression using the CUST_LIFETIME_VALUE intermediate object field as shown in Figure 10.

Figure 10. Discount intermediate object field
Discount field

At runtime, when a event is submitted, the Retrieve Customer Data interaction set, shown in Figure 8, is evaluated, and the file associated with the action appears in the directory specified by the connector configuration. However, when you look at the log, you'll see that the Discount field is missing, as shown in the following snapshot from connectors.log, which shows all the fields that made it to the output:

<connectors>
<connector name="WBE" version="2.2">
<connector-bundle id="32ACAC46F450F45011DD9258A675D35C"
	name="Outgoing" type="Action" workflow="FACE">
<connector-object name="Outgoing">
  <field name="CUST_ID" type="Integer">74824</field> 
  <field name="CUST_FIRST_NAME" type="String">Montgomery</field> 
  <field name="CUST_LIFETIME_VALUE" type="Real">100000000</field> 
  <field name="CUST_LAST_NAME" type="String">Burns</field> 
  </connector-object>
  </connector-bundle>
  <system>rlustig</system> 
  <timestamp>2008-08-22T16:19:54.234-0400</timestamp> 
  <loginfo>Generated from IBM WebSphere Business Events</loginfo> 
  </connector>
  </connectors>

Problem determination:

  1. The first place to look is WBERuntime.event.log, where you'll see the following exception:
    <message><throwable><![CDATA[
    org.mozilla.javascript.EvaluatorException: 
    	syntax error (sourceName#1) at 
    .
    .
    .
       ]]></throwable></message>
    </exceptionitem>
    <item time='2008-08-22T16:19:54.140-0400' level='INFO' thread='RulesEngineThread-0'>
      <source>event.com.aptsoft.maestro.server.action.
    	JmsAction</source>
      <event id='32ACAC46F450F45011DD9258A675D35C' 
    	name='Incoming'></event>
      <message><![CDATA[Unable to get a value for action 
    	field [Discount] from Intermediate Object 
    	[Outgoing](may be a NULL field or may be a 
    	Parameter).]]></message>

    This message indicates that a JavaScript syntax error has occurred. It indicates that the Data Resolver (the WebSphere Business Events Runtime component responsible for ensuring that all Intermediate Object fields referenced in filters have values, and that all action object fields in actions executed as a result of true event evaluation have values) was unable to create a value for the Discount action object field, because the instantiated Outgoing intermediate object didn't have a value for its Discount field.

    Note: This message doesn't always indicate a problem, because there may be a legitimate reason why the Intermediate Object field is a null value. For example, if there is no corresponding event object field passed in on the event, and it’s not a field that’s important to the application.

  2. Open the project and look at the Discount field in the CUSTOMER intermediate object, as shown in Figure13.
    Figure 11. Discount intermediate object definition
    Discount definition
  3. If you're adept at JavaScript, you might spot the syntax error immediately. But you can also use the embedded JavaScript tester tool as shown in Figure 12, which you'll find at http://hostname:port/wbe/tools/test_javascript.html. (For example: http://localhost:9080/wbe/tools/test_javascript.html) on the machine on which Business Events is installed.
  4. Open the JavaScript test tool and type the JavaScript expression as shown in Figure 12, then click Evaluate. The results are evaluated and shown at the bottom of the screen..
    Figure 12. JavaScript test tool showing error
    JavaScript test tool with error

    Use the tool to get the syntax working correctly (in this case, by removing the extra parenthesis) before making the change in the project as shown in Figure 13.

    When the correct syntax is used, the results are evaluated and shown at the bottom of the JavaScript tool. This validates that the syntax of this JavaScript expression is correct.

    Figure 13. JavaScript test tool showing correct value
    JavaScript test tool with correct value

Solution:

  1. Open the Design Data tool and select Check out for the CUSTOMER intermediate object.
  2. Correct the JavaScript code using the correct expression from the JavaScript test tool.
  3. Select Add in to put the asset back into the repository.
  4. Restart WBERuntimeEAR and rerun the test. It should now show that the Discount field is included in the action file.

Following is a snapshot from connectors.log showing all the fields that made it to the output:

    <connector name="WBE" version="2.2">
    <connector-bundle id="7BAF3462FB10FB1011DD9258A675D35C" 
	name="Outgoing" type="Action" workflow="FACE">
      <connector-object name="Outgoing">
      <field name="Discount" type="Integer">20</field> 
         <field name="CUST_ID" type="Integer">74824</field> 
         <field name="CUST_FIRST_NAME" type="String">Montgomery</field> 
         <field name="CUST_LIFETIME_VALUE" type="Real">100000000</field> 
         <field name="CUST_LAST_NAME" type="String">Burns</field> 
  </connector-object>
</connector-bundle>
  <system>rlustig</system> 
  <timestamp>2008-08-22T16:45:07.515-0400</timestamp> 
  <loginfo>Generated from IBM WebSphere Business Events</loginfo> 
</connector>

As a general rule of thumb, you should test the JavaScript (using the embedded JavaScript tester tool or some other utility) before incorporating it into a Business Events project.


Runtime problems

For event processing, runtime problems typically fall into two categories:

  • An event or events are not processed at all (never received by the Business Events runtime server)
  • An event is processed, but the results are not correct. For example, filter results were unexpected, associated actions were never created, and so on.

The Business Events runtime produces three log files:

  • <WBE install directory>/director/logs/WBERuntime.event.log
    For example: C:\Program Files\IBM\WBE\director\logs\WBERuntime.event.log
  • <WBE install directory>/director/logs/WBERuntime.system.log
    For example: C:\Program Files\IBM\WBE\director\logs\WBERuntime.system.log
  • ><WBE install directory>/director/logs/connectors.log
    For example: C:\Program Files\IBM\WBE\director\logs\connectors.log

For runtime troubleshooting, the WBERuntime.event.log is typically the first place to look. You can search for the event name, or type= "event". Any issued SQL or evaluated JavaScript is also shown in the event log.

In the WBERuntime.event.log, do the following:

  1. Search for type= "event" to find the event you’re interested in.
  2. Examine the contents of the event to determine whether the event contains the expected event objects and object fields, and that their names are spelled correctly (note that Business Events treats strings as case-sensitive). These names must exactly match corresponding definitions within Business Events, as defined in the Design Data tool.
  3. Scroll down the log to see how intermediate objects are instantiated, in particular to see whether intermediate object fields that should be populated are not populated. A message explaining why the field is not populated is provided. Users are warned when an intermediate object field is not populated, even if there is a legitimate reason why the field shouldn’t be populated (for example, a value does not come in from an associated event object field, but that is expected by the application, which tests for a null condition).
  4. Scroll further to see messages that indicate whether a filter condition evaluates to true. If a filter is expected to evaluate to true and it doesn’t, review the filter logic and the data evaluated by the filter. Sometimes the filter logic is not as intended, or sometimes the data that’s being evaluated would not result in a true condition. Check for any messages that may explain an unusual condition; for example, a filter that is false because one or more of the intermediate object fields used in the filter has a null value (and the filter does not test for nulls).
  5. Scrolling further to see the actions produced by true filter evaluation. You can examine these actions to determine whether all the fields in the action objects contain expected values. If an action is associated with an embedded technology connector, then the result returned by the connector is included in the log, and you can examine the result returned by the connector to determine whether the connector successfully passed the action to the receiving touchpoint.

Look at the following example where an event does not behave as expected at runtime. It explains how you can identify and correct the source of the problem.

Sample runtime problem: Output file not found

Problem:

The output file is not found in the directory specified by the Outgoing action as evaluated by the Retrieve Customer Data interaction set. In this example, an Incoming event is sent in using an HTML form. The event is evaluated by Retrieve Customer Data. There is no filter, so when the event is received, the corresponding Outgoing action is always executed. The action uses the File System Connector to send a file to a directory.

Figure 14. Form to submit event
Form to submit event

When the event is submitted, there is no output in the directory defined for the File System Connector. In other words, the directory (in this case, C:\WebSphereBusinessEventsTest) in which the output file (in this case ValidationTest.xml) should have been generated is empty.

To see these details, import the BrokenExample_Runtime_scenario.xml provided with this article into the Design Data tool. The broken event form HTML (Broken7_Form.html) is also provided for download.

Problem determination:

  1. Look at the WBERuntime.event.log first. If there is nothing in the event log that indicates there was a problem or if there is no entry in the event log at all, proceed to the next step.
  2. Since the event was submitted via connector, check the connectors.log, as shown here:
    DEBUG 2008-08-25 20:16:44,109 [WebContainer : 1] 
        [com.aptsoft.connectors.http.eventConnector]- _event => Event1
    DEBUG 2008-08-25 20:16:44,109 [WebContainer : 1] 
        [com.aptsoft.connectors.http.eventConnector]-_event => Event1
    DEBUG 2008-08-25 20:16:44,109 [WebContainer : 1] 
        [com.aptsoft.connectors.http.eventConnector]- B1 => Submit
    DEBUG 2008-08-25 20:16:44,109 [WebContainer : 1] 
        [com.aptsoft.connectors.http.eventConnector]- _object => Event1
    DEBUG 2008-08-25 20:16:44,109 [WebContainer : 1] 
        [com.aptsoft.connectors.http.eventConnector]- IntegerIn => 42
    DEBUG 2008-08-25 20:16:44,109 [WebContainer : 1] 
        [com.aptsoft.connectors.http.eventConnector]- Looking for: 
        Event1  found :Incoming
    ERROR 2008-08-25 20:16:44,109 [WebContainer : 1] 
    [com.aptsoft.connectors.http.eventConnector]- Missing event bundle

    This message indicates that the Business Events runtime server received an event (Event1), but was unable to process it because no event by that name was defined in the Design Data tool.
  3. Open the project to see whether there is an event by that name (Event1). You'll find that the only event this project contains is Incoming as shown in Figure 15.
    Figure 15. Touchpoints view showing Event and Action
    Touchpoints view
  4. To resolve the problem, you need to look at the HTML form to see where Event1 is coming from. The HTTP event connector, which can generate an event by completing an HTML form, uses certain hidden fields within the form’s HTML to define the event, event object, and associated fields that will be passed in the event to the Business Events runtime server. If there is a mismatch between what’s specified in these fields and what's defined in Design Data, this error will occur.

Solution:

  1. Open the Broken Event HTML Form, as shown in Figure 14, in a text editor. You'll see the following:
      <p>Enter a number<br><input type="text" name="IntegerIn" size="20"></p>
      <p><input type=hidden value="Event1" name="_event">
      <p><input type=hidden value="Event1" name="_object">
  2. The value of the _event and _object tags is Event1. In order to make the connector work properly, change the values for those fields to match the values defined for the event in Design Data (in this case, Incoming) as follows:
      <p>Enter a number<br><input type="text" name="IntegerIn" size="20"></p>
      <p><input type=hidden value="Incoming" name="_event">
      <p><input type=hidden value="Incoming" name="_object">
  3. Save and resubmit the form. It will now pass the event properly to the Business Events runtime and the output file will be generated successfully. In this case, there is no need to make any changes to the project or restart the server.

Summary

This article has addressed some of the common methods for troubleshooting Business Events and showed you how to debug common problems encountered when working with Business Events V6.1. It described each of the available logs and how you can use them to resolve problems. Most of the problems you encounter using Business Events will fit into one or more of the four categories covered in this article: Install, Configuration, Design and Runtime.


Acknowledgements

The authors would like to offer sincere thanks to Denise M. Goldberg, WebSphere Business Events Test Lead, Prasad Imandi WebSphere Message Broker, WebSphere Service Registry and Repository , and WebSphere Business Events Level 2 Support, and Julia Holloway, Workstation Installation Development, for their valuable input into this article.


Download

DescriptionNameSize
Sample filessamples.zip5KB

Resources

Comments

developerWorks: Sign in

Required fields are indicated with an asterisk (*).


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Information in your profile (your name, country/region, and company name) is displayed to the public and will accompany any content you post, unless you opt to hide your company name. You may update your IBM account at any time.

All information submitted is secure.

Choose your display name



The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

Required fields are indicated with an asterisk (*).

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


All information submitted is secure.

Dig deeper into WebSphere on developerWorks


static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=WebSphere
ArticleID=374323
ArticleTitle=Troubleshooting common problems with WebSphere Business Events V6.1
publish-date=03052009