I'm using the 0.9 plugin framework and am trying to add a new plugin and am having classloading issues.

I want to use Javamail's mail.jar and BouncyCastle jars. My plugin implemnentation catches javax.mail.internet.ParseException and when it tries to create the new instance of my Parser, it gives

java.lang.NoClassDefFoundError: javax/mail/internet/ParseException
        at java.lang.Class.getDeclaredConstructors0(Native Method)
        at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
        at java.lang.Class.getConstructor0(Class.java:2699)
        at java.lang.Class.newInstance0(Class.java:326)
        at java.lang.Class.newInstance(Class.java:308)
at org.apache.nutch.plugin.Extension.getExtensionInstance(Extension.java:160)
        at 
org.apache.nutch.parse.ParserFactory.getParsers(ParserFactory.java:130)

My plugin.xml has

   <runtime>
      <library name="parse-mime.jar">
         <export name="*"/>
      </library>
      <library name="bcmail-jdk16-141.jar"/>
      <library name="bcprov-jdk16-141.jar"/>
      <library name="mail.jar"/>
   </runtime>

I have tried it with the export for all libraries, also by having a lib-javamail plugin, which does an export for mail.jar and with my plugin having the

   <requires>
      <import plugin="lib-javamail"/>
   </requires>

but it just doesn't work. It seems identical to the standard PDF parsing or the POI based parsers, so I'm at a loss...

It's a stand alone app, no Tomcat or anything else.

Any ideas?
Antony

Reply via email to