You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Han Hong Fang (JIRA)" <ji...@apache.org> on 2011/07/14 05:16:00 UTC

[jira] [Created] (KARAF-735) java.util.NoSuchElementException if issue the first command as an empty command

java.util.NoSuchElementException if issue the first command as an empty command
-------------------------------------------------------------------------------

                 Key: KARAF-735
                 URL: https://issues.apache.org/jira/browse/KARAF-735
             Project: Karaf
          Issue Type: Bug
          Components: karaf-shell
    Affects Versions: 2.2.2, 2.2.1
         Environment: WinXP SP3 English
            Reporter: Han Hong Fang


Steps to reproduce the problem.

1. downlaod apache-karaf-2.2.1.zip
2. extract it to folderA
3. go into the folderA\bin
4. issue karaf.bat
5. press enter and you get java.util.NoSuchElementException

BTW: The exception disappears after any non-empty command like "list" being issued.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (KARAF-735) java.util.NoSuchElementException if issue the first command as an empty command

Posted by "Freeman Fang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/KARAF-735?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13065050#comment-13065050 ] 

Freeman Fang commented on KARAF-735:
------------------------------------

Hi,

Yeah, I can also reproduce it from my mac if I remove the .karaf/karaf.history(this is the cache for the history karaf command),  I will fix it up soon.

Freeman

> java.util.NoSuchElementException if issue the first command as an empty command
> -------------------------------------------------------------------------------
>
>                 Key: KARAF-735
>                 URL: https://issues.apache.org/jira/browse/KARAF-735
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-shell
>    Affects Versions: 2.2.1, 2.2.2
>         Environment: WinXP SP3 English
>            Reporter: Han Hong Fang
>         Attachments: karaf-735.patch
>
>
> Steps to reproduce the problem.
> 1. downlaod apache-karaf-2.2.1.zip
> 2. extract it to folderA
> 3. go into the folderA\bin
> 4. issue karaf.bat
> 5. press enter and you get java.util.NoSuchElementException
> BTW: The exception disappears after any non-empty command like "list" being issued.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (KARAF-735) java.util.NoSuchElementException if issue the first command as an empty command

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

Freeman Fang reassigned KARAF-735:
----------------------------------

    Assignee: Freeman Fang

> java.util.NoSuchElementException if issue the first command as an empty command
> -------------------------------------------------------------------------------
>
>                 Key: KARAF-735
>                 URL: https://issues.apache.org/jira/browse/KARAF-735
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-shell
>    Affects Versions: 2.2.1, 2.2.2
>         Environment: WinXP SP3 English
>            Reporter: Han Hong Fang
>            Assignee: Freeman Fang
>         Attachments: karaf-735.patch
>
>
> Steps to reproduce the problem.
> 1. downlaod apache-karaf-2.2.1.zip
> 2. extract it to folderA
> 3. go into the folderA\bin
> 4. issue karaf.bat
> 5. press enter and you get java.util.NoSuchElementException
> BTW: The exception disappears after any non-empty command like "list" being issued.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (KARAF-735) java.util.NoSuchElementException if issue the first command as an empty command

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

Freeman Fang resolved KARAF-735.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 3.0.0
                   2.2.3

apply patch on behalf of Han Hong Fang with thanks
http://svn.apache.org/viewvc?rev=1146572&view=rev for trunk
http://svn.apache.org/viewvc?rev=1146571&view=rev for 2.2.x branch

> java.util.NoSuchElementException if issue the first command as an empty command
> -------------------------------------------------------------------------------
>
>                 Key: KARAF-735
>                 URL: https://issues.apache.org/jira/browse/KARAF-735
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-shell
>    Affects Versions: 2.2.1, 2.2.2
>         Environment: WinXP SP3 English
>            Reporter: Han Hong Fang
>            Assignee: Freeman Fang
>             Fix For: 2.2.3, 3.0.0
>
>         Attachments: karaf-735.patch
>
>
> Steps to reproduce the problem.
> 1. downlaod apache-karaf-2.2.1.zip
> 2. extract it to folderA
> 3. go into the folderA\bin
> 4. issue karaf.bat
> 5. press enter and you get java.util.NoSuchElementException
> BTW: The exception disappears after any non-empty command like "list" being issued.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Closed] (KARAF-735) java.util.NoSuchElementException if issue the first command as an empty command

Posted by "Jamie goodyear (Closed) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/KARAF-735?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jamie goodyear closed KARAF-735.
--------------------------------

    
> java.util.NoSuchElementException if issue the first command as an empty command
> -------------------------------------------------------------------------------
>
>                 Key: KARAF-735
>                 URL: https://issues.apache.org/jira/browse/KARAF-735
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-shell
>    Affects Versions: 2.2.1, 2.2.2
>         Environment: WinXP SP3 English
>            Reporter: Han Hong Fang
>            Assignee: Freeman Fang
>             Fix For: 2.2.3, 3.0.0
>
>         Attachments: karaf-735.patch
>
>
> Steps to reproduce the problem.
> 1. downlaod apache-karaf-2.2.1.zip
> 2. extract it to folderA
> 3. go into the folderA\bin
> 4. issue karaf.bat
> 5. press enter and you get java.util.NoSuchElementException
> BTW: The exception disappears after any non-empty command like "list" being issued.

--
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] (KARAF-735) java.util.NoSuchElementException if issue the first command as an empty command

Posted by "Han Hong Fang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/KARAF-735?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Han Hong Fang updated KARAF-735:
--------------------------------

    Attachment: karaf-735.patch

Attached the patch for this issue.

> java.util.NoSuchElementException if issue the first command as an empty command
> -------------------------------------------------------------------------------
>
>                 Key: KARAF-735
>                 URL: https://issues.apache.org/jira/browse/KARAF-735
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-shell
>    Affects Versions: 2.2.1, 2.2.2
>         Environment: WinXP SP3 English
>            Reporter: Han Hong Fang
>         Attachments: karaf-735.patch
>
>
> Steps to reproduce the problem.
> 1. downlaod apache-karaf-2.2.1.zip
> 2. extract it to folderA
> 3. go into the folderA\bin
> 4. issue karaf.bat
> 5. press enter and you get java.util.NoSuchElementException
> BTW: The exception disappears after any non-empty command like "list" being issued.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (KARAF-735) java.util.NoSuchElementException if issue the first command as an empty command

Posted by "Freeman Fang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/KARAF-735?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13065027#comment-13065027 ] 

Freeman Fang commented on KARAF-735:
------------------------------------

Hi,

My gut feeling is it's related to the discussion here[1], you probably miss dll from Visual C++ libraries on the windows XP.

Could you take a look at [1] and verify if you're in this case?

[1]http://fusesource.com/forums/thread.jspa?messageID=10985&#10985

Freeman

> java.util.NoSuchElementException if issue the first command as an empty command
> -------------------------------------------------------------------------------
>
>                 Key: KARAF-735
>                 URL: https://issues.apache.org/jira/browse/KARAF-735
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-shell
>    Affects Versions: 2.2.1, 2.2.2
>         Environment: WinXP SP3 English
>            Reporter: Han Hong Fang
>
> Steps to reproduce the problem.
> 1. downlaod apache-karaf-2.2.1.zip
> 2. extract it to folderA
> 3. go into the folderA\bin
> 4. issue karaf.bat
> 5. press enter and you get java.util.NoSuchElementException
> BTW: The exception disappears after any non-empty command like "list" being issued.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (KARAF-735) java.util.NoSuchElementException if issue the first command as an empty command

Posted by "Han Hong Fang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/KARAF-735?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13065037#comment-13065037 ] 

Han Hong Fang commented on KARAF-735:
-------------------------------------

The problem only occurs if the FIRST command is EMPTY. Meanwhile, the problem will disappear once a non-empty command has been issued.

Karaf works well if you issue non-empty command firstly. So I guess it is non-related with the VC libraries.

I look into the karaf code. In org.apache.karaf.shell.console.jline.Cosole.run() method, the problem occurs here: reader.getHistory().replace(command); when the first command is empty, history is with size 0, but replace() tries to remove the last item which leads to java.util.NoSuchElementException.

> java.util.NoSuchElementException if issue the first command as an empty command
> -------------------------------------------------------------------------------
>
>                 Key: KARAF-735
>                 URL: https://issues.apache.org/jira/browse/KARAF-735
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-shell
>    Affects Versions: 2.2.1, 2.2.2
>         Environment: WinXP SP3 English
>            Reporter: Han Hong Fang
>
> Steps to reproduce the problem.
> 1. downlaod apache-karaf-2.2.1.zip
> 2. extract it to folderA
> 3. go into the folderA\bin
> 4. issue karaf.bat
> 5. press enter and you get java.util.NoSuchElementException
> BTW: The exception disappears after any non-empty command like "list" being issued.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira