我正在使用wso2esb 4.8.0并且希望创建外部数据源。我尝试过默认数据源,现在正在尝试创建外部数据源。但是在/home/wso2esb-4.8.0/repository/conf/datasources
中添加了以下配置:
<datasource>
<name>DS1</name>
<jndiConfig>
<name>DS1</name>
</jndiConfig>
<definition type="RDBMS">
<configuration>
<bean id="xaDataSource" class="com.atomikos.jdbc.AtomikosDataSourceBean">
<dataSourceProps>
<property name="xaDataSourceClassName">org.postgresql.xa.PGXADataSource</property>
<property name="uniqueResourceName">TXDB1</property>
<property name="xaProperties.user">youtilitydba</property>
<property name="xaProperties.password">Youtility11</property>
<property name="xaProperties.URL">jdbx:postgresql:/localhost:5432/DB1</property>
</dataSourceProps>
</bean>
</configuration>
</definition>
</datasource>
然后在代理服务中将此数据源添加为:
<dblookup>
<connection>
<pool>
<dsName>DS1</dsName>
</pool>
</connection>
<statement>
<sql>
select name,id,price from table1</sql>
</statement>
</dblookup>
并且在执行此代理时发现错误为:
ERROR - DBLookupMediator Error executing statement :
select name,id,price from table1 against DataSource : DS1
java.sql.SQLException
at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:254)
at org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:182)
at org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:702)
at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:634)
at org.apache.tomcat.jdbc.pool.ConnectionPool.getConnection(ConnectionPool.java:188)
at org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:127)
.
.
他们在代理或数据源配置中的任何问题都是错误的吗?让我知道..
提前致谢..