Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Test and Performance Tools Platform (TPTP) » Using Java class callouts with the Generic Log Adapter / Using substitution extension class
Using Java class callouts with the Generic Log Adapter / Using substitution extension class [message #87338] Wed, 15 November 2006 11:01 Go to next message
Eclipse UserFriend
Originally posted by: christian.jog.businessmart.de

Hi,

I tried very hard to make this work, but I think I've come to a point where
I definitely need help.

I can't make the GLA ("Rerun adapter from first record" button) to accept my
own substitution extension class. I only get the message "Could not find
substitution extension class"

I worked through the following document:
* http://www-128.ibm.com/developerworks/autonomic/library/ac-c allout/

And I think I understand the machanisms. In this documentation:
http://www-128.ibm.com/developerworks/autonomic/library/ac-s tatic/ is a
screenshot (Figure 4) where you can see the substitution class
" com.ibm.etools.logging.adapter.parsers.SyslogTimeFormatExten sion ". So I
tried that one and it works!

I then added my own class
(com/ibm/etools/logging/adapter/parsers/TestCode.class) to the same package
"glacomponents.jar" in hope I can trick the system. I also added the
extension point to the plugin.xml:

<!-- Test substitutionExtensionClassname extension -->
<extension
id="com.ibm.etools.logging.adapter.parsers.TestCode"
name="Test"
point="org.eclipse.hyades.logging.adapter.substitutionExtension ">
<substitutionExtensionClassname
name="com.ibm.etools.logging.adapter.parsers.TestCode">
</substitutionExtensionClassname>
</extension>

But no luck here. Although I can use
" com.ibm.etools.logging.adapter.parsers.SyslogTimeFormatExten sion ", my own
class "com.ibm.etools.logging.adapter.parsers.TestCode" won't work.

Of course I tried to get my class to work within my own Plug-In, but that
was useless as well. It seems I'm not the only one with that problem:
http://209.85.135.104/search?q=cache:-1WZfPj7Li4J:www.eclips e.org/newsportal/article.php%3Fid%3D720%26group%3Declipse.tp tp+%22substitution+extension+class%22&hl=de&gl=de&am p;ct=clnk&cd=8&client=firefox-a

But - alas - I haven't found a solution yet.


Any sugestions?

regards,
Christian

PS: This is my TestCode.class:

package de.businessmart.gla;

import org.eclipse.hyades.logging.adapter.AdapterException;
import org.eclipse.hyades.logging.adapter.parsers.ISubstitutionExte nsion;

public class TestCode implements ISubstitutionExtension {

public String processRecord(String arg0) throws AdapterException {

return "*";
}

public String processMatchResult(String arg0) throws AdapterException {
return "**";
}

}


Re: Using Java class callouts with the Generic Log Adapter / Using substitution extension class [message #87736 is a reply to message #87338] Thu, 16 November 2006 19:06 Go to previous message
Eclipse UserFriend
Originally posted by: cindyjin.ca.ibm.com

Hi Christian:

You can't execute the project you attached because this plugin is not
loaded into eclipse, so it can't find the substitution extension class
while you press the GLA(Rerun adapter from first record") button. I
executed your project with "run as eclipse application", then your
extension class in loaded to runtime workspace, then I imported your
plugin into the runtime workspace, and pressed the button again. It works.

I suggest you to split your plugin into two plugin projects, one only
has the substitution extension class, export and deploy it to your
eclipse plugins. The other one contains the adapter to use this
extension class. Then it should be work.

Hope this can help you.

Cindy

Christian Jog wrote:
> Hi,
>
> I tried very hard to make this work, but I think I've come to a point where
> I definitely need help.
>
> I can't make the GLA ("Rerun adapter from first record" button) to accept my
> own substitution extension class. I only get the message "Could not find
> substitution extension class"
>
> I worked through the following document:
> * http://www-128.ibm.com/developerworks/autonomic/library/ac-c allout/
>
> And I think I understand the machanisms. In this documentation:
> http://www-128.ibm.com/developerworks/autonomic/library/ac-s tatic/ is a
> screenshot (Figure 4) where you can see the substitution class
> " com.ibm.etools.logging.adapter.parsers.SyslogTimeFormatExten sion ". So I
> tried that one and it works!
>
> I then added my own class
> (com/ibm/etools/logging/adapter/parsers/TestCode.class) to the same package
> "glacomponents.jar" in hope I can trick the system. I also added the
> extension point to the plugin.xml:
>
> <!-- Test substitutionExtensionClassname extension -->
> <extension
> id="com.ibm.etools.logging.adapter.parsers.TestCode"
> name="Test"
> point="org.eclipse.hyades.logging.adapter.substitutionExtension ">
> <substitutionExtensionClassname
> name="com.ibm.etools.logging.adapter.parsers.TestCode">
> </substitutionExtensionClassname>
> </extension>
>
> But no luck here. Although I can use
> " com.ibm.etools.logging.adapter.parsers.SyslogTimeFormatExten sion ", my own
> class "com.ibm.etools.logging.adapter.parsers.TestCode" won't work.
>
> Of course I tried to get my class to work within my own Plug-In, but that
> was useless as well. It seems I'm not the only one with that problem:
> http://209.85.135.104/search?q=cache:-1WZfPj7Li4J:www.eclips e.org/newsportal/article.php%3Fid%3D720%26group%3Declipse.tp tp+%22substitution+extension+class%22&hl=de&gl=de&am p;ct=clnk&cd=8&client=firefox-a
>
> But - alas - I haven't found a solution yet.
>
>
> Any sugestions?
>
> regards,
> Christian
>
> PS: This is my TestCode.class:
>
> package de.businessmart.gla;
>
> import org.eclipse.hyades.logging.adapter.AdapterException;
> import org.eclipse.hyades.logging.adapter.parsers.ISubstitutionExte nsion;
>
> public class TestCode implements ISubstitutionExtension {
>
> public String processRecord(String arg0) throws AdapterException {
>
> return "*";
> }
>
> public String processMatchResult(String arg0) throws AdapterException {
> return "**";
> }
>
> }
>
>
Previous Topic:Trouble Installing TPTP
Next Topic:profiling workspace plugin
Goto Forum:
  


Current Time: Sun Nov 23 08:46:22 GMT 2014

Powered by FUDForum. Page generated in 0.01795 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software