[ 
https://issues.apache.org/activemq/browse/AMQ-2285?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gary Tully resolved AMQ-2285.
-----------------------------

    Resolution: Fixed

r783384
pulled file locking logic outside setting opened state.

> KahaDB store file lock issue - NPE if store is locked and 
> failIfDatabaseIsLocked is set. Only one try otherwise
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: AMQ-2285
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2285
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Message Store
>    Affects Versions: 5.3.0
>            Reporter: Gary Tully
>            Assignee: Gary Tully
>             Fix For: 5.3.0
>
>
> {code}
> 2009-06-10 09:37:12,462 [com.fusesource.support.StoreBrokerRunner.main()] 
> INFO  BrokerService - Using Persistence Adapter: 
> org.apache.activemq.store.kahadb.kahadbst...@bb6598
> 2009-06-10 09:37:12,470 [com.fusesource.support.StoreBrokerRunner.main()] 
> ERROR BrokerService - Failed to start ActiveMQ JMS Message Broker. Reason: 
> java.io.IOException: File 'storeBroker1/kahadbstore/lock' could not be locked.
> java.io.IOException: File 'storeBroker1/kahadbstore/lock' could not be locked.
>       at org.apache.kahadb.util.LockFile.lock(LockFile.java:67)
>       at 
> org.apache.activemq.store.kahadb.MessageDatabase.open(MessageDatabase.java:225)
>       at 
> org.apache.activemq.store.kahadb.MessageDatabase.load(MessageDatabase.java:279)
>       at 
> org.apache.activemq.store.kahadb.MessageDatabase.start(MessageDatabase.java:164)
>       at 
> org.apache.activemq.broker.BrokerService.start(BrokerService.java:463)
>       at 
> com.fusesource.support.StoreBrokerRunner.main(StoreBrokerRunner.java:56)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>       at java.lang.reflect.Method.invoke(Method.java:585)
>       at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:283)
>       at java.lang.Thread.run(Thread.java:613)
> 2009-06-10 09:37:12,474 [com.fusesource.support.StoreBrokerRunner.main()] 
> INFO  BrokerService - ActiveMQ Message Broker (slaveBroker1, null) is 
> shutting down
> 2009-06-10 09:37:12,474 [com.fusesource.support.StoreBrokerRunner.main()] 
> INFO  TransportConnector - Connector 
> nio://127.0.0.1:61627?useQueueForAccept=false Stopped
> 2009-06-10 09:37:12,484 [com.fusesource.support.StoreBrokerRunner.main()] 
> ERROR KahaDBStore - Could not stop service: 
> org.apache.activemq.store.kahadb.kahadbst...@bb6598. Reason: 
> java.lang.NullPointerException
> java.lang.NullPointerException
>       at 
> org.apache.activemq.store.kahadb.MessageDatabase.unload(MessageDatabase.java:315)
>       at 
> org.apache.activemq.store.kahadb.MessageDatabase.stop(MessageDatabase.java:170)
>       at org.apache.activemq.util.ServiceStopper.stop(ServiceStopper.java:41)
>       at org.apache.activemq.broker.BrokerService.stop(BrokerService.java:541)
>       at 
> org.apache.activemq.broker.BrokerService.start(BrokerService.java:509)
>       at 
> com.fusesource.support.StoreBrokerRunner.main(StoreBrokerRunner.java:56)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>       at java.lang.reflect.Method.invoke(Method.java:585)
>       at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:283)
>       at java.lang.Thread.run(Thread.java:613)
> 2009-06-10 09:37:12,486 [com.fusesource.support.StoreBrokerRunner.main()] 
> DEBUG ManagementContext - Probably not using JRE 1.4: 
> mx4j.tools.naming.NamingService
> 2009-06-10 09:37:12,492 [com.fusesource.support.StoreBrokerRunner.main()] 
> INFO  BrokerService - ActiveMQ JMS Message Broker (slaveBroker1, null) stopped
> 2009-06-10 09:37:12,492 [com.fusesource.support.StoreBrokerRunner.main()] 
> WARN  BrokerService - Failed to stop broker after failure in start 
> java.lang.NullPointerException
>       at 
> org.apache.activemq.store.kahadb.MessageDatabase.unload(MessageDatabase.java:315)
>       at 
> org.apache.activemq.store.kahadb.MessageDatabase.stop(MessageDatabase.java:170)
>       at org.apache.activemq.util.ServiceStopper.stop(ServiceStopper.java:41)
>       at org.apache.activemq.broker.BrokerService.stop(BrokerService.java:541)
>       at 
> org.apache.activemq.broker.BrokerService.start(BrokerService.java:509)
>       at 
> com.fusesource.support.StoreBrokerRunner.main(StoreBrokerRunner.java:56)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>       at java.lang.reflect.Method.invoke(Method.java:585)
>       at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:283)
>       at java.lang.Thread.run(Thread.java:613)
> 2009-06-10 09:37:12,493 [com.fusesource.support.StoreBrokerRunner.main()] 
> ERROR StoreBrokerRunner - java.io.IOException: File 
> 'storeBroker1/kahadbstore/lock' could not be locked.
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to