org.hibernate.HibernateException: OGM001213: MongoDB authentication failed with username \[myUser]"*}}

Hibernate JIRA | Pavol Pitonak | 3 years ago
  1. 0

    Hibernate OGM doesn't work when you use secured database, i.e. you provide username and password. # create a secured MongoDB database named "ogm_test_database", you can use e.g. mongolab.com # git clone https://github.com/ppitonak/hibernate-ogm.git # cd hibernate-ogm # git checkout secured_mongodb # export MONGODB_HOSTNAME=ds045027.mongolab.com # export MONGODB_PORT=45027 # export MONGODB_USERNAME=someUsername # export MONGODB_PASSWORD=someP@ssw0rd # mvn clean install -s settings-example.xml -DuseExternalMongoDb -f integrationtest/pom.xml result: * failed test, connecting to database using Mongo shell works fine {quote} Caused by: java.lang.Exception: {"JBAS014671: Failed services" => {"jboss.persistenceunit.\"MongoDBModuleMemberRegistrationIT.war#primary\"" => "org.jboss.msc.service.StartException in service jboss.persistenceunit.\"MongoDBModuleMemberRegistrationIT.war#primary\": javax.persistence.PersistenceException: \[PersistenceUnit: primary] Unable to build Hibernate SessionFactory Caused by: javax.persistence.PersistenceException: \[PersistenceUnit: primary] Unable to build Hibernate SessionFactory Caused by: org.hibernate.MappingException: Could not get constructor for org.hibernate.ogm.persister.SingleTableOgmEntityPersister Caused by: org.hibernate.service.spi.ServiceException: Unable to create requested service \[org.hibernate.ogm.dialect.GridDialect] *Caused by: org.hibernate.HibernateException: OGM001213: MongoDB authentication failed with username \[myUser]"*}} at org.jboss.as.controller.client.helpers.standalone.impl.ServerDeploymentPlanResultFuture.getActionResult(ServerDeploymentPlanResultFuture.java:134) at org.jboss.as.controller.client.helpers.standalone.impl.ServerDeploymentPlanResultFuture.getResultFromNode(ServerDeploymentPlanResultFuture.java:123) at org.jboss.as.controller.client.helpers.standalone.impl.ServerDeploymentPlanResultFuture.get(ServerDeploymentPlanResultFuture.java:85) at org.jboss.as.controller.client.helpers.standalone.impl.ServerDeploymentPlanResultFuture.get(ServerDeploymentPlanResultFuture.java:42) at org.jboss.as.controller.client.helpers.standalone.ServerDeploymentHelper.deploy(ServerDeploymentHelper.java:55) at org.jboss.as.arquillian.container.ArchiveDeployer.deployInternal(ArchiveDeployer.java:77) ... 96 more {quote}

    Hibernate JIRA | 3 years ago | Pavol Pitonak
    org.hibernate.HibernateException: OGM001213: MongoDB authentication failed with username \[myUser]"*}}
  2. 0

    Hibernate OGM doesn't work when you use secured database, i.e. you provide username and password. # create a secured MongoDB database named "ogm_test_database", you can use e.g. mongolab.com # git clone https://github.com/ppitonak/hibernate-ogm.git # cd hibernate-ogm # git checkout secured_mongodb # export MONGODB_HOSTNAME=ds045027.mongolab.com # export MONGODB_PORT=45027 # export MONGODB_USERNAME=someUsername # export MONGODB_PASSWORD=someP@ssw0rd # mvn clean install -s settings-example.xml -DuseExternalMongoDb -f integrationtest/pom.xml result: * failed test, connecting to database using Mongo shell works fine {quote} Caused by: java.lang.Exception: {"JBAS014671: Failed services" => {"jboss.persistenceunit.\"MongoDBModuleMemberRegistrationIT.war#primary\"" => "org.jboss.msc.service.StartException in service jboss.persistenceunit.\"MongoDBModuleMemberRegistrationIT.war#primary\": javax.persistence.PersistenceException: \[PersistenceUnit: primary] Unable to build Hibernate SessionFactory Caused by: javax.persistence.PersistenceException: \[PersistenceUnit: primary] Unable to build Hibernate SessionFactory Caused by: org.hibernate.MappingException: Could not get constructor for org.hibernate.ogm.persister.SingleTableOgmEntityPersister Caused by: org.hibernate.service.spi.ServiceException: Unable to create requested service \[org.hibernate.ogm.dialect.GridDialect] *Caused by: org.hibernate.HibernateException: OGM001213: MongoDB authentication failed with username \[myUser]"*}} at org.jboss.as.controller.client.helpers.standalone.impl.ServerDeploymentPlanResultFuture.getActionResult(ServerDeploymentPlanResultFuture.java:134) at org.jboss.as.controller.client.helpers.standalone.impl.ServerDeploymentPlanResultFuture.getResultFromNode(ServerDeploymentPlanResultFuture.java:123) at org.jboss.as.controller.client.helpers.standalone.impl.ServerDeploymentPlanResultFuture.get(ServerDeploymentPlanResultFuture.java:85) at org.jboss.as.controller.client.helpers.standalone.impl.ServerDeploymentPlanResultFuture.get(ServerDeploymentPlanResultFuture.java:42) at org.jboss.as.controller.client.helpers.standalone.ServerDeploymentHelper.deploy(ServerDeploymentHelper.java:55) at org.jboss.as.arquillian.container.ArchiveDeployer.deployInternal(ArchiveDeployer.java:77) ... 96 more {quote}

    Hibernate JIRA | 3 years ago | Pavol Pitonak
    org.hibernate.HibernateException: OGM001213: MongoDB authentication failed with username \[myUser]"*}}
  3. 0

    Struts2+Spring2+Hibernate3 web应用示例(一) - 诗特林-sterning - BlogJava

    blogjava.net | 1 year ago
    org.hibernate.HibernateException: CGLIB Enhancement failed: com.sterning.books.model.Books
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Hibernate @OneToMany fails with "collection is not associated with any session"

    Stack Overflow | 1 year ago | Виталик Сироткин
    org.hibernate.HibernateException: collection is not associated with any session
  6. 0

    Current Hibernate Session

    Stack Overflow | 3 years ago | user3305262
    org.hibernate.HibernateException: collection is not associated with any session

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.hibernate.HibernateException

      OGM001213: MongoDB authentication failed with username \[myUser]"*}}

      at org.jboss.as.controller.client.helpers.standalone.impl.ServerDeploymentPlanResultFuture.getActionResult()
    2. JBoss Application Server: Controller Client
      ServerDeploymentHelper.deploy
      1. org.jboss.as.controller.client.helpers.standalone.impl.ServerDeploymentPlanResultFuture.getActionResult(ServerDeploymentPlanResultFuture.java:134)
      2. org.jboss.as.controller.client.helpers.standalone.impl.ServerDeploymentPlanResultFuture.getResultFromNode(ServerDeploymentPlanResultFuture.java:123)
      3. org.jboss.as.controller.client.helpers.standalone.impl.ServerDeploymentPlanResultFuture.get(ServerDeploymentPlanResultFuture.java:85)
      4. org.jboss.as.controller.client.helpers.standalone.impl.ServerDeploymentPlanResultFuture.get(ServerDeploymentPlanResultFuture.java:42)
      5. org.jboss.as.controller.client.helpers.standalone.ServerDeploymentHelper.deploy(ServerDeploymentHelper.java:55)
      5 frames
    3. JBoss Application Server: Arquillian Common
      ArchiveDeployer.deployInternal
      1. org.jboss.as.arquillian.container.ArchiveDeployer.deployInternal(ArchiveDeployer.java:77)
      1 frame