[
https://hibernate.onjira.com/browse/HV-587?page=com.atlassian.jira.plugin...
]
Michael G updated HV-587:
-------------------------
Attachment: test.zip
Please find attached my test case.
I am using
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>4.2.0.Final</version>
The exception is
Exception in thread "main" java.lang.StackOverflowError
at
javax.persistence.spi.PersistenceProviderResolverHolder.getPersistenceProviderResolver(PersistenceProviderResolverHolder.java:39)
at javax.persistence.Persistence.getProviders(Persistence.java:60)
at javax.persistence.Persistence.access$000(Persistence.java:16)
at javax.persistence.Persistence$1.isLoaded(Persistence.java:76)
at
org.hibernate.validator.engine.resolver.JPATraversableResolver.isReachable(JPATraversableResolver.java:61)
at
org.hibernate.validator.engine.resolver.DefaultTraversableResolver.isReachable(DefaultTraversableResolver.java:131)
at
org.hibernate.validator.engine.resolver.SingleThreadCachedTraversableResolver.isReachable(SingleThreadCachedTraversableResolver.java:46)
at
org.hibernate.validator.engine.ValidatorImpl.isCascadeRequired(ValidatorImpl.java:1266)
at
org.hibernate.validator.engine.ValidatorImpl.validateCascadedConstraints(ValidatorImpl.java:472)
at
org.hibernate.validator.engine.ValidatorImpl.validateInContext(ValidatorImpl.java:322)
at
org.hibernate.validator.engine.ValidatorImpl.validateCascadedConstraint(ValidatorImpl.java:613)
at
org.hibernate.validator.engine.ValidatorImpl.validateCascadedConstraints(ValidatorImpl.java:478)
at
org.hibernate.validator.engine.ValidatorImpl.validateInContext(ValidatorImpl.java:322)
at
org.hibernate.validator.engine.ValidatorImpl.validateCascadedConstraint(ValidatorImpl.java:613)
at
org.hibernate.validator.engine.ValidatorImpl.validateCascadedConstraints(ValidatorImpl.java:478)
at
org.hibernate.validator.engine.ValidatorImpl.validateInContext(ValidatorImpl.java:322)
at
org.hibernate.validator.engine.ValidatorImpl.validateCascadedConstraint(ValidatorImpl.java:613)
at
org.hibernate.validator.engine.ValidatorImpl.validateCascadedConstraints(ValidatorImpl.java:478)
at
org.hibernate.validator.engine.ValidatorImpl.validateInContext(ValidatorImpl.java:322)
at
org.hibernate.validator.engine.ValidatorImpl.validateCascadedConstraint(ValidatorImpl.java:613)
at
org.hibernate.validator.engine.ValidatorImpl.validateCascadedConstraints(ValidatorImpl.java:478)
...
stack overflow when having @Valid on cycle
------------------------------------------
Key: HV-587
URL:
https://hibernate.onjira.com/browse/HV-587
Project: Hibernate Validator
Issue Type: Bug
Reporter: Michael G
Attachments: test.zip
When I have some entities referencing each other (a cycle), the annotation @Valid is on
the corresponding getters and there is not really something to be validated on these
entities (no @NotNull, ... is present) I end up in a recursion which leads to a stack
overflow.
If there are some @NotNull the detection of cycles does work fine.
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira