Could not initialize class sun.java2d.Disposer

Hi,

I got following error after upgrading from OpenJDK 8 to OpenJDK 11 on isfimagefile().
Is OpenJDK 11 not yet supported?

Thanks in advance
Michael

Message string Could not initialize class sun.java2d.Disposer
StackTrace string lucee.runtime.exp.NativeException: Could not initialize class sun.java2d.Disposer at java.desktop/javax.imageio.stream.FileCacheImageInputStream.(FileCacheImageInputStream.java:114) at java.desktop/com.sun.imageio.spi.InputStreamImageInputStreamSpi.createInputStreamInstance(InputStreamImageInputStreamSpi.java:69) at java.desktop/javax.imageio.ImageIO.createImageInputStream(ImageIO.java:357) at java.desktop/javax.imageio.ImageIO.read(ImageIO.java:1359) at org.lucee.extension.image.coder.JRECoder.toBufferedImage(JRECoder.java:78) at org.lucee.extension.image.coder.DoubleCoder.toBufferedImage(DoubleCoder.java:42) at org.lucee.extension.image.ImageUtil.toBufferedImage(ImageUtil.java:62) at org.lucee.extension.image.Image.(Image.java:213) at org.lucee.extension.image.Image.(Image.java:206) at org.lucee.extension.image.functions.IsImageFile.call(IsImageFile.java:34) at org.lucee.extension.image.functions.IsImageFile.invoke(IsImageFile.java:43) at lucee.runtime.functions.FunctionHandlerPool.invoke(FunctionHandlerPool.java:40) at _clickr.cfml.index_cfm$cf$o.call(/_clickr/cfml/index.cfm:30) at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:944) at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:836) at lucee.runtime.listener.ModernAppListener._onRequest(ModernAppListener.java:216) at lucee.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:42) at lucee.runtime.PageContextImpl.execute(PageContextImpl.java:2415) at lucee.runtime.PageContextImpl._execute(PageContextImpl.java:2405) at lucee.runtime.PageContextImpl.executeCFML(PageContextImpl.java:2380) at lucee.runtime.engine.Request.exe(Request.java:43) at lucee.runtime.engine.CFMLEngineImpl._service(CFMLEngineImpl.java:1110) at lucee.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:1056) at lucee.loader.engine.CFMLEngineWrapper.serviceCFML(CFMLEngineWrapper.java:97) at lucee.loader.servlet.CFMLServlet.service(CFMLServlet.java:51) at javax.servlet.http.HttpServlet.service(HttpServlet.java:97) at com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChain.java:109) at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:156) at com.caucho.server.webapp.AccessLogFilterChain.doFilter(AccessLogFilterChain.java:95) at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:314) at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:843) at com.caucho.network.listen.TcpSocketLink.dispatchRequest(TcpSocketLink.java:1393) at com.caucho.network.listen.TcpSocketLink.handleRequest(TcpSocketLink.java:1349) at com.caucho.network.listen.TcpSocketLink.handleRequestsImpl(TcpSocketLink.java:1333) at com.caucho.network.listen.TcpSocketLink.handleRequests(TcpSocketLink.java:1241) at com.caucho.network.listen.TcpSocketLink.handleAcceptTaskImpl(TcpSocketLink.java:1037) at com.caucho.network.listen.ConnectionTask.runThread(ConnectionTask.java:117) at com.caucho.network.listen.ConnectionTask.run(ConnectionTask.java:93) at com.caucho.network.listen.SocketLinkThreadLauncher.handleTasks(SocketLinkThreadLauncher.java:175) at com.caucho.network.listen.TcpSocketAcceptThread.run(TcpSocketAcceptThread.java:61) at com.caucho.env.thread2.ResinThread2.runTasks(ResinThread2.java:173) at com.caucho.env.thread2.ResinThread2.run(ResinThread2.java:118) Caused by: java.lang.NoClassDefFoundError: Could not initialize class sun.java2d.Disposer … 42 more

StackTrace string lucee.runtime.exp.NativeException: Could not initialize class sun.java2d.Disposer at java.desktop/javax.imageio.stream.FileCacheImageInputStream.(FileCacheImageInputStream.java:114) at java.desktop/com.sun.imageio.spi.InputStreamImageInputStreamSpi.createInputStreamInstance(InputStreamImageInputStreamSpi.java:69) at java.desktop/javax.imageio.ImageIO.createImageInputStream(ImageIO.java:357) at java.desktop/javax.imageio.ImageIO.read(ImageIO.java:1359) at org.lucee.extension.image.coder.JRECoder.toBufferedImage(JRECoder.java:78) at org.lucee.extension.image.coder.DoubleCoder.toBufferedImage(DoubleCoder.java:42) at org.lucee.extension.image.ImageUtil.toBufferedImage(ImageUtil.java:62) at org.lucee.extension.image.Image.(Image.java:213) at org.lucee.extension.image.Image.(Image.java:206) at org.lucee.extension.image.functions.IsImageFile.call(IsImageFile.java:34) at org.lucee.extension.image.functions.IsImageFile.invoke(IsImageFile.java:43) at lucee.runtime.functions.FunctionHandlerPool.invoke(FunctionHandlerPool.java:40) at _clickr.cfml.index_cfm$cf$o.call(/_clickr/cfml/index.cfm:30) at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:944) at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:836) at lucee.runtime.listener.ModernAppListener._onRequest(ModernAppListener.java:216) at lucee.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:42) at lucee.runtime.PageContextImpl.execute(PageContextImpl.java:2415) at lucee.runtime.PageContextImpl._execute(PageContextImpl.java:2405) at lucee.runtime.PageContextImpl.executeCFML(PageContextImpl.java:2380) at lucee.runtime.engine.Request.exe(Request.java:43) at lucee.runtime.engine.CFMLEngineImpl._service(CFMLEngineImpl.java:1110) at lucee.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:1056) at lucee.loader.engine.CFMLEngineWrapper.serviceCFML(CFMLEngineWrapper.java:97) at lucee.loader.servlet.CFMLServlet.service(CFMLServlet.java:51) at javax.servlet.http.HttpServlet.service(HttpServlet.java:97) at com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChain.java:109) at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:156) at com.caucho.server.webapp.AccessLogFilterChain.doFilter(AccessLogFilterChain.java:95) at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:314) at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:843) at com.caucho.network.listen.TcpSocketLink.dispatchRequest(TcpSocketLink.java:1393) at com.caucho.network.listen.TcpSocketLink.handleRequest(TcpSocketLink.java:1349) at com.caucho.network.listen.TcpSocketLink.handleRequestsImpl(TcpSocketLink.java:1333) at com.caucho.network.listen.TcpSocketLink.handleRequests(TcpSocketLink.java:1241) at com.caucho.network.listen.TcpSocketLink.handleAcceptTaskImpl(TcpSocketLink.java:1037) at com.caucho.network.listen.ConnectionTask.runThread(ConnectionTask.java:117) at com.caucho.network.listen.ConnectionTask.run(ConnectionTask.java:93) at com.caucho.network.listen.SocketLinkThreadLauncher.handleTasks(SocketLinkThreadLauncher.java:175) at com.caucho.network.listen.TcpSocketAcceptThread.run(TcpSocketAcceptThread.java:61) at com.caucho.env.thread2.ResinThread2.runTasks(ResinThread2.java:173) at com.caucho.env.thread2.ResinThread2.run(ResinThread2.java:118) Caused by: java.lang.NoClassDefFoundError: Could not initialize class sun.java2d.Disposer … 42 more

Don’t forget to tell us about your stack!

OS: Windows Server
Java Version: AdoptJDK 11
Tomcat Version:Caucho Resin
Lucee Version: 5.3.4.80

what file type are you testing?

I initially thought it might be a linux headless server problem, can you RDP into your server’s desktop?

here’s an old post
https://groups.google.com/forum/#!topic/railo/J-aPN8a-2xU

I wouldn’t say I’m testing.
I tried to migrate to a new JDK (and test if this addresses the mail-server issue i have).
However all images, JPGs as well as PNG, that are handled in my Lucee on JDK 8 without problem fail in JDK 11.
RDP to that server works without problem.

I’ll try those additional Java_Args later today. Thank you for that link.

I meant testing only as far as isImageFile is a function which tests something :slight_smile:

Which version of the Lucee image extension are you running?

coz that stack trace suggests you’re running an older version

I’m doing <cfif FileExists(variables.imagepath) AND isimagefile(variables.imagepath)> in the corresponding line.
The java args did not solve the problem. Neither did changing to image extension version 1.0.0.35 (I think I was on 1.0.0.36_SNAPSHOT)

are you able to test against the latest snapshot? also which exact JDK 11 version are you using?

Upgrading Lucee breaks my mail-server. That is no solution.

I installed AdoptJDK 11.0.8_10 yesterday.
At least I can switch back to a working JDK8.

I’m only asking to test the snapshot, to figure out if it’s already been fixed.

that’s going to be the first step in triage once a bug is filed

The latest snapshot seems to work.
So let’s switch to the mail-issue threads instead?

thanks for testing that, sorry it doesn’t work for you at the moment.

the java mail 1.6.5 upgrade is scheduled for the current 5.3.8 sprint
https://luceeserver.atlassian.net/browse/LDEV-2618

Although this is off-topic:

After upgrading Lucee I can find following lines in the JVM-Logfile:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.apache.felix.framework.ext.ClassPathExtenderFactory$DefaultClassLoaderExtender (file:/C:/resin-pro-4-2/lib/lucee-5.3.4.54-RC.jar) to method java.net.URLClassLoader.addURL(java.net.URL)
WARNING: Please consider reporting this to the maintainers of org.apache.felix.framework.ext.ClassPathExtenderFactory$DefaultClassLoaderExtender
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
log4j:WARN No appenders could be found for logger (org.jets3t.service.Jets3tProperties).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.

My -Dmail.debug=true does not work after upgrading. I can see mail-logging working in Lucee 5.3.4.80 but not in newer versions.