You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Phillip McCarley (JIRA)" <ji...@apache.org> on 2012/05/31 02:30:22 UTC

[jira] [Created] (AMQ-3870) ArrayIndexOutOfBoundsException when using Multi kahaDB (mKahaDB) adapter, per-destination adapters and Topics

Phillip McCarley created AMQ-3870:
-------------------------------------

             Summary: ArrayIndexOutOfBoundsException when using Multi kahaDB (mKahaDB) adapter, per-destination adapters and Topics
                 Key: AMQ-3870
                 URL: https://issues.apache.org/jira/browse/AMQ-3870
             Project: ActiveMQ
          Issue Type: Bug
          Components: Message Store
    Affects Versions: 5.6.0
         Environment: Java v1.6.0_21
Windows XP SP3
            Reporter: Phillip McCarley


Steps to reproduce the issue:

- Unpack clean "apache-activemq-5.6.0-bin.zip" to local drive.
- Change the default configuration to use the mKahaDB adapter and per-destination instances (exactly as given at http://activemq.apache.org/kahadb.html in the very last config snippet). See also attached activemq.xml
- Start up ActiveMQ from bin/activemq.bat
- Run a small test program that simply creates a Topic and attempts to consume (that main point here is that the Topic is created and due to "per-destination" mKahaDB, a folder is created in the data directory specifically for this Topic.
- Shutdown ActiveMQ normally.
- Restart ActiveMQ normally, and the ArrayIndexOutOfBoundsException will be thrown. (see attached activemq.log)


I have done some investigation and it seems that on restart when it is attempting to "registerExistingAdapter", it wants to register each adapter with one of the destinations (the first in fact) that each adapter applies to (adapter.getDestinations()...[0]). However, in getDestinations(), empty topics get filtered out of the return value, and since we are using per-destination="true" there can be adapters for topics only and so a chance that getDestinations() returns an empty List. Hence causing the Exception when trying to access the first destination from that list.


The reason that I haven't gone further, to supply a patch, is that I am unsure of what would be an appropriate way to register these adapters, or if you could leave them and not register them anyway, since they are empty topics.

Note, that if you extend the configuration of the mKahaDB adapter to provide an explicit adapter for all topics, then the issue goes away. (see commented part of mKahaDB config in activemq.xml attached)


--
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-3870) ArrayIndexOutOfBoundsException when using Multi kahaDB (mKahaDB) adapter, per-destination adapters and Topics

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

Phillip McCarley updated AMQ-3870:
----------------------------------

    Attachment: TopicConsumer.java
    
> ArrayIndexOutOfBoundsException when using Multi kahaDB (mKahaDB) adapter, per-destination adapters and Topics
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: AMQ-3870
>                 URL: https://issues.apache.org/jira/browse/AMQ-3870
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Message Store
>    Affects Versions: 5.6.0
>         Environment: Java v1.6.0_21
> Windows XP SP3
>            Reporter: Phillip McCarley
>         Attachments: TopicConsumer.java, activemq.log, activemq.xml
>
>
> Steps to reproduce the issue:
> - Unpack clean "apache-activemq-5.6.0-bin.zip" to local drive.
> - Change the default configuration to use the mKahaDB adapter and per-destination instances (exactly as given at http://activemq.apache.org/kahadb.html in the very last config snippet). See also attached activemq.xml
> - Start up ActiveMQ from bin/activemq.bat
> - Run a small test program that simply creates a Topic and attempts to consume (that main point here is that the Topic is created and due to "per-destination" mKahaDB, a folder is created in the data directory specifically for this Topic.
> - Shutdown ActiveMQ normally.
> - Restart ActiveMQ normally, and the ArrayIndexOutOfBoundsException will be thrown. (see attached activemq.log)
> I have done some investigation and it seems that on restart when it is attempting to "registerExistingAdapter", it wants to register each adapter with one of the destinations (the first in fact) that each adapter applies to (adapter.getDestinations()...[0]). However, in getDestinations(), empty topics get filtered out of the return value, and since we are using per-destination="true" there can be adapters for topics only and so a chance that getDestinations() returns an empty List. Hence causing the Exception when trying to access the first destination from that list.
> The reason that I haven't gone further, to supply a patch, is that I am unsure of what would be an appropriate way to register these adapters, or if you could leave them and not register them anyway, since they are empty topics.
> Note, that if you extend the configuration of the mKahaDB adapter to provide an explicit adapter for all topics, then the issue goes away. (see commented part of mKahaDB config in activemq.xml attached)

--
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-3870) ArrayIndexOutOfBoundsException when using Multi kahaDB (mKahaDB) adapter, per-destination adapters and Topics

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

Phillip McCarley updated AMQ-3870:
----------------------------------

    Attachment: activemq.xml
    
> ArrayIndexOutOfBoundsException when using Multi kahaDB (mKahaDB) adapter, per-destination adapters and Topics
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: AMQ-3870
>                 URL: https://issues.apache.org/jira/browse/AMQ-3870
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Message Store
>    Affects Versions: 5.6.0
>         Environment: Java v1.6.0_21
> Windows XP SP3
>            Reporter: Phillip McCarley
>         Attachments: TopicConsumer.java, activemq.log, activemq.xml
>
>
> Steps to reproduce the issue:
> - Unpack clean "apache-activemq-5.6.0-bin.zip" to local drive.
> - Change the default configuration to use the mKahaDB adapter and per-destination instances (exactly as given at http://activemq.apache.org/kahadb.html in the very last config snippet). See also attached activemq.xml
> - Start up ActiveMQ from bin/activemq.bat
> - Run a small test program that simply creates a Topic and attempts to consume (that main point here is that the Topic is created and due to "per-destination" mKahaDB, a folder is created in the data directory specifically for this Topic.
> - Shutdown ActiveMQ normally.
> - Restart ActiveMQ normally, and the ArrayIndexOutOfBoundsException will be thrown. (see attached activemq.log)
> I have done some investigation and it seems that on restart when it is attempting to "registerExistingAdapter", it wants to register each adapter with one of the destinations (the first in fact) that each adapter applies to (adapter.getDestinations()...[0]). However, in getDestinations(), empty topics get filtered out of the return value, and since we are using per-destination="true" there can be adapters for topics only and so a chance that getDestinations() returns an empty List. Hence causing the Exception when trying to access the first destination from that list.
> The reason that I haven't gone further, to supply a patch, is that I am unsure of what would be an appropriate way to register these adapters, or if you could leave them and not register them anyway, since they are empty topics.
> Note, that if you extend the configuration of the mKahaDB adapter to provide an explicit adapter for all topics, then the issue goes away. (see commented part of mKahaDB config in activemq.xml attached)

--
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-3870) ArrayIndexOutOfBoundsException when using Multi kahaDB (mKahaDB) adapter, per-destination adapters and Topics

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

Phillip McCarley commented on AMQ-3870:
---------------------------------------

Thanks for that, I did search for other issues with "ArrayIndexOutOfBoundsException" but I somehow missed AMQ-3841. I have looked over the patch for that and I have a comment which I will leave under that issue.
                
> ArrayIndexOutOfBoundsException when using Multi kahaDB (mKahaDB) adapter, per-destination adapters and Topics
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: AMQ-3870
>                 URL: https://issues.apache.org/jira/browse/AMQ-3870
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Message Store
>    Affects Versions: 5.6.0
>         Environment: Java v1.6.0_21
> Windows XP SP3
>            Reporter: Phillip McCarley
>             Fix For: 5.7.0
>
>         Attachments: TopicConsumer.java, activemq.log, activemq.xml
>
>
> Steps to reproduce the issue:
> - Unpack clean "apache-activemq-5.6.0-bin.zip" to local drive.
> - Change the default configuration to use the mKahaDB adapter and per-destination instances (exactly as given at http://activemq.apache.org/kahadb.html in the very last config snippet). See also attached activemq.xml
> - Start up ActiveMQ from bin/activemq.bat
> - Run a small test program that simply creates a Topic and attempts to consume (that main point here is that the Topic is created and due to "per-destination" mKahaDB, a folder is created in the data directory specifically for this Topic.
> - Shutdown ActiveMQ normally.
> - Restart ActiveMQ normally, and the ArrayIndexOutOfBoundsException will be thrown. (see attached activemq.log)
> I have done some investigation and it seems that on restart when it is attempting to "registerExistingAdapter", it wants to register each adapter with one of the destinations (the first in fact) that each adapter applies to (adapter.getDestinations()...[0]). However, in getDestinations(), empty topics get filtered out of the return value, and since we are using per-destination="true" there can be adapters for topics only and so a chance that getDestinations() returns an empty List. Hence causing the Exception when trying to access the first destination from that list.
> The reason that I haven't gone further, to supply a patch, is that I am unsure of what would be an appropriate way to register these adapters, or if you could leave them and not register them anyway, since they are empty topics.
> Note, that if you extend the configuration of the mKahaDB adapter to provide an explicit adapter for all topics, then the issue goes away. (see commented part of mKahaDB config in activemq.xml attached)

--
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] [Closed] (AMQ-3870) ArrayIndexOutOfBoundsException when using Multi kahaDB (mKahaDB) adapter, per-destination adapters and Topics

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

Timothy Bish closed AMQ-3870.
-----------------------------

       Resolution: Duplicate
    Fix Version/s: 5.7.0

Duplicate of AMQ-3841 which has been resolved.
                
> ArrayIndexOutOfBoundsException when using Multi kahaDB (mKahaDB) adapter, per-destination adapters and Topics
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: AMQ-3870
>                 URL: https://issues.apache.org/jira/browse/AMQ-3870
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Message Store
>    Affects Versions: 5.6.0
>         Environment: Java v1.6.0_21
> Windows XP SP3
>            Reporter: Phillip McCarley
>             Fix For: 5.7.0
>
>         Attachments: TopicConsumer.java, activemq.log, activemq.xml
>
>
> Steps to reproduce the issue:
> - Unpack clean "apache-activemq-5.6.0-bin.zip" to local drive.
> - Change the default configuration to use the mKahaDB adapter and per-destination instances (exactly as given at http://activemq.apache.org/kahadb.html in the very last config snippet). See also attached activemq.xml
> - Start up ActiveMQ from bin/activemq.bat
> - Run a small test program that simply creates a Topic and attempts to consume (that main point here is that the Topic is created and due to "per-destination" mKahaDB, a folder is created in the data directory specifically for this Topic.
> - Shutdown ActiveMQ normally.
> - Restart ActiveMQ normally, and the ArrayIndexOutOfBoundsException will be thrown. (see attached activemq.log)
> I have done some investigation and it seems that on restart when it is attempting to "registerExistingAdapter", it wants to register each adapter with one of the destinations (the first in fact) that each adapter applies to (adapter.getDestinations()...[0]). However, in getDestinations(), empty topics get filtered out of the return value, and since we are using per-destination="true" there can be adapters for topics only and so a chance that getDestinations() returns an empty List. Hence causing the Exception when trying to access the first destination from that list.
> The reason that I haven't gone further, to supply a patch, is that I am unsure of what would be an appropriate way to register these adapters, or if you could leave them and not register them anyway, since they are empty topics.
> Note, that if you extend the configuration of the mKahaDB adapter to provide an explicit adapter for all topics, then the issue goes away. (see commented part of mKahaDB config in activemq.xml attached)

--
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-3870) ArrayIndexOutOfBoundsException when using Multi kahaDB (mKahaDB) adapter, per-destination adapters and Topics

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

Phillip McCarley updated AMQ-3870:
----------------------------------

    Attachment: activemq.log
    
> ArrayIndexOutOfBoundsException when using Multi kahaDB (mKahaDB) adapter, per-destination adapters and Topics
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: AMQ-3870
>                 URL: https://issues.apache.org/jira/browse/AMQ-3870
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Message Store
>    Affects Versions: 5.6.0
>         Environment: Java v1.6.0_21
> Windows XP SP3
>            Reporter: Phillip McCarley
>         Attachments: TopicConsumer.java, activemq.log, activemq.xml
>
>
> Steps to reproduce the issue:
> - Unpack clean "apache-activemq-5.6.0-bin.zip" to local drive.
> - Change the default configuration to use the mKahaDB adapter and per-destination instances (exactly as given at http://activemq.apache.org/kahadb.html in the very last config snippet). See also attached activemq.xml
> - Start up ActiveMQ from bin/activemq.bat
> - Run a small test program that simply creates a Topic and attempts to consume (that main point here is that the Topic is created and due to "per-destination" mKahaDB, a folder is created in the data directory specifically for this Topic.
> - Shutdown ActiveMQ normally.
> - Restart ActiveMQ normally, and the ArrayIndexOutOfBoundsException will be thrown. (see attached activemq.log)
> I have done some investigation and it seems that on restart when it is attempting to "registerExistingAdapter", it wants to register each adapter with one of the destinations (the first in fact) that each adapter applies to (adapter.getDestinations()...[0]). However, in getDestinations(), empty topics get filtered out of the return value, and since we are using per-destination="true" there can be adapters for topics only and so a chance that getDestinations() returns an empty List. Hence causing the Exception when trying to access the first destination from that list.
> The reason that I haven't gone further, to supply a patch, is that I am unsure of what would be an appropriate way to register these adapters, or if you could leave them and not register them anyway, since they are empty topics.
> Note, that if you extend the configuration of the mKahaDB adapter to provide an explicit adapter for all topics, then the issue goes away. (see commented part of mKahaDB config in activemq.xml attached)

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