• No replies
3 Posts

Pinned topic Properly Exporting a Crawler Jar

‏2013-07-03T20:57:10Z | crawler jar java

I am working on a custom crawler for Omnifind Enterprise Edition. I kept getting an error, so I decided to just try to load an example plugin, but I still get the same error.  This is the code I am trying to use:

public class MyPostparsePlugin implements PostparsePlugin {
  public MyPostparsePlugin() { }
  public boolean init() { return true; }
  public boolean release() { return true; }
  public boolean processDocument(PostparsePluginArg[] args) {
    try {
      PostparsePluginArg1 arg = (PostparsePluginArg1)args[0];
        if (arg.getContent() != null && arg.getContent().length > 0) {
          String content = new String( arg.getContent(), arg.getEncoding() );
            if (content != null && content.indexOf(keyword) > 0) {
              final String userdata = null; // look up string by keyword.
              FieldMetadata mf = new FieldMetadata(
                 "MyUserSpecificMetadata", // field name
                 userdata,                 // field value
                 false,                    // searchable?
                 true,                     // field-searchable?
                 false,                    // parametric-searchable?
                 true,                     // can be extracted by search?
                 "MetadataPreferred",      // metadata value rather 
                                           // than content
                 false);                   // show in summary?
                 arg.addMetadataField(mf);   // Add it to the list.
                 return true;                // Use results.
        return false;  // ignore results
      } catch (Exception e) {
        return false;  // disregard returned results

I keep getting "FFQD4924E An error occurred when calling Web crawler plug-in class MyPostparsePlugin." I have been using this version of eclipse to export the java class as a jar:  However, the  import*; still has a red underline in eclipse. After I export the jar, I store it in the plugin Omnifind directory of, along with a copy of the .java and .class. Are there any steps I am missing in exporting the plugin?