OpenIDM 4 snapshot – JDBC repository configured bt datasource was not found

This topic has 3 replies, 2 voices, and was last updated 6 years, 10 months ago by Matt Mencel.

  • Author
    Posts
  • #6293
     Matt Mencel
    Participant

    I’m trying out OpenIDM 4 using the nightly snapshots. I’ve got my MySQL database created.

    I see there are some changes to the repo.jdbc.json file compared to 3.x, and there’s a new value called useDataSource with a default value of “default”. The 4.0 docs make no mention of what this should be set to.

    When I launch OpenIDM I get this error in the logs.

    
    SEVERE: JDBC repository configured, but datasource "default" was not found -  must specify or configure a valid datasource for JDBC repository to use.
    

    That has to be set to something because if I remove it, it logs that it’s missing. But what do I set it to?

    The top of my repo.jdbc.json file looks like this…

    
    {
        "dbType" : "MYSQL",
        "useDataSource" : "default",
        "jndiName" : "",
        "driverClass" : "com.mysql.jdbc.Driver",
        "jdbcUrl" : "jdbc:mysql://127.0.0.1:3306/openidm?allowMultiQueries=true&characterEncoding=utf8",
        "username" : "openidm",
        "password" : "mypass",
        "defaultCatalog" : "openidm",
        "maxBatchSize" : 100,
        "maxTxRetry" : 5,
        "enableConnectionPool" : true,
        "connectionTimeoutInMs" : 30000,
        "queries" : {
    ...
    
    #6294
     Matt Mencel
    Participant

    Ah….there’s a new conf file there called datasource.jdbc-default.json. Looks like that’s where I need to be looking.

    #6295
     laurent.bristiel
    Participant

    yes, indeed, you need both files now:
    – repo.jdbc.json
    – datasource.jdbc-default.json
    some explanations can be found in openidm/db/README

    #6296
     Matt Mencel
    Participant

    Moved my connection info to that datasource file. Works. Brilliant! :)

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

©2022 ForgeRock - we provide an identity and access platform to secure every online relationship for the enterprise market, educational sector and even entire countries. Click to view our privacy policy and terms of use.

Log in with your credentials

Forgot your details?