Hi I am working with saving Image into DB,I am Taking Image as Multipart and trying to convert into Blob
type.
I do this method:
Blob blob=Hibernate.getLobCreator(sessionFactory.getCurrentSession()).createBlob(multipartFile.getInputStream(),multipartFile.getSize());
But getting Nullpointer Exception While Executing
.
the file is Unable to convert multipart into Blob
, any other Method to saving Image into DB.
The method createBlob(InputStream) is undefined for the type Hibernate
when i use thecreateBlob()
method, as it is deprecated and in Hibernate version 4.. – Filing