I cannot post this code, but I can build a stand alone example tonight,
thanks!

On Mon, Dec 21, 2015 at 4:51 PM, Romain Manni-Bucau <[email protected]>
wrote:

> 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.
> >
>



-- 
Steven P. Goldsmith

Reply via email to