Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 53285 invoked from network); 26 May 2008 15:43:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 May 2008 15:43:39 -0000 Received: (qmail 11215 invoked by uid 500); 26 May 2008 15:43:39 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 11191 invoked by uid 500); 26 May 2008 15:43:39 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 11180 invoked by uid 99); 26 May 2008 15:43:39 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 May 2008 08:43:39 -0700 X-ASF-Spam-Status: No, hits=-1998.5 required=10.0 tests=ALL_TRUSTED,WEIRD_PORT X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 May 2008 15:42:58 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 48C19234C125 for ; Mon, 26 May 2008 08:42:58 -0700 (PDT) Message-ID: <1645574938.1211816578296.JavaMail.jira@brutus> Date: Mon, 26 May 2008 08:42:58 -0700 (PDT) From: "Joe Fernandez (JIRA)" To: dev@activemq.apache.org Subject: [jira] Reopened: (AMQ-1098) Use of https transport throws ClassCastException MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/activemq/browse/AMQ-1098?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Joe Fernandez reopened AMQ-1098: -------------------------------- HttpsTransportFactory does not override doBind(URI location); therefore, HttpTransportFactory's doBind(URI location) is referenced instead. So a 'https://' transportConnector ends up using a HttpTransportServer instead of HttpsTransportServer object. > Use of https transport throws ClassCastException > ------------------------------------------------ > > Key: AMQ-1098 > URL: https://issues.apache.org/activemq/browse/AMQ-1098 > Project: ActiveMQ > Issue Type: Bug > Components: Transport > Affects Versions: incubation > Environment: Ubuntu Linux & Mac OS X > Reporter: Hernan Otero > Priority: Minor > Fix For: 5.1.0 > > Attachments: amq-1098potentialpatch.zip > > > 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 HttpTransportFactory.java 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 = https://my.example.com:2222 for subject $subject = TEST.FOO > [java] Connecting to URL: https://my.example.com:7043 > [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: org.apache.activemq.transport.https.HttpsTransport > [java] Caught: javax.jms.JMSException: Could not create Transport. Reason: java.lang.ClassCastException: org.apache.activemq.transport.https.HttpsTransport > [java] at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:33) > [java] at org.apache.activemq.ActiveMQConnectionFactory.createTransport(ActiveMQConnectionFactory.java:229) > [java] at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:242) > [java] at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:211) > [java] at org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:158) > [java] at ProducerTool.run(Unknown 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(HttpTransportFactory.java:62) > [java] at org.apache.activemq.transport.TransportFactory.configure(TransportFactory.java:213) > [java] at org.apache.activemq.transport.TransportFactory.doConnect(TransportFactory.java:117) > [java] at org.apache.activemq.transport.TransportFactory.doConnect(TransportFactory.java:43) > [java] at org.apache.activemq.transport.TransportFactory.connect(TransportFactory.java:77) > [java] at org.apache.activemq.ActiveMQConnectionFactory.createTransport(ActiveMQConnectionFactory.java:227) > [java] ... 5 more > BUILD SUCCESSFUL > 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.