-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Medium
-
Affects Version/s: 5.2.6
-
Component/s: None
-
Environment:
JDK 1.7.0_13 Linux 64 bit
-
5.02
Hi Atlassian,
I have noticed in catalina.out a flood of errors like these
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)
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
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()
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
Workaround
Move JIRA over to Java 6. Please note as per our 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:
$JIRA_HOME/plugins/.bundled_plugins $JIRA_HOME/plugins/.osgi_plugins
These are temporary files and folders and will be recreated when JIRA starts. - Start JIRA.
- Test you can create a Support Email.
- relates to
-
JRASERVER-28464 JIRA 5.0.5 et al. throws ClassCastException on startup from SAL plugin using JDK 1.7.0_02-04
-
- Closed
-