0

I have a windows server 2008 VPS running Railo 3.3.

I am having a Java issue using the <cfimage tag.

Basically I upload an image using <cffile to Folder/Images/Original Then on another page I use <cfimage to read the file then use <cfimage again to resize and save over the top of the file. This is were the issue is.

I will not I have tried saving to other locations so it isn't overwriting that is causeing the issue.

I can't post an image of the error so I will post the text here:

Cause: java.io.FileNotFoundException   
C:\inetpub\wwwroot\mnz.salesearch.co\NZ1\CheapSkates\Images\Original (Access is denied) 
   at java.io.FileOutputStream.open(Native Method):-2 
   at java.io.FileOutputStream.<init>(Unknown Source):-1 
   at railo.commons.io.res.type.file.FileResource.getOutputStream(FileResource.java:226):226 
   at railo.commons.io.res.type.file.FileResource.getOutputStream(FileResource.java:212):212 
   at railo.runtime.img.Image.writeOut(Image.java:855):855 
   at railo.runtime.img.Image.writeOut(Image.java:835):835 
   at railo.runtime.tag.Image.doActionWrite(Image.java:484):484 
   at railo.runtime.tag.Image.doStartTag(Image.java:332):332 
   at app.toolbox.crop_cfm$cf.call(C:\inetpub\wwwroot\mnz.salesearch.co\APP\TOOLBOX\crop.cfm:10):10 
   at railo.runtime.PageContextImpl.doInclude(PageContextImpl.java:799):799 
   at railo.runtime.PageContextImpl.doInclude(PageContextImpl.java:751):751 
   at railo.runtime.listener.ClassicAppListener._onRequest(ClassicAppListener.java:35):35 
   at railo.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:24):24 
   at railo.runtime.PageContextImpl.execute(PageContextImpl.java:2035):2035 
   at railo.runtime.PageContextImpl.execute(PageContextImpl.java:2002):2002 
   at railo.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:297):297 
   at railo.loader.servlet.CFMLServlet.service(CFMLServlet.java:32):32 
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:722):722 
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305):305 
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210):210 
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225):225 

 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169):169 
   at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472):472 
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168):168 
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98):98 
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118):118 
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407):407 
   at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:200):200 
   at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565):565 
   at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:307):307 
   at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source):-1 
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source):-1 
   at java.lang.Thread.run(Unknown Source):-1 
jbard
  • 103
  • 1
  • 10
  • Does your Railo instance have a user that has permission to read/write and execute files? Windows permissions are always tricky. You can set the user in the Railo service control monitor. – Dpolehonski Sep 20 '12 at 14:28

1 Answers1

1

The error is being quite specific so look at the permissions. Where it says:

Cause: java.io.FileNotFoundException   
C:\inetpub\wwwroot\mnz.salesearch.co\NZ1\CheapSkates\Images\Original (Access is denied)

Means that whatever user Railo is running under (check in your Services) does NOT have access to get files from that folder.

Anne
  • 26,765
  • 9
  • 65
  • 71
Mark D
  • 543
  • 2
  • 5