guess you will need to put it on github cause with this mail we can;t say if your constructor is valid and what is returning getGetCustomerSTBData()
Romain Manni-Bucau @rmannibucau <https://twitter.com/rmannibucau> | Blog <http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> | LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber <http://www.tomitribe.com> 2015-12-21 22:25 GMT+01:00 sgjava <[email protected]>: > OK, my non-cached services have the payloads validated now, but one > annotated > with @CacheResult is throwing a NPE if accountId is null. I'm using a > parameter annotation instead of a instance variable annotation. > > DTO: > > @ConstructorProperties({"customerGuid", "masIp", "maxAgeMs", "transId", > "accountId"}) > public CustStbDto(final String customerGuid, final String masIp, > final Long maxAgeMs, final Long transId, > @NotNull final String accountId) { > > Service: > > @Path("/someurl") > @POST > @ValidateOnExecution > @Valid > public Response getCustomerSTBData(@Valid final CustStbDto custStbDto) > { > CustStbDto retCustStbDto = masBean.getCustomerSTBData(custStbDto. > getGetCustomerSTBData().getAccountId(), custStbDto); > > Bean: > > @CacheResult(cacheName = "customerStbData") > public CustStbDto getCustomerSTBData(@CacheKey final String accountId, > final CustStbDto custStbDto) { > log.debug("Not in cache"); > > GeneratedCacheKey: > > public StringGeneratedCacheKey(final String val) { > this.value = val; > this.cachedHash = val.hashCode(); > } > > It's NPE on this.cachedHash = val.hashCode(); > > > > -- > View this message in context: > http://tomee-openejb.979440.n4.nabble.com/Bean-validation-with-JCache-tp4677284.html > Sent from the TomEE Users mailing list archive at Nabble.com. >
