-
Bug
-
Resolution: Fixed
-
Low
-
4.1, 4.1.1
-
JIRA EAR/WAR
JDK 1.5+
JBoss 4.x
Windows XP
Firefox 3.6
-
4.01
-
This bug has already being scheduled to be fixed in JIRA 4.2, so this is just for the record.
As far as the investigation goes, this problem only occurs in JIRA EAR/WAR installation type and using JDK 1.5+.
Here are the steps to reproduce the problem:
- Download JIRA 4.1 war.
- Install and configure.
- Attempt to run.
- First attempt at resolving the default splash page results in exceptions thrown.
The following stack trace is thrown:
... org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: 29 in the jsp file: /includes/decorators/header.jsp Generated servlet error: Type mismatch: cannot convert from Object to KeyboardShortcutManager at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84) at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328) at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:414) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:297) ...
It seems that there is a fundamental issue with the JSP code itself when being used with JDK 1.5+. The affected file is header.jsp file which is located in <JIRA_install>/atlassian-jira/includes/decorators/ directory:
Original:
... ... WebResourceManager webResourceManager = ComponentManager.getInstance().getWebResourceManager(); final KeyboardShortcutManager shortcutManager = ComponentManager.getComponentInstanceOfType(KeyboardShortcutManager.class); ...
Fixed:
... WebResourceManager webResourceManager = ComponentManager.getInstance().getWebResourceManager(); final KeyboardShortcutManager shortcutManager = (KeyboardShortcutManager) ComponentManager.getComponentInstanceOfType(KeyboardShortcutManager.class); ...
There needs to be an explicit cast made to KeyboardShortcutManager.
Cheers.