Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NotSerializableException for OpenIdConfiguration #5064

Closed
lachlan-roberts opened this issue Jul 20, 2020 · 0 comments · Fixed by #5066
Closed

NotSerializableException for OpenIdConfiguration #5064

lachlan-roberts opened this issue Jul 20, 2020 · 0 comments · Fixed by #5066
Assignees

Comments

@lachlan-roberts
Copy link
Contributor

Jetty version
9.4.x

Description
OpenIdCredentials cannot be serialized to the SessionDataStore as the OpenIdConfiguration it has now contains an HttpClient.

The OpenIdConfiguration should be held externally and only passed into the OpenIdCredentials when required.

2020-07-20 06:33:02.737:WARN:oejs.session:qtp815674463-17: 
org.eclipse.jetty.server.session.UnwriteableSessionDataException: Unwriteable session node015zwkx6qigxx71fku2rp26rmwt0 for node0__0.0.0.0
        at org.eclipse.jetty.server.session.FileSessionDataStore.doStore(FileSessionDataStore.java:333)
        at org.eclipse.jetty.server.session.AbstractSessionDataStore$1.run(AbstractSessionDataStore.java:142)
        at org.eclipse.jetty.server.handler.ContextHandler.handle(ContextHandler.java:1454)
        at org.eclipse.jetty.server.handler.ContextHandler.handle(ContextHandler.java:1473)
        at org.eclipse.jetty.server.session.SessionContext.run(SessionContext.java:92)
        at org.eclipse.jetty.server.session.AbstractSessionDataStore.store(AbstractSessionDataStore.java:155)
        at org.eclipse.jetty.server.session.AbstractSessionCache.release(AbstractSessionCache.java:578)
        at org.eclipse.jetty.server.session.SessionHandler.complete(SessionHandler.java:368)
        at org.eclipse.jetty.server.Request.leaveSession(Request.java:399)
        at org.eclipse.jetty.server.Request.onCompleted(Request.java:1531)
        at org.eclipse.jetty.server.HttpChannel.onCompleted(HttpChannel.java:741)
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:363)
        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:272)
        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.ssl.SslConnection$DecryptedEndPoint.onFillable(SslConnection.java:543)
        at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:398)
        at org.eclipse.jetty.io.ssl.SslConnection$2.succeeded(SslConnection.java:161)
        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
        at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
        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: 
java.io.NotSerializableException: org.eclipse.jetty.security.openid.OpenIdConfiguration
        at java.base/java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1185)
        at java.base/java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1553)
        at java.base/java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1510)
        at java.base/java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1433)
        at java.base/java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1179)
        at java.base/java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1553)
        at java.base/java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1510)
        at java.base/java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1433)
        at java.base/java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1179)
        at java.base/java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:349)
        at org.eclipse.jetty.server.session.SessionData.serializeAttributes(SessionData.java:116)
        at org.eclipse.jetty.server.session.FileSessionDataStore.save(FileSessionDataStore.java:481)
        at org.eclipse.jetty.server.session.FileSessionDataStore.doStore(FileSessionDataStore.java:326)
        at org.eclipse.jetty.server.session.AbstractSessionDataStore$1.run(AbstractSessionDataStore.java:142)
        at org.eclipse.jetty.server.handler.ContextHandler.handle(ContextHandler.java:1454)
        at org.eclipse.jetty.server.handler.ContextHandler.handle(ContextHandler.java:1473)
        at org.eclipse.jetty.server.session.SessionContext.run(SessionContext.java:92)
        at org.eclipse.jetty.server.session.AbstractSessionDataStore.store(AbstractSessionDataStore.java:155)
        at org.eclipse.jetty.server.session.AbstractSessionCache.release(AbstractSessionCache.java:578)
        at org.eclipse.jetty.server.session.SessionHandler.complete(SessionHandler.java:368)
        at org.eclipse.jetty.server.Request.leaveSession(Request.java:399)
        at org.eclipse.jetty.server.Request.onCompleted(Request.java:1531)
        at org.eclipse.jetty.server.HttpChannel.onCompleted(HttpChannel.java:741)
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:363)
        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:272)
        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.ssl.SslConnection$DecryptedEndPoint.onFillable(SslConnection.java:543)
        at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:398)
        at org.eclipse.jetty.io.ssl.SslConnection$2.succeeded(SslConnection.java:161)
        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
        at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
        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)
@lachlan-roberts lachlan-roberts self-assigned this Jul 20, 2020
@lachlan-roberts lachlan-roberts added this to To do in Jetty 9.4.31 via automation Jul 20, 2020
lachlan-roberts added a commit that referenced this issue Jul 21, 2020
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
@joakime joakime linked a pull request Jul 22, 2020 that will close this issue
@joakime joakime moved this from To do to Review in progress in Jetty 9.4.31 Jul 22, 2020
@joakime joakime moved this from Review in progress to In progress in Jetty 9.4.31 Jul 22, 2020
lachlan-roberts added a commit that referenced this issue Jul 23, 2020
…able

Issue #5064 - the OpenIdCredentials should be serializable
Jetty 9.4.31 automation moved this from In progress to Done Jul 23, 2020
leonchen83 pushed a commit to leonchen83/jetty.project that referenced this issue Aug 3, 2020
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Jetty 9.4.31
  
Done
Development

Successfully merging a pull request may close this issue.

1 participant