Issue with Nuxeo 5.6 release database connectivity using connection url string
Below issue is occuring for Nuxeo 5.6 Release Candidate
We want to configure nuxeo database connectivity by specifying oracle database connection url string in nuxeo.db.jdbc.url instead nuxeo.db.host and nuxeo.db.name as shown in the nuxeo.conf file below:
nuxeo.conf
nuxeo.db.user=RECM_VWA_OWNER
and in default-repository-config we did the following change:
nuxeo.db.password=RECM_VWA_OWNER
nuxeo.db.jdbc.url=jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=CIT-ODB10-L01)(Port=1521))(CONNECT_DATA=(SERVICE_NAME=CSRCA)))
property name=“URL”>${nuxeo.db.jdbc.url}/property>
but its not connecting to the configured oracle database and shows this exception in logs:
2012-07-26 14:10:21,261 INFO [org.nuxeo.launcher.config.ConfigurationGenerator] Configuration files generated.
2012-07-26 14:10:21,392 ERROR [org.nuxeo.launcher.config.ConfigurationGenerator] java.sql.SQLException: Listener refused the connection with the following error: ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
However if we specify database name and database host in nuxeo.db.name
and nuxeo.db.host
, it connects.
In nuxeo 5.5 we were not having this issue.
Please note that we have to use SERVICE NAME and not SID in JDBC URL
Hi,
Since 5.6, we introduced a database connection check in the Launcher before starting the server.
That's managed by org.nuxeo.launcher.config.ConfigurationGenerator.checkDatabaseConnection(String, String, String, String, String, String). For now, the test is using nuxeo.db.jdbc.url
parameter defined in templates/databaseTemplate/nuxeo.defaults
with databaseTemplate
corresponding to the chosen database, then it replaces the variables with values from nuxeo.db.host
, nuxeo.db.port
and nuxeo.db.name
.
I filled a Jira NXP-9786 for using the customized nuxeo.db.jdbc.url
if exists.
Waiting for the fix, you can workaround that issue by setting nuxeo.db.jdbc.url=jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=CIT-ODB10-L01)(Port=1521))(CONNECT_DATA=(SERVICE_NAME=CSRCA)))
in templates/oracle/nuxeo.defaults
instead of nuxeo.conf
.
I planned to fix the issue for 5.6-RC2 meaning it will be available with the next release candidate coming on Monday.
I get the following stacktrace when i set jdbc url in nuxeo.db.jdbc.url in nuxeo.conf file. http://pastebin.com/BFih7bfa
It's not obvious your issue has anything to do with our above discussion. It looks more like a driver or network issue: java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
.
Please create a [1][Jira] issue and reference (or comment) [2][NXP-9786] with more information (for instance, what is the generated value for nuxeo.db.jdbc.url
, how to reproduce your issue, …).