At first I tried to complete the persistence tutorial with Hibernate.
I can see, the HashMap is filled with the values (firstName, lastName values
in PersonDaoTestCase) if I debug the TestCase.
Unfortunatelly BeanUtils doesn't seem to find the proper setter for the
HashMap keys.
Even copying the property file direct to
src/test/java/${groupId}/ClassName.properties doesn't help.
Frank-Michael
ERROR [main] JDBCExceptionReporter.logExceptions(78) | Batch-Eintrag 0
insert into person (first_nam
e, last_name, id) values (NULL, NULL, 1) wurde abgebrochen. Rufen Sie
'getNextException' auf, um di
e Ursache zu erfahren.
WARN [main] JDBCExceptionReporter.logExceptions(77) | SQL Error: 0,
SQLState: 23505
ERROR [main] JDBCExceptionReporter.logExceptions(78) | ERROR: duplicate key
violates unique constrai
nt "person_pkey"
ERROR [main] AbstractFlushingEventListener.performExecutions(301) | Could
not synchronize database s
tate with session
org.hibernate.exception.ConstraintViolationException: Could not execute JDBC
batch update
at
org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:71)
....
Caused by: java.sql.BatchUpdateException: Batch-Eintrag 0 insert into person
(first_name, last_name,
id) values (NULL, NULL, 1) wurde abgebrochen. Rufen Sie 'getNextException'
auf, um die Ursache zu
erfahren.
at
org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError(AbstractJdbc2S
tatement.java:2512)
at
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1310)
at
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:347)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:2574
)
at
org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297)
at
org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297)
at
org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48)
at
org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:246)
... 34 more
INFO [main] PersonDaoTest.endTransaction(290) | Rolled back transaction
after test execution
Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 3.647 sec
<<< FAILURE!
mraible wrote:
>
> Are you placing your .properties file in the correct directory? It
> should be in src/test/resources/${groupId}/ClassName.properties.
>
--
View this message in context:
http://www.nabble.com/Bean-population-in-BaseDaoTestCase-%28Hibernate%29-tp16046539s2369p16121972.html
Sent from the AppFuse - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]