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>* * [email protected] <[email protected]>* On Mon, Nov 3, 2014 at 11:56 AM, Jean-Baptiste Onofré <[email protected]> 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é <[email protected] >> <mailto:[email protected]>>: >> >> 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]> >> <mailto:[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> >> <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>>>_*_** >> **[email protected] >> <mailto:[email protected]> >> <mailto:jonathan.vila@gmail.__com <mailto:[email protected] >> >> >> <mailto:jonathan.vila@gmail. >> <mailto:jonathan.vila@gmail.>____com >> <mailto:jonathan.vila@gmail.__com <mailto:[email protected] >> >>> >> >> _* >> >> >> >> -- >> Jean-Baptiste Onofré >> [email protected] <mailto:[email protected]> >> <mailto:[email protected] <mailto:[email protected]>> >> http://blog.nanthrax.net >> Talend - http://www.talend.com >> >> >> -- >> Jean-Baptiste Onofré >> [email protected] <mailto:[email protected]> >> 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é > [email protected] > http://blog.nanthrax.net > Talend - http://www.talend.com >
