简体   繁体   中英

WSO2 ESB - java.lang.ClassNotFoundException: org.apache.synapse.core.axis2.Axis2MessageContext

I am having a mediator that receives a message, which is generated by VFS poller. I am trying to figure out the file name so that act on it differently. The code that pulls the fileName works, but sometimes I am getting ClassNotFoundException (see below). I gave to restart WSO2 one or more times in order for the class to be loaded successfully. I am running WSO2 ESB 4.8.0 on Ubuntu 12.04 with 8GB RAM and 4GB max Java Heap. Thanks, Krassimir

public boolean mediate(MessageContext context) {
...
String fileName = ((Map) ((Axis2MessageContext) context).getAxis2MessageContext()
        .getProperty("TRANSPORT_HEADERS")).get("FILE_NAME").toString();
...

Caused by: java.lang.ClassNotFoundException: org.apache.synapse.core.axis2.Axis2MessageContext at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 17 more

Kindly download corresponding jar file from google and keep it in lib folder (ESB_HOME/repository/components/lib) restart and try.

otherwise

keep it in extensions folder. restart and try

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM