I am using Appian 7.1.2 on JBOSS. I am building a smartservice to call the sales

I am using Appian 7.1.2 on JBOSS. I am building a smartservice to call the salesforce enterprise wsdl. I am using axis2 version 1.6.2. The code works when I test it outside of the application server. When I run it with a process model, I initially got NoClassDefFound error on org/w3c/dom/Node. I then added the following to my appian-plugin.xml.

<bundle-instructions>
                    <Export-Package>org.w3c.dom</Export-Package>
          </bundle-instructions>

Now I am getting:

java.lang.ClassCastException: __redirected.__XMLInputFactory cannot be cast to javax.xml.stream.XMLInputFactory at javax.xml.stream.XMLInputFactory.newInstance(XMLInputFactory.java:41) at org.apache.axiom.om.util.StAXUtils$7.run(StAXUtils.java:504) at java.security.AccessController.doPrivileged(Native

To make life easier, I wrote a simple plugin to call the weather web service. That gave me the same exception. Need someone to resolve. I can send you my plugin. FYI, here are the...

OriginalPostID-80470

OriginalPostID-80470

  Discussion posts and replies are publicly visible

  • ... steps that I followed:

    1) Download axis2 version 1.6.2 from apache site.
    2) Download the Axis2 Code Generation toolkit.
    3) Used the above to generate proxy classes for Salesforce Enterprise WSDL / Weather.com WSDL. Packaged the proxy classes into a jar file.
    4) Created appian plugin using the appian eclipse plugin generator.
    5) Added all of the jars in axis2 version 1.6.2 to the lib directory of the project.
    6) Added the proxy jar to the lib directory.
    7) Wrote some code to call the proxy classes and verified that it worked locally (using a class with a main method).
    8) Packaged the project as a plugin using the provided eclipse plugin by appian.
    9) Deployed the plugin to appian. Received this error (java.lang.ClassCastException: __redirected.__XMLInputFactory cannot be cast to javax.xml.stream.XMLInputFactory at).
  • This won't solve your item, but please clarify the version #. There is Appian 7.1 and Appian 7.2. However, 7.1.2 doesn't exist.
  • I finally got this to work. If someone else is doing this, I would suggest that you pay very close attention to what jar files you include in the plugin's lib and lib-compile directories. Ideally, I would have liked to just copy my dependent jars to the lib directory but that doesn't work. You have to be very aware of what java classes are made available to the plugin by appian. The list is given here:

    forum.appian.com/.../Custom_Plug-in_Packages

    Before you add a jar to the lib or lib-compile directory see if the class that you are using is made-available to the plugin by appian. If it is, then add the jar to the lib-compile directory. If not, add it to the lib directory. Unfortunately for me, I had to add one jar at a time until it worked. Extremely time consuming and frustrating (because I had to keep deploying the plugin).