Sometimes other jar files will conflict with the libraries already loaded in the platform, especially as custom jar files get older or are not maintained anymore.
The most common symptoms are:
- Your process starts failing with "org.xml.sax.SAXNotRecognizedException: Property 'http://javax.xml.XMLConstants/property/accessExternalDTD' is not recognized"
- Your process starts failing with "org.xml.sax.SAXNotRecognizedException: http://javax.xml.XMLConstants/feature/secure-processing"
- You get similar errors to "javax.xml.parsers.ParserConfigurationException"
- Your process starts failing with an XML non-document related error similar to the above
- Your atom/molecule/cloud doesn't startup and immediately stops after trying to start it up
- Your installed libraries tab for the atom is not loading even though other tabs might be working
At some point one or some of the following jar files were added directly to the userlib or lib directory in the atom installation directory:
Note: You should never add any custom jar files directly to the lib directory.
xalan.jar and other xalan*.jar
xerces.jar and other xerces*.jar
xercesImpl.jar and other xercesImpl*.jar
xml-apis.jar and other xml-apis*.jar
We do not advocate adding jar files directly to the userlib directory unless you are a cloud and really want a jar file(s) to be universally available to all of your tenants. On cloud atoms, tenants should be making custom libraries and deploying them to the environment instead.
- Remove the jar file(s) from the userlib or lib directory if they are not actually being used anymore
- Create a custom library with the jar file(s) and deploy to the desired environment. In the case where you have some library that is directly using any of the incompatible jar files and its classes, you will need to contact your vendor. A known example is the JDE database jar directly using xerces.jar and removing it it is not an option since that interferes with the JDE database connection
- Create a custom library under a specific connector so it is not in the main userlib directory e.g. choosing JMS for connector type to place jars under userlib/jms directory
There's a chance the jar will still conflict if uploaded in a custom library, at which point your best option would be to remove it.
Note: If you are getting "http://javax.xml.XMLConstants/property/accessExternalDTD is not recognized" errors but do not have any incompatible jar files (or already tried removing the suspected ones without a change in result), make sure you are on at least Java 1.7.0_55 (for Java 7) or 1.8.0_66 (for Java 8).
How to Create and Deploy a Custom Library
You can also follow the help guide here, Creating a Custom Library component
1. Go to your Setup (top right Account name's drop down menu) -> Account Libraries
2. Click "Upload a File"
3. Choose your jar file and click "Upload"
4. Go the Build tab and make a new "Custom Library" component
If you choose "General" as the Custom Library Type, the jar files will be placed under the userlib folder.
If you choose "Scripting", the jar files will be placed under the userlib/scripting folder.
If you choose "Connector", you will then choose a connector and the jars will be placed under userlib/<<connector_type>> folder, i.e. choosing the database connector will place those jars into the userlib/database folder.
5. Click on "Select JAR files to add" and drop down list with all of the jars you have uploaded in the account libraries will be populated. Pick your jars one at a time. Once selected, you will not see it in the list again and it will populate in the list underneath the "Select JAR files to add"
6. Save the component and deploy it to the desired environment
7. Once successfully deployed, the jars should show up in the "Installed Libraries" tab in that atom information. Their location will correspond with what you choose as the Custom Library Type and should reflect in the path
Note: Atoms and molecules will get physical copies placed in the corresponding locations. Tenants who deploy a custom library will have them placed in the accounts folder of the cloud directory, <<cloud_installation_directory>>/accounts/account_id/userlib. Deploying a custom library directly to a cloud will not place the jar files physically anywhere in the installation directory.