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
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)))

and in default-repository-config we did the following change:
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

0 votes

1 answers

6503 views

ANSWER



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.

1 votes



I don't know that syntax but it will be used as it is by the JDBC driver. So if it's fine, then it'll work.

I planned to fix the issue for 5.6-RC2 meaning it will be available with the next release candidate coming on Monday.

07/27/2012

Julien, the bug is back in Nuxeo 5.6

I get the following stacktrace when i set jdbc url in nuxeo.db.jdbc.url in nuxeo.conf file. http://pastebin.com/BFih7bfa

09/14/2012

I moved your logs to pastebin, it's more readable.

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, …).

09/14/2012