-->
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.  [ 2 posts ] 
Author Message
 Post subject: I'm not able to use validation.xml!
PostPosted: Fri Jul 02, 2010 4:58 pm 
Newbie

Joined: Thu Jul 01, 2010 9:31 am
Posts: 3
Hi,

I'm using GlassFish V3 Java EE 6 which supports already JSR303.
I'm not able to use validation.xml to set the constraint-mapping to my XML
It's still referringt to the Class Constraint Annotations. And even if they are removed, no validation occurs.

I have placed the validation.xml under META-INF/validation.xml
and my Test Class

@BeforeClass
public static void setUp() {
ValidatorFactory factory = Validation.buildDefaultValidatorFactory();
validator = factory.getValidator();
}

Am I missing something?


Top
 Profile  
 
 Post subject: Re: I'm not able to use validation.xml!
PostPosted: Mon Jul 05, 2010 4:40 am 
Hibernate Team
Hibernate Team

Joined: Thu Apr 05, 2007 5:52 am
Posts: 1689
Location: Sweden
If validation.xml is found in the META-INF directory of your classpath it should be picked up. If there is an error in the xml there should be an exception. My guess is that it is not picked up from some reason. Do you have hibernate debug trace enabled? If so look through the first few messages from Hibernate Validator when it bootstraps. If validation.xml is not found you should see something like this:

Code:
No META-INF/Validtion.xml found. Using annotation based configuration only


--Hardy


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.