Win a copy of Programming with Types this week in the Angular and TypeScript forum
or The Design of Web APIs in the Web Services forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Knute Snortum
  • Henry Wong
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Joe Ess
  • salvin francis

help

 
Ranch Hand
Posts: 4702
9
Scala Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this is the stupid message i get
java.io.FileNotFoundException: ../webapps/examples/SiteLog.txt (The system cannot find the path specified)
well I guarantee the file is there and sometimes the server can see it too. It is just like the game which says I must free up some disk space in order to save a game when i got 4 gigs free
this site has worked fine for over a year. there is something wrong with windows please help
 
Randall Twede
Ranch Hand
Posts: 4702
9
Scala Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
well i guess they will just take my word that there is a database and that i use ODBC to talk to it from my servlets.. if someone told me that and it didnt work i would believe it. hey does anyone collect shell casings cause i might as well just shoot myself
does anyone have a dictionary with my picture for loser?
 
Randall Twede
Ranch Hand
Posts: 4702
9
Scala Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I mean how do you explain to a potential employer that your code is fine it is just not working cause some hacker fucked you over? eh? how do I say that in my resume?
 
Randall Twede
Ranch Hand
Posts: 4702
9
Scala Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what would you think if someone said hey go see my site i use servlets to access a database it is like online store and you saw this?:
Error: 500
Location: /examples/servlet/MyCookieServlet
Internal Servlet Error:
java.io.FileNotFoundException: ../webapps/examples/SiteLog.txt (The system cannot find the path specified)
at java.io.FileOutputStream.openAppend(Native Method)
at java.io.FileOutputStream.(Unknown Source)
at java.io.FileWriter.(Unknown Source)
at FileIO.append(FileIO.java:12)
at MyCookieServlet.doGet(MyCookieServlet.java:96)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:499)
at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:597)
at org.apache.tomcat.servlets.InvokerServlet.service(InvokerServlet.java:257)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java:156)
at org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338)
at java.lang.Thread.run(Unknown Source)
the worst part is this code has worked fine for over a year and I cant fix it or find out the problem since the problem is in windows not my application
 
Randall Twede
Ranch Hand
Posts: 4702
9
Scala Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
damnit it file is there! it always has been for over a year now and it was never a problem. what is wrong?
 
Wanderer
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try modifying the server to print out the file.getAbsolutePath() for the file in question. You may find that the relative path isn't starting from the same directory you think it is. As a quick workaround you might need to hard-code the correct full path, until you have time to track down what caused the path to be interpreted differently than usual. I don't have any other ideas offhand - good luck!
 
Randall Twede
Ranch Hand
Posts: 4702
9
Scala Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks jim ill try tomorrow i guess i cant handle it now
 
Always look on the bright side of life. At least this ad is really tiny:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!