Open ziziiy opened 6 years ago
So in order for the application to work, a temporary folder should be created where the images are stored. This folder is /tmp/steganography. Make sure the folder exists and is writable.
I created a tmp folder and placed the images. but when I open anyway an error on console. jquery-1.7.2.min.js:4 POST http://localhost:8081/Steganography/encode 500 (Internal Server Error) send @ jquery-1.7.2.min.js:4 ajax @ jquery-1.7.2.min.js:4 fileUploadXhr @ jquery.form.js:262 $.fn.ajaxSubmit @ jquery.form.js:199 doAjaxSubmit @ jquery.form.js:718 dispatch @ jquery-1.7.2.min.js:3 i @ jquery-1.7.2.min.js:3 and already Image:false
Have you checked the tomcat logs? Is there any exception there?
Image : false мар 29, 2018 2:55:51 PM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet [org.university.steganography.servlet.EncodeImageServlet] in context with path [/Steganography] threw exception java.lang.NullPointerException at org.university.steganography.servlet.EncodeImageServlet.doPost(EncodeImageServlet.java:81) at javax.servlet.http.HttpServlet.service(HttpServlet.java:648) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:94) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:502) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1132) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1539) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1495) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745)
Can please explain in details how do you build and run the application. Have you followed the steps explained in the README file?
According to the log it seems the image is null. Let me update the code a little as the current exception handling is awful :)
for some reason when I upload a photo , the console produces image:false POST http://localhost:8081/Steganography/encode 500 (Internal Server Error) please help.