java.lang.IllegalStateException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Hi Atlassian, I have noticed in catalina.out a flood of errors like these {code} Error getting plugins java.lang.IllegalStateException: Multiple plugins with the same key and version:com.atlassian.jira.ext.charting 2 at com.atlassian.jira.startup.PluginComparator.compare(PluginComparator.java:28) at com.atlassian.jira.startup.PluginComparator.compare(PluginComparator.java:7) at java.util.TreeMap.compare(TreeMap.java:1188) at java.util.TreeMap.put(TreeMap.java:531) at java.util.TreeSet.add(TreeSet.java:255) at java.util.AbstractCollection.addAll(AbstractCollection.java:334) at java.util.TreeSet.addAll(TreeSet.java:312) at com.atlassian.jira.util.system.ExtendedSystemInfoUtilsImpl.getPlugins(ExtendedSystemInfoUtilsImpl.java:643) at org.apache.jsp._500page_jsp._jspService(_500page_jsp.java:1195) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334) {code} Likely this is thrown when an error 500 occurs but this is not the problem. The problem is that ExtendedSystemInfoUtilsImpl.getPlugins() throws an IllegalStateException when run on JDK 1.7.0_13 but not on JDK 1.6.0_39. Since we need to switch to JDK 1.7 this bug has very high priority for us to be fixed. The problem likely lies in the different behaviour of JRE 6 and 7 when adding elements to an empty TreeSet. The problem can be reproduced with the following code in the Groovy Script Runner {code} import com.atlassian.jira.util.system.ExtendedSystemInfoUtils import com.atlassian.jira.util.system.ExtendedSystemInfoUtilsImpl; import com.atlassian.jira.web.bean.I18nBean import com.atlassian.plugin.Plugin ExtendedSystemInfoUtils extendedSystemInfoUtils = new ExtendedSystemInfoUtilsImpl(new I18nBean(Locale.ENGLISH)); Collection<Plugin> plugins = extendedSystemInfoUtils.getPlugins() {code} I'm not sure if this behaviour came with JDK 1.7.0_13 or has been in JDK 1.7 since the beginning. Regards, Dieter h3. Workaround Move JIRA over to Java 6. Please note as per our [Supported Platforms|http://confluence.atlassian.com/display/JIRA/Supported+Platforms] Java 6 is not supported in JIRA 6. # Install Java 6 JRE/JDK. # Stop JIRA. # Change the {{$JAVA_HOME}} to point to the Java 6 JRE/JDK. # Clear our the plugin cache, as it is Java version dependent (starting up will cause failures if we don't clear it). To do so, remove the following directories: {noformat} $JIRA_HOME/plugins/.bundled_plugins $JIRA_HOME/plugins/.osgi_plugins {noformat} (i) These are temporary files and folders and will be recreated when JIRA starts. # Start JIRA. # Test you can create a Support Email.
    via by Dieter Greiner,
  • Hi Atlassian, I have noticed in catalina.out a flood of errors like these {code} Error getting plugins java.lang.IllegalStateException: Multiple plugins with the same key and version:com.atlassian.jira.ext.charting 2 at com.atlassian.jira.startup.PluginComparator.compare(PluginComparator.java:28) at com.atlassian.jira.startup.PluginComparator.compare(PluginComparator.java:7) at java.util.TreeMap.compare(TreeMap.java:1188) at java.util.TreeMap.put(TreeMap.java:531) at java.util.TreeSet.add(TreeSet.java:255) at java.util.AbstractCollection.addAll(AbstractCollection.java:334) at java.util.TreeSet.addAll(TreeSet.java:312) at com.atlassian.jira.util.system.ExtendedSystemInfoUtilsImpl.getPlugins(ExtendedSystemInfoUtilsImpl.java:643) at org.apache.jsp._500page_jsp._jspService(_500page_jsp.java:1195) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334) {code} Likely this is thrown when an error 500 occurs but this is not the problem. The problem is that ExtendedSystemInfoUtilsImpl.getPlugins() throws an IllegalStateException when run on JDK 1.7.0_13 but not on JDK 1.6.0_39. Since we need to switch to JDK 1.7 this bug has very high priority for us to be fixed. The problem likely lies in the different behaviour of JRE 6 and 7 when adding elements to an empty TreeSet. The problem can be reproduced with the following code in the Groovy Script Runner {code} import com.atlassian.jira.util.system.ExtendedSystemInfoUtils import com.atlassian.jira.util.system.ExtendedSystemInfoUtilsImpl; import com.atlassian.jira.web.bean.I18nBean import com.atlassian.plugin.Plugin ExtendedSystemInfoUtils extendedSystemInfoUtils = new ExtendedSystemInfoUtilsImpl(new I18nBean(Locale.ENGLISH)); Collection<Plugin> plugins = extendedSystemInfoUtils.getPlugins() {code} I'm not sure if this behaviour came with JDK 1.7.0_13 or has been in JDK 1.7 since the beginning. Regards, Dieter h3. Workaround Move JIRA over to Java 6. Please note as per our [Supported Platforms|http://confluence.atlassian.com/display/JIRA/Supported+Platforms] Java 6 is not supported in JIRA 6. # Install Java 6 JRE/JDK. # Stop JIRA. # Change the {{$JAVA_HOME}} to point to the Java 6 JRE/JDK. # Clear our the plugin cache, as it is Java version dependent (starting up will cause failures if we don't clear it). To do so, remove the following directories: {noformat} $JIRA_HOME/plugins/.bundled_plugins $JIRA_HOME/plugins/.osgi_plugins {noformat} (i) These are temporary files and folders and will be recreated when JIRA starts. # Start JIRA. # Test you can create a Support Email.
    via by Dieter Greiner,
    • java.lang.IllegalStateException: Multiple plugins with the same key and version:com.atlassian.jira.ext.charting 2 at com.atlassian.jira.startup.PluginComparator.compare(PluginComparator.java:28) at com.atlassian.jira.startup.PluginComparator.compare(PluginComparator.java:7) at java.util.TreeMap.compare(TreeMap.java:1188) at java.util.TreeMap.put(TreeMap.java:531) at java.util.TreeSet.add(TreeSet.java:255) at java.util.AbstractCollection.addAll(AbstractCollection.java:334) at java.util.TreeSet.addAll(TreeSet.java:312) at com.atlassian.jira.util.system.ExtendedSystemInfoUtilsImpl.getPlugins(ExtendedSystemInfoUtilsImpl.java:643) at org.apache.jsp._500page_jsp._jspService(_500page_jsp.java:1195) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
    No Bugmate found.