HTTP ERROR 500 javax.servlet.ServletException: javax.servlet.ServletException: java.lang.NoClassDefFoundError: Could not initialize class java.net.PlainDatagramSocketImpl when opening web admin session

Hi all

I need really help regarding the issue below !

The following exceptions are thrown when starting OpenFire web admin (after successful login):
First
HTTP ERROR 500 javax.servlet.ServletException: javax.servlet.ServletException: java.lang.ExceptionInInitializerError
Then
HTTP ERROR 500 javax.servlet.ServletException: javax.servlet.ServletException: java.lang.NoClassDefFoundError: Could not initialize class java.net.PlainDatagramSocketImpl

My environment:

  • LXC running Debian Buster 10 on top of Proxmox
  • OpenJDK 11
  • OpenFire 4.5.2
  • OpenFire Meeting 0.9.5
  • OpenFire web admin runs in FireFox ESR or Chromium (latest version)
  • PostgreSQL 11
    So, my environment is up-to-date.
    Please note that I don’t face the issue if I remove the OpenFire Meetings plug-in.

It looks like:

  • either 'm missing some JAVA classes
  • or I’m facing a misalignment in my environment between JAVA and the OpenFire Meetings plug-in
    Any clue ?

Many thx in advance for your help :slight_smile:
Erwan


PS-1: Here below the 1st exception stack displayed in my browser just after successful login
HTTP ERROR 500 javax.servlet.ServletException: javax.servlet.ServletException: java.lang.ExceptionInInitializerError
URI: /index.jsp
STATUS: 500
MESSAGE: javax.servlet.ServletException: javax.servlet.ServletException: java.lang.ExceptionInInitializerError
SERVLET: org.jivesoftware.openfire.admin.index_jsp
CAUSED BY: javax.servlet.ServletException: javax.servlet.ServletException: java.lang.ExceptionInInitializerError
CAUSED BY: javax.servlet.ServletException: java.lang.ExceptionInInitializerError
CAUSED BY: java.lang.ExceptionInInitializerError
CAUSED BY: java.lang.NullPointerException
Caused by:
javax.servlet.ServletException: javax.servlet.ServletException: java.lang.ExceptionInInitializerError
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:162)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
at org.eclipse.jetty.server.Server.handle(Server.java:500)
at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:383)
at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:547)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:375)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:273)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806)
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: javax.servlet.ServletException: java.lang.ExceptionInInitializerError
at org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:909)
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:838)
at org.jivesoftware.openfire.admin.index_jsp._jspService(index_jsp.java:737)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.eclipse.jetty.servlet.ServletHolder$NotAsyncServlet.service(ServletHolder.java:1411)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:763)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1631)
at com.opensymphony.sitemesh.webapp.SiteMeshFilter.obtainContent(SiteMeshFilter.java:129)
at com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java:77)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1618)
at org.jivesoftware.util.LocaleFilter.doFilter(LocaleFilter.java:73)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1618)
at org.jivesoftware.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:49)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1618)
at org.jivesoftware.admin.PluginFilter.doFilter(PluginFilter.java:226)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1618)
at org.jivesoftware.admin.AuthCheckFilter.doFilter(AuthCheckFilter.java:234)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:549)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:602)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1610)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1363)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:489)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1580)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1278)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:221)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146)
… 17 more
Caused by: java.lang.ExceptionInInitializerError
at java.base/java.net.DefaultDatagramSocketImplFactory.createDatagramSocketImpl(DefaultDatagramSocketImplFactory.java:72)
at java.base/java.net.DatagramSocket.createImpl(DatagramSocket.java:333)
at java.base/java.net.DatagramSocket.(DatagramSocket.java:241)
at java.base/java.net.DatagramSocket.(DatagramSocket.java:198)
at jdk.naming.dns/com.sun.jndi.dns.DNSDatagramSocketFactory.openDefault(DNSDatagramSocketFactory.java:204)
at jdk.naming.dns/com.sun.jndi.dns.DNSDatagramSocketFactory.open(DNSDatagramSocketFactory.java:147)
at jdk.naming.dns/com.sun.jndi.dns.DnsClient.getDatagramSocket(DnsClient.java:141)
at jdk.naming.dns/com.sun.jndi.dns.DnsClient.doUdpQuery(DnsClient.java:400)
at jdk.naming.dns/com.sun.jndi.dns.DnsClient.query(DnsClient.java:212)
at jdk.naming.dns/com.sun.jndi.dns.Resolver.query(Resolver.java:81)
at jdk.naming.dns/com.sun.jndi.dns.DnsContext.c_getAttributes(DnsContext.java:434)
at java.naming/com.sun.jndi.toolkit.ctx.ComponentDirContext.p_getAttributes(ComponentDirContext.java:235)
at java.naming/com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.getAttributes(PartialCompositeDirContext.java:141)
at java.naming/com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.getAttributes(PartialCompositeDirContext.java:129)
at java.naming/javax.naming.directory.InitialDirContext.getAttributes(InitialDirContext.java:142)
at org.jivesoftware.openfire.net.DNSUtil.srvLookup(DNSUtil.java:222)
at org.jivesoftware.openfire.admin.index_jsp._jspService(index_jsp.java:405)
… 49 more
Caused by: java.lang.NullPointerException
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2646)
at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:830)
at java.base/java.lang.System.loadLibrary(System.java:1870)
at java.base/java.net.AbstractPlainDatagramSocketImpl$1.run(AbstractPlainDatagramSocketImpl.java:70)
at java.base/java.net.AbstractPlainDatagramSocketImpl$1.run(AbstractPlainDatagramSocketImpl.java:68)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.net.AbstractPlainDatagramSocketImpl.(AbstractPlainDatagramSocketImpl.java:67)
… 66 more


PS-2: here below the 2nd exception stack raised when I refresh the page after the above exception raised
HTTP ERROR 500 javax.servlet.ServletException: javax.servlet.ServletException: java.lang.NoClassDefFoundError: Could not initialize class java.net.PlainDatagramSocketImpl
URI: /index.jsp
STATUS: 500
MESSAGE: javax.servlet.ServletException: javax.servlet.ServletException: java.lang.NoClassDefFoundError: Could not initialize class java.net.PlainDatagramSocketImpl
SERVLET: org.jivesoftware.openfire.admin.index_jsp
CAUSED BY: javax.servlet.ServletException: javax.servlet.ServletException: java.lang.NoClassDefFoundError: Could not initialize class java.net.PlainDatagramSocketImpl
CAUSED BY: javax.servlet.ServletException: java.lang.NoClassDefFoundError: Could not initialize class java.net.PlainDatagramSocketImpl
CAUSED BY: java.lang.NoClassDefFoundError: Could not initialize class java.net.PlainDatagramSocketImpl
Caused by:

javax.servlet.ServletException: javax.servlet.ServletException: java.lang.NoClassDefFoundError: Could not initialize class java.net.PlainDatagramSocketImpl
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:162)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
at org.eclipse.jetty.server.Server.handle(Server.java:500)
at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:383)
at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:547)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:375)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:273)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806)
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: javax.servlet.ServletException: java.lang.NoClassDefFoundError: Could not initialize class java.net.PlainDatagramSocketImpl
at org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:909)
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:838)
at org.jivesoftware.openfire.admin.index_jsp._jspService(index_jsp.java:737)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.eclipse.jetty.servlet.ServletHolder$NotAsyncServlet.service(ServletHolder.java:1411)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:763)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1631)
at com.opensymphony.sitemesh.webapp.SiteMeshFilter.obtainContent(SiteMeshFilter.java:129)
at com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java:77)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1618)
at org.jivesoftware.util.LocaleFilter.doFilter(LocaleFilter.java:73)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1618)
at org.jivesoftware.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:49)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1618)
at org.jivesoftware.admin.PluginFilter.doFilter(PluginFilter.java:226)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1618)
at org.jivesoftware.admin.AuthCheckFilter.doFilter(AuthCheckFilter.java:234)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:549)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:602)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1610)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1363)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:489)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1580)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1278)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:221)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146)
… 12 more
Caused by: java.lang.NoClassDefFoundError: Could not initialize class java.net.PlainDatagramSocketImpl
at java.base/java.net.DefaultDatagramSocketImplFactory.createDatagramSocketImpl(DefaultDatagramSocketImplFactory.java:72)
at java.base/java.net.DatagramSocket.createImpl(DatagramSocket.java:333)
at java.base/java.net.DatagramSocket.(DatagramSocket.java:241)
at java.base/java.net.DatagramSocket.(DatagramSocket.java:198)
at jdk.naming.dns/com.sun.jndi.dns.DNSDatagramSocketFactory.openDefault(DNSDatagramSocketFactory.java:204)
at jdk.naming.dns/com.sun.jndi.dns.DNSDatagramSocketFactory.open(DNSDatagramSocketFactory.java:147)
at jdk.naming.dns/com.sun.jndi.dns.DnsClient.getDatagramSocket(DnsClient.java:141)
at jdk.naming.dns/com.sun.jndi.dns.DnsClient.doUdpQuery(DnsClient.java:400)
at jdk.naming.dns/com.sun.jndi.dns.DnsClient.query(DnsClient.java:212)
at jdk.naming.dns/com.sun.jndi.dns.Resolver.query(Resolver.java:81)
at jdk.naming.dns/com.sun.jndi.dns.DnsContext.c_getAttributes(DnsContext.java:434)
at java.naming/com.sun.jndi.toolkit.ctx.ComponentDirContext.p_getAttributes(ComponentDirContext.java:235)
at java.naming/com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.getAttributes(PartialCompositeDirContext.java:141)
at java.naming/com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.getAttributes(PartialCompositeDirContext.java:129)
at java.naming/javax.naming.directory.InitialDirContext.getAttributes(InitialDirContext.java:142)
at org.jivesoftware.openfire.net.DNSUtil.srvLookup(DNSUtil.java:222)
at org.jivesoftware.openfire.admin.index_jsp._jspService(index_jsp.java:405)
… 44 more

Short update from me: I’ve just tested with Java SE Development Kit 11 from Oracle (instead of OpenJDK11) and I have no issue at all.
So, the issue seems around the non-availability of some classes in OpenJDK.
That’s a pity since I want to use OpenJDK.

Could it be that I need to add further libraries on top of OpenJDK ?

I still need some help or ideas…
Thx :slight_smile:

Me again.
It seems same issue than Openfire 4.4.0 doesn't work with OpenJDK 11 on Ubuntu.
Nothing came out from the above dicussion.

Help please :slight_smile:

Try ofmeet 0.9.11 - see https://github.com/igniterealtime/openfire-pade-plugin/releases
You will need both ofmeet.jar and offocus.jar plugin files

Hi

First, many thx for the consideration you have on my issue.
Your suggestion didn’t work (I did already using 9.9 before posting my issue on the forum).
It actually works the very first time just after having copied the generated jar files, then having restarted of the openfire service).
But it fails after the second restart of openfire service (i.e. restart of service, then attempt of login to web admin - btw I can choose the user and enter the password… then I have the exception raised as described previously).

I believe the issue is not related to the openfire meetings plug-in itself. I would guess the issue is related to some missing java.net interface implementation in the OpenJDK 11.

Thanks to all for having a look at the issue
KR
Erwan

Summary of my tests (still on Debian Buster 10)

So, definitively the issue is due to OpenJDK 11 which is not supported by the Openfire meetings plugin (could be the other way round, i.e. not the fault of Openfire meeting plugin but the one of OpenJDK 11 !)

Investigation to be continued…

Are there some people using Openfire meeting on top of OpenKDK 11 with any issue ?

Thx for your feedback
Erwan

Last update:

  • OpenJDK 8 = OK :slight_smile:
  • JAVA SE Dev Kit 11 from Oracle = OK :slight_smile:
  • OpenJDK 11 = KO :frowning:
  • OpenJDK 15 = OK :slight_smile:

So definitively, there something missing in OpenJDK 11 on Debian Buster 10 (OpenJDK 64-Bit Server VM (build 11.0.7+10-post-Debian-3deb10u1, mixed mode, sharing)).

I stop the investigations here.
But I would be good to get the final word on the faulty OpenJDK 11 !

KR
Erwan

I can confirm OpenJDK 11 works with openfire meetings on CentOS and Ubuntu
image