Project

General

Profile

Defect #1330

500 on server

Added by Sanneke Aleman almost 6 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Normal
Category:
velocity
Target version:
Start date:
05/28/2018
Due date:
% Done:

0%

Estimated time:
Browser (if web client):
chrome

Description

We get a 500 error on the sever(Servoy version 8.2.3 -releaseNumber 3109, tomcat 9.0.8). It works fine in developer.

https://ourURL/eastwood/reports/css/contract.css will give:

java.lang.NullPointerException
java.io.File.<init>(Unknown Source)
net.stuff.servoy.servlet.StaticWebServlet.getFile(StaticWebServlet.java:129)
net.stuff.servoy.servlet.StaticWebServlet.getLastModified(StaticWebServlet.java:122)
javax.servlet.http.HttpServlet.service(HttpServlet.java:630)
javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
org.tuckey.web.filters.urlrewrite.NormalRewrittenUrl.doRewrite(NormalRewrittenUrl.java:213)
org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:171)
org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:381)

History

#1

Updated by Sanneke Aleman almost 6 years ago

The problem seems to be that velocity does not work correctly on a separate tomcat server with wars export

#2

Updated by Patrick Talbot almost 6 years ago

  • Status changed from New to Feedback
  • Assignee set to Sanneke Aleman

Did you deploy the eastwood war as well? Did you setup the velocityreport.serverURL?

#3

Updated by Sanneke Aleman almost 6 years ago

Yes we did. But the structure is different so some url will go wrong

#4

Updated by Sanneke Aleman almost 6 years ago

It seems to go worng where it looks for the properties file:

65
File f = new File(whereAmI + "../../../servoy.properties");
66
p.load(new FileInputStream(f));
67
path = p.getProperty("velocityreport.reportfolder");
68
if (path == null) {
69
f = new File(whereAmI + "../ROOT/");
70
path = f.getCanonicalPath();
71
} else {
72
f = new File(path);
73
if (f != null && f.exists() && f.isDirectory()) {
74
path = f.getCanonicalPath();
75
}
76
}
77
return path;
78
} catch (final Exception ex) {
79
}
80
return null;
81

We changed the whole setup now to not use eastwood as a war:
<Context docBase="c:\\xxxx\\velocity" path="/xxxx/eastwood/reports" />

#5

Updated by Patrick Talbot almost 6 years ago

Right. Eastwood does indeed try to determine where the reports folder is located, based on what's being set in the velocityreport.reportfolder property to serve static files via a servlet.
Your solution is a good one! :)

#6

Updated by Patrick Talbot about 5 years ago

  • Status changed from Feedback to Closed

Also available in: Atom PDF