Questions tagged [jsr]

JSR commonly refers to Java Specification Requests, formal standards for the Java platform.

Java Specification Requests

147 questions
0
votes
1 answer

Validating POJO with JSR 303

I have a POJO as follows: public class ClosureCodeReasonRequest { @NotNull(message = MessageConstants.CLOSURE_CODE_BLANK_ERROR) @NotBlank(message = MessageConstants.CLOSURE_CODE_BLANK_ERROR) private String closureCode; …
Joy
  • 4,197
  • 14
  • 61
  • 131
0
votes
1 answer

JSR 303 vs Spring validation

I am new to Spring validation. Recently I have been exploring different approaches of validation utilities available in Spring. I found there are basically two approaches: 1. with JSR-303 and 2. by implementing Validator interface in Spring. What I…
Joy
  • 4,197
  • 14
  • 61
  • 131
0
votes
0 answers

response not coming for spring-micro services, jsr 303 validation

I am using JSR 303 for validating my request object of rest controller. Validation is working fine but i am not getting the response. below is the code am i missing something ? Pojo class: @ValInfo(message ="empty filed",…
user3927150
  • 61
  • 1
  • 2
  • 9
0
votes
1 answer

Use only JSR api in my pom.xml

Well, i'm trying to follow the Oracle JSR and use only specifications in my project. I'm using JBOSS EAP 7 as Server APP. 1) I have hibernate dependency in my project: org.hibernate
Ronaldo Lanhellas
  • 2,975
  • 5
  • 46
  • 92
0
votes
1 answer

Single JSR, multiple API versions

Many specifications define different JSRs for different versions of the API, e.g. for the Java Servlet spec: ------------------------------- |Servlet spec version | JSR | ------------------------------- | 4.0 | 369 | | …
parml
  • 497
  • 5
  • 15
0
votes
1 answer

Jersey REST does not return data in the format from Accept header

CustomObjectResource - rest service returning a simple POJO with text, long and local date time fields. @Component @Path("/resource") public class CustomObjectResource { private RandomCOBuilder randomCOBuilder = new RandomCOBuilder(); …
user8290063
0
votes
1 answer

Making request to @Valid

I'm developping spring-boot application, I need to validate user information before checking other information. This is a snippet: @RequestMapping(value = "/create-user", method = RequestMethod.POST) public String ceateCustomer(@Valid @RequestBody…
Olivier
  • 3
  • 3
0
votes
1 answer

Custom bean validation

I'm developing an application using spring-boot. I want to validate the user bean using JSR annotation. The problem is that I have some fields that depend on the value of others. For example when status="user_pr" I have to make the address, county,…
Olivier
  • 3
  • 3
0
votes
0 answers

Custom Annotation using JSR 3.0

I have one pojo class with name LoanForm with few fields:String loanType;String source;String amount; I created a custom annotation for loanType. Below is the code.Next I created another class as validator LoanTypeConstraintValidator. Below is the…
Apurba
  • 3
  • 1
  • 4
0
votes
1 answer

Jmeter - JSR223 Error: Can't iterate over type: class com.couchbase.client.java.query.DefaultN1qlQueryResult

I have a java code and validating them on JSR 223 Preprocessor.. When i validated, i have found below error message: Can't iterate over type: class com.couchbase.client.java.query.DefaultN1qlQueryResult Any idea/advice to resolve the above error…
0
votes
3 answers

Java implementation in Java

Is there a JSR 223 implementation of the Java language? or even something that can parse and run Java? My intentions are to make Java reload times almost zero during development like Javascript and PHP, without having to pay for JRebel or deal with…
0
votes
1 answer

@Resource on type level

I found @Resource can also be applied at class level: http://docs.oracle.com/javaee/5/tutorial/doc/bncjk.html Class-Based Injection To use class-based injection, decorate the class with a @Resource annotation, and set the required name and type …
jarosik
  • 4,136
  • 10
  • 36
  • 53
0
votes
0 answers

@Vaild is not working

I want to check size validation for studentHobby object and i am using @Size annotation and Using @valid annotation. I am providing less than the value defined in @Size annotation but still I am getting the result instead of error. I tried things…
Diwakar Bhatt
  • 495
  • 2
  • 11
  • 24
0
votes
1 answer

How can I ignore extra fields with JSR 303?

I'm getting a JSON response in a RESTful endpoint. The fields in the response are variable. In particular some fields that I do not care about them. Because of some requirements I have to use JSR 303 validation annotation to an envelope class to…
A F
  • 53
  • 1
  • 7
0
votes
1 answer

ConstraintValidation not getting applied to the list

I have List of Objects that I need to run some validation on @KeyValid @Valid protected List keyValues; and I have a the following annotation created for it: @Target({ElementType.TYPE,…
Nick Div
  • 5,338
  • 12
  • 65
  • 127