2
respostas

Erro ao criar uma queue

jvm 1    |  WARN | /admin/createDestination.action
jvm 1    | javax.servlet.ServletException: javax.servlet.ServletException: org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.UnsupportedOperationException: Possible CSRF attack
jvm 1    |      at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:162)[jetty-all-9.4.27.v20200227-uber.jar:9.4.27.v20200227]
jvm 1    |      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)[jetty-all-9.4.27.v20200227-uber.jar:9.4.27.v20200227]
jvm 1    |      at org.eclipse.jetty.server.Server.handle(Server.java:500)[jetty-all-9.4.27.v20200227-uber.jar:9.4.27.v20200227]
jvm 1    |      at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:383)[jetty-all-9.4.27.v20200227-uber.jar:9.4.27.v20200227]
jvm 1    |      at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:547)[jetty-all-9.4.27.v20200227-uber.jar:9.4.27.v20200227]
jvm 1    |      at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:375)[jetty-all-9.4.27.v20200227-uber.jar:9.4.27.v20200227]
jvm 1    |      at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:273)[jetty-all-9.4.27.v20200227-uber.jar:9.4.27.v20200227]
jvm 1    |      at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)[jetty-all-9.4.27.v20200227-uber.jar:9.4.27.v20200227]
jvm 1    |      at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)[jetty-all-9.4.27.v20200227-uber.jar:9.4.27.v20200227]
jvm 1    |      at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117)[jetty-all-9.4.27.v20200227-uber.jar:9.4.27.v20200227]
jvm 1    |      at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)[jetty-all-9.4.27.v20200227-uber.jar:9.4.27.v20200227]
jvm 1    |      at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)[jetty-all-9.4.27.v20200227-uber.jar:9.4.27.v20200227]
jvm 1    |      at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)[jetty-all-9.4.27.v20200227-uber.jar:9.4.27.v20200227]
jvm 1    |      at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)[jetty-all-9.4.27.v20200227-uber.jar:9.4.27.v20200227]
jvm 1    |      at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375)[jetty-all-9.4.27.v20200227-uber.jar:9.4.27.v20200227]
jvm 1    |      at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806)[jetty-all-9.4.27.v20200227-uber.jar:9.4.27.v20200227]
jvm 1    |      at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938)[jetty-all-9.4.27.v20200227-uber.jar:9.4.27.v20200227]
jvm 1    |      at java.lang.Thread.run(Unknown Source)[:1.8.0_251]
jvm 1    |  WARN | /admin/createDestination.action
jvm 1    | javax.servlet.ServletException: javax.servlet.ServletException: org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.UnsupportedOperationException: Unsupported method GET for path /admin/createDestination.action
jvm 1    |  
2 respostas

esse erro

Request processing failed; nested exception is java.lang.UnsupportedOperationException: Possible CSRF attack

parece ser causado por falta de alguma configuração de segurança no ActiveMQ: https://issues.redhat.com/browse/MB-670?focusedCommentId=12844088&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-12844088

Pode ser útil usar uma versão mais nova do ActiveMQ: https://activemq.apache.org/components/classic/download/ Nela é possível desabilitar pelo arquivo /apache-activemq-5.15.12/conf/java.security a segurança:

ocsp.enable=false

Para desativar completamente a segurança do ActiveMQ Artemis, simplesmente configure a propriedade security-enabled como false no arquivo broker.xml.

Ainda continua dando erro ao alterar para false ocsp.enable. Também estou utilizando exatamente esta versão: apache-activemq-5.15.12

javax.servlet.ServletException: javax.servlet.ServletException: org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.UnsupportedOperationException: Possible CSRF attack
javax.servlet.ServletException: javax.servlet.ServletException: org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.UnsupportedOperationException: Unsupported method GET for path /admin/createDestination.action