[opencms-dev] Bug with CmsSystemInfo.isFailedInitializationThrowsException()
Kuntz, Tim
tim_kuntz at pamperedchef.com
Fri Mar 14 02:24:57 CET 2008
I am reporting this off the 7.0.4 source download. I hope this is new
information.
It looks like there is a problem with the 7.0.4 changes that now
determines whether a failed initialization throws an error or not, which
now determines this behavior based on the value of ServletContext
getServerInfo().
The bug is that OpenCmsCore and CmsSystemInfo are getting recreated
after a CmsInitException is thrown and CmsSystemInfo.
isFailedInitializationThrowsException() _always_ evaluates to the
default value of true. This keeps the app from starting for the intended
app servers.
The root of the problem appears to be line 321 in setErrorCondition() of
OpenCmsCore which clears the singleton.
protected static void setErrorCondition(CmsMessageContainer
errorCondition) {
// init exceptions should only be thrown during setup process
if ((m_instance != null) && (m_instance.getRunLevel() <
OpenCms.RUNLEVEL_3_SHELL_ACCESS)) {
....
m_instance = null;
....
}
More helpful is the stack trace which shows how this is happening.
Daemon Thread [Thread-33] (Suspended (breakpoint at line 120 in
CmsInitException))
CmsInitException.setErrorCondition() line: 120
CmsInitException.<init>(CmsMessageContainer, boolean) line: 78
CmsInitException.<init>(CmsMessageContainer) line: 64
OpenCmsCore.initContext(ServletContext) line: 1256
OpenCmsCore.upgradeRunlevel(ServletContext) line: 1731
OpenCmsServlet.init(ServletConfig) line: 235
....
Thanks,
Tim Kuntz
More information about the opencms-dev
mailing list