activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Silva (JIRA)" <>
Subject [jira] Updated: (AMQ-1098) Use of https transport throws ClassCastException
Date Thu, 10 Apr 2008 19:53:43 GMT


John Silva updated AMQ-1098:


Here are a few fixed files that appear to address the classcastexception...basically made
an httpsclienttransport which just extends the existing HttpClientTransport.  Because the
underlying HttpClient works with http and https, there are no further changes needed.  Then
in the HttpsTransportFactory I return the newly created httpsclienttransport...since it extends
the httpclienttransport there is no longer the classcastexception.  Tested and seems to work
for my purposes, patch against v4.1.1.

> Use of https transport throws ClassCastException
> ------------------------------------------------
>                 Key: AMQ-1098
>                 URL:
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Transport
>    Affects Versions: incubation
>         Environment: Ubuntu Linux & Mac OS X
>            Reporter: Hernan Otero
>            Priority: Minor
>             Fix For: 5.2.0
>         Attachments:
> Trying to run the sample producer out of the main trunk using an https url throws a ClassCastException.
 I've tracked this down in the code to the fact that expects to
find an HttpClientTransport but HttpsTransportFactory does not override createTransport()
to create an HttpsClientTransport instead (HttpsClientTransport does not exist as a class).
> Thanks,
> Hernan
> $ ant producer
> Buildfile: build.xml
> init:
> compile:
> producer:
>      [echo] Running producer against server at $url = for
subject $subject = TEST.FOO
>      [java] Connecting to URL:
>      [java] Publishing a Message with size 1000 to topic: TEST.FOO
>      [java] Using non-persistent messages
>      [java] Sleeping between publish 0 ms
>      [java] javax.jms.JMSException: Could not create Transport. Reason: java.lang.ClassCastException:
>      [java] Caught: javax.jms.JMSException: Could not create Transport. Reason: java.lang.ClassCastException:
>      [java]     at org.apache.activemq.util.JMSExceptionSupport.create(
>      [java]     at org.apache.activemq.ActiveMQConnectionFactory.createTransport(
>      [java]     at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(
>      [java]     at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(
>      [java]     at org.apache.activemq.ActiveMQConnectionFactory.createConnection(
>      [java]     at Source)
>      [java]     at ProducerTool.main(Unknown Source)
>      [java] Caused by: java.lang.ClassCastException: org.apache.activemq.transport.https.HttpsTransport
>      [java]     at org.apache.activemq.transport.http.HttpTransportFactory.compositeConfigure(
>      [java]     at org.apache.activemq.transport.TransportFactory.configure(
>      [java]     at org.apache.activemq.transport.TransportFactory.doConnect(
>      [java]     at org.apache.activemq.transport.TransportFactory.doConnect(
>      [java]     at org.apache.activemq.transport.TransportFactory.connect(
>      [java]     at org.apache.activemq.ActiveMQConnectionFactory.createTransport(
>      [java]     ... 5 more
> Total time: 2 seconds

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message