title: Custom Mule Cloud Connector with Axis2 Client
body: <p>I have developed a custom cloud connector for Mule.  I have developed it in IntelliJ using Maven.  I generated code from a 3rd party WSDL using Axis2 and XMLBeans.  I have developed test cases that pass and show the expected results after interacting with the web service.  "mvn clean package" successfully passes all tests and builds the site.</p>
  
  <p>The problem I am having is using it in anypoint building out a Mule project.  I have added the Axis2 1.6.3 libs to the classpath root of the jvm created by Anypoint when launching the application.  When I submit a request that interacts with my connector, I get the following error:</p>
  
  <blockquote>
    <hr>
    
    <p>Message               : null (java.lang.ExceptionInInitializerError).
    Message payload is of type: String Type                  :
    org.mule.api.MessagingException Code                  : MULE_ERROR--2
    JavaDoc               :
    <a href="http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/MessagingException.html" rel="nofollow">http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/MessagingException.html</a>
    Payload               : Testing
    ******************************************************************************** Exception stack is:
    1. null (java.lang.NullPointerException)   org.apache.axiom.locator.DefaultOMMetaFactoryLocator:72 (null)
    2. null (java.lang.ExceptionInInitializerError)   org.apache.axis2.description.AxisDescription:72 (null)
    3. null (java.lang.ExceptionInInitializerError). Message payload is of type: String (org.mule.api.MessagingException)<br>
    org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor:32
    (<a href="http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/MessagingException.html" rel="nofollow">http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/MessagingException.html</a>)
    ******************************************************************************** Root Exception stack trace: java.lang.NullPointerException   at
    org.apache.axiom.locator.DefaultOMMetaFactoryLocator.(DefaultOMMetaFactoryLocator.java:72)</p>
  </blockquote>
  
  <p>Looking at DefaultOMMetaFactoryLocator, for axiom-api1.2.14, I see the following at line 72:</p>
  
  <blockquote>
    <p>Enumeration e =
    classLoader.getResources(ImplementationFactory.DESCRIPTOR_RESOURCE);</p>
  </blockquote>
  
  <p>The static reference is to an axiom.xml file.  I have tried adding the file manually but continue to get the null pointer error.  This code is used by the generated code to make a connection via the client but not impacted by my code directly.  Is there something I am missing with being able to use Axis2 within a Cloud Connector in Mule ESB?  Why would it work in the maven test but not in anypoint?</p>
  
  <p>Additional Info:</p>
  
  <p>Axis2 1.6.3
  Axiom* 1.2.14
  Mule ESB 3.7</p>