Hi Tero, I was able to duplicate the error you're seeing. However, you have to be a little careful specifying the image location and image name when using the Image Upload jsp. More specifically, it wants you to enter the full path + the filename + extension in the "Location of the Image(full path)" entry field. The "Name of the Image(Unique Name)" entry field then is then used to uniquely identify that image in the system database. So in your case you might want to use this:

Location of the Image(full path):       c:\app\FILENAME.EXT
Name of the Image(Unique Name):   FILENAME

If you do that you'll find that it uploads correctly. Then you can use the Image Download jsp to view what you've uploaded using the unique name you specified above. So in your case you would use: For example:

Name of the Image:      FILENAME

Try that and let me know how it goes. BTW, I noticed a couple errors in the documentation for this tutorial, which you probably noticed as well. I'll clean those up tomorrow. Thanks
                                

Tero Mäntyvaara wrote:
Hi,

I am following tutorial of the Web Application for JDBC access. I am
running Geronimo in Windwows XP. I have made directory c:\app to store
file to upload. Permission is for all and to do anything in this folder.
After entering c:\app as directory and FILENAME.EXT as file and pressing
submit button in form I get 500 error. AG console reports

        java.io.FileNotFoundException: C:\app (Access is denied)
        at java.io.FileInputStream.open(Native Method)
        at java.io.FileInputStream.<init>(Unknown Source)
        at jdbc.ImageUpload.doProcess(ImageUpload.java:39)
        at jdbc.ImageUpload.doGet(ImageUpload.java:28)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:693)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at
org.apache.geronimo.tomcat.valve.DefaultSubjectValve.invoke(DefaultSubjectValve.java:56)
        at
org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke(GeronimoStandardContext.java:406)
        at
org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(GeronimoBeforeAfterValve.java:47)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:568)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
        at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
        at java.lang.Thread.run(Unknown Source)
17:43:14,249 ERROR [[ImageUpload]] Servlet.service() for servlet
ImageUpload threw exception
java.lang.NullPointerException
        at jdbc.ImageUpload.doProcess(ImageUpload.java:53)
        at jdbc.ImageUpload.doGet(ImageUpload.java:28)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:693)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at
org.apache.geronimo.tomcat.valve.DefaultSubjectValve.invoke(DefaultSubjectValve.java:56)
        at
org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke(GeronimoStandardContext.java:406)
        at
org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(GeronimoBeforeAfterValve.java:47)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:568)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
        at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
        at java.lang.Thread.run(Unknown Source)


Is this AGs security issue or Tomcats?


Tero Mäntyvaara


--
Thanks,
Tim McConnell

Reply via email to