Locally Imported WSDLs Java Linkage Error
A Java Linkage error displays when performing certain operations if you import a TIBCO ActiveMatrix BPM Public WSDL into a Business Studio project and deploy it to your ActiveMatrix BPM installation.
- import a ActiveMatrix BPM WSDL into your Business Studio™ project and deploy the process to your ActiveMatrix BPM installation and
- increment the version number of the Business Studio project so that the version number of the imported ActiveMatrix BPM WSDL is higher than the version number of the WSDL distributed with ActiveMatrix BPM.
This is because, importing a ActiveMatrix BPM WSDL locally and deploying it to ActiveMatrix BPM causes you to install another package with the same name to your ActiveMatrix BPM installation, but with different version numbers.
a java.lang.LinkageError: loader constraint violation: loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) previously initiated loading for a different type with name "com/tibco/n2/common/api/exception/ErrorLine error displays.
This is because when ActiveMatrix BPM performs these operations, ActiveMatrix BPM looks for packages with a specific name and automatically chooses the packages with the highest version number for a given major version number. For example, for packages with a major version number of 1, ActiveMatrix BPM picks the highest version of 1.x.x.x. In other words, ActiveMatrix BPM is selecting the packages from the locally imported WSDL rather than the WSDLs distributed with ActiveMatrix BPM.
A Business Studio project version number is in the format major.minor.micro.qualifier, for example, 1.0.0.1. Note that:
- If the major version number of the WSDL distributed with your Business Studio project is different from the major version number of the WSDL distributed with ActiveMatrix BPM, then the problem does not occur. In other words, you can change the major version number of the Business Studio project to any number other than "1" and the problem will not occur.
- If your Business Studio project version number uses a qualifier (for example, the version number is in the format x.x.x.qualifier) then this is interpreted by ActiveMatrix BPM as a higher number than any other micro version number. In other words, a version number of 1.2.0.qualifier is interpreted as higher than 1.2.0.003, and so the problem may occur.