Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
12 replies
Subscribers
6 subscribers
Views
9224 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Plug-Ins
I am creating a custom plugin which has references to 3rd party jars like xmlbe
sivananthag
over 10 years ago
I am creating a custom plugin which has references to 3rd party jars like xmlbeans, asis-axiom jars etc., I created a plugin project and then created a smart service.
I checked some sample plugins in the forum that has 3rd party dependencies ( for example Base64 Conversion Utilities - has dependency on castor). They just place the 3rd party jars under META-INF / lib and has a plain manifest file that contains only Manifest Version attribute.
I followed the same approach and placed my dependent jars in the META-INF/lib folder and there is a Manifest.MF file under META-INF with just version property.
I deployed this plugin jar , but it didnt work. I got NoClassDefFound Exception always.
I tried adding my depdendency jars in "ClassPath" attribute in Manifest.MF and my manifest now looked like:
Manifest-Version: 1.0
Main-Class:
Class-Path: schemaorg_apache_xmlbeans.jar apache-mime4j-core-0.7.2.jar axiom-api-1.2.13.jar axiom-dom-1.2.13.jar axiom-impl-1.2.1...
OriginalPostID-118374
OriginalPostID-118374
Discussion posts and replies are publicly visible
0
sivananthag
over 10 years ago
...3.jar axis2-fastinfoset-1.6.2.jar axis2-kernel-1.6.2.jar axis2-xmlbeans-1.6.2.jar neethi-3.0.2.jar xmlbeans-2.3.0.jar wsdl4j-1.6.2.jar XmlSchema-1.4.7.jar axis2-adb-1.6.2.jar axis2-transport-http-1.6.2.jar axis2-transport-local-1.6.2.jar commons-codec-1.3.jar commons-httpclient-3.1.jar commons-logging-1.1.1.jar httpcore-4.0.jar mail-1.4.jar
This also didnt work out and I got NoClassDefFound Exception.
Please suggest me how to reference 3rd party jars in an Appian Plugin / Smart Service?
Thanks,
Jhothi
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Michael Chirlin
Appian Employee
over 10 years ago
Can you copy your custom plugin to this post so I can take a look?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sivananthag
over 10 years ago
I can not post my custom plugin in forum. I am using Appian's Eclipse plugin and the Appian-> Export bundle option to build the jar. I tried various options of building Jar - through Java Export ( manual assembly of jar), appian -> Export Plugin, Appian build.xml etc., . I could not find any difference in structure and content in any of the jar building approach. the dependent jars are placed in META-INF/ lib and manifest.mf file didnt have any special attributes, it is just Manifest-Version & Created-By attributes. So I am not sure why classes from my libraries are not getting loaded?
Please suggest me if i am missing any steps / how to get the libraries loaded?
Also appreciate your help on throwing some light on Appian Class loading mechanism for Smart services. I could not get any article on this in Appian documentation.
thanks,
Jhothi
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Michael Chirlin
Appian Employee
over 10 years ago
The usual workflow when using the Eclipse plugin is to put all of your runtime dependent classes in the lib folder under the parent project. When the ant script runs, it copies these files over to META-INF/lib. You also shouldn't have to create the manifest.mf file manually.
Once your files are in the lib folder, then update your classpath to include those files so that there are no errors in your java classes. Then when you run your ant built it should generate the plugin file for you.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sivananthag
over 10 years ago
Thanks Chirlin for your help. I followed the same steps. I didnt understand your statement " update your classpath to include those files so that there are no errors in your java classes"?
I didnt create the manifest manually.
Are you referring to adding them in build path for compiling the classes? Or do i need to add them in the class path of Jboss Server?
Thanks,
Jhothi.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Michael Chirlin
Appian Employee
over 10 years ago
Right click on the project and add them to the build path. Then run the any script by either dragging the build XML to the ant window in eclipse or by using the appian eclipse plugin.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sivananthag
over 10 years ago
I did that already for compiling. If these are the steps, Not sure why my plugin didnt work. I am expecting the appian to load the classes from META-INF/ lib, but it didnt happen.
do you have any idea?
thanks,
Jhothi
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Michael Chirlin
Appian Employee
over 10 years ago
Can you paste the stack trace error?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
samiullahm
over 7 years ago
Please check whether the dependent jar has already available under suite.ear/lib, in case the class package available then it won't consider the jar from META-INF/lib. I have faced this issue in 17.1 for json related jar, have removed the jar from META-INF/lib but the jar available under suite.ear/lib is not the latest so few classes not available like JSONException in my case.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
aloks0189
Certified Lead Developer
over 7 years ago
in reply to
samiullahm
Can you post the folder structure of the plugin project. I feel that the jar files has been misplaced.
Extract jar file into a folder, Open command prompt, go to jar file main folder which contains various folders using command prompt> hit the following command, tree/f
This will represent you the tree structure of the plugin project in windows command prompt screen, so that the practitioner can easily trace the issue from the basic level.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
>