Error while deploying mysql datasource with message javax.naming.NameNotFoundException
Issue
- User is trying to deploy a data source bundle without success.
- User is using the same code and
blueprintused in the 6.1.1 fabric version. - This is the
blueprintdeployed
<?xml version="1.0" encoding="UTF-8"?>
<!-- First install the H2 driver using: > install -s mvn:com.h2database/h2/1.3.163
Then copy this file to the deploy folder -->
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0">
<!-- PROPERTIES MANAGEMENT -->
<cm:property-placeholder persistent-id="xxx.yyy.zzz.ruleengine.ds" update-strategy="reload" />
<!-- PROPERTIES MANAGEMENT -->
<!-- BEANS MANAGEMENT -->
<bean id="dataSource" class="com.mysql.jdbc.jdbc2.optional.MysqlXADataSource">
<property name="databaseName" value="${db.name}" />
<property name="url" value="${db.url}" />
<property name="user" value="${db.user}" />
<property name="password" value="${db.password}" />
</bean>
<!-- BEANS MANAGEMENT -->
<!-- SERVICES MANAGEMENT -->
<service interface="javax.sql.XADataSource" ref="dataSource">
<service-properties>
<entry key="osgi.jndi.service.name" value="jdbc/ruleengine" />
<entry key="datasource.name" value="${db.datasource.name}" />
<entry key="aries.xa.name" value="${db.xa.name}" />
<entry key="aries.xa.pooling" value="true" />
<entry key="aries.xa.poolMinSize" value="${db.pool.min.size}" />
<entry key="aries.xa.poolMaxSize" value="${db.pool.max.size}" />
<entry key="aries.xa.username" value="${db.user}" />
<entry key="aries.xa.password" value="${db.password}" />
</service-properties>
</service>
<!-- SERVICES MANAGEMENT -->
</blueprint>
- User can't understand the reason but it seems like it doesn't read the properties from the properties files (configured in the profile).
Environment
- Red Hat JBoss Fuse
- 6.2.0
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.