You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Matt Altermatt (JIRA)" <ji...@apache.org> on 2012/05/15 20:27:07 UTC

[jira] [Created] (AMQ-3841) mKahaDB causes ArrayIndexOutOfBoundsException on restart after deleting existing queues

Matt Altermatt created AMQ-3841:
-----------------------------------

             Summary: mKahaDB causes ArrayIndexOutOfBoundsException on restart after deleting existing queues
                 Key: AMQ-3841
                 URL: https://issues.apache.org/jira/browse/AMQ-3841
             Project: ActiveMQ
          Issue Type: Bug
          Components: Broker
    Affects Versions: 5.6.0
         Environment: Windows 7, JDK 6
            Reporter: Matt Altermatt


To replicate, use these settings in the activemq.xml
{code}
		<persistenceAdapter>
			<mKahaDB directory="${activemq.data}/kahadb">
				<filteredPersistenceAdapters>
					<filteredKahaDB perDestination="true" >
						<persistenceAdapter>
							<kahaDB journalMaxFileLength="32mb" />
						</persistenceAdapter>
					</filteredKahaDB>
				</filteredPersistenceAdapters>
			</mKahaDB>
		</persistenceAdapter>
{code}

# Start the broker
# Create a queue
#* This will create the queue in the /kahadb folder
# Delete the queue
#* The queue is not deleted from the /kahadb folder
# Stop the broker
# Start the broker

This will cause cause the stack trace that is attached.

To fix this, delete the queue in the /kahadb folder and start the broker.  This allows the broker to start as normal.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (AMQ-3841) mKahaDB causes ArrayIndexOutOfBoundsException on restart after deleting existing queues

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3841?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13286662#comment-13286662 ] 

Timothy Bish commented on AMQ-3841:
-----------------------------------

Done, updated in trunk, should see it in the next nightly.
                
> mKahaDB causes ArrayIndexOutOfBoundsException on restart after deleting existing queues
> ---------------------------------------------------------------------------------------
>
>                 Key: AMQ-3841
>                 URL: https://issues.apache.org/jira/browse/AMQ-3841
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.6.0
>         Environment: Windows 7, JDK 6
>            Reporter: Matt Altermatt
>            Assignee: Timothy Bish
>             Fix For: 5.7.0
>
>         Attachments: AMQ3841Test.java, output.txt
>
>
> To replicate, use these settings in the activemq.xml
> {code}
> 		<persistenceAdapter>
> 			<mKahaDB directory="${activemq.data}/kahadb">
> 				<filteredPersistenceAdapters>
> 					<filteredKahaDB perDestination="true" >
> 						<persistenceAdapter>
> 							<kahaDB journalMaxFileLength="32mb" />
> 						</persistenceAdapter>
> 					</filteredKahaDB>
> 				</filteredPersistenceAdapters>
> 			</mKahaDB>
> 		</persistenceAdapter>
> {code}
> # Start the broker
> # Create a queue
> #* This will create the queue in the /kahadb folder
> # Delete the queue
> #* The queue is not deleted from the /kahadb folder
> # Stop the broker
> # Start the broker
> This will cause cause the stack trace that is attached.
> To fix this, delete the queue in the /kahadb folder and start the broker.  This allows the broker to start as normal.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (AMQ-3841) mKahaDB causes ArrayIndexOutOfBoundsException on restart after deleting existing queues

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AMQ-3841?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Timothy Bish reassigned AMQ-3841:
---------------------------------

    Assignee: Timothy Bish
    
> mKahaDB causes ArrayIndexOutOfBoundsException on restart after deleting existing queues
> ---------------------------------------------------------------------------------------
>
>                 Key: AMQ-3841
>                 URL: https://issues.apache.org/jira/browse/AMQ-3841
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.6.0
>         Environment: Windows 7, JDK 6
>            Reporter: Matt Altermatt
>            Assignee: Timothy Bish
>             Fix For: 5.7.0
>
>         Attachments: AMQ3841Test.java, output.txt
>
>
> To replicate, use these settings in the activemq.xml
> {code}
> 		<persistenceAdapter>
> 			<mKahaDB directory="${activemq.data}/kahadb">
> 				<filteredPersistenceAdapters>
> 					<filteredKahaDB perDestination="true" >
> 						<persistenceAdapter>
> 							<kahaDB journalMaxFileLength="32mb" />
> 						</persistenceAdapter>
> 					</filteredKahaDB>
> 				</filteredPersistenceAdapters>
> 			</mKahaDB>
> 		</persistenceAdapter>
> {code}
> # Start the broker
> # Create a queue
> #* This will create the queue in the /kahadb folder
> # Delete the queue
> #* The queue is not deleted from the /kahadb folder
> # Stop the broker
> # Start the broker
> This will cause cause the stack trace that is attached.
> To fix this, delete the queue in the /kahadb folder and start the broker.  This allows the broker to start as normal.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (AMQ-3841) mKahaDB causes ArrayIndexOutOfBoundsException on restart after deleting existing queues

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AMQ-3841?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Timothy Bish updated AMQ-3841:
------------------------------

    Attachment: AMQ3841Test.java

Unit test that can reproduce this issue.
                
> mKahaDB causes ArrayIndexOutOfBoundsException on restart after deleting existing queues
> ---------------------------------------------------------------------------------------
>
>                 Key: AMQ-3841
>                 URL: https://issues.apache.org/jira/browse/AMQ-3841
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.6.0
>         Environment: Windows 7, JDK 6
>            Reporter: Matt Altermatt
>         Attachments: AMQ3841Test.java, output.txt
>
>
> To replicate, use these settings in the activemq.xml
> {code}
> 		<persistenceAdapter>
> 			<mKahaDB directory="${activemq.data}/kahadb">
> 				<filteredPersistenceAdapters>
> 					<filteredKahaDB perDestination="true" >
> 						<persistenceAdapter>
> 							<kahaDB journalMaxFileLength="32mb" />
> 						</persistenceAdapter>
> 					</filteredKahaDB>
> 				</filteredPersistenceAdapters>
> 			</mKahaDB>
> 		</persistenceAdapter>
> {code}
> # Start the broker
> # Create a queue
> #* This will create the queue in the /kahadb folder
> # Delete the queue
> #* The queue is not deleted from the /kahadb folder
> # Stop the broker
> # Start the broker
> This will cause cause the stack trace that is attached.
> To fix this, delete the queue in the /kahadb folder and start the broker.  This allows the broker to start as normal.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (AMQ-3841) mKahaDB causes ArrayIndexOutOfBoundsException on restart after deleting existing queues

Posted by "Matt Altermatt (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AMQ-3841?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matt Altermatt updated AMQ-3841:
--------------------------------

    Attachment: output.txt

Stack trace from starting up the broker with a deleted queue.
                
> mKahaDB causes ArrayIndexOutOfBoundsException on restart after deleting existing queues
> ---------------------------------------------------------------------------------------
>
>                 Key: AMQ-3841
>                 URL: https://issues.apache.org/jira/browse/AMQ-3841
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.6.0
>         Environment: Windows 7, JDK 6
>            Reporter: Matt Altermatt
>         Attachments: output.txt
>
>
> To replicate, use these settings in the activemq.xml
> {code}
> 		<persistenceAdapter>
> 			<mKahaDB directory="${activemq.data}/kahadb">
> 				<filteredPersistenceAdapters>
> 					<filteredKahaDB perDestination="true" >
> 						<persistenceAdapter>
> 							<kahaDB journalMaxFileLength="32mb" />
> 						</persistenceAdapter>
> 					</filteredKahaDB>
> 				</filteredPersistenceAdapters>
> 			</mKahaDB>
> 		</persistenceAdapter>
> {code}
> # Start the broker
> # Create a queue
> #* This will create the queue in the /kahadb folder
> # Delete the queue
> #* The queue is not deleted from the /kahadb folder
> # Stop the broker
> # Start the broker
> This will cause cause the stack trace that is attached.
> To fix this, delete the queue in the /kahadb folder and start the broker.  This allows the broker to start as normal.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (AMQ-3841) mKahaDB causes ArrayIndexOutOfBoundsException on restart after deleting existing queues

Posted by "Phillip McCarley (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3841?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13286569#comment-13286569 ] 

Phillip McCarley commented on AMQ-3841:
---------------------------------------

I have one comment on the patch that fixes this issue. The KahaDBStore.getDestinations() method looks as though it would be pretty heavy, performance wise. Should the resultant List be cached instead of retrieved twice, once for .size() and once for .toArray() (lines 321 & 322)?
                
> mKahaDB causes ArrayIndexOutOfBoundsException on restart after deleting existing queues
> ---------------------------------------------------------------------------------------
>
>                 Key: AMQ-3841
>                 URL: https://issues.apache.org/jira/browse/AMQ-3841
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.6.0
>         Environment: Windows 7, JDK 6
>            Reporter: Matt Altermatt
>            Assignee: Timothy Bish
>             Fix For: 5.7.0
>
>         Attachments: AMQ3841Test.java, output.txt
>
>
> To replicate, use these settings in the activemq.xml
> {code}
> 		<persistenceAdapter>
> 			<mKahaDB directory="${activemq.data}/kahadb">
> 				<filteredPersistenceAdapters>
> 					<filteredKahaDB perDestination="true" >
> 						<persistenceAdapter>
> 							<kahaDB journalMaxFileLength="32mb" />
> 						</persistenceAdapter>
> 					</filteredKahaDB>
> 				</filteredPersistenceAdapters>
> 			</mKahaDB>
> 		</persistenceAdapter>
> {code}
> # Start the broker
> # Create a queue
> #* This will create the queue in the /kahadb folder
> # Delete the queue
> #* The queue is not deleted from the /kahadb folder
> # Stop the broker
> # Start the broker
> This will cause cause the stack trace that is attached.
> To fix this, delete the queue in the /kahadb folder and start the broker.  This allows the broker to start as normal.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (AMQ-3841) mKahaDB causes ArrayIndexOutOfBoundsException on restart after deleting existing queues

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AMQ-3841?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Timothy Bish resolved AMQ-3841.
-------------------------------

       Resolution: Fixed
    Fix Version/s: 5.7.0

Fixed in trunk test updated to show that a destination can be removed and then later re-added without issue.
                
> mKahaDB causes ArrayIndexOutOfBoundsException on restart after deleting existing queues
> ---------------------------------------------------------------------------------------
>
>                 Key: AMQ-3841
>                 URL: https://issues.apache.org/jira/browse/AMQ-3841
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.6.0
>         Environment: Windows 7, JDK 6
>            Reporter: Matt Altermatt
>             Fix For: 5.7.0
>
>         Attachments: AMQ3841Test.java, output.txt
>
>
> To replicate, use these settings in the activemq.xml
> {code}
> 		<persistenceAdapter>
> 			<mKahaDB directory="${activemq.data}/kahadb">
> 				<filteredPersistenceAdapters>
> 					<filteredKahaDB perDestination="true" >
> 						<persistenceAdapter>
> 							<kahaDB journalMaxFileLength="32mb" />
> 						</persistenceAdapter>
> 					</filteredKahaDB>
> 				</filteredPersistenceAdapters>
> 			</mKahaDB>
> 		</persistenceAdapter>
> {code}
> # Start the broker
> # Create a queue
> #* This will create the queue in the /kahadb folder
> # Delete the queue
> #* The queue is not deleted from the /kahadb folder
> # Stop the broker
> # Start the broker
> This will cause cause the stack trace that is attached.
> To fix this, delete the queue in the /kahadb folder and start the broker.  This allows the broker to start as normal.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira