play2war / play2-war-plugin

WAR Plugin for Play framework 2.x
Apache License 2.0
443 stars 71 forks source link

Play Framework 2.6 support #321

Open pwyczes opened 6 years ago

pwyczes commented 6 years ago

Hi there. In our company, we are currently in a process of migrating our Play modules from 2.3 to 2.6 (yup, huge jump).

We managed to upgrade almost everything, except play2war of course. :)

This is very important for us and therefore I am willing to work on making play2war work with Play 2.6.

Is there any specific procedure to follow? :)

Also, anyone who is willing to help is welcome. :)

PS. I am aware of https://github.com/play2war/play2-war-plugin/issues/308, but I will work on 2.6 only.

pwyczes commented 5 years ago

I managed to find some time to get back to this one. :)

All the tests in the branch 321_play_2_6 are green and it looks like on my machine, locally, our application (that uses play2war) runs as it should on Wildfly. However, this is not always true... On our test environments (they only differ by having nginx as a proxy from my local setup) I am getting some concurrency issues again. :(

I think, I stuck a bit... @yanns @jroper if anyone of you can point me where can I look at, I would be grateful... :) (no pressure though)

I am getting following exceptions:

UT000002: The response has already been started  java.lang.IllegalStateException: UT000002: The response has already been started
    at io.undertow.server.HttpServerExchange.startResponse(HttpServerExchange.java:1720)
    at io.undertow.server.HttpServerExchange.getResponseChannel(HttpServerExchange.java:1284)
    at io.undertow.servlet.spec.ServletOutputStreamImpl.writeBufferBlocking(ServletOutputStreamImpl.java:556)
    at io.undertow.servlet.spec.ServletOutputStreamImpl.flushInternal(ServletOutputStreamImpl.java:478)
    at io.undertow.servlet.spec.ServletOutputStreamImpl.flush(ServletOutputStreamImpl.java:465)
    at org.springframework.security.web.util.OnCommittedResponseWrapper$SaveContextServletOutputStream.flush(OnCommittedResponseWrapper.java:514)
    at org.springframework.security.web.util.OnCommittedResponseWrapper$SaveContextServletOutputStream.flush(OnCommittedResponseWrapper.java:514)
    at akka.stream.impl.io.OutputStreamSubscriber$$anonfun$receive$1.applyOrElse(OutputStreamSubscriber.scala:57)
    at akka.actor.Actor.aroundReceive(Actor.scala:517)
    at akka.actor.Actor.aroundReceive$(Actor.scala:515)
    at akka.stream.impl.io.OutputStreamSubscriber.akka$stream$actor$ActorSubscriber$$super$aroundReceive(OutputStreamSubscriber.scala:29)
    at akka.stream.actor.ActorSubscriber.aroundReceive(ActorSubscriber.scala:202)
    at akka.stream.actor.ActorSubscriber.aroundReceive$(ActorSubscriber.scala:182)
    at akka.stream.impl.io.OutputStreamSubscriber.aroundReceive(OutputStreamSubscriber.scala:29)
    at akka.actor.ActorCell.receiveMessage(ActorCell.scala:588)
    at akka.actor.ActorCell.invoke(ActorCell.scala:557)
    at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:258)
    at akka.dispatch.Mailbox.run(Mailbox.scala:225)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)

or

java.lang.NullPointerException
    at io.undertow.servlet.spec.ServletOutputStreamImpl.writeBufferBlocking(ServletOutputStreamImpl.java:565)
    at io.undertow.servlet.spec.ServletOutputStreamImpl.flushInternal(ServletOutputStreamImpl.java:478)
    at io.undertow.servlet.spec.ServletOutputStreamImpl.flush(ServletOutputStreamImpl.java:465)
    at org.springframework.security.web.util.OnCommittedResponseWrapper$SaveContextServletOutputStream.flush(OnCommittedResponseWrapper.java:514)
    at org.springframework.security.web.util.OnCommittedResponseWrapper$SaveContextServletOutputStream.flush(OnCommittedResponseWrapper.java:514)
    at akka.stream.impl.io.OutputStreamSubscriber$$anonfun$receive$1.applyOrElse(OutputStreamSubscriber.scala:57)
    at akka.actor.Actor.aroundReceive(Actor.scala:517)
    at akka.actor.Actor.aroundReceive$(Actor.scala:515)
    at akka.stream.impl.io.OutputStreamSubscriber.akka$stream$actor$ActorSubscriber$$super$aroundReceive(OutputStreamSubscriber.scala:29)
    at akka.stream.actor.ActorSubscriber.aroundReceive(ActorSubscriber.scala:202)
    at akka.stream.actor.ActorSubscriber.aroundReceive$(ActorSubscriber.scala:182)
    at akka.stream.impl.io.OutputStreamSubscriber.aroundReceive(OutputStreamSubscriber.scala:29)
    at akka.actor.ActorCell.receiveMessage(ActorCell.scala:588)
    at akka.actor.ActorCell.invoke(ActorCell.scala:557)
    at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:258)
    at akka.dispatch.Mailbox.run(Mailbox.scala:225)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)

or

java.nio.channels.ClosedChannelException
    at io.undertow.channels.DetachableStreamSinkChannel.write(DetachableStreamSinkChannel.java:238)
    at io.undertow.server.HttpServerExchange$WriteDispatchChannel.write(HttpServerExchange.java:2028)
    at io.undertow.servlet.spec.ServletOutputStreamImpl.writeBufferBlocking(ServletOutputStreamImpl.java:563)
    at io.undertow.servlet.spec.ServletOutputStreamImpl.flushInternal(ServletOutputStreamImpl.java:478)
    at io.undertow.servlet.spec.ServletOutputStreamImpl.flush(ServletOutputStreamImpl.java:465)
    at org.springframework.security.web.util.OnCommittedResponseWrapper$SaveContextServletOutputStream.flush(OnCommittedResponseWrapper.java:514)
    at org.springframework.security.web.util.OnCommittedResponseWrapper$SaveContextServletOutputStream.flush(OnCommittedResponseWrapper.java:514)
    at akka.stream.impl.io.OutputStreamSubscriber$$anonfun$receive$1.applyOrElse(OutputStreamSubscriber.scala:57)
    at akka.actor.Actor.aroundReceive(Actor.scala:517)
    at akka.actor.Actor.aroundReceive$(Actor.scala:515)
    at akka.stream.impl.io.OutputStreamSubscriber.akka$stream$actor$ActorSubscriber$$super$aroundReceive(OutputStreamSubscriber.scala:29)
    at akka.stream.actor.ActorSubscriber.aroundReceive(ActorSubscriber.scala:202)
    at akka.stream.actor.ActorSubscriber.aroundReceive$(ActorSubscriber.scala:182)
    at akka.stream.impl.io.OutputStreamSubscriber.aroundReceive(OutputStreamSubscriber.scala:29)
    at akka.actor.ActorCell.receiveMessage(ActorCell.scala:588)
    at akka.actor.ActorCell.invoke(ActorCell.scala:557)
    at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:258)
    at akka.dispatch.Mailbox.run(Mailbox.scala:225)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)

or

Exception in thread "default task-362" java.nio.BufferOverflowException    
    at java.nio.DirectByteBuffer.put(DirectByteBuffer.java:363)    
    at java.nio.ByteBuffer.put(ByteBuffer.java:859)    
    at io.undertow.util.HttpString.appendTo(HttpString.java:209)    
    at io.undertow.server.protocol.http.HttpResponseConduit.processWrite(HttpResponseConduit.java:167)    
    at io.undertow.server.protocol.http.HttpResponseConduit.write(HttpResponseConduit.java:588)    
    at io.undertow.conduits.AbstractFixedLengthStreamSinkConduit.write(AbstractFixedLengthStreamSinkConduit.java:106)    
    at org.xnio.conduits.Conduits.writeFinalBasic(Conduits.java:132)    
    at io.undertow.conduits.AbstractFixedLengthStreamSinkConduit.writeFinal(AbstractFixedLengthStreamSinkConduit.java:175)    
    at org.xnio.conduits.ConduitStreamSinkChannel.writeFinal(ConduitStreamSinkChannel.java:104)    
    at io.undertow.channels.DetachableStreamSinkChannel.writeFinal(DetachableStreamSinkChannel.java:195)    
    at io.undertow.server.HttpServerExchange$WriteDispatchChannel.writeFinal(HttpServerExchange.java:2007)    
    at io.undertow.servlet.spec.ServletOutputStreamImpl.writeBufferBlocking(ServletOutputStreamImpl.java:561)    
    at io.undertow.servlet.spec.ServletOutputStreamImpl.close(ServletOutputStreamImpl.java:596)    
    at io.undertow.servlet.spec.HttpServletResponseImpl.closeStreamAndWriter(HttpServletResponseImpl.java:478)    
    at io.undertow.servlet.spec.HttpServletResponseImpl.responseDone(HttpServletResponseImpl.java:561)    
    at io.undertow.servlet.spec.AsyncContextImpl$3.run(AsyncContextImpl.java:315)    
    at io.undertow.servlet.spec.AsyncContextImpl$6.run(AsyncContextImpl.java:455)    
    at io.undertow.servlet.spec.AsyncContextImpl$TaskDispatchRunnable.run(AsyncContextImpl.java:566)    
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)    
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)    
    at java.lang.Thread.run(Thread.java:748) 
pwyczes commented 5 years ago

@yanns, @jroper I just cleaned TODOs. All tests sbt itt are green. My tests of our application also are green.

I think, that we can release 1.6.0 version of this plugin. :) Can you please advice how this can be achieved?

yanns commented 5 years ago

Awesome news @pwyczes !! Sorry for my lack of participation. To be honest, as I don't use it anymore, it's difficult for me to find time & motivation for this. AFAIK, only @dlecan can perform a release. If he does not have the time anymore, maybe he can transfer the rights to you so that you can take care of this project. I'd advise to do a 1.6.0-RC1 release before, to announce it on the play list, so that you can receive feedback before a 1.6.0 release.

dlecan commented 5 years ago

Hi all,

Sorry for my response time @yanns and @pwyczes, I'm working on other projects now. Yes, I agree with @yanns, I can transfer to @pwyczes the rights of the project, and even of the whole organization. Let's do that now, you will be able to do a release on your own.

srigaur commented 5 years ago

Hi @pwyczes, I know that everyone is busy but do you have any plan to release it any time sooner ?

rr2013 commented 4 years ago

Hi @pwyczes @dlecan

It looks like all the handwork is already done and would appreciate your help to release support for 2.6. Please help? thank you!