-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Caused by: javax.validation.ValidationException: HV000012:
PostPosted: Fri Oct 05, 2012 11:42 am 
Newbie

Joined: Tue Jul 24, 2012 2:39 pm
Posts: 10
I am having trouble validating the beans that we want to validate, and I have written everything needed and I am having this exception.

Please let me know, what is wrong.

java.lang.ExceptionInInitializerError
at com.drfirst.pi.affiliate.json.validation.test.HibernateRequestValidatorTest.testGetProgramDocumentsRequestSuccessful(HibernateRequestValidatorTest.java:32)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: javax.validation.ValidationException: HV000012: Unable to create annotation for configured constraint: HV000085: No value provided for fraction..
at org.hibernate.validator.internal.xml.XmlMappingParser.createMetaConstraint(XmlMappingParser.java:365)
at org.hibernate.validator.internal.xml.XmlMappingParser.parseFieldLevelOverrides(XmlMappingParser.java:237)
at org.hibernate.validator.internal.xml.XmlMappingParser.parse(XmlMappingParser.java:113)
at org.hibernate.validator.internal.metadata.provider.XmlMetaDataProvider.<init>(XmlMetaDataProvider.java:63)
at org.hibernate.validator.internal.engine.ValidatorFactoryImpl.<init>(ValidatorFactoryImpl.java:69)
at org.hibernate.validator.HibernateValidator.buildValidatorFactory(HibernateValidator.java:45)
at org.hibernate.validator.internal.engine.ConfigurationImpl.buildValidatorFactory(ConfigurationImpl.java:196)
at com.drfirst.pi.affiliate.json.validation.HibernateRequestValidator.<clinit>(HibernateRequestValidator.java:59)
... 24 more
Caused by: java.lang.IllegalArgumentException: HV000085: No value provided for fraction.
at org.hibernate.validator.internal.util.annotationfactory.AnnotationProxy.getAnnotationValues(AnnotationProxy.java:83)
at org.hibernate.validator.internal.util.annotationfactory.AnnotationProxy.<init>(AnnotationProxy.java:67)
at org.hibernate.validator.internal.util.annotationfactory.AnnotationFactory.create(AnnotationFactory.java:41)
at org.hibernate.validator.internal.xml.XmlMappingParser.createMetaConstraint(XmlMappingParser.java:362)
... 31 more


Thanks.


Top
 Profile  
 
 Post subject: Re: Caused by: javax.validation.ValidationException: HV000012:
PostPosted: Tue Oct 09, 2012 4:40 am 
Hibernate Team
Hibernate Team

Joined: Thu Apr 05, 2007 5:52 am
Posts: 1689
Location: Sweden
Which constraints are you using? Built-in ones or custom constraints? Maybe you are using the @Digits constraints which needs to have a fraction specified. However, this value is mandatory so I am not sure how you code would even compile.
On the other hand you seem to use XML configuration. Maybe you just don't specify fraction for the @Digits constraint there?

--Hardy


Top
 Profile  
 
 Post subject: Re: Caused by: javax.validation.ValidationException: HV000012:
PostPosted: Tue Oct 09, 2012 4:47 am 
Hibernate Team
Hibernate Team

Joined: Thu Apr 05, 2007 5:52 am
Posts: 1689
Location: Sweden
The error message should be more descriptive though. I created https://hibernate.onjira.com/browse/HV-620.

--Hardy


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.