Skip to main content
chidimmau6652471
Participant
August 22, 2018
Question

CF Data Source: I cannot connect to a different database other than the one specified in my initial setup

  • August 22, 2018
  • 0 replies
  • 480 views

I have CF installed and configured to worked with MongoDB using a Data Direct JDBC connector.

I created a data source and specified a sample database name in the JDBC URL and all works fine.

The problem now is, I want to use a different database, the actual one for my CF application, but when I edit the database name in the JDBC URL, I get the following error and when I change it back to the sample database name, it works fine:

Connection verification failed for data source: OkDataSource3

java.sql.SQLSyntaxErrorException: [DataDirect][MongoDB JDBC Driver][MongoDB]syntax error or access rule violation: invalid schema name: NEWDB

The root cause was that: java.sql.SQLSyntaxErrorException: [DataDirect][MongoDB JDBC Driver][MongoDB]syntax error or access rule violation: invalid schema name: NEWDB

The database name is correct.

I have tried creating a new data source with my preferred database, I get the same error too.

I am also unable to connect to a different Collection in the sample database other than the very first one I used.

The summary of my current issue is, I have different databases in my MongoDB Compass but I can't seem to connect to any of them other than the very first sample database I used when I created the data source. Also, when I edit the columns in the Collection i'm using in the sample database, my application doesn't seem to recognize the change.

Please help, what am I not doing right?

This topic has been closed for replies.