Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 686 invoked from network); 28 Feb 2007 16:35:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 Feb 2007 16:35:32 -0000 Received: (qmail 48697 invoked by uid 500); 28 Feb 2007 16:35:38 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 48681 invoked by uid 500); 28 Feb 2007 16:35:38 -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 48661 invoked by uid 99); 28 Feb 2007 16:35:38 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Feb 2007 08:35:38 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of sukoneru@cisco.com designates 171.68.10.86 as permitted sender) Received: from [171.68.10.86] (HELO sj-iport-4.cisco.com) (171.68.10.86) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Feb 2007 08:35:25 -0800 Received: from sj-dkim-6.cisco.com ([171.68.10.81]) by sj-iport-4.cisco.com with ESMTP; 28 Feb 2007 08:35:04 -0800 X-IronPort-AV: i="4.14,231,1170662400"; d="scan'208"; a="43647514:sNHT58340664" Received: from sj-core-4.cisco.com (sj-core-4.cisco.com [171.68.223.138]) by sj-dkim-6.cisco.com (8.12.11/8.12.11) with ESMTP id l1SGZ4Mw002785 for ; Wed, 28 Feb 2007 08:35:04 -0800 Received: from xbh-sjc-221.amer.cisco.com (xbh-sjc-221.cisco.com [128.107.191.63]) by sj-core-4.cisco.com (8.12.10/8.12.6) with ESMTP id l1SGYZnZ003931 for ; Wed, 28 Feb 2007 08:35:04 -0800 (PST) Received: from xmb-sjc-21a.amer.cisco.com ([171.70.151.152]) by xbh-sjc-221.amer.cisco.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 28 Feb 2007 08:34:59 -0800 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: derby db does not start , when context is reloaded Date: Wed, 28 Feb 2007 08:34:55 -0800 Message-ID: <5BD9FA70F5EDAC43AB816A5FDE30F6AC03BD05B4@xmb-sjc-21a.amer.cisco.com> In-Reply-To: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: derby db does not start , when context is reloaded Thread-Index: AcdbBBHDll3l4XDyRBiTvaQfrQgDHQAUaOyw From: "Suchitha Koneru \(sukoneru\)" To: X-OriginalArrivalTime: 28 Feb 2007 16:34:59.0345 (UTC) FILETIME=[633AA010:01C75B56] DKIM-Signature: v=0.5; a=rsa-sha256; q=dns/txt; l=3653; t=1172680504; x=1173544504; c=relaxed/simple; s=sjdkim6002; h=Content-Type:From:Subject:Content-Transfer-Encoding:MIME-Version; d=cisco.com; i=sukoneru@cisco.com; z=From:=20=22Suchitha=20Koneru=20\(sukoneru\)=22=20 |Subject:=20RE=3A=20derby=20db=20does=20not=20start=20,=20when=20context= 20is=20reloaded |Sender:=20; bh=9eB+zXSVxEfKl48SshnNPi1ARFmXMrla8aGCdCSAOlk=; b=OFp0y21xfcRkpPYd7lW3uDeHR0+LEI0KR9woFkiGwo8kDT+MM99qiAB2CO6qKYJTDy1n7xqj vAl47BB6b5e5reocoNlWh1N59R901TXjfQr7zHmWUGXaX2plsz4RDcD/; Authentication-Results: sj-dkim-6; header.From=sukoneru@cisco.com; dkim=pass ( sig from cisco.com/sjdkim6002 verified; ); X-Virus-Checked: Checked by ClamAV on apache.org Thanks for the suggestion. Is there any documentation , which I can refer to , in regard to configuring data base for active mq.=20 Sucgitha=20 -----Original Message----- From: James Strachan [mailto:james.strachan@gmail.com]=20 Sent: Tuesday, February 27, 2007 10:45 PM To: users@activemq.apache.org Subject: Re: derby db does not start , when context is reloaded I guess a good work around is to switch to a different database; such as using MySQL or Postgresql On 2/28/07, Suchitha Koneru (sukoneru) wrote: > Hello Active MQ users , > I have an embedded broker described by the=20 > following java class. It is started as a servletContextlistener , in=20 > tomcat 5.5 > > public class ActiveMQBrokerStartListener implements=20 > ServletContextListener { > > BrokerService broker =3D new BrokerService(); > > public void contextInitialized(ServletContextEvent arg0) { > > try{ > > System.out.println("Starting ActiveMQ Broker Service..."); > > File dir =3D new File("../../activemq"); > > dir.mkdir(); > > broker.setDataDirectory(dir); > > = broker.addConnector("tcp://localhost:61616?trace=3Dtrue&wireFormat.maxIn > ac > tivityDuration=3D-1"); > > broker.start(); > > System.out.println("Active MQ Broker Started at local host port=20 > 61616"); > > }catch(Exception e){ > > System.err.println(e.getMessage()); > > e.printStackTrace(); > > throw new RuntimeException(e); > > } > > } > > public void contextDestroyed(ServletContextEvent arg0) { > > try{ > > broker.stop(); > > System.out.println("Active MQ Broker Stopped at localhost port=20 > 61616"); > > }catch(Exception e){ > > System.err.println(e.getMessage()); > > e.printStackTrace(); > > throw new RuntimeException(e); > > } > > } > > } > > In the web.xml , I have an entry for the above listener as follows > > > > com.cisco.cpnm.common.messaging.ActiveMQBrokerStartListener > > > > When ever the context is reloaded > > I get the following exception > > Failed to start database 'derbydb', see the next exception for details. > java.io.IOException: Failed to start database 'derbydb', see the next=20 > exception for details. > at > org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport. > ja > va:42) > at > org.apache.activemq.store.jdbc.TransactionContext.getConnection(Transa > ct > ionContext.java:58) > at > org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.createAdapter(JD > BC > PersistenceAdapter.java:229) > at > org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.getAdapter(JDBCP > er > sistenceAdapter.java:213) > at > org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.start(JDBCPersis > te > nceAdapter.java:139) > at > org.apache.activemq.store.journal.JournalPersistenceAdapter.start(Jour > na > lPersistenceAdapter.java:216) > at > org.apache.activemq.broker.BrokerService.createRegionBroker(BrokerServ > ic > e.java:930) > at > org.apache.activemq.broker.BrokerService.createBroker(BrokerService.ja > va > :888) > ...... > > Please let me know, if there is a work around. > > I have the following active mq jars > > activemq-core-4.0.1.jar ,backport-util-concurrent-2.1.jar ,=20 > geronimo-j2ee-management_1.0_spec-1.0.jar > > geronimo-jms_1.1_spec-1.0.jar , incubator-activemq-4.0.2.jar. > > thanks,. > > Suchitha. > > > > --=20 James ------- http://radio.weblogs.com/0112098/