FileNotFoundException when loading freemarker template in java

后端 未结 5 1262
说谎
说谎 2021-01-04 07:40

I get a file not found exception while loading a freemarker template even though the template is actually present in the path.

Update: This is running as a webservi

5条回答
  •  难免孤独
    2021-01-04 08:01

    The Java VM is not able to find you file /templates/fibplain.xml in the specified location. This is an absolute path and it is highly likely that you are confused with relative path. To get this corrected use the complete (i.e absolute) path properly like /home/jaykumar/templates/fibplan.xml($TEMPLATE_HOME/fibplan.xml). Other possibility would be, if you do have such location as /templates/, you might not have placed fibplain.xml in the location. To me only these two are the most plausible reasons. I assumed it is one of the linux distribution because of the separator is /

提交回复
热议问题