You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Jonathan Vila Lopez <jo...@gmail.com> on 2014/11/02 23:01:31 UTC
Derby database and error with jdbc:datasources
Hello
I'm trying to use Derby database for my bundle, and this bundle has a
blueprint file with the datasource.
But when I execute : jdbc:datasources it gives an error :
Caused by: ERROR 08001: java.net.ConnectException: Error al conectarse al
servidor localhost en el puerto 1.527 con el mensaje Conexión rehusada.
( Error connecting to server localhost at port 1527 with message Conection
rejected )
This is my blueprint file :
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:camel="http://camel.apache.org/schema/blueprint"
xmlns:cm="
http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"
xsi:schemaLocation="
http://www.osgi.org/xmlns/blueprint/v1.0.0
http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
http://camel.apache.org/schema/blueprint
http://camel.apache.org/schema/blueprint/camel-blueprint.xsd">
<!-- Standard DataSource -->
<bean id="dataSource" class="org.apache.derby.jdbc.ClientDataSource" >
<property name="serverName" value="localhost"/>
<property name="databaseName" value="demo"/>
<property name="createDatabase" value="create"/>
</bean>
<service id="demoDataSource" ref="dataSource"
interface="javax.sql.DataSource">
<service-properties>
<entry key="osgi.jndi.service.name" value="jdbc/demo"/>
<entry key="transactional" value="false"/>
</service-properties>
</service>
</blueprint>
Kind regards.
[image: Inline image 2]
* Jonathan Vila ** <https://www.twitter.com/jonathan_vila>
<http://www.linkedin.com/in/jonathanvila>*
* jonathan.vila@gmail.com <jo...@gmail.com>*
Re: Derby database and error with jdbc:datasources
Posted by Kevin Schmidt <kt...@gmail.com>.
That error sounds like you don't have Derby running or it isn't running on
port 1527.
On Sun, Nov 2, 2014 at 2:01 PM, Jonathan Vila Lopez <jonathan.vila@gmail.com
> wrote:
> Hello
>
> I'm trying to use Derby database for my bundle, and this bundle has a
> blueprint file with the datasource.
>
> But when I execute : jdbc:datasources it gives an error :
>
> Caused by: ERROR 08001: java.net.ConnectException: Error al conectarse al
> servidor localhost en el puerto 1.527 con el mensaje Conexión rehusada.
>
> ( Error connecting to server localhost at port 1527 with message Conection
> rejected )
>
> This is my blueprint file :
>
> <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:camel="http://camel.apache.org/schema/blueprint"
> xmlns:cm="
> http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"
> xsi:schemaLocation="
> http://www.osgi.org/xmlns/blueprint/v1.0.0
> http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
> http://camel.apache.org/schema/blueprint
> http://camel.apache.org/schema/blueprint/camel-blueprint.xsd">
>
> <!-- Standard DataSource -->
> <bean id="dataSource" class="org.apache.derby.jdbc.ClientDataSource" >
> <property name="serverName" value="localhost"/>
> <property name="databaseName" value="demo"/>
> <property name="createDatabase" value="create"/>
> </bean>
>
> <service id="demoDataSource" ref="dataSource"
> interface="javax.sql.DataSource">
> <service-properties>
> <entry key="osgi.jndi.service.name" value="jdbc/demo"/>
> <entry key="transactional" value="false"/>
> </service-properties>
> </service>
> </blueprint>
>
> Kind regards.
>
>
> [image: Inline image 2]
>
> * Jonathan Vila ** <https://www.twitter.com/jonathan_vila>
> <http://www.linkedin.com/in/jonathanvila>*
>
>
> * jonathan.vila@gmail.com <jo...@gmail.com>*
>
>
>
>
Re: Derby database and error with jdbc:datasources
Posted by Jonathan Vila Lopez <jo...@gmail.com>.
Hello
I tried first using the jdbc feature commands, as explained in Christian
examples..... but for a reason I dont know my tables ( from my JPA entities
) were not created, and then tried with a "remote" datasource to my
localhost database to check if it worked.....
I will try again with the embedded karaf Derby database.......
[image: Inline image 2]
* Jonathan Vila ** <https://www.twitter.com/jonathan_vila>
<http://www.linkedin.com/in/jonathanvila>*
* jonathan.vila@gmail.com <jo...@gmail.com>*
On Mon, Nov 3, 2014 at 11:56 AM, Jean-Baptiste Onofré <jb...@nanthrax.net>
wrote:
> FYI, the generic or derby datasource type (in jdbc:* commands) may help as
> well.
>
> Regards
> JB
>
> On 11/03/2014 11:30 AM, Charlie Mordant wrote:
>
>> Hi,
>>
>>
>> You can also start your Derby server via blueprint with a little bit of
>> code/configuration: you have to make a little server starter:
>> https://github.com/OsgiliathEnterprise/net.osgiliath.parent/blob/master/
>> net.osgiliath.framework/net.osgiliath.helpers.parent/net.
>> osgiliath.helpers.derby/src/main/java/net/osgiliath/database/starter/
>> DatabaseStarter.java
>>
>> Then using blueprint configuration to start it:
>> https://github.com/OsgiliathEnterprise/net.osgiliath.parent/blob/master/
>> net.osgiliath.samples/net.osgiliath.hello/net.osgiliath.
>> hello.model/net.osgiliath.hello.model.database/src/main/
>> resources/OSGI-INF/blueprint/database.osgi-context.xml
>>
>>
>> Regards, Charlie
>>
>> 2014-11-03 10:58 GMT+01:00 Jean-Baptiste Onofré <jb@nanthrax.net
>> <ma...@nanthrax.net>>:
>>
>> In that case use the embedded datasource as provided by jdbc:*
>> commands.
>>
>> Regards
>> JB
>>
>> On 11/03/2014 10:37 AM, Jonathan Vila Lopez wrote:
>>
>> Well, I'm new with derby, I have installed the derby bundle and
>> the
>> derbyclient bundle.
>> I don't know how to start derby with the derby bundle installed.
>>
>> My intention is to have a memory database, create the structure
>> from the
>> JPA entities and populate test data every time I start my bundle
>> just to
>> do integration tests to a faster database than the production one.
>>
>> Maybe I'm completely wrong about the architecture.
>>
>> El 03/11/2014 08:07, "Jean-Baptiste Onofré" <jb@nanthrax.net
>> <ma...@nanthrax.net>
>> <mailto:jb@nanthrax.net <ma...@nanthrax.net>>> escribió:
>>
>>
>> I don't understand your configuration. You use a
>> ClientDataSource,
>> to connect to a remote derby server.
>>
>> Do you have a remote derby server started with
>> startNetworkServer -h
>> localhost -p 1527 on the same machine ?
>>
>> Regards
>> JB
>>
>> On 11/02/2014 11:01 PM, Jonathan Vila Lopez wrote:
>>
>> Hello
>>
>> I'm trying to use Derby database for my bundle, and
>> this bundle
>> has a
>> blueprint file with the datasource.
>>
>> But when I execute : jdbc:datasources it gives an error :
>>
>> Caused by: ERROR 08001: java.net.ConnectException: Error
>> al
>> conectarse
>> al servidor localhost en el puerto 1.527 con el mensaje
>> Conexión
>> rehusada.
>>
>> ( Error connecting to server localhost at port 1527
>> with message
>> Conection rejected )
>>
>> This is my blueprint file :
>>
>> <blueprint
>> xmlns="http://www.osgi.org/____xmlns/blueprint/v1.0.0
>> <http://www.osgi.org/__xmlns/blueprint/v1.0.0>
>> <http://www.osgi.org/xmlns/__blueprint/v1.0.0
>> <http://www.osgi.org/xmlns/blueprint/v1.0.0>>"
>>
>>
>> xmlns:xsi="http://www.w3.org/____2001/XMLSchema-instance
>> <http://www.w3.org/__2001/XMLSchema-instance>
>> <http://www.w3.org/2001/__XMLSchema-instance
>> <http://www.w3.org/2001/XMLSchema-instance>>"
>>
>>
>> xmlns:camel="http://camel.__ap__ache.org/schema/blueprint
>> <http://apache.org/schema/blueprint>
>> <http://camel.apache.org/__schema/blueprint
>> <http://camel.apache.org/schema/blueprint>>"
>>
>>
>>
>> xmlns:cm="http://aries.apache.____org/blueprint/xmlns/__
>> blueprint-__cm/v1.0.0
>>
>> <http://aries.apache.org/__blueprint/xmlns/blueprint-cm/__v1.0.0
>> <http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0>>"
>> xsi:schemaLocation="
>> http://www.osgi.org/xmlns/____blueprint/v1.0.0
>> <http://www.osgi.org/xmlns/__blueprint/v1.0.0>
>> <http://www.osgi.org/xmlns/__blueprint/v1.0.0
>> <http://www.osgi.org/xmlns/blueprint/v1.0.0>>
>> http://www.osgi.org/xmlns/____blueprint/v1.0.0/blueprint.xsd
>> <http://www.osgi.org/xmlns/__blueprint/v1.0.0/blueprint.xsd>
>>
>> <http://www.osgi.org/xmlns/__blueprint/v1.0.0/blueprint.xsd
>> <http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd>__>
>> http://camel.apache.org/____schema/blueprint
>> <http://camel.apache.org/__schema/blueprint>
>> <http://camel.apache.org/__schema/blueprint
>> <http://camel.apache.org/schema/blueprint>>
>> http://camel.apache.org/____schema/blueprint/camel-____
>> blueprint.xsd
>> <http://camel.apache.org/__schema/blueprint/camel-__blueprint.xsd
>> >
>>
>> <http://camel.apache.org/__schema/blueprint/camel-__blueprint.xsd
>> <http://camel.apache.org/schema/blueprint/camel-blueprint.xsd>>">
>>
>> <!-- Standard DataSource -->
>> <bean id="dataSource"
>> class="org.apache.derby.jdbc.____ClientDataSource" >
>> <property name="serverName" value="localhost"/>
>> <property name="databaseName" value="demo"/>
>> <property name="createDatabase"
>> value="create"/>
>> </bean>
>>
>> <service id="demoDataSource" ref="dataSource"
>> interface="javax.sql.____DataSource">
>> <service-properties>
>> <entry key="osgi.jndi.service.name
>> <http://osgi.jndi.service.name>
>> <http://osgi.jndi.service.name__>
>> <http://osgi.jndi.service.__name__
>> <http://osgi.jndi.service.name__>>" value="jdbc/demo"/>
>> <entry key="transactional" value="false"/>
>> </service-properties>
>> </service>
>> </blueprint>
>>
>> Kind regards.
>>
>>
>> Inline image 2
>>
>>
>>
>> * Jonathan Vila
>> **_*_<https://www.twitter.com/____jonathan_vila
>> <https://www.twitter.com/__jonathan_vila>
>> <https://www.twitter.com/__jonathan_vila
>> <https://www.twitter.com/jonathan_vila>>>_**__**_<http:/__/__
>> www.linkedin.com/in/____jonathanvila
>> <http://www.linkedin.com/in/__jonathanvila>
>> <http://www.linkedin.com/in/__jonathanvila
>> <http://www.linkedin.com/in/jonathanvila>>>_*_**
>> **_jonathan.vila@gmail.com
>> <ma...@gmail.com>
>> <mailto:jonathan.vila@gmail.__com <mailto:jonathan.vila@gmail.com
>> >>
>> <mailto:jonathan.vila@gmail.
>> <ma...@gmail.>____com
>> <mailto:jonathan.vila@gmail.__com <mailto:jonathan.vila@gmail.com
>> >>>
>>
>> _*
>>
>>
>>
>> --
>> Jean-Baptiste Onofré
>> jbonofre@apache.org <ma...@apache.org>
>> <mailto:jbonofre@apache.org <ma...@apache.org>>
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>>
>>
>> --
>> Jean-Baptiste Onofré
>> jbonofre@apache.org <ma...@apache.org>
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>>
>>
>>
>>
>> --
>> Charlie Mordant
>>
>> Full OSGI/EE stack made with Karaf:
>> https://github.com/OsgiliathEnterprise/net.osgiliath.parent
>>
>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>
Re: Derby database and error with jdbc:datasources
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
FYI, the generic or derby datasource type (in jdbc:* commands) may help
as well.
Regards
JB
On 11/03/2014 11:30 AM, Charlie Mordant wrote:
> Hi,
>
>
> You can also start your Derby server via blueprint with a little bit of
> code/configuration: you have to make a little server starter:
> https://github.com/OsgiliathEnterprise/net.osgiliath.parent/blob/master/net.osgiliath.framework/net.osgiliath.helpers.parent/net.osgiliath.helpers.derby/src/main/java/net/osgiliath/database/starter/DatabaseStarter.java
>
> Then using blueprint configuration to start it:
> https://github.com/OsgiliathEnterprise/net.osgiliath.parent/blob/master/net.osgiliath.samples/net.osgiliath.hello/net.osgiliath.hello.model/net.osgiliath.hello.model.database/src/main/resources/OSGI-INF/blueprint/database.osgi-context.xml
>
>
> Regards, Charlie
>
> 2014-11-03 10:58 GMT+01:00 Jean-Baptiste Onofré <jb@nanthrax.net
> <ma...@nanthrax.net>>:
>
> In that case use the embedded datasource as provided by jdbc:* commands.
>
> Regards
> JB
>
> On 11/03/2014 10:37 AM, Jonathan Vila Lopez wrote:
>
> Well, I'm new with derby, I have installed the derby bundle and the
> derbyclient bundle.
> I don't know how to start derby with the derby bundle installed.
>
> My intention is to have a memory database, create the structure
> from the
> JPA entities and populate test data every time I start my bundle
> just to
> do integration tests to a faster database than the production one.
>
> Maybe I'm completely wrong about the architecture.
>
> El 03/11/2014 08:07, "Jean-Baptiste Onofré" <jb@nanthrax.net
> <ma...@nanthrax.net>
> <mailto:jb@nanthrax.net <ma...@nanthrax.net>>> escribió:
>
> I don't understand your configuration. You use a
> ClientDataSource,
> to connect to a remote derby server.
>
> Do you have a remote derby server started with
> startNetworkServer -h
> localhost -p 1527 on the same machine ?
>
> Regards
> JB
>
> On 11/02/2014 11:01 PM, Jonathan Vila Lopez wrote:
>
> Hello
>
> I'm trying to use Derby database for my bundle, and
> this bundle
> has a
> blueprint file with the datasource.
>
> But when I execute : jdbc:datasources it gives an error :
>
> Caused by: ERROR 08001: java.net.ConnectException: Error al
> conectarse
> al servidor localhost en el puerto 1.527 con el mensaje
> Conexión
> rehusada.
>
> ( Error connecting to server localhost at port 1527
> with message
> Conection rejected )
>
> This is my blueprint file :
>
> <blueprint
> xmlns="http://www.osgi.org/____xmlns/blueprint/v1.0.0
> <http://www.osgi.org/__xmlns/blueprint/v1.0.0>
> <http://www.osgi.org/xmlns/__blueprint/v1.0.0
> <http://www.osgi.org/xmlns/blueprint/v1.0.0>>"
>
>
> xmlns:xsi="http://www.w3.org/____2001/XMLSchema-instance
> <http://www.w3.org/__2001/XMLSchema-instance>
> <http://www.w3.org/2001/__XMLSchema-instance
> <http://www.w3.org/2001/XMLSchema-instance>>"
>
>
> xmlns:camel="http://camel.__ap__ache.org/schema/blueprint
> <http://apache.org/schema/blueprint>
> <http://camel.apache.org/__schema/blueprint
> <http://camel.apache.org/schema/blueprint>>"
>
>
>
> xmlns:cm="http://aries.apache.____org/blueprint/xmlns/__blueprint-__cm/v1.0.0
>
> <http://aries.apache.org/__blueprint/xmlns/blueprint-cm/__v1.0.0
> <http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0>>"
> xsi:schemaLocation="
> http://www.osgi.org/xmlns/____blueprint/v1.0.0
> <http://www.osgi.org/xmlns/__blueprint/v1.0.0>
> <http://www.osgi.org/xmlns/__blueprint/v1.0.0
> <http://www.osgi.org/xmlns/blueprint/v1.0.0>>
> http://www.osgi.org/xmlns/____blueprint/v1.0.0/blueprint.xsd
> <http://www.osgi.org/xmlns/__blueprint/v1.0.0/blueprint.xsd>
>
> <http://www.osgi.org/xmlns/__blueprint/v1.0.0/blueprint.xsd
> <http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd>__>
> http://camel.apache.org/____schema/blueprint
> <http://camel.apache.org/__schema/blueprint>
> <http://camel.apache.org/__schema/blueprint
> <http://camel.apache.org/schema/blueprint>>
> http://camel.apache.org/____schema/blueprint/camel-____blueprint.xsd
> <http://camel.apache.org/__schema/blueprint/camel-__blueprint.xsd>
>
> <http://camel.apache.org/__schema/blueprint/camel-__blueprint.xsd <http://camel.apache.org/schema/blueprint/camel-blueprint.xsd>>">
>
> <!-- Standard DataSource -->
> <bean id="dataSource"
> class="org.apache.derby.jdbc.____ClientDataSource" >
> <property name="serverName" value="localhost"/>
> <property name="databaseName" value="demo"/>
> <property name="createDatabase" value="create"/>
> </bean>
>
> <service id="demoDataSource" ref="dataSource"
> interface="javax.sql.____DataSource">
> <service-properties>
> <entry key="osgi.jndi.service.name
> <http://osgi.jndi.service.name>
> <http://osgi.jndi.service.name__>
> <http://osgi.jndi.service.__name__
> <http://osgi.jndi.service.name__>>" value="jdbc/demo"/>
> <entry key="transactional" value="false"/>
> </service-properties>
> </service>
> </blueprint>
>
> Kind regards.
>
>
> Inline image 2
>
>
>
> * Jonathan Vila
> **_*_<https://www.twitter.com/____jonathan_vila
> <https://www.twitter.com/__jonathan_vila>
> <https://www.twitter.com/__jonathan_vila
> <https://www.twitter.com/jonathan_vila>>>_**__**_<http:/__/__www.linkedin.com/in/____jonathanvila
> <http://www.linkedin.com/in/__jonathanvila>
> <http://www.linkedin.com/in/__jonathanvila
> <http://www.linkedin.com/in/jonathanvila>>>_*_**
> **_jonathan.vila@gmail.com
> <ma...@gmail.com>
> <mailto:jonathan.vila@gmail.__com <ma...@gmail.com>>
> <mailto:jonathan.vila@gmail.
> <ma...@gmail.>____com
> <mailto:jonathan.vila@gmail.__com <ma...@gmail.com>>>
>
> _*
>
>
>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org <ma...@apache.org>
> <mailto:jbonofre@apache.org <ma...@apache.org>>
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>
>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org <ma...@apache.org>
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>
>
>
>
> --
> Charlie Mordant
>
> Full OSGI/EE stack made with Karaf:
> https://github.com/OsgiliathEnterprise/net.osgiliath.parent
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com
Re: Derby database and error with jdbc:datasources
Posted by Charlie Mordant <cm...@gmail.com>.
Hi,
You can also start your Derby server via blueprint with a little bit of
code/configuration: you have to make a little server starter:
https://github.com/OsgiliathEnterprise/net.osgiliath.parent/blob/master/net.osgiliath.framework/net.osgiliath.helpers.parent/net.osgiliath.helpers.derby/src/main/java/net/osgiliath/database/starter/DatabaseStarter.java
Then using blueprint configuration to start it:
https://github.com/OsgiliathEnterprise/net.osgiliath.parent/blob/master/net.osgiliath.samples/net.osgiliath.hello/net.osgiliath.hello.model/net.osgiliath.hello.model.database/src/main/resources/OSGI-INF/blueprint/database.osgi-context.xml
Regards, Charlie
2014-11-03 10:58 GMT+01:00 Jean-Baptiste Onofré <jb...@nanthrax.net>:
> In that case use the embedded datasource as provided by jdbc:* commands.
>
> Regards
> JB
>
> On 11/03/2014 10:37 AM, Jonathan Vila Lopez wrote:
>
>> Well, I'm new with derby, I have installed the derby bundle and the
>> derbyclient bundle.
>> I don't know how to start derby with the derby bundle installed.
>>
>> My intention is to have a memory database, create the structure from the
>> JPA entities and populate test data every time I start my bundle just to
>> do integration tests to a faster database than the production one.
>>
>> Maybe I'm completely wrong about the architecture.
>>
>> El 03/11/2014 08:07, "Jean-Baptiste Onofré" <jb@nanthrax.net
>> <ma...@nanthrax.net>> escribió:
>>
>> I don't understand your configuration. You use a ClientDataSource,
>> to connect to a remote derby server.
>>
>> Do you have a remote derby server started with startNetworkServer -h
>> localhost -p 1527 on the same machine ?
>>
>> Regards
>> JB
>>
>> On 11/02/2014 11:01 PM, Jonathan Vila Lopez wrote:
>>
>> Hello
>>
>> I'm trying to use Derby database for my bundle, and this bundle
>> has a
>> blueprint file with the datasource.
>>
>> But when I execute : jdbc:datasources it gives an error :
>>
>> Caused by: ERROR 08001: java.net.ConnectException: Error al
>> conectarse
>> al servidor localhost en el puerto 1.527 con el mensaje Conexión
>> rehusada.
>>
>> ( Error connecting to server localhost at port 1527 with message
>> Conection rejected )
>>
>> This is my blueprint file :
>>
>> <blueprint xmlns="http://www.osgi.org/__xmlns/blueprint/v1.0.0
>> <http://www.osgi.org/xmlns/blueprint/v1.0.0>"
>>
>> xmlns:xsi="http://www.w3.org/__2001/XMLSchema-instance
>> <http://www.w3.org/2001/XMLSchema-instance>"
>>
>> xmlns:camel="http://camel.__apache.org/schema/blueprint
>> <http://camel.apache.org/schema/blueprint>"
>>
>>
>> xmlns:cm="http://aries.apache.__org/blueprint/xmlns/
>> blueprint-__cm/v1.0.0
>> <http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0>"
>> xsi:schemaLocation="
>> http://www.osgi.org/xmlns/__blueprint/v1.0.0
>> <http://www.osgi.org/xmlns/blueprint/v1.0.0>
>> http://www.osgi.org/xmlns/__blueprint/v1.0.0/blueprint.xsd
>> <http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd>
>> http://camel.apache.org/__schema/blueprint
>> <http://camel.apache.org/schema/blueprint>
>> http://camel.apache.org/__schema/blueprint/camel-__blueprint.xsd
>> <http://camel.apache.org/schema/blueprint/camel-blueprint.xsd>">
>>
>> <!-- Standard DataSource -->
>> <bean id="dataSource"
>> class="org.apache.derby.jdbc.__ClientDataSource" >
>> <property name="serverName" value="localhost"/>
>> <property name="databaseName" value="demo"/>
>> <property name="createDatabase" value="create"/>
>> </bean>
>>
>> <service id="demoDataSource" ref="dataSource"
>> interface="javax.sql.__DataSource">
>> <service-properties>
>> <entry key="osgi.jndi.service.name
>> <http://osgi.jndi.service.name>
>> <http://osgi.jndi.service.name__>" value="jdbc/demo"/>
>> <entry key="transactional" value="false"/>
>> </service-properties>
>> </service>
>> </blueprint>
>>
>> Kind regards.
>>
>>
>> Inline image 2
>>
>>
>>
>> * Jonathan Vila
>> **_*_<https://www.twitter.com/__jonathan_vila
>> <https://www.twitter.com/jonathan_vila>>_**__**_<http://__
>> www.linkedin.com/in/__jonathanvila
>> <http://www.linkedin.com/in/jonathanvila>>_*_**
>> **_jonathan.vila@gmail.com <ma...@gmail.com>
>> <mailto:jonathan.vila@gmail.__com <mailto:jonathan.vila@gmail.com
>> >>
>>
>> _*
>>
>>
>>
>> --
>> Jean-Baptiste Onofré
>> jbonofre@apache.org <ma...@apache.org>
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>>
>>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>
--
Charlie Mordant
Full OSGI/EE stack made with Karaf:
https://github.com/OsgiliathEnterprise/net.osgiliath.parent
Re: Derby database and error with jdbc:datasources
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
In that case use the embedded datasource as provided by jdbc:* commands.
Regards
JB
On 11/03/2014 10:37 AM, Jonathan Vila Lopez wrote:
> Well, I'm new with derby, I have installed the derby bundle and the
> derbyclient bundle.
> I don't know how to start derby with the derby bundle installed.
>
> My intention is to have a memory database, create the structure from the
> JPA entities and populate test data every time I start my bundle just to
> do integration tests to a faster database than the production one.
>
> Maybe I'm completely wrong about the architecture.
>
> El 03/11/2014 08:07, "Jean-Baptiste Onofré" <jb@nanthrax.net
> <ma...@nanthrax.net>> escribió:
>
> I don't understand your configuration. You use a ClientDataSource,
> to connect to a remote derby server.
>
> Do you have a remote derby server started with startNetworkServer -h
> localhost -p 1527 on the same machine ?
>
> Regards
> JB
>
> On 11/02/2014 11:01 PM, Jonathan Vila Lopez wrote:
>
> Hello
>
> I'm trying to use Derby database for my bundle, and this bundle
> has a
> blueprint file with the datasource.
>
> But when I execute : jdbc:datasources it gives an error :
>
> Caused by: ERROR 08001: java.net.ConnectException: Error al
> conectarse
> al servidor localhost en el puerto 1.527 con el mensaje Conexión
> rehusada.
>
> ( Error connecting to server localhost at port 1527 with message
> Conection rejected )
>
> This is my blueprint file :
>
> <blueprint xmlns="http://www.osgi.org/__xmlns/blueprint/v1.0.0
> <http://www.osgi.org/xmlns/blueprint/v1.0.0>"
>
> xmlns:xsi="http://www.w3.org/__2001/XMLSchema-instance
> <http://www.w3.org/2001/XMLSchema-instance>"
>
> xmlns:camel="http://camel.__apache.org/schema/blueprint
> <http://camel.apache.org/schema/blueprint>"
>
>
> xmlns:cm="http://aries.apache.__org/blueprint/xmlns/blueprint-__cm/v1.0.0
> <http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0>"
> xsi:schemaLocation="
> http://www.osgi.org/xmlns/__blueprint/v1.0.0
> <http://www.osgi.org/xmlns/blueprint/v1.0.0>
> http://www.osgi.org/xmlns/__blueprint/v1.0.0/blueprint.xsd
> <http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd>
> http://camel.apache.org/__schema/blueprint
> <http://camel.apache.org/schema/blueprint>
> http://camel.apache.org/__schema/blueprint/camel-__blueprint.xsd
> <http://camel.apache.org/schema/blueprint/camel-blueprint.xsd>">
>
> <!-- Standard DataSource -->
> <bean id="dataSource"
> class="org.apache.derby.jdbc.__ClientDataSource" >
> <property name="serverName" value="localhost"/>
> <property name="databaseName" value="demo"/>
> <property name="createDatabase" value="create"/>
> </bean>
>
> <service id="demoDataSource" ref="dataSource"
> interface="javax.sql.__DataSource">
> <service-properties>
> <entry key="osgi.jndi.service.name
> <http://osgi.jndi.service.name>
> <http://osgi.jndi.service.name__>" value="jdbc/demo"/>
> <entry key="transactional" value="false"/>
> </service-properties>
> </service>
> </blueprint>
>
> Kind regards.
>
>
> Inline image 2
>
>
>
> * Jonathan Vila
> **_*_<https://www.twitter.com/__jonathan_vila
> <https://www.twitter.com/jonathan_vila>>_**__**_<http://__www.linkedin.com/in/__jonathanvila
> <http://www.linkedin.com/in/jonathanvila>>_*_**
> **_jonathan.vila@gmail.com <ma...@gmail.com>
> <mailto:jonathan.vila@gmail.__com <ma...@gmail.com>>
>
> _*
>
>
>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org <ma...@apache.org>
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com
Re: Derby database and error with jdbc:datasources
Posted by Jonathan Vila Lopez <jo...@gmail.com>.
Well, I'm new with derby, I have installed the derby bundle and the
derbyclient bundle.
I don't know how to start derby with the derby bundle installed.
My intention is to have a memory database, create the structure from the
JPA entities and populate test data every time I start my bundle just to do
integration tests to a faster database than the production one.
Maybe I'm completely wrong about the architecture.
El 03/11/2014 08:07, "Jean-Baptiste Onofré" <jb...@nanthrax.net> escribió:
> I don't understand your configuration. You use a ClientDataSource, to
> connect to a remote derby server.
>
> Do you have a remote derby server started with startNetworkServer -h
> localhost -p 1527 on the same machine ?
>
> Regards
> JB
>
> On 11/02/2014 11:01 PM, Jonathan Vila Lopez wrote:
>
>> Hello
>>
>> I'm trying to use Derby database for my bundle, and this bundle has a
>> blueprint file with the datasource.
>>
>> But when I execute : jdbc:datasources it gives an error :
>>
>> Caused by: ERROR 08001: java.net.ConnectException: Error al conectarse
>> al servidor localhost en el puerto 1.527 con el mensaje Conexión rehusada.
>>
>> ( Error connecting to server localhost at port 1527 with message
>> Conection rejected )
>>
>> This is my blueprint file :
>>
>> <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> xmlns:camel="http://camel.apache.org/schema/blueprint"
>>
>> xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"
>> xsi:schemaLocation="
>> http://www.osgi.org/xmlns/blueprint/v1.0.0
>> http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
>> http://camel.apache.org/schema/blueprint
>> http://camel.apache.org/schema/blueprint/camel-blueprint.xsd">
>>
>> <!-- Standard DataSource -->
>> <bean id="dataSource" class="org.apache.derby.jdbc.ClientDataSource"
>> >
>> <property name="serverName" value="localhost"/>
>> <property name="databaseName" value="demo"/>
>> <property name="createDatabase" value="create"/>
>> </bean>
>>
>> <service id="demoDataSource" ref="dataSource"
>> interface="javax.sql.DataSource">
>> <service-properties>
>> <entry key="osgi.jndi.service.name
>> <http://osgi.jndi.service.name>" value="jdbc/demo"/>
>> <entry key="transactional" value="false"/>
>> </service-properties>
>> </service>
>> </blueprint>
>>
>> Kind regards.
>>
>>
>> Inline image 2
>>
>>
>>
>> * Jonathan Vila
>> **_*_<https://www.twitter.com/jonathan_vila>_**__**_<http://
>> www.linkedin.com/in/jonathanvila>_*_**
>> **_jonathan.vila@gmail.com <ma...@gmail.com>
>>
>> _*
>>
>>
>>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>
Re: Derby database and error with jdbc:datasources
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
I don't understand your configuration. You use a ClientDataSource, to
connect to a remote derby server.
Do you have a remote derby server started with startNetworkServer -h
localhost -p 1527 on the same machine ?
Regards
JB
On 11/02/2014 11:01 PM, Jonathan Vila Lopez wrote:
> Hello
>
> I'm trying to use Derby database for my bundle, and this bundle has a
> blueprint file with the datasource.
>
> But when I execute : jdbc:datasources it gives an error :
>
> Caused by: ERROR 08001: java.net.ConnectException: Error al conectarse
> al servidor localhost en el puerto 1.527 con el mensaje Conexión rehusada.
>
> ( Error connecting to server localhost at port 1527 with message
> Conection rejected )
>
> This is my blueprint file :
>
> <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:camel="http://camel.apache.org/schema/blueprint"
>
> xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"
> xsi:schemaLocation="
> http://www.osgi.org/xmlns/blueprint/v1.0.0
> http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
> http://camel.apache.org/schema/blueprint
> http://camel.apache.org/schema/blueprint/camel-blueprint.xsd">
>
> <!-- Standard DataSource -->
> <bean id="dataSource" class="org.apache.derby.jdbc.ClientDataSource" >
> <property name="serverName" value="localhost"/>
> <property name="databaseName" value="demo"/>
> <property name="createDatabase" value="create"/>
> </bean>
>
> <service id="demoDataSource" ref="dataSource"
> interface="javax.sql.DataSource">
> <service-properties>
> <entry key="osgi.jndi.service.name
> <http://osgi.jndi.service.name>" value="jdbc/demo"/>
> <entry key="transactional" value="false"/>
> </service-properties>
> </service>
> </blueprint>
>
> Kind regards.
>
>
> Inline image 2
>
>
>
> * Jonathan Vila
> **_*_<https://www.twitter.com/jonathan_vila>_**__**_<http://www.linkedin.com/in/jonathanvila>_*_**
> **_jonathan.vila@gmail.com <ma...@gmail.com>
>
> _*
>
>
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com