-->
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: @NotNull validation not working
PostPosted: Thu Mar 17, 2011 5:52 am 
Newbie

Joined: Thu Mar 17, 2011 5:44 am
Posts: 2
Hi everyone,

I am newbie to hibernate validation usage. I tried to add @NotNull and @Valid anootation to the parameters being passed to the EJB3 session beans. But when I execute my JUnit test case by passing null or invalid data, validator does not throw any exceptions. Please find the code snippet below [ I am not facing any errors also ]. Please let me know waht I am missing to make this work.

public Pool createPool(@NotNull final Pool pool) throws ApplicationException {


Thanks in advance,
Raj


Top
 Profile  
 
 Post subject: Re: @NotNull validation not working
PostPosted: Sat Mar 19, 2011 2:07 am 
Newbie

Joined: Thu Mar 17, 2011 5:44 am
Posts: 2
Hi,

At last that was an issue from my side.

I tried to use @NotNull using JUnit and it looks like @NotNull will be called by container and hence I used OPenEJB framework for unit testing and it worked fine.

Thanks,
Raj


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.