| Summary: | IllegalArgumentException on using NIO channels. | ||
|---|---|---|---|
| Product: | [RT] Jetty | Reporter: | Nikolas Falco <nfalco79> |
| Component: | server | Assignee: | Greg Wilkins <gregw> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | major | ||
| Priority: | P3 | CC: | jetty-inbox |
| Version: | 7.3.1 | ||
| Target Milestone: | 7.2.x | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
|
Description
Nikolas Falco
Following stacktrace this error seems occur when in the call: class ResourceCache ... if (_useFileMappedBuffer && resource.getFile()!=null) return ... int len=(int)resource.length(); new DirectNIOBuffer(len); // line 313 ... len parameter is < 0 when: - is an instance of ResourceColletion (and is empty) - is an instance of BadResource - is an instance of JarFileResource (and is a Directory) never if is an instance of FileResource (if return java.io.File.length() < 0 JVM bug?) With my configuration should be always last case, webdefault.xml is standard from a jetty distribution so I don't understand the wrong case. sorry we have not looked at this sooner. Can you try to reproduce on 7.4.2 and if it is still a problem we will get right onto it. This has been resolved in the current release as the length is checked to be >=0 |