-
Type: Bug
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: 5.3.1, 5.4
-
Component/s: Themes (deprecated)
At initialization time, theme is installing an URL stream URL handler factory for handling with the 'nxtheme' protocol. As there is no de-installing logic in place, next activation of the plugin will use an incorrect instance of the factory (de-referenced class).
java.lang.IllegalStateException
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1273)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at org.nuxeo.theme.Manager$1.createURLStreamHandler(Manager.java:122)
at org.nuxeo.common.utils.URLStreamHandlerFactoryInstaller$FactoryStack.createURLStreamHandler(URLStreamHandlerFactoryInstaller.java:139)
at java.net.URL.getURLStreamHandler(URL.java:1106)
at java.net.URL.<init>(URL.java:572)
at java.net.URL.<init>(URL.java:464)
at java.net.URL.<init>(URL.java:413)
at org.nuxeo.theme.Manager.initializeProtocols(Manager.java:111)
at org.nuxeo.theme.Manager.<clinit>(Manager.java:41)
at org.nuxeo.theme.resources.ResourceManager.<init>(ResourceManager.java:39)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
Impacts are
- remove the use of the URLStreamHandlerFactoryInstaller (Manager) (This way of initializing was introduced because of surefire bug (SUREFIRE-104). We can safely remove this way of initializing because the bug is solved in the surefire version we're using now (>=2.4))
- introduce the resetProtocols method that will remove the "org.nuxeo.theme.protocol" and reset the handler cache (Manager)
- initialize and reset protocol handlers during service activation (ThemeService)
- depends on
-
NXP-6124 URL handlers not cleaned up
- Resolved