Working on a project with the following:
When I run a mvn compile, I get a notice about failed tests, with the following result:Code:persistence setup --provider HIBERNATE --database ORACLE entity --class ~.ItemStatus field string --fieldName name --notNull entity --class ~.ItemState --testAutomatically field reference --type ~.ItemStatus status --cardinality ONE_TO_ONE --notNull field date --type java.util.Date --fieldName statusDate --notNull field boolean --fieldName currentState --notNull
I'm new to the Spring Roo framework, so I'm probably overlooking something that's obvious to everyone else, but I can't seem to track down a solution for this.Code:------------------------------------------------------------------------------- Test set: test.ItemStateIntegrationTest ------------------------------------------------------------------------------- Tests run: 9, Failures: 0, Errors: 8, Skipped: 0, Time elapsed: 0.077 sec <<< FAILURE! testFlush(test.ItemStateIntegrationTest) Time elapsed: 0.014 sec <<< ERROR! javax.validation.ConstraintViolationException: Validation failed for classes [test.ItemState] during persist time for groups [javax.validation.groups.Default, ] List of constraint violations:[ ConstraintViolationImpl{interpolatedMessage='may not be null', propertyPath=status, rootBeanClass=class test.ItemState, messageTemplate='{javax.validation.constraints.NotNull.message}'} ] at org.hibernate.cfg.beanvalidation.BeanValidationEventListener.validate(BeanValidationEventListener.java:161) at org.hibernate.cfg.beanvalidation.BeanValidationEventListener.onPreInsert(BeanValidationEventListener.java:94) at org.hibernate.action.EntityInsertAction.preInsert(EntityInsertAction.java:178) at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:72) at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:273) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:265) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:184) at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321) at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51) at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1216) ...
Any help would be appreciated.


Reply With Quote