cockroachdb / cockroachdb/examples-orms
Hibernate demo uses company_hibernate instead of the stated
- Dominant language
- Go
- Stars
- 82
- Forks
- 37
- PR merge metrics
- No merged PRs in 30d
Description
CREATE DATABASE IF NOT EXISTS company_{language}_{ORM};
It uses the database company_hibernate..
Sep 21, 2017 4:40:15 PM org.hibernate.tool.schema.internal.ExceptionHandlerLoggedImpl handleException
WARN: GenerationTarget encountered exception accepting command : Error executing DDL via JDBC Statement
org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL via JDBC Statement
at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:67)
at org.hibernate.tool.schema.internal.AbstractSchemaMigrator.applySqlString(AbstractSchemaMigrator.java:524)
at org.hibernate.tool.schema.internal.AbstractSchemaMigrator.applySqlStrings(AbstractSchemaMigrator.java:470)
at org.hibernate.tool.schema.internal.AbstractSchemaMigrator.applyForeignKeys(AbstractSchemaMigrator.java:429)
at org.hibernate.tool.schema.internal.AbstractSchemaMigrator.performMigration(AbstractSchemaMigrator.java:245)
at org.hibernate.tool.schema.internal.AbstractSchemaMigrator.doMigration(AbstractSchemaMigrator.java:110)
at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.performDatabaseAction(SchemaManagementToolCoordinator.java:177)
at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.process(SchemaManagementToolCoordinator.java:66)
at org.hibernate.internal.SessionFactoryImpl.(SessionFactoryImpl.java:309)
at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:445)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:710)
at com.cockroachlabs.util.SessionUtil.(SessionUtil.java:64)
at com.cockroachlabs.util.SessionUtil.init(SessionUtil.java:68)
at com.cockroachlabs.Application.initHibernate(Application.java:33)
at com.cockroachlabs.Application.run(Application.java:28)
at com.cockroachlabs.Application.main(Application.java:24)
Caused by: org.postgresql.util.PSQLException: ERROR: database "company_hibernate" does not exist
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2284)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2003)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:200)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:424)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the Hibernate demo configuration and the com.cockroachlabs.util.SessionUtil and Application.initHibernate entry points named in the stack trace. Compare the configured database with the stated company_{language}_{ORM} convention; done means the demo uses the intended database name and no longer reports that company_hibernate is missing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, postgresql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100