Sally william wrote:...Then i convert the image dto attribute to blob in service side:I need to display that image on my JSP page, and i need to set back all my entity attributes to DTO attributes...
I'm afraid I'm no expert on this stuff, but I don't see the setPicture() method that you appear to be trying to call (I do see setPictureFileName() though).
However, one tip that might help you out: Split your statements up into single actions.
That statement of yours above is doing at least 4 things that I can see (and maybe more under the hood), and it makes it very difficult to determine what's going wrong if you run into problems.
If you were to write:you would be accomplishing exactly the same thing (I think ), and you could then add debugging statements in between each stage to check that what you think is happening is in fact happening; and I think my first one would be to display picBytes.length.
In addition, it also makes it much easier for the next poor soul who has to maintain that program to understand what it's trying to do.