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) <[EMAIL PROTECTED]> wrote:
Hello Active MQ users ,
                   I have an embedded broker described by the following
java class. It is started as a servletContextlistener , in tomcat 5.5

public class ActiveMQBrokerStartListener implements
ServletContextListener {

BrokerService broker = new BrokerService();

public void contextInitialized(ServletContextEvent arg0) {

try{

System.out.println("Starting ActiveMQ Broker Service...");

File dir = new File("../../activemq");

dir.mkdir();

broker.setDataDirectory(dir);

broker.addConnector("tcp://localhost:61616?trace=true&wireFormat.maxInac
tivityDuration=-1");

broker.start();

System.out.println("Active MQ Broker Started at local host port 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 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

<listener>
        <listener-class>
         com.cisco.cpnm.common.messaging.ActiveMQBrokerStartListener
        </listener-class>
     </listener>

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
exception for details.
        at
org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.ja
va:42)
        at
org.apache.activemq.store.jdbc.TransactionContext.getConnection(Transact
ionContext.java:58)
        at
org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.createAdapter(JDBC
PersistenceAdapter.java:229)
        at
org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.getAdapter(JDBCPer
sistenceAdapter.java:213)
        at
org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.start(JDBCPersiste
nceAdapter.java:139)
        at
org.apache.activemq.store.journal.JournalPersistenceAdapter.start(Journa
lPersistenceAdapter.java:216)
        at
org.apache.activemq.broker.BrokerService.createRegionBroker(BrokerServic
e.java:930)
        at
org.apache.activemq.broker.BrokerService.createBroker(BrokerService.java
: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 ,
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.






--

James
-------
http://radio.weblogs.com/0112098/

Reply via email to