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>_*_**
**[email protected] <mailto:[email protected]>

_*



--
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com

Reply via email to