This week's book giveaway is in the Programmer Certification forum. We're giving away four copies of OCP Oracle Certified Professional Java SE 11 Programmer I Study Guide: Exam 1Z0-815 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
first off thanks for your prompt responces. What i wrote had typos (sorry i should proof-read b4 posting).
I was mentioning that i know if i redeploy i will loose everything but it isn't important right now since i'm in development rather than production. I will start clean anyway so anything i'm uploading is garbage.
Currently i'm logged in as local admin and running tomcat through an eclipse plugin. I would assume that tomcat would take on the permissions as the user running it.
java.io.IOException: Access is denied at java.io.WinNTFileSystem.createFileExclusively(Native Method) at java.io.File.createNewFile(Unknown Source) at com.m2m.actions.AddUserPicturesAction.execute(AddUserPicturesAction.java:95) at org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58) at org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67) at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51) at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190) at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304) at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190) at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462) at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.m2m.filters.HibernateSessionReqFilter.doFilter(HibernateSessionReqFilter.java:41) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Unknown Source)
This is at f.createNewFile();
I haven't tried to deploy it on an external tomcat.
posted 11 years ago
when running it on an external tomcat5 (eclipse plugin is v6).. the same error occurs. I wasn't running this as a service or anything..just a standard launch.
posted 11 years ago
well i just uncommented out the f.mkdirs() and it seemed to work.. odd.
If you want the long explanation, I think you can search this forum and find one. Ever so often I go on a long-winded rant about why you should never try and write into any part of a web application. Short answer: because it doesn't always work. Treat the app as something read-only that isn't necessarily a real directory with real files in it.
Eclipse isn't a web server, so if your webapp is attempting to write to itself, Eclipse doesn't get involved - all it's doing is running a copy of Tomcat in embedded mode. Technically, Tomcat's not doing it either. You're doing it to yourself in your webapp code.
But as I said, you'll have a happier life if you don't do it at all.
Being persecuted doesn't in any way prove your righteousness or your beliefs. Many people get persecuted because they are repugnant or annoying. Or just because they can be.
Without deviation from the norm, progress is not possible - Zappa. Tiny ad: