Am 27.08.2014 11:05, schrieb Sylvain Goulmy:
Hi all,

I'm trying to setup a XA Datasource configuration in Tomcat 7 with an
Oracle database.

I have spent a long time trying to set that configuration up without any
success.

I have read the  following blog entry which is i think the only ressource
that deals with this subject :

http://www.tomcatexpert.com/blog/2010/04/01/configuring-jdbc-pool-high-concurrency

with the "Pooling connections from other data sources" paragraph.

Here is the configuration i have done in my context.xml file :

   <Resource
factory="org.apache.tomcat.jdbc.naming.GenericNamingResourcesFactory"
name="jdbc/mydatasource-xa" password="password"
type="oracle.jdbc.xa.client.OracleXADataSource" user="userName"
databaseName="databaseName" serverName="myDatabaseHost" portNumber="1522" />

...
and here is the exception i have when the application starts :

2014-08-27 08:25:49,748 [default-startStop-1] ERROR
org.apache.tomcat.jdbc.pool.ConnectionPool- Unable to create initial
connections of pool.
java.sql.SQLException: Invalid Oracle URL specified:
OracleDataSource.makeURL
  at oracle.jdbc.pool.OracleDataSource.makeURL(OracleDataSource.java:1277)
at oracle.jdbc.pool.OracleDataSource.getURL(OracleDataSource.java:1025)

The JDBC-Driver cannot create the JDBC-URL from these parameters: use url instead of serverName, databaseName, portNumber e.g. url="jdbc:oracle:thin:@myhost:1521/orcl or add a driverType, e.g. driverType="thin"

see http://www.orafaq.com/wiki/JDBC for URLs and http://docs.oracle.com/cd/E18283_01/appdev.112/e13995/oracle/jdbc/pool/OracleDataSource.html for the possible parameters and default values.

Regards,

        Stefan

--
Mayr Stefan

Hausen - Gassenaecker 10
82269 Geltendorf

Tel.: 08193 - 9979469

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to