Hello everyone
I tried to connect an external database to my service builder. For that i follow all of those steps :
1) In my service.xml i add this :
1<entity name="EventTracker" local-service="true" remote-service="false" data-source="myDatasource">
2) I created my file : "ext-spring.xml" :
1<?xml version="1.0"?>
2<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" default-destroy-method="destroy" default-init-method="afterPropertiesSet" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
3
4 <bean id="myDatasource" lazy-init="true" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
5 <property name="driverClassName" value="com.mysql.jdbc.Driver" />
6 <property name="url" value="jdbc:mysql://192.168.*.***/mydatabase?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false"/>
7 <property name="username" value="myusername" />
8 <property name="password" value="mypassword" />
9 </bean>
10</beans>
3) After that, i've moved my .jar of my service in the folder /WEB-INF/lib in the /WEB-INF/lib of another project (i want to use my service in a different project that the portlet in which i've created it)
But when i try to add a row in my table, an error tells me that i try to connect at lportal database...
Can anyone help me please ?