[
https://issues.apache.org/jira/browse/AMQ-8451?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17471663#comment-17471663
]
Varun Ramachandran edited comment on AMQ-8451 at 1/10/22, 5:45 AM:
-------------------------------------------------------------------
Hi Jean,
We have a test scenario where we publish a Blob type message to ActiveMQ queue
and wait for a call back response.
when we execute the getInputStream() method of the blob message, we get the
following exception 'java.io.IOException: The message URL host is incorrect'
*Code snippet for reference:*
{code:java}
private void onMessageInternal(final Message message) {
CommandInputStream commandInputStream = null;
try {
CommandBase command = null;
if (message instanceof BlobMessage) {
ActiveMQBlobMessage blobMessage = (ActiveMQBlobMessage) message;
blobMessage.setBlobDownloader(new BlobDownloader(new BlobTransferPolicy()));
commandInputStream = new CommandInputStream(blobMessage.getInputStream());
command = commandInputStream.getCommand();
}
else if (message instanceof ObjectMessage) {{code}
*Exception:*
2022-01-05 17:32:31.493 [ERROR] — [pool-6-thread-6]
c.s.f.g.c.dispatcher.Dispatcher : Error on onMessage().
java.io.IOException: The message URL host is incorrect
at
org.apache.activemq.blob.DefaultBlobDownloadStrategy.getInputStream(DefaultBlobDownloadStrategy.java:51)
at
org.apache.activemq.blob.BlobDownloader.getInputStream(BlobDownloader.java:38)
at
org.apache.activemq.command.ActiveMQBlobMessage.getInputStream(ActiveMQBlobMessage.java:132)
at c.s.f.g.c.dispatcher.Dispatcher.onMessageInternal(Dispatcher.java:132)
at
c.s.f.g.c.dispatcher.Dispatcher.lambda$returnOnMessage$0(Dispatcher.java:119)
at c.s.f.g.c.dispatcher.Dispatcher$$Lambda$635/22398831.run(Unknown Source)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
*pom.xml*
{code:java}
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-client</artifactId>
<version>5.16.2</version>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-broker</artifactId>
<version>5.16.2</version>
</dependency> {code}
Please feel free to let us know if there are any other information required.
Thanks
was (Author: JIRAUSER283193):
Hi Jean,
We have a test scenario where we publish a Blob type message to ActiveMQ queue
and wait for a call back response.
when we execute the getInputStream() method of the blob message, we get the
following exception 'java.io.IOException: The message URL host is incorrect'
Code snippet for reference:
{code:java}
private void onMessageInternal(final Message message) {
CommandInputStream commandInputStream = null;
try {
CommandBase command = null;
if (message instanceof BlobMessage) {
ActiveMQBlobMessage blobMessage = (ActiveMQBlobMessage) message;
blobMessage.setBlobDownloader(new BlobDownloader(new BlobTransferPolicy()));
commandInputStream = new CommandInputStream(blobMessage.getInputStream());
command = commandInputStream.getCommand();
}
else if (message instanceof ObjectMessage) {{code}
Exception:
2022-01-05 17:32:31.493 [ERROR] — [pool-6-thread-6]
c.s.f.g.c.dispatcher.Dispatcher : Error on onMessage().
java.io.IOException: The message URL host is incorrect
at
org.apache.activemq.blob.DefaultBlobDownloadStrategy.getInputStream(DefaultBlobDownloadStrategy.java:51)
at
org.apache.activemq.blob.BlobDownloader.getInputStream(BlobDownloader.java:38)
at
org.apache.activemq.command.ActiveMQBlobMessage.getInputStream(ActiveMQBlobMessage.java:132)
at c.s.f.g.c.dispatcher.Dispatcher.onMessageInternal(Dispatcher.java:132)
at
c.s.f.g.c.dispatcher.Dispatcher.lambda$returnOnMessage$0(Dispatcher.java:119)
at c.s.f.g.c.dispatcher.Dispatcher$$Lambda$635/22398831.run(Unknown Source)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
pom.xml
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-client</artifactId>
<version>5.16.2</version>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-broker</artifactId>
<version>5.16.2</version>
</dependency>
Please feel free to let us know if there are any other information required.
Thanks
> Message URL Host is incorrect
> -----------------------------
>
> Key: AMQ-8451
> URL: https://issues.apache.org/jira/browse/AMQ-8451
> Project: ActiveMQ
> Issue Type: Bug
> Components: JMS client
> Affects Versions: 5.16.2
> Reporter: Varun Ramachandran
> Assignee: Jean-Baptiste Onofré
> Priority: Major
>
> After I upgraded the Active MQ client version from 5.15.12 to 5.16.2 in our
> pom.xml, I encounter the below exception for Blob Messages. I tried upgrading
> to 5.16.3 and find the same problem
> *Exception*
> _java.io.IOException: The message URL host is incorrect_
> _at
> org.apache.activemq.blob.DefaultBlobDownloadStrategy.getInputStream(DefaultBlobDownloadStrategy.java:51)_
> _at
> org.apache.activemq.blob.BlobDownloader.getInputStream(BlobDownloader.java:38)_
> _at
> org.apache.activemq.command.ActiveMQBlobMessage.getInputStream(ActiveMQBlobMessage.java:132)_
>
> The URL host of our message is same for both the versions, however it just
> gives an exception for the 5.16.2 version.
> http://blob-service:8080/blob/ID
> ID Masked
> Thanks in advance!
>
--
This message was sent by Atlassian Jira
(v8.20.1#820001)