Return-Path: Delivered-To: apmail-geronimo-activemq-users-archive@www.apache.org Received: (qmail 34863 invoked from network); 5 Jun 2006 06:47:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 5 Jun 2006 06:47:47 -0000 Received: (qmail 17304 invoked by uid 500); 5 Jun 2006 06:47:47 -0000 Delivered-To: apmail-geronimo-activemq-users-archive@geronimo.apache.org Received: (qmail 17285 invoked by uid 500); 5 Jun 2006 06:47:47 -0000 Mailing-List: contact activemq-users-help@geronimo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: activemq-users@geronimo.apache.org Delivered-To: mailing list activemq-users@geronimo.apache.org Received: (qmail 17276 invoked by uid 99); 5 Jun 2006 06:47:46 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 04 Jun 2006 23:47:46 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of chirino@gmail.com designates 64.233.184.239 as permitted sender) Received: from [64.233.184.239] (HELO wr-out-0506.google.com) (64.233.184.239) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 04 Jun 2006 23:47:45 -0700 Received: by wr-out-0506.google.com with SMTP id 37so933453wra for ; Sun, 04 Jun 2006 23:47:24 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=WaWZHsKI4PllBxfa1c7AXF4sg8BcLeCTw07crwGuW+/2Su2HzhdI1IbT0RjUmbOU7KCCTV/8tCTfNVdEAmPEJSl6EkTk/6413K9bvsXd6ydLXD+tu9FFucbwHZ6rQy5RTCo52MqbuEelgN1jsNKGA9RuJY8s94UdeBPZY1yO9cQ= Received: by 10.65.185.17 with SMTP id m17mr3070291qbp; Sun, 04 Jun 2006 23:47:24 -0700 (PDT) Received: by 10.65.218.1 with HTTP; Sun, 4 Jun 2006 23:47:24 -0700 (PDT) Message-ID: Date: Mon, 5 Jun 2006 01:47:24 -0500 From: "Hiram Chirino" Sender: chirino@gmail.com To: activemq-users@geronimo.apache.org Subject: Re: ActiveMQ with JBoss 4 and annotations In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: X-Google-Sender-Auth: 5d5e464d372fefe6 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N This may be a better question asked on the JBoss dev lists. From the stack trace it seems like the JBossMQ connection is being used of some reason with the ActiveMQ destinations. Weird. On 6/4/06, Martin wrote: > Hi, > > Has anyone tried to use EJB3 style MDB with AtiveMQ deployed in JBoss 4 ? > I keep trying but JBoss gives me java.lang.ClassCastException during MDB > deployment. I tried ActiveMQ 3.2.2 and 4 with the same result. > > Here is my test MDB and the stack trace form JBoss 4.0.4 GA: > > -------------- > package test.mdb; > > import javax.jms.Message; > import javax.jms.MessageListener; > import javax.ejb.ActivationConfigProperty; > import javax.ejb.MessageDriven; > > @MessageDriven( activationConfig = > { > @ActivationConfigProperty(propertyName="destinationType", > propertyValue="javax.jms.Queue"), > @ActivationConfigProperty(propertyName="destination", > propertyValue="queue/mdbTestQueue"), > @ActivationConfigProperty(propertyName="resourceAdaptorName", > propertyValue="activemq-ra-3.2.2.rar"), > @ActivationConfigProperty(propertyName="connectionFactoryName", > propertyValue="java:/AMQQueueConnectionFactory"), > > }) > public class PostSenderBean implements MessageListener { > > public void onMessage(Message message) { > System.out.println("PostSenderBean.onMessage()"); > } > } > > > and the JBoss Error: > > 16:15:47,867 WARN [ServiceController] Problem starting service jboss.j2ee:jar=h > pejb.jar,name=PostSenderBean,service=EJB3 > java.lang.ClassCastException: org.activemq.message.ActiveMQQueue > at org.jboss.mq.SpyConnectionConsumer.(SpyConnectionConsumer.java: > 107) > at org.jboss.mq.SpyConnection.createConnectionConsumer(SpyConnection.jav > a:209) > at org.jboss.ejb3.mdb.MDB.innerCreateQueue(MDB.java:424) > at org.jboss.ejb3.mdb.MDB.innerCreate(MDB.java:347) > at org.jboss.ejb3.mdb.MDB.innerStart(MDB.java:225) > at org.jboss.ejb3.mdb.MDB.start(MDB.java:214) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. > java:39) > > > > > 16:15:47,877 ERROR [URLDeploymentScanner] Incomplete Deployment listing: > > --- MBeans waiting for other MBeans --- > ObjectName: jboss.j2ee:jar=hpejb.jar,name=PostSenderBean,service=EJB3 > State: FAILED > Reason: java.lang.ClassCastException: org.activemq.message.ActiveMQQueue > > --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM --- > ObjectName: jboss.j2ee:jar=hpejb.jar,name=PostSenderBean,service=EJB3 > State: FAILED > Reason: java.lang.ClassCastException: org.activemq.message.ActiveMQQueue > > ----------------------- > > The same bean works great with JBossMQ! Any help will be greatly appreciated. > > best regards > Martin > > -- Regards, Hiram