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é" <[email protected] <mailto:[email protected]>> 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>>_*_** **[email protected] <mailto:[email protected]> <mailto:jonathan.vila@gmail.__com <mailto:[email protected]>> _* -- Jean-Baptiste Onofré [email protected] <mailto:[email protected]> http://blog.nanthrax.net Talend - http://www.talend.com
-- Jean-Baptiste Onofré [email protected] http://blog.nanthrax.net Talend - http://www.talend.com
