Hi Todd,

Can you attach the pom.xml of your custom handler?

Thanks,
Harsha

On Mon, Sep 4, 2017 at 9:58 PM, Todd Hill <[email protected]> wrote:

> Sorry if this is not the right place to send questions about writing a
> custom Handler for WSO2 API Manager 2.1.0, but I don't see any other places
> listed.
>
> I have written a custom handler that worked well with WSO2 ESB 4.8.0. We
> are migrating to using the API Manager v2.1.0, so I updated the maven
> dependencies, but now after I put the jar into 
> <APIM_HOME>/repository/components/lib
> and restart the API Manager, I get this when my Handler class is invoked:
>
> Caused by: java.lang.ClassNotFoundException:
> org.apache.synapse.core.axis2.Axis2MessageContext cannot be found by
> esb.poc_1.0_SNAPSHOT_1.0.0
> 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)
>
>
> Here is the method in the handler:
>
> private void processPayload(CaosDecisionMakingData decisionMakingData,
> MessageContext mc){
> try {
> RelayUtils.buildMessage(((Axis2MessageContext)
> mc).getAxis2MessageContext());
> } catch (IOException e) {
> throw new RuntimeException(e);
> } catch (XMLStreamException e) {
> throw new RuntimeException(e);
> }
> OMElement restPayload = mc.getEnvelope().getBody().getFirstElement();
> if (restPayload != null) {
> decisionMakingData.setPostBodyElement(restPayload);
> }
> }
>
> The line with RelayUtils containing the cast is where the problem is.
>
>
> Thanks for any help or direction you can give.
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Harsha Kumara
Software Engineer, WSO2 Inc.
Mobile: +94775505618
Blog:harshcreationz.blogspot.com
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to