You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Krzysztof Sobkowiak <kr...@gmail.com> on 2014/01/17 20:41:40 UTC
The completer of jdbc:delete shows jndi names
Hi
I have created a derby data source using
karaf@root()> jdbc:create -t derby -u test -i test
karaf@root()> jdbc:create -t derby -u test -i test1
karaf@root()> jdbc:datasources
Name | Product | Version | URL
------------------------------------------------------------------
/jdbc/test | Apache Derby | 10.8.2.2 - (1181258) | jdbc:derby:test
/jdbc/test1 | Apache Derby | 10.8.2.2 - (1181258) | jdbc:derby:test1
When I try to delete the data source using jdbc:delete, the completer
shows me the available data sources as jndi names
karaf@root()> jdbc:delete /jdbc/test
/jdbc/test /jdbc/test1
But che command does not accept the jndi names only names used when
creating the data source
karaf@root()> jdbc:delete /jdbc/test
Error executing command: The JDBC datasource file
/home/kso/work/projects/asf/karaf/assemblies/apache-karaf/target/apache-karaf-3.0.1-SNAPSHOT/deploy/datasource-/jdbc/test.xml
doesn't exist
karaf@root()> jdbc:delete test
The completer should display the names or the command should be able to
handle correctly the jndi name.
Regards
Krzysztof
--
Krzysztof Sobkowiak
JEE & OSS Architect | Technical Architect @ Capgemini
Capgemini <http://www.pl.capgemini.com/> | Software Solutions Center
<http://www.pl.capgemini-sdm.com/> | Wroclaw
e-mail: krzys.sobkowiak@gmail.com <ma...@gmail.com> |
Twitter: @KSobkowiak
Re: The completer of jdbc:delete shows jndi names
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Krzysztof
You are right, and it's explained in the documentation.
I forgot to change this.
Thanks for the reminder.
Regards
JB
On 01/17/2014 08:41 PM, Krzysztof Sobkowiak wrote:
> Hi
>
> I have created a derby data source using
>
> karaf@root()> jdbc:create -t derby -u test -i test
> karaf@root()> jdbc:create -t derby -u test -i test1
>
> karaf@root()> jdbc:datasources
> Name | Product | Version | URL
> ------------------------------------------------------------------
> /jdbc/test | Apache Derby | 10.8.2.2 - (1181258) | jdbc:derby:test
> /jdbc/test1 | Apache Derby | 10.8.2.2 - (1181258) | jdbc:derby:test1
>
>
> When I try to delete the data source using jdbc:delete, the completer
> shows me the available data sources as jndi names
>
> karaf@root()> jdbc:delete /jdbc/test
> /jdbc/test /jdbc/test1
>
> But che command does not accept the jndi names only names used when
> creating the data source
>
> karaf@root()> jdbc:delete /jdbc/test
> Error executing command: The JDBC datasource file
> /home/kso/work/projects/asf/karaf/assemblies/apache-karaf/target/apache-karaf-3.0.1-SNAPSHOT/deploy/datasource-/jdbc/test.xml
> doesn't exist
>
> karaf@root()> jdbc:delete test
>
> The completer should display the names or the command should be able to
> handle correctly the jndi name.
>
> Regards
> Krzysztof
>
> --
> Krzysztof Sobkowiak
>
> JEE & OSS Architect | Technical Architect @ Capgemini
> Capgemini <http://www.pl.capgemini.com/> | Software Solutions Center
> <http://www.pl.capgemini-sdm.com/> | Wroclaw
> e-mail: krzys.sobkowiak@gmail.com <ma...@gmail.com> |
> Twitter: @KSobkowiak
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com
Re: The completer of jdbc:delete shows jndi names
Posted by Krzysztof Sobkowiak <kr...@gmail.com>.
I have attached a patch
(https://issues.apache.org/jira/secure/attachment/12623745/0001-KARAF-2692.patch)
which extends the JdbcService with a method datasourceFiles which
returns the names of all deployed datasource files (with the pattern
datasource-<name>.xml). The new completer retrieves from each file name
the <name> part and provides it for the StringCompleter.
karaf@root()> jdbc:datasources
Name | Product | Version | URL
--------------------------------------------------------------------
/jdbc/test2 | Apache Derby | 10.8.2.2 - (1181258) | jdbc:derby:test2
/jdbc/test3 | Apache Derby | 10.8.2.2 - (1181258) | jdbc:derby:test3
/jdbc/test1 | Apache Derby | 10.8.2.2 - (1181258) | jdbc:derby:test1
karaf@root()>
karaf@root()> jdbc:delete test
test1 test2 test3
karaf@root()> jdbc:delete test3
karaf@root()> jdbc:datasources
Name | Product | Version | URL
--------------------------------------------------------------------
/jdbc/test2 | Apache Derby | 10.8.2.2 - (1181258) | jdbc:derby:test2
/jdbc/test1 | Apache Derby | 10.8.2.2 - (1181258) | jdbc:derby:test1
Regards
Krzysztof
On 17.01.2014 21:06, Krzysztof Sobkowiak wrote:
> I have filled https://issues.apache.org/jira/browse/KARAF-2692 for
> this issue
>
> On 17.01.2014 20:41, Krzysztof Sobkowiak wrote:
>> Hi
>>
>> I have created a derby data source using
>>
>> karaf@root()> jdbc:create -t derby -u test -i test
>> karaf@root()> jdbc:create -t derby -u test -i test1
>>
>> karaf@root()> jdbc:datasources
>> Name | Product | Version | URL
>> ------------------------------------------------------------------
>> /jdbc/test | Apache Derby | 10.8.2.2 - (1181258) | jdbc:derby:test
>> /jdbc/test1 | Apache Derby | 10.8.2.2 - (1181258) | jdbc:derby:test1
>>
>>
>> When I try to delete the data source using jdbc:delete, the completer
>> shows me the available data sources as jndi names
>>
>> karaf@root()> jdbc:delete /jdbc/test
>> /jdbc/test /jdbc/test1
>>
>> But che command does not accept the jndi names only names used when
>> creating the data source
>>
>> karaf@root()> jdbc:delete /jdbc/test
>> Error executing command: The JDBC datasource file
>> /home/kso/work/projects/asf/karaf/assemblies/apache-karaf/target/apache-karaf-3.0.1-SNAPSHOT/deploy/datasource-/jdbc/test.xml
>> doesn't exist
>>
>> karaf@root()> jdbc:delete test
>>
>> The completer should display the names or the command should be able
>> to handle correctly the jndi name.
>>
>> Regards
>> Krzysztof
>>
>> --
>> Krzysztof Sobkowiak
>>
>> JEE & OSS Architect | Technical Architect @ Capgemini
>> Capgemini <http://www.pl.capgemini.com/> | Software Solutions Center
>> <http://www.pl.capgemini-sdm.com/> | Wroclaw
>> e-mail: krzys.sobkowiak@gmail.com <ma...@gmail.com>
>> | Twitter: @KSobkowiak
>
>
> --
> Krzysztof Sobkowiak
>
> JEE & OSS Architect | Technical Architect @ Capgemini
> Capgemini <http://www.pl.capgemini.com/> | Software Solutions Center
> <http://www.pl.capgemini-sdm.com/> | Wroclaw
> e-mail: krzys.sobkowiak@gmail.com <ma...@gmail.com> |
> Twitter: @KSobkowiak
--
Krzysztof Sobkowiak
JEE & OSS Architect | Technical Architect @ Capgemini
Capgemini <http://www.pl.capgemini.com/> | Software Solutions Center
<http://www.pl.capgemini-sdm.com/> | Wroclaw
e-mail: krzys.sobkowiak@gmail.com <ma...@gmail.com> |
Twitter: @KSobkowiak
Re: The completer of jdbc:delete shows jndi names
Posted by Krzysztof Sobkowiak <kr...@gmail.com>.
I have filled https://issues.apache.org/jira/browse/KARAF-2692 for this
issue
On 17.01.2014 20:41, Krzysztof Sobkowiak wrote:
> Hi
>
> I have created a derby data source using
>
> karaf@root()> jdbc:create -t derby -u test -i test
> karaf@root()> jdbc:create -t derby -u test -i test1
>
> karaf@root()> jdbc:datasources
> Name | Product | Version | URL
> ------------------------------------------------------------------
> /jdbc/test | Apache Derby | 10.8.2.2 - (1181258) | jdbc:derby:test
> /jdbc/test1 | Apache Derby | 10.8.2.2 - (1181258) | jdbc:derby:test1
>
>
> When I try to delete the data source using jdbc:delete, the completer
> shows me the available data sources as jndi names
>
> karaf@root()> jdbc:delete /jdbc/test
> /jdbc/test /jdbc/test1
>
> But che command does not accept the jndi names only names used when
> creating the data source
>
> karaf@root()> jdbc:delete /jdbc/test
> Error executing command: The JDBC datasource file
> /home/kso/work/projects/asf/karaf/assemblies/apache-karaf/target/apache-karaf-3.0.1-SNAPSHOT/deploy/datasource-/jdbc/test.xml
> doesn't exist
>
> karaf@root()> jdbc:delete test
>
> The completer should display the names or the command should be able
> to handle correctly the jndi name.
>
> Regards
> Krzysztof
>
> --
> Krzysztof Sobkowiak
>
> JEE & OSS Architect | Technical Architect @ Capgemini
> Capgemini <http://www.pl.capgemini.com/> | Software Solutions Center
> <http://www.pl.capgemini-sdm.com/> | Wroclaw
> e-mail: krzys.sobkowiak@gmail.com <ma...@gmail.com> |
> Twitter: @KSobkowiak
--
Krzysztof Sobkowiak
JEE & OSS Architect | Technical Architect @ Capgemini
Capgemini <http://www.pl.capgemini.com/> | Software Solutions Center
<http://www.pl.capgemini-sdm.com/> | Wroclaw
e-mail: krzys.sobkowiak@gmail.com <ma...@gmail.com> |
Twitter: @KSobkowiak