how to get image from java to j2me

friends please help me with this problem i connected a j2me application with a jdbc application...it retreives an image and sends it as bytes to the j2me application but the j2me application displays an error message saying java.lang.error ut of memory what shall i do?