Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 195998

Summary: Sensor/Extractor XPath filtering does not work in remote log import scenario
Product: z_Archived Reporter: Dave Smith <smith>
Component: TPTP.monitoringAssignee: Rohit Shetty <rohit.shetty>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: P1 CC: apnan, harkrish, jkubasta, labadie, rohit.shetty
Version: unspecifiedKeywords: plan
Target Milestone: ---Flags: apnan: review+
Hardware: PC   
OS: Windows 2000   
Whiteboard: closed460
Attachments:
Description Flags
Modified Apache access log adapter file with XPath sensor filter specification
none
Patch for this problem rohit.shetty: review?

Description Dave Smith CLA 2007-07-10 10:29:09 EDT
Currently TPTP does not provide sensor/extractor XPath filtering on log import operations, even though GLA supports sensor/extractor XPath filtering.  However, if consumers extend TPTP to provide XPath filtering on log import, it does not work in the remote scenario because the Fast XPath jar is not in the classpath of the RemoteLogParserLoader application defined in the Agent Controller for remote log import.  The following error is returned to the Log Import Wizard when the filter and filter exit class parameters are added to the Apache access log static adapter file in the Agent Controller:

Exception
IWAT0030E An error occurred during the execution of the remote log parser "org.eclipse.hyades.logging.adapter.config.StaticParserWrapper": IWAT0488E A failure occurred attempting to get the FilterExit extension org.eclipse.hyades.logging.parsers.util.ApacheAccessLogFilterExit from the platform.

Adding a debug message to FilterExitLoaderUtil.instantiate method I found that a FastXPath class could not be found.

To fix this the TPTP Models classpath variable needs to be added to the classpath of RemoteLogParserLoader in the org.eclipse.hyades.logging.parsers SetConfig class.  For example the SetConfig needs to generate the following in the pluginconfig.xml:

<Variable name="CLASSPATH" position="append" value="%CLASSPATH_ORG_ECLIPSE_TPTP_PLATFORM_MODELS%"/>

Note as a workaround for this problem, the extenders can add this variable definition to their plugin's SetConfig class that extends the RemoteLogParserLoader configuration.
Comment 1 Dave Smith CLA 2007-07-10 10:32:01 EDT
Created attachment 73420 [details]
Modified Apache access log adapter file with XPath sensor filter specification
Comment 2 Dave Smith CLA 2007-07-10 11:35:35 EDT
Deferring this to 4.4.1 because there is a workaround for extenders that use sensor/extractor filtering for log import.
Comment 3 Hari H Krishna CLA 2007-07-12 11:24:27 EDT
Dave, I tested the fix for AC and see that we have to add all the below mentioned parameters
<Variable name="CLASSPATH" position="prepend" value="%CLASSPATH_ORG_ECLIPSE_TPTP_PLATFORM_MODELS%"/>
		<Variable name="CLASSPATH" position="prepend" value="%CLASSPATH_ORG_ECLIPSE_JDT%"/>
		<Variable name="CLASSPATH" position="prepend" value="%CLASSPATH_ORG_ECLIPSE_JDT_LAUNCHING%"/>

Comment 4 Dave Smith CLA 2007-07-12 12:42:13 EDT
Hari, what jars are defined in CLASSPATH_ORG_ECLIPSE_JDT?  As far as I know for Fast XPath compiliation support, only org.eclipse.jdt.core jar is required.  Why is CLASSPATH_ORG_ECLIPSE_JDT_LAUNCHING required to be added to the classpath?  

Note, the JDT jars are currently not packaged with the TPTP Agent Controller.
Comment 5 Dave Smith CLA 2007-08-01 09:41:16 EDT
Deferring this to future because there is currently no plan to add sensor/extractor filtering support in the log import scenario in TPTP.
Comment 6 Eric Labadie CLA 2007-08-09 10:47:55 EDT
This is required from AC perspective
Comment 7 Dave Smith CLA 2007-08-31 18:00:34 EDT
Add a sizing.
Comment 8 Rohit Shetty CLA 2007-11-24 11:03:57 EST
Created attachment 83696 [details]
Patch for this problem
Comment 9 Rohit Shetty CLA 2007-11-25 03:01:18 EST
Alex,
Can you review the patch. 

Also, requesting moving this defect to 4.5 i4.

Thanks.
Comment 10 Alex Nan CLA 2007-11-26 16:49:38 EST
Reviewed. +1. 
Please make sure you add a test case for it and change the new comment "// org.eclipse.emf.ecore jars" accordingly.
Comment 11 Rohit Shetty CLA 2007-11-28 13:19:01 EST
Added an Automated test case into Monitoring.Analysis.LogImport to test this fix.
Comment 12 Rohit Shetty CLA 2007-11-28 13:20:20 EST
Fix is in CVS.
Comment 13 Paul Slauenwhite CLA 2009-06-30 09:55:13 EDT
As of TPTP 4.6.0, TPTP is in maintenance mode and focusing on improving quality by resolving relevant enhancements/defects and increasing test coverage through test creation, automation, Build Verification Tests (BVTs), and expanded run-time execution. As part of the TPTP Bugzilla housecleaning process (see http://wiki.eclipse.org/Bugzilla_Housecleaning_Processes), this enhancement/defect is verified/closed by the Project Lead since this originator of this enhancement/defect has an inactive Bugzilla account and considered to be fixed. If this enhancement/defect is still unresolved and reproducible in the latest TPTP release (http://www.eclipse.org/tptp/home/downloads/), please re-open.