Ok,
Let me answer this myself

In case you have a plain jar (my case) you should put it in
repository\components\mediators.  [1]
Even better is if you make it an osgi-bundle. [1,2]

Regards,
Harm

ref:
[1] http://supunk.blogspot.com/2009/07/writing-wso2-esb-mediator.html
[2] http://wso2.org/forum/thread/5635

On Wed, Sep 2, 2009 at 10:55 AM, Harm Verhagen <[email protected]>wrote:

> Hi,
>
>
> I'm trying to load a custom mediator with esb v2.1 an i'm experiencing
> problems.
> (I can successfully do the same with v1.7, same jarfile, same synapse.xml
> snippet)
>
> I keep getting the following exception
> [2009-09-02 10:37:02,150] ERROR - ClassMediatorFactory Error :
> com.esb.mediators.FaultMediator
> java.lang.ClassNotFoundException: com.esb.mediators.FaultMediator
>         at
> org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:489)
>         at
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:405)
>         at
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:393)
>         at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:105)
>
> synapse snippet.
> <syn:class name="com.esb.mediators.FaultMediator">
>             <syn:property name="message" value="fault!"/>
>   </syn:class>
>
> First I thought, I didn't put the jar in the correct place on disk....
> But thats not the problem. even when putting my jar in every directory
> within esb2.1 that contained jars I still get this error.
> I tried putting it next to every instance of
> org.wso2.esb.samples-2.1.0.jar
>
> The following sampling code works OK.org.wso2.esb.samples-2.1.0.jar
> <syn:class name="samples.mediators.DiscountQuoteMediator">
>                 <syn:property name="discountFactor" value="10"/>
>                 <syn:property name="bonusFor" value="5"/>
> </syn:class>
>
>
>
> What am I missing ?  Do I need to register jar files somewhere first ?
> Instead of just putting them in a direcotry.  (I did find  some references
> to  org.wso2.esb.samples-2.1.0.jar in a file called bundles.info)
>
> Regards,
> Harm
>
_______________________________________________
Esb-java-user mailing list
[email protected]
https://wso2.org/cgi-bin/mailman/listinfo/esb-java-user

Reply via email to