I have a Hibernate entity class that uses the following annotations
@Entity
@Table(name = "user", schema = "public", catalog = "fittracker")
public class UserEntity {
The code runs fine in the server with these annotations, but the tests
failed with the error:
Running trackerservices.db.UserDAOTest
WARN [2017-04-12 20:34:52,352] org.hibernate.orm.connections: HHH10001002:
Using Hibernate built-in connection pool (not for production use!)
WARN [2017-04-12 20:34:53,745]
org.hibernate.tool.schema.internal.ExceptionHandlerLoggedImpl:
GenerationTarget encountered exception accepting command : Unable to
execute command [drop table fittracker.public.user if exists]
! org.h2.jdbc.JdbcSQLException: Schema "FITTRACKER" not found; SQL
statement:
If I remove the schema and catalog attributes, the tests run fine bu tthen
the requests fail with the following error:
! org.postgresql.util.PSQLException: ERROR: syntax error at or near "user"
! Position: 58
! at
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2102)
! at
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1835)
! at
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
! at
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:500)
! at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:388)
! at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:334)
! at
org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204)
Is there any way to set up the annotations to run both the tests and server
requests? I'm I missing something on my Entity definition?
Thanks
--
You received this message because you are subscribed to the Google Groups
"dropwizard-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.