Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
My blueprint :
<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
default-activation="lazy">
<bean id="oracleDSContract" class="oracle.jdbc.pool.OracleConnectionPoolDataSource">
<property name="connectionCachingEnabled" value="true" />
<property name="URL" value="jdbcracle:thin:@xxxxxxx:1521:xxxxx"/>
<property name="user" value="xxxx"/>
<property name="password" value="xxxx"/>
<property name="autoReconnect" value="true"/>
<property name="connectionCacheProperties">
<props>
<prop key="MinLimit">1</prop>
<prop key="MaxLimit">5</prop>
<prop key="InitialLimit">1</prop>
<prop key="ConnectionWaitTimeout">200</prop>
</props>
</property>
</bean>
<bean id="dataSourceContract" class="org.apache.commons.dbcp.datasources.SharedPoolDataSource" destroy-method="close">
<property name="connectionPoolDataSource" ref="oracleDSContract"/>
<property name="maxActive" value="100"/>
<property name="maxIdle" value="5"/>
<property name="maxWait" value="-1"/>
<property name="defaultAutoCommit" value="false"/>
</bean>
<service interface="javax.sql.DataSource" ref="dataSourceContract">
<service-properties>
<entry key="osgi.jndi.service.name" value="jdbc/oracleds"/>
</service-properties>
</service>
After deploying a Rest service in karaf and testing, I have this error message :
getService() returned null for {javax.sql.DataSource}={osgi.service.blueprint.compname=dataSourceContract, osgi.jndi.service.name=jdbc/oracleds, service.id=466}
however my setup is good. Mysql pool connection works well, however the bug arises with oracle.
Any Idea ?