You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by conejo <lo...@gmail.com> on 2016/06/14 15:02:44 UTC

Karaf 4.0.5 jdbc-config

I have an installation of karaf 4.0.5.
I create the file etc/org.ops4j.datasource-myDS with the following
information:

url = jdbc:h2:file:./db/myDatabase
dataSourceName = myDS
osgi.jdbc.driver.name = H2-pool-xa

The result is that two javax.sql.DataSource services are created with the
same name = myDS osgi.jndi.service.name=myDS

If I create the datasource manually does not occur:
jdbc: ds-create -dn H2-pool-xa -url jdbc:h2:file:./db/myDatabase myDs

Can you help?
Thank you.



--
View this message in context: http://karaf.922171.n3.nabble.com/Karaf-4-0-5-jdbc-config-tp4046858.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Karaf 4.0.5 jdbc-config

Posted by Christian Schneider <ch...@die-schneider.net>.
That sounds a bit strange. Maybe you ended up with two configurations that
then create two DataSources.
It could be because the config as ManagedServiceFactory. I think the config
admin support in features is not compatible with it.

Christian

2016-06-15 8:13 GMT+02:00 conejo <lo...@gmail.com>:

> I have solved the problem as follows:
> 1. I am using my own assembly.
> 2. It seems the problem that I comment occurs if I include the
> configuration
> file datasource in my feature.
> 3. I removed the file of the feature and I put it directly in the /etc my
> distribution.
>
> Everything works.
>
>
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/Karaf-4-0-5-jdbc-config-tp4046858p4046865.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>



-- 
-- 
Christian Schneider
http://www.liquid-reality.de
<https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46&URL=http%3a%2f%2fwww.liquid-reality.de>

Open Source Architect
http://www.talend.com
<https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46&URL=http%3a%2f%2fwww.talend.com>

Re: Karaf 4.0.5 jdbc-config

Posted by cniehues <ch...@its-telco.de>.
I am also using <config> in my feature-file with karaf 4.0.7 and when I
install the feature I get 4 equal datasources. So it seems like it is not
completely fixed.



--
View this message in context: http://karaf.922171.n3.nabble.com/Karaf-4-0-5-jdbc-config-tp4046858p4048504.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Karaf 4.0.5 jdbc-config

Posted by conejo <lo...@gmail.com>.
Thanx jbonofre.
That's exactly what I was doing (using <config />)
I will wait to version 4.0.6



--
View this message in context: http://karaf.922171.n3.nabble.com/Karaf-4-0-5-jdbc-config-tp4046858p4046868.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Karaf 4.0.5 jdbc-config

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
If you use 4.0.5, you may face an issue that I fixed when using 
<config/> element in the feature.

Now, Karaf automatically creates the cfg file when you use <config/> 
element. However, we had an issue with ManagedServiceFactory format 
(like foo-bar.cfg). It will be fixed in 4.0.6.

Regards
JB

On 06/15/2016 08:13 AM, conejo wrote:
> I have solved the problem as follows:
> 1. I am using my own assembly.
> 2. It seems the problem that I comment occurs if I include the configuration
> file datasource in my feature.
> 3. I removed the file of the feature and I put it directly in the /etc my
> distribution.
>
> Everything works.
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Karaf-4-0-5-jdbc-config-tp4046858p4046865.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>

-- 
Jean-Baptiste Onofr
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: Karaf 4.0.5 jdbc-config

Posted by conejo <lo...@gmail.com>.
I have solved the problem as follows:
1. I am using my own assembly.
2. It seems the problem that I comment occurs if I include the configuration
file datasource in my feature.
3. I removed the file of the feature and I put it directly in the /etc my
distribution.

Everything works.



--
View this message in context: http://karaf.922171.n3.nabble.com/Karaf-4-0-5-jdbc-config-tp4046858p4046865.html
Sent from the Karaf - User mailing list archive at Nabble.com.