Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 18344 invoked from network); 21 Mar 2008 16:56:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Mar 2008 16:56:38 -0000 Received: (qmail 1260 invoked by uid 500); 21 Mar 2008 16:56:36 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 1234 invoked by uid 500); 21 Mar 2008 16:56:35 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 1224 invoked by uid 99); 21 Mar 2008 16:56:35 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Mar 2008 09:56:35 -0700 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Mar 2008 16:55:56 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1JckXH-0002zL-IA for users@activemq.apache.org; Fri, 21 Mar 2008 09:56:07 -0700 Message-ID: <16202156.post@talk.nabble.com> Date: Fri, 21 Mar 2008 09:56:07 -0700 (PDT) From: aslam To: users@activemq.apache.org Subject: Re: factory:java.io.IOException: Could not find factory class for resource: META-INF/services/org... In-Reply-To: <16167726.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: akwala@gmail.com References: <16167726.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org None of the jars have the 'vm' file where it's expected: META-INF/services/org/apache/activemq/broker/vm META-INF/services/org/apache/activemq/broker/ has only the following four files: - agent - broker - properties - xbean There's a 'vm' file in META-INF/services/org/apache/activemq/transport. I copied this to the META-INF/**/broker directory, which resulted in... java.io.IOException: Could load vm factory:java.lang.ClassCastException: org.apache.activemq.transport.vm.VMTransportFactory Given this, I'm not sure whether starting an embedded broker using the vm transport and configuring it using an external configuration file -- http://activemq.apache.org/vm-transport-reference.html -- works. Any ideas? Next, I'll try doing this in one of the alternate ways. --aslam a k'wala wrote: > > I'm trying to use the VM Transport, launched in a JUnit TestSetup. Here's > how I create the broker: > > String brokerUri = > "vm://localhost?brokerConfig=xbean:file:../mtx-unit-test/testing/activemq/activemq.xml"; > BrokerService broker = BrokerFactory.createBroker(new URI(brokerUri)); > > This causes the following exception: > java.io.IOException: Could load vm factory:java.io.IOException: Could not > find factory class for resource: > META-INF/services/org/apache/activemq/broker/vm > at > org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:27) > at > org.apache.activemq.broker.BrokerFactory.createBrokerFactoryHandler(BrokerFactory.java:43) > at > org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:70) > at > org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:54) > ...[truncated] > Caused by: java.io.IOException: Could not find factory class for resource: > META-INF/services/org/apache/activemq/broker/vm > at > org.apache.activemq.util.FactoryFinder.doFindFactoryProperies(FactoryFinder.java:92) > at > org.apache.activemq.util.FactoryFinder.newInstance(FactoryFinder.java:52) > > The only info I could find on this is: > http://activemq.apache.org/ioexception-could-not-find-class-for-resource.html > ...which says that I need to have the distro jar in my classpath. I have > both, activemq-core-5.0.0.jar and activemq-all-5.0.0.jar in the classpath. > > What else should I check? > > > -- View this message in context: http://www.nabble.com/factory%3Ajava.io.IOException%3A-Could-not-find-factory-class-for-resource%3A-META-INF-services-org...-tp16167726s2354p16202156.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.