Am 2018-06-27 um 20:34 schrieb Claude Brisson:

It's running for me under java 8. Log for the cargo section copy
pasted below.

Is it a linux/windows cargo/jetty problem?
I think it's running under a SecurityManager and the policy isn't
allowing the "jetty.home" system property to be read.
I hitted this error during development, and fixed it with:

// Give Jetty libs all permissions
grant codeBase "file:@cargo.container@/-"
{
     permission java.security.AllPermission "", "";
};

in the showcase.policy file - it worked for me.

Maybe the @cargo.container@ isn't correctly populated. You can check that by inspecting the following file:
target/cargo/configurations/jetty9x/showcase.policy

For me it shows:

grant codeBase "file:/home/claude/Projects/velocity/tools/trunk/velocity-tools-examples/velocity-tools-examples-showcase/target/cargo/installs/-"
{
     permission java.security.AllPermission "", "";
};

If this SecurityManager thing is too touchy, we can leave it commented anyway. But it'd be interesting to understand why it fails.

Charming Claude,

*you* spotted the bug and the entire Cargo variables are /crap/, unusable for policy files. The produce is java.io.File#toString() which does not work for URIs. The output is "file:D:\Projects\veltools...". This is like MNG-6386. There is no way to fix that, but only in Cargo by adding to each property a subproperty '.uri' via File.toPath().toUri(). The reason by it works for you on your Linux distro is that Java's URI class is crap and does not correspond to RFC 3986. Otherwise it would fail too.

Please disable Cargo test for now!

BTW, all tests fail on Java 10 on Windows:
[INFO]
[INFO] Results:
[INFO]
[ERROR] Errors:
[ERROR]   ViewToolsIT.testBrowserTool:177 » HttpInternalError Error on HTTP 
request: 500...
[ERROR]   ViewToolsIT.testContextTool:197 » HttpInternalError Error on HTTP 
request: 500...
[ERROR]   ViewToolsIT.testJsonTool:335 » HttpInternalError Error on HTTP 
request: 500 In...
[ERROR]   ViewToolsIT.testLinkTool:224 » HttpInternalError Error on HTTP 
request: 500 In...
[ERROR]   ViewToolsIT.testParameterParserTool:267 » HttpInternalError Error on 
HTTP requ...
[INFO]
[ERROR] Tests run: 5, Failures: 0, Errors: 5, Skipped: 0

Michael


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@velocity.apache.org
For additional commands, e-mail: dev-h...@velocity.apache.org

Reply via email to