You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Jean-Baptiste Onofré (Jira)" <ji...@apache.org> on 2020/10/09 03:41:00 UTC

[jira] [Deleted] (KARAF-4950) jdbc:query Error executing command: String index out of range: -1

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

Jean-Baptiste Onofré deleted KARAF-4950:
----------------------------------------


> jdbc:query Error executing command: String index out of range: -1
> -----------------------------------------------------------------
>
>                 Key: KARAF-4950
>                 URL: https://issues.apache.org/jira/browse/KARAF-4950
>             Project: Karaf
>          Issue Type: Bug
>            Reporter: Jirka
>            Assignee: Jean-Baptiste Onofré
>            Priority: Minor
>
> When entering in the console
> {code}
> jdbc:query myDB select name from my_table
> {code}
> this error is displayed:
> {code}
> Error executing command: String index out of range: -1
> {code}
> It seems to happen only when only 1 column is selected and the column is of type VARCHAR.
> log
> {code}
> karaf@root()> display
> 2017-01-19 17:00:08,137 | ERROR | nsole user karaf | ShellUtil                        | 44 - org.apache.karaf.shell.core - 4.0.5 | Exception caught while executing command
> java.lang.StringIndexOutOfBoundsException: String index out of range: -1
>         at java.lang.AbstractStringBuilder.charAt(AbstractStringBuilder.java:237)[:1.8.0_112]
>         at java.lang.StringBuilder.charAt(StringBuilder.java:76)[:1.8.0_112]
>         at org.apache.karaf.shell.support.table.Row.getContent(Row.java:80)[44:org.apache.karaf.shell.core:4.0.5]
>         at org.apache.karaf.shell.support.table.ShellTable.print(ShellTable.java:111)[44:org.apache.karaf.shell.core:4.0.5]
>         at org.apache.karaf.shell.support.table.ShellTable.print(ShellTable.java:80)[44:org.apache.karaf.shell.core:4.0.5]
>         at org.apache.karaf.jdbc.command.QueryCommand.execute(QueryCommand.java:64)[151:org.apache.karaf.jdbc.core:4.0.5]
>         at org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:83)[44:org.apache.karaf.shell.core:4.0.5]
>         at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:67)[44:org.apache.karaf.shell.core:4.0.5]
>         at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:87)[44:org.apache.karaf.shell.core:4.0.5]
>         at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:480)[44:org.apache.karaf.shell.core:4.0.5]
>         at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:406)[44:org.apache.karaf.shell.core:4.0.5]
>         at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[44:org.apache.karaf.shell.core:4.0.5]
>         at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:182)[44:org.apache.karaf.shell.core:4.0.5]
>         at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:119)[44:org.apache.karaf.shell.core:4.0.5]
>         at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:94)[44:org.apache.karaf.shell.core:4.0.5]
>         at org.apache.karaf.shell.impl.console.ConsoleSessionImpl.run(ConsoleSessionImpl.java:270)[44:org.apache.karaf.shell.core:4.0.5]
>         at java.lang.Thread.run(Thread.java:745)[:1.8.0_112]
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)