cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with Nuxeo 5.6 release database connectivity using connection url string

SMAH_Haider
Star Contributor
Star Contributor

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

1 ACCEPTED ANSWER

Julien_Carsique
Elite Collaborator
Elite Collaborator

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, Str.... 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.

View answer in original post

4 REPLIES 4

Julien_Carsique
Elite Collaborator
Elite Collaborator

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, Str.... 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 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.

Julien, the bug is back in Nuxeo 5.6

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