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
4 replies
Subscribers
5 subscribers
Views
11779 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Plug-Ins
Error with using the DocumentBuilderFactory when creating a plugin
nickh413445
Certified Senior Developer
over 8 years ago
I keep running into an issue with the DocumentBuilderFactory when creating a custom smart service plug-in.
The issue has to do with the appian-suiteapi.jar
Without the .jar file, my code is able to run successfully. When I add the appian-suiteapi.jar, I start getting the error below.
Does anyone have experience dealing with this issue? Is there another .jar I should be including to avoid this issue?
Exception in thread "main" javax.xml.parsers.FactoryConfigurationError: Provider for class javax.xml.parsers.DocumentBuilderFactory cannot be created
at javax.xml.parsers.FactoryFinder.findServiceProvider(Unknown Source)
at javax.xml.parsers.FactoryFinder.find(Unknown Source)
at javax.xml.parsers.DocumentBuilderFactory.newInstance(Unknown Source)
..
..
Caused by: java.lang.RuntimeException: Provider for class javax.xml.parsers.DocumentBuilderFactor...
OriginalPostID-241401
Discussion posts and replies are publicly visible
0
nickh413445
Certified Senior Developer
over 8 years ago
...y cannot be created
... 5 more
Caused by: java.util.ServiceConfigurationError: javax.xml.parsers.DocumentBuilderFactory: Provider com.appiancorp.common.xml.AppianDocumentBuilderFactory not found
at java.util.ServiceLoader.fail(Unknown Source)
at java.util.ServiceLoader.access$300(Unknown Source)
at java.util.ServiceLoader$LazyIterator.nextService(Unknown Source)
at java.util.ServiceLoader$LazyIterator.next(Unknown Source)
at java.util.ServiceLoader$1.next(Unknown Source)
at javax.xml.parsers.FactoryFinder$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 5 more
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
chetany
A Score Level 1
over 8 years ago
The class "AppianDocumentBuilderFactory" is included in the apian-common.jar. Try including it. Also this class which is Appian specific actually extends javax.xml.parsers.DocumentBuilderFactory which the Java XML package provides
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
chetany
A Score Level 1
over 8 years ago
One more thing: the DocumentBuilderFactory is an abstract class whereas the AppianDocumentBuilderFactory is not. If you check this link:
forum.appian.com/.../Custom_Plug-in_Packages.html
it mentions that if you use the classes from the package javax.xml.parsers , then you should not include the library. It may cause class-loading conflict.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
nickh413445
Certified Senior Developer
over 8 years ago
The problem is I'm using a .jar that's using the javax.xml.parsers.DocumentBuilderFactory. I guess one solution is updating the .jar source code and recompiling to a new .jar and use that. It's most definitely a class-loading conflict as the code is the same, but only the inclusion of the appian jar gives the error.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel