antonwierenga / amazonmq-cli Goto Github PK
View Code? Open in Web Editor NEWCommand Line tool to interact with the Amazon MQ message broker
License: Apache License 2.0
Command Line tool to interact with the Amazon MQ message broker
License: Apache License 2.0
The custom properties appear to be ignored. When sending a message using --file with elements set, they are missing from the message.
when I try to browse message from specific queue, I had this error
Command failed java.lang.ClassCastException: org.apache.activemq.command.ActiveMQObjectMessage cannot be cast to javax.jms.TextMessage
java.lang.ClassCastException: org.apache.activemq.command.ActiveMQObjectMessage cannot be cast to javax.jms.TextMessage
at amazonmq.cli.command.MessageCommands$$anonfun$browseMessages$1$$anonfun$apply$5.apply(MessageCommands.scala:215)
at amazonmq.cli.command.MessageCommands$$anonfun$browseMessages$1$$anonfun$apply$5.apply(MessageCommands.scala:212)
at amazonmq.cli.command.Commands.withSession(Commands.scala:116)
at amazonmq.cli.command.MessageCommands$$anonfun$browseMessages$1.apply(MessageCommands.scala:212)
at amazonmq.cli.command.MessageCommands$$anonfun$browseMessages$1.apply(MessageCommands.scala:210)
at amazonmq.cli.command.Commands.withWebClient(Commands.scala:139)
at amazonmq.cli.command.MessageCommands.browseMessages(MessageCommands.scala:210)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:216)
at org.springframework.shell.core.SimpleExecutionStrategy.invoke(SimpleExecutionStrategy.java:68)
at org.springframework.shell.core.SimpleExecutionStrategy.execute(SimpleExecutionStrategy.java:50)
at org.springframework.shell.core.AbstractShell.executeCommand(AbstractShell.java:134)
at org.springframework.shell.core.JLineShell.promptLoop(JLineShell.java:533)
at org.springframework.shell.core.JLineShell.run(JLineShell.java:179)
at java.lang.Thread.run(Thread.java:748)
I have my environment set up with activemq-5.16.0 and amazonmq-cli-0.2.2 as well as Java 8.
Running any valid command within the cli throws the following exceptions:
local>list-queues
java.net.MalformedURLException: no protocol: /xml/queues.jsp
at java.net.URL.<init>(URL.java:610)
at com.gargoylesoftware.htmlunit.util.UrlUtils.toUrlUnsafe(UrlUtils.java:243)
at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:450)
at amazonmq.cli.command.QueueCommands$$anonfun$listQueues$1.apply(QueueCommands.scala:162)
at amazonmq.cli.command.QueueCommands$$anonfun$listQueues$1.apply(QueueCommands.scala:161)
at amazonmq.cli.command.Commands.withWebClient(Commands.scala:139)
at amazonmq.cli.command.QueueCommands.listQueues(QueueCommands.scala:161)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:216)
at org.springframework.shell.core.SimpleExecutionStrategy.invoke(SimpleExecutionStrategy.java:68)
at org.springframework.shell.core.SimpleExecutionStrategy.execute(SimpleExecutionStrategy.java:50)
at org.springframework.shell.core.AbstractShell.executeCommand(AbstractShell.java:134)
at org.springframework.shell.core.JLineShell.promptLoop(JLineShell.java:533)
at org.springframework.shell.core.JLineShell.run(JLineShell.java:179)
at java.lang.Thread.run(Thread.java:748)
java.lang.reflect.UndeclaredThrowableException
at org.springframework.util.ReflectionUtils.rethrowRuntimeException(ReflectionUtils.java:315)
at org.springframework.util.ReflectionUtils.handleInvocationTargetException(ReflectionUtils.java:295)
at org.springframework.util.ReflectionUtils.handleReflectionException(ReflectionUtils.java:279)
at org.springframework.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:219)
at org.springframework.shell.core.SimpleExecutionStrategy.invoke(SimpleExecutionStrategy.java:68)
at org.springframework.shell.core.SimpleExecutionStrategy.execute(SimpleExecutionStrategy.java:50)
at org.springframework.shell.core.AbstractShell.executeCommand(AbstractShell.java:134)
at org.springframework.shell.core.JLineShell.promptLoop(JLineShell.java:533)
at org.springframework.shell.core.JLineShell.run(JLineShell.java:179)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.net.MalformedURLException: no protocol: /xml/queues.jsp
at java.net.URL.<init>(URL.java:610)
at com.gargoylesoftware.htmlunit.util.UrlUtils.toUrlUnsafe(UrlUtils.java:243)
at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:450)
at amazonmq.cli.command.QueueCommands$$anonfun$listQueues$1.apply(QueueCommands.scala:162)
at amazonmq.cli.command.QueueCommands$$anonfun$listQueues$1.apply(QueueCommands.scala:161)
at amazonmq.cli.command.Commands.withWebClient(Commands.scala:139)
at amazonmq.cli.command.QueueCommands.listQueues(QueueCommands.scala:161)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:216)
... 6 more
Could this be an issue with my setup? Where should I start looking?
I can connect to my broker and I can send a message to a queue but I am unable to carry out any other command due to the following same error for all:
Command failed java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter
java.lang.ClassNotFoundException: javax.xml.bind.DatatypeConverter
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
at amazonmq.cli.command.Commands.withWebClient(Commands.scala:133)
at amazonmq.cli.command.QueueCommands.listQueues(QueueCommands.scala:160)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.springframework.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:196)
at org.springframework.shell.core.SimpleExecutionStrategy.invoke(SimpleExecutionStrategy.java:64)
at org.springframework.shell.core.SimpleExecutionStrategy.execute(SimpleExecutionStrategy.java:48)
at org.springframework.shell.core.AbstractShell.executeCommand(AbstractShell.java:127)
at org.springframework.shell.core.JLineShell.promptLoop(JLineShell.java:533)
at org.springframework.shell.core.JLineShell.run(JLineShell.java:179)
at java.base/java.lang.Thread.run(Thread.java:834)
Exception in thread "Spring Shell" java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter
at amazonmq.cli.command.Commands.withWebClient(Commands.scala:133)
at amazonmq.cli.command.QueueCommands.listQueues(QueueCommands.scala:160)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.springframework.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:196)
at org.springframework.shell.core.SimpleExecutionStrategy.invoke(SimpleExecutionStrategy.java:64)
at org.springframework.shell.core.SimpleExecutionStrategy.execute(SimpleExecutionStrategy.java:48)
at org.springframework.shell.core.AbstractShell.executeCommand(AbstractShell.java:127)
at org.springframework.shell.core.JLineShell.promptLoop(JLineShell.java:533)
at org.springframework.shell.core.JLineShell.run(JLineShell.java:179)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.DatatypeConverter
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
Command failed java.lang.NoClassDefFoundError: com/thoughtworks/xstream/converters/Converter
java.lang.ClassNotFoundException: com.thoughtworks.xstream.converters.Converter
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
at org.apache.activemq.transport.xstream.XStreamWireFormatFactory.createWireFormat(XStreamWireFormatFactory.java:31)
at org.apache.activemq.transport.TransportFactory.createWireFormat(TransportFactory.java:193)
at org.apache.activemq.transport.TransportFactory.doConnect(TransportFactory.java:119)
at org.apache.activemq.transport.TransportFactory.connect(TransportFactory.java:65)
at org.apache.activemq.ActiveMQConnectionFactory.createTransport(ActiveMQConnectionFactory.java:331)
at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:346)
at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:304)
at org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:244)
at amazonmq.cli.command.Commands.withSession(Commands.scala:112)
at amazonmq.cli.command.BrokerCommands.connect(BrokerCommands.scala:70)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:196)
at org.springframework.shell.core.SimpleExecutionStrategy.invoke(SimpleExecutionStrategy.java:64)
at org.springframework.shell.core.SimpleExecutionStrategy.execute(SimpleExecutionStrategy.java:48)
at org.springframework.shell.core.AbstractShell.executeCommand(AbstractShell.java:127)
at org.springframework.shell.core.JLineShell.promptLoop(JLineShell.java:533)
at org.springframework.shell.core.JLineShell.run(JLineShell.java:179)
When browsing messages we infrequently get the following exception. Our messages have an XML document as body but it is not clear what is different to other messages that do not get the exception.
Command failed java.lang.ClassCastException: org.apache.activemq.command.ActiveMQBytesMessage cannot be cast to javax.jms.TextMessage
java.lang.ClassCastException: org.apache.activemq.command.ActiveMQBytesMessage cannot be cast to javax.jms.TextMessage
at amazonmq.cli.command.MessageCommands$$anonfun$browseMessages$1$$anonfun$apply$5.apply(MessageCommands.scala:215)
at amazonmq.cli.command.MessageCommands$$anonfun$browseMessages$1$$anonfun$apply$5.apply(MessageCommands.scala:212)
at amazonmq.cli.command.Commands.withSession(Commands.scala:116)
at amazonmq.cli.command.MessageCommands$$anonfun$browseMessages$1.apply(MessageCommands.scala:212)
at amazonmq.cli.command.MessageCommands$$anonfun$browseMessages$1.apply(MessageCommands.scala:210)
at amazonmq.cli.command.Commands.withWebClient(Commands.scala:139)
at amazonmq.cli.command.MessageCommands.browseMessages(MessageCommands.scala:210)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:216)
at org.springframework.shell.core.SimpleExecutionStrategy.invoke(SimpleExecutionStrategy.java:68)
at org.springframework.shell.core.SimpleExecutionStrategy.execute(SimpleExecutionStrategy.java:50)
at org.springframework.shell.core.AbstractShell.executeCommand(AbstractShell.java:134)
at org.springframework.shell.core.JLineShell.promptLoop(JLineShell.java:533)
at org.springframework.shell.core.JLineShell.run(JLineShell.java:179)
at java.lang.Thread.run(Thread.java:748)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.