1

First, I run my method as a java application in eclipse and it works fine.

Then, when I run it on the tomcat server, it blows up.

Here is the code:

try(BufferedReader br = new BufferedReader(new FileReader(new File(Constants.USERMAP_FILE_LOCATION))))

Here is the Exception:

com.mycompany.is.dt.Exception.SubversionUtilityException: usermap (No such file or directory)

I also tried changing the path. I right clicked on the file in my project and went to properties. It gave me the path /DevToolsSvn2Git/usermap but I still got this excetion.

com.mycompany.is.dt.Exception.SubversionUtilityException: /DevToolsSvn2Git/usermap (No such file or directory)

Is something changing in the WAR that I am not aware of?

Chris Bolton
  • 2,162
  • 4
  • 36
  • 75

2 Answers2

0

I would suggest implementing the top answer from this question to see what folder your application is running in. This will help you figure out where your file/folder reference needs to be to avoid the FileNotFoundException

Community
  • 1
  • 1
bhooks
  • 409
  • 5
  • 16
0

You must use AbsolutePath, which is sth. like

"C://User//Project//Git//DevToolsSvn2Git/usermap"
Azat Nugusbayev
  • 1,391
  • 11
  • 19