0

我有一个运行 Railo 3.3 的 Windows Server 2008 VPS。

我在使用<cfimage标签时遇到了 Java 问题。

基本上,我使用<cffile to Folder/Images/Original 然后在另一个页面上上传图像,<cfimage用于读取文件,然后<cfimage再次用于调整大小并保存在文件顶部。这就是问题所在。

我不会尝试保存到其他位置,因此不会覆盖导致问题的原因。

我无法发布错误的图像,因此我将在此处发布文本:

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 
4

1 回答 1

1

该错误非常具体,因此请查看权限。它在哪里说:

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

意味着无论 Railo 运行在哪个用户下(签入您的服务),都无权从该文件夹中获取文件。

于 2012-09-20T15:33:49.110 回答