NoSuchFieldError Deploying JIRA on JBoss
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
The content on this page relates to platforms which are not supported. Consequently, Atlassian Support cannot guarantee providing any support for it. Please be aware that this material is provided for your information only and using it is done so at your own risk.
Symptoms
When trying to deploy JIRA on JBoss 4.x, the following error appears in the log:
1
2
3
4
2009-03-25 11:13:16,046 FATAL [com.atlassian.jira.upgrade.ConsistencyLauncher]
An Error occurred during ConsistencyLauncher servlet context initialisation - ANY_HOST_CONFIGURATION.
java.lang.NoSuchFieldError: ANY_HOST_CONFIGURATION
at org.apache.commons.httpclient.params.HttpConnectionManagerParams.setDefaultMaxConnectionsPerHost(HttpConnectionManagerParams.java:85)
Cause
This is caused by a classloading issue. JBoss and JIRA both ship with a version of Jakarta Commons HTTP Client and the JBoss classloader is using a conflicting version.
Resolution
Option 1
Replace $JBOSS_HOME/servers/default/lib/commons-httpclient.jar
with the version provided by JIRA in webapps/WEB-INF/jira/commons-httpclient-x.x.x.jar
where x.x.x is the version e.g. commons-httpclient-3.0.1.jar
. If you do this, make sure to backup the version provided by JBoss in case something goes wrong.
1
2
3
4
5
6
7
8
9
10
{panel:bgColor=#EAECFF|title=Option 2}
The other option is to [configure the JBoss classloader|http://www.jboss.org/community/docs/DOC-9288] in {{jboss-web.xml}} to use the correct version:
{code:xml}<jboss-web>
<class-loading>
<loader-repository>
org.apache.commons.httpclient:loader=commons-httpclient-3.0.1.jar
</loader-repository>
</class-loading>
</jboss-web>
Was this helpful?