Migrating static parsers from 1.3 to 3.x

The architectural design for the static parsers has changed in moving from 1.3 to 3.x. The org.eclipse.hyades.logging.events.* classes have been migrated to the org.eclipse.hyades.logging.events.cbe.* Common Base Event classes.

Follow these steps to migrate your static parser:

Import log parser project to current workspace

  1. In the Log and Trace Analyzer, import your existing log parser project by selecting File > Import.
  2. In the Import wizard, select Existing project into workspace.
  3. Specify the location of the project in the Project contents field and click Finish. The project contents are loaded into the workspace.

Update Java Build Path in project properties

  1. Switch to the Plug-in Development perspective.
  2. The Java Build Path needs to be updated to point to the libraries used in the current release. Open the project properties by right-clicking on the project and selecting Properties.
  3. In the Properties dialog, select Java Build Path.
  4. Select the Libraries tab in the Java Build Path properties.
  5. Select all the JAR files from 1.3 in the list and click Remove.
  6. Click Add external JARs and add the following libraries:
  7. Click OK to save the changes.

Update the static parser Java class to use the Common Base Event API

The classes used in your static parser Java class for Common Base Events need to be updated. All instances of org.eclipse.hyades.logging.events.* need to be migrated to org.eclipse.hyades.logging.events.cbe.*. For example, if you have a set of import statements:

import org.eclipse.hyades.logging.events.ICommonBaseEvent;
import org.eclipse.hyades.logging.events.IComponentIdentification;
import org.eclipse.hyades.logging.events.IReportSituation;
import org.eclipse.hyades.logging.events.ISituation;
in 3.x.x, these statements need to be updated to:
import org.eclipse.hyades.logging.events.cbe.CommonBaseEvent;
import org.eclipse.hyades.logging.events.cbe.ComponentIdentification;
import org.eclipse.hyades.logging.events.cbe.ReportSituation;
import org.eclipse.hyades.logging.events.cbe.Situation;
For details on the org.eclipse.hyades.logging.events.cbe.* classes, refer to the Common Base Event Programming API.

Update the adatper configuration file

Additional fields in the adapter are now being validated in the Adapter Configuration Editor. For example, the Implementation Creation Date and the Role Creation Date fields must have a value that conforms to the XML date time format, yyyy-MM-ddThh:mm:ss. Ensure that any errors that show up in the Problems view for your adatper are corrected before you run the adapter.

  1. Open the adapter file for your log parser. Right-click on the adapter file and select Open with > Adapter Configuration Editor.
  2. Update any fields that show up in the Problems view that are listed as incorrectly specified or missing. For example, the component fields Implementation version, and Role version are now required fields in 3.x.x.
  3. Save any changes to the adapter file.

Update the version in the plugin.xml file

Update the version number in your plugin.xml file for your log parser plug-in.
  1. Right-click on the project plugin.xml file and select Open with > Plug-in Manifest Editor.
  2. In the editor, select the Overview tab.
  3. Update the version number of your plug-in.
  4. Save the changes.

Summary of changes

v3.x.x Configuration v1.3.0 Configuration
Java Build Path plug-ins org.eclipse.hyades.logging.adapter.config\hglaconfig.jar
org.eclipse.hyades.logging.core\hlcore.jar
org.eclipse.hyades.logging.core\hlcbe101.jar
org.eclipse.hyades.logging.parsers\hparse.jar
org.eclipse.hyades.logging.adapter\hgla.jar
org.eclipse.emf.ecore\runtime\ecore.jar
org.eclipse.emf.common\runtime\common.jar
org.eclipse.hyades.logging.commons\hlcommons.jar
org.apache.jakarta_commons_logging\commons-logging.jar
org.eclipse.hyades.logging.adapter\hglaconfig.jar
org.eclipse.hyades.logging.core\hlcore.jar
org.eclipse.hyades.logging.core\hlevents.jar
org.eclipse.hyades.logging.parsers\hparser.jar
org.apache.xerces\xmlParserAPIs.jar
org.eclipse.hyades.logging.commons\common-loggings.jar
Common Base Event API org.eclipse.hyades.logging.events.cbe.* org.eclipse.hyades.logging.events.*
Adapter Configuration File changes Additional fields validated through editor:
  • Implementation date
  • Implementation version
  • Role implementation date
  • Role version
N/A

Related concepts
Overview of the Hyades Generic Log Adapter

Related tasks
Creating a log parser

Related references
Adapter Configuration File structure
Adapter Configuration Editor