activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Suchitha Koneru \(sukoneru\)" <sukon...@cisco.com>
Subject journal locked exceptions
Date Fri, 09 Mar 2007 18:35:25 GMT
Hello active Mq users , 

is there any way out to overcome journal locked exceptions ? please help
me out.

I am getting a journal Locked Exception , when ever I re start tomcat.
How come the journal is still locked , when the broker is stopped.

The following is the exception 

org.apache.activeio.journal.active.JournalLockedException: Journal is
already opened by this application.

at

org.apache.activeio.journal.active.ControlFile.lock(ControlFile.java:77)

at

org.apache.activeio.journal.active.LogFileManager.initialize(LogFileMana

ger.java:121)

at

org.apache.activeio.journal.active.LogFileManager.<init>(LogFileManager.

java:102)

at

org.apache.activeio.journal.active.JournalImpl.<init>(JournalImpl.java:1

01)

at

org.apache.activemq.store.DefaultPersistenceAdapterFactory.createJournal

(DefaultPersistenceAdapterFactory.jav

a:198)

at

org.apache.activemq.store.DefaultPersistenceAdapterFactory.getJournal(De

faultPersistenceAdapterFactory.java:1

34)

at

org.apache.activemq.store.DefaultPersistenceAdapterFactory.createPersist

enceAdapter(DefaultPersistenceAdapter

Factory.java:63)

at

org.apache.activemq.broker.BrokerService.createPersistenceAdapter(Broker

Service.java:968)

at

org.apache.activemq.broker.BrokerService.getPersistenceAdapter(BrokerSer

vice.java:559)

at

org.apache.activemq.broker.BrokerService.createRegionBroker(BrokerServic

e.java:929)

at

org.apache.activemq.broker.BrokerService.createBroker(BrokerService.java

:888)

at

org.apache.activemq.broker.BrokerService.getBroker(BrokerService.java:45

8)

at

org.apache.activemq.broker.BrokerService.addConnector(BrokerService.java

:143)

at

org.apache.activemq.broker.BrokerService.addConnector(BrokerService.java

:133)

at

com.cisco.cpnm.common.messaging.ActiveMQBrokerServlet.init(ActiveMQBroke

rServlet.java:26)

The active mq version being used is 4.0.2 . I am starting the broker
from tomcat 5.5.20's conf/web.xml .

<servlet>

<servlet-name>activemqbroker</servlet-name>

<servlet-class>

com.cisco.cpnm.common.messaging.ActiveMQBrokerServlet

</servlet-class>

<load-on-startup>6</load-on-startup>

</servlet>.

the code for the servlet , which starts the broker is 

public class ActiveMQBrokerServlet extends GenericServlet{

BrokerService broker ;

public void init(ServletConfig config) throws ServletException {

try{

broker = new BrokerService();

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

//for the broker URI , do not have leading or trailing spaces

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){

e.printStackTrace();

}

}

public void destroy(){

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);

}

}

}

The jars needed by active are placed in Tomcat's shared/lib folder.

Please let me know, as to how to overcome this issue.

thanks,

Suchitha.


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message