org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.ogm.dialect.spi.GridDialect]

Hibernate JIRA | Emmanuel Bernard | 2 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    I have had the following error on the CI. I suppose it's because MongoDB is unreacheable but the message is quite cryptic {code} Running org.hibernate.ogm.datastore.mongodb.test.id.TableGeneratorTest Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.585 sec <<< FAILURE! org.hibernate.ogm.datastore.mongodb.test.id.TableGeneratorTest Time elapsed: 1.585 sec <<< ERROR! org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.ogm.dialect.spi.GridDialect] at com.mongodb.BaseCluster.getDescription(BaseCluster.java:128) at com.mongodb.DBTCPConnector.getClusterDescription(DBTCPConnector.java:396) at com.mongodb.DBTCPConnector.getType(DBTCPConnector.java:569) at com.mongodb.DBTCPConnector.getReplicaSetStatus(DBTCPConnector.java:364) at com.mongodb.Mongo.getReplicaSetStatus(Mongo.java:465) at com.mongodb.DB.getCommandReadPreference(DB.java:86) at com.mongodb.DB.command(DB.java:314) at com.mongodb.DB.command(DB.java:296) at com.mongodb.DB.command(DB.java:371) at com.mongodb.Mongo.getDatabaseNames(Mongo.java:396) at org.hibernate.ogm.datastore.mongodb.impl.MongoDBDatastoreProvider.extractDatabase(MongoDBDatastoreProvider.java:136) at org.hibernate.ogm.datastore.mongodb.impl.MongoDBDatastoreProvider.start(MongoDBDatastoreProvider.java:111) at org.hibernate.service.internal.AbstractServiceRegistryImpl.startService(AbstractServiceRegistryImpl.java:329) at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:237) at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:206) at org.hibernate.ogm.dialect.impl.GridDialectInitiator.initiateService(GridDialectInitiator.java:48) at org.hibernate.ogm.dialect.impl.GridDialectInitiator.initiateService(GridDialectInitiator.java:32) at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:105) at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:251) at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:225) at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:206) at org.hibernate.ogm.dialect.impl.OgmDialectFactoryInitiator$OgmDialectFactory.<init>(OgmDialectFactoryInitiator.java:51) at org.hibernate.ogm.dialect.impl.OgmDialectFactoryInitiator.buildServiceInstance(OgmDialectFactoryInitiator.java:33) at org.hibernate.ogm.dialect.impl.OgmDialectFactoryInitiator.buildServiceInstance(OgmDialectFactoryInitiator.java:27) at org.hibernate.ogm.service.impl.OptionalServiceInitiator.initiateService(OptionalServiceInitiator.java:23) at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:105) at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:251) at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:225) at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:206) at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:95) at org.hibernate.ogm.service.impl.OgmJdbcServicesInitiator$OgmJdbcServicesImpl.configure(OgmJdbcServicesInitiator.java:56) at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:111) at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:234) at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:206) at org.hibernate.cfg.Configuration.buildTypeRegistrations(Configuration.java:1887) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1845) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1930) at org.hibernate.ogm.cfg.OgmConfiguration.buildSessionFactory(OgmConfiguration.java:96) at org.hibernate.ogm.cfg.OgmConfiguration.buildSessionFactory(OgmConfiguration.java:37) at org.hibernate.ogm.utils.OgmTestRunner.buildSessionFactory(OgmTestRunner.java:178) at org.hibernate.ogm.utils.OgmTestRunner.run(OgmTestRunner.java:116) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124) {code} Let's try and improve that message if possible.

    Hibernate JIRA | 2 years ago | Emmanuel Bernard
    org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.ogm.dialect.spi.GridDialect]
  2. 0

    I have had the following error on the CI. I suppose it's because MongoDB is unreacheable but the message is quite cryptic {code} Running org.hibernate.ogm.datastore.mongodb.test.id.TableGeneratorTest Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.585 sec <<< FAILURE! org.hibernate.ogm.datastore.mongodb.test.id.TableGeneratorTest Time elapsed: 1.585 sec <<< ERROR! org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.ogm.dialect.spi.GridDialect] at com.mongodb.BaseCluster.getDescription(BaseCluster.java:128) at com.mongodb.DBTCPConnector.getClusterDescription(DBTCPConnector.java:396) at com.mongodb.DBTCPConnector.getType(DBTCPConnector.java:569) at com.mongodb.DBTCPConnector.getReplicaSetStatus(DBTCPConnector.java:364) at com.mongodb.Mongo.getReplicaSetStatus(Mongo.java:465) at com.mongodb.DB.getCommandReadPreference(DB.java:86) at com.mongodb.DB.command(DB.java:314) at com.mongodb.DB.command(DB.java:296) at com.mongodb.DB.command(DB.java:371) at com.mongodb.Mongo.getDatabaseNames(Mongo.java:396) at org.hibernate.ogm.datastore.mongodb.impl.MongoDBDatastoreProvider.extractDatabase(MongoDBDatastoreProvider.java:136) at org.hibernate.ogm.datastore.mongodb.impl.MongoDBDatastoreProvider.start(MongoDBDatastoreProvider.java:111) at org.hibernate.service.internal.AbstractServiceRegistryImpl.startService(AbstractServiceRegistryImpl.java:329) at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:237) at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:206) at org.hibernate.ogm.dialect.impl.GridDialectInitiator.initiateService(GridDialectInitiator.java:48) at org.hibernate.ogm.dialect.impl.GridDialectInitiator.initiateService(GridDialectInitiator.java:32) at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:105) at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:251) at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:225) at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:206) at org.hibernate.ogm.dialect.impl.OgmDialectFactoryInitiator$OgmDialectFactory.<init>(OgmDialectFactoryInitiator.java:51) at org.hibernate.ogm.dialect.impl.OgmDialectFactoryInitiator.buildServiceInstance(OgmDialectFactoryInitiator.java:33) at org.hibernate.ogm.dialect.impl.OgmDialectFactoryInitiator.buildServiceInstance(OgmDialectFactoryInitiator.java:27) at org.hibernate.ogm.service.impl.OptionalServiceInitiator.initiateService(OptionalServiceInitiator.java:23) at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:105) at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:251) at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:225) at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:206) at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:95) at org.hibernate.ogm.service.impl.OgmJdbcServicesInitiator$OgmJdbcServicesImpl.configure(OgmJdbcServicesInitiator.java:56) at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:111) at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:234) at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:206) at org.hibernate.cfg.Configuration.buildTypeRegistrations(Configuration.java:1887) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1845) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1930) at org.hibernate.ogm.cfg.OgmConfiguration.buildSessionFactory(OgmConfiguration.java:96) at org.hibernate.ogm.cfg.OgmConfiguration.buildSessionFactory(OgmConfiguration.java:37) at org.hibernate.ogm.utils.OgmTestRunner.buildSessionFactory(OgmTestRunner.java:178) at org.hibernate.ogm.utils.OgmTestRunner.run(OgmTestRunner.java:116) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124) {code} Let's try and improve that message if possible.

    Hibernate JIRA | 2 years ago | Emmanuel Bernard
    org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.ogm.dialect.spi.GridDialect]

    Root Cause Analysis

    1. org.hibernate.service.spi.ServiceException

      Unable to create requested service [org.hibernate.ogm.dialect.spi.GridDialect]

      at com.mongodb.BaseCluster.getDescription()
    2. MongoDB Java Driver
      Mongo.getDatabaseNames
      1. com.mongodb.BaseCluster.getDescription(BaseCluster.java:128)
      2. com.mongodb.DBTCPConnector.getClusterDescription(DBTCPConnector.java:396)
      3. com.mongodb.DBTCPConnector.getType(DBTCPConnector.java:569)
      4. com.mongodb.DBTCPConnector.getReplicaSetStatus(DBTCPConnector.java:364)
      5. com.mongodb.Mongo.getReplicaSetStatus(Mongo.java:465)
      6. com.mongodb.DB.getCommandReadPreference(DB.java:86)
      7. com.mongodb.DB.command(DB.java:314)
      8. com.mongodb.DB.command(DB.java:296)
      9. com.mongodb.DB.command(DB.java:371)
      10. com.mongodb.Mongo.getDatabaseNames(Mongo.java:396)
      10 frames
    3. org.hibernate.ogm
      MongoDBDatastoreProvider.start
      1. org.hibernate.ogm.datastore.mongodb.impl.MongoDBDatastoreProvider.extractDatabase(MongoDBDatastoreProvider.java:136)
      2. org.hibernate.ogm.datastore.mongodb.impl.MongoDBDatastoreProvider.start(MongoDBDatastoreProvider.java:111)
      2 frames
    4. Hibernate
      AbstractServiceRegistryImpl.getService
      1. org.hibernate.service.internal.AbstractServiceRegistryImpl.startService(AbstractServiceRegistryImpl.java:329)
      2. org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:237)
      3. org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:206)
      3 frames
    5. Hibernate Object Grid Mapper
      GridDialectInitiator.initiateService
      1. org.hibernate.ogm.dialect.impl.GridDialectInitiator.initiateService(GridDialectInitiator.java:48)
      2. org.hibernate.ogm.dialect.impl.GridDialectInitiator.initiateService(GridDialectInitiator.java:32)
      2 frames
    6. org.hibernate.boot
      StandardServiceRegistryImpl.initiateService
      1. org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:105)
      1 frame
    7. Hibernate
      AbstractServiceRegistryImpl.getService
      1. org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:251)
      2. org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:225)
      3. org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:206)
      3 frames
    8. Hibernate Object Grid Mapper
      OptionalServiceInitiator.initiateService
      1. org.hibernate.ogm.dialect.impl.OgmDialectFactoryInitiator$OgmDialectFactory.<init>(OgmDialectFactoryInitiator.java:51)
      2. org.hibernate.ogm.dialect.impl.OgmDialectFactoryInitiator.buildServiceInstance(OgmDialectFactoryInitiator.java:33)
      3. org.hibernate.ogm.dialect.impl.OgmDialectFactoryInitiator.buildServiceInstance(OgmDialectFactoryInitiator.java:27)
      4. org.hibernate.ogm.service.impl.OptionalServiceInitiator.initiateService(OptionalServiceInitiator.java:23)
      4 frames
    9. org.hibernate.boot
      StandardServiceRegistryImpl.initiateService
      1. org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:105)
      1 frame
    10. Hibernate
      JdbcServicesImpl.configure
      1. org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:251)
      2. org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:225)
      3. org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:206)
      4. org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:95)
      4 frames
    11. Hibernate Object Grid Mapper
      OgmJdbcServicesInitiator$OgmJdbcServicesImpl.configure
      1. org.hibernate.ogm.service.impl.OgmJdbcServicesInitiator$OgmJdbcServicesImpl.configure(OgmJdbcServicesInitiator.java:56)
      1 frame
    12. org.hibernate.boot
      StandardServiceRegistryImpl.configureService
      1. org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:111)
      1 frame
    13. Hibernate
      Configuration.buildSessionFactory
      1. org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:234)
      2. org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:206)
      3. org.hibernate.cfg.Configuration.buildTypeRegistrations(Configuration.java:1887)
      4. org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1845)
      5. org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1930)
      5 frames
    14. Hibernate Object Grid Mapper
      OgmConfiguration.buildSessionFactory
      1. org.hibernate.ogm.cfg.OgmConfiguration.buildSessionFactory(OgmConfiguration.java:96)
      2. org.hibernate.ogm.cfg.OgmConfiguration.buildSessionFactory(OgmConfiguration.java:37)
      2 frames
    15. org.hibernate.ogm
      OgmTestRunner.run
      1. org.hibernate.ogm.utils.OgmTestRunner.buildSessionFactory(OgmTestRunner.java:178)
      2. org.hibernate.ogm.utils.OgmTestRunner.run(OgmTestRunner.java:116)
      2 frames
    16. JUnit4 Provider
      JUnit4Provider.invoke
      1. org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264)
      2. org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
      3. org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)
      3 frames