[
https://issues.jboss.org/browse/WFLY-4325?page=com.atlassian.jira.plugin....
]
Tomaz Cerar edited comment on WFLY-4325 at 3/9/15 11:02 AM:
------------------------------------------------------------
Looking bit further, i think the regression is caused by upgrading JDK7 --> JDK8 and
how java.util.logging.FileHandler.openFiles() is implemented.
On java7 is does:
{code:java}
FileChannel fc;
try {
lockStream = new FileOutputStream(lockFileName);
fc = lockStream.getChannel();
} catch (IOException ix) {
// We got an IOException while trying to open the file.
// Try the next file.
continue;
}
{code}
and in JDK8 it does
{code:java}
try {
lockFileChannel = FileChannel.open(Paths.get(lockFileName),
CREATE_NEW, WRITE);
} catch (FileAlreadyExistsException ix) {
// try the next lock file name in the sequence
continue;
}
{code}
and the difference is that it uses Paths.get()
so in both cases, brit returns the same, but if pass path with "/" Paths.get()
it fails where File api is happy about it.
To be fair, Path api behaves correctly...
was (Author: ctomc):
Looking bit further, i think the regression is caused by upgrading JDK7 --> JDK8 and
how java.util.logging.FileHandler.openFiles() is implemented.
On java7 is does:
{code:java}
FileChannel fc;
...
try {
lockStream = new FileOutputStream(lockFileName);
fc = lockStream.getChannel();
} catch (IOException ix) {
// We got an IOException while trying to open the file.
// Try the next file.
}
{code}
and in JDK8 it does
{code:java}
try {
lockFileChannel = FileChannel.open(Paths.get(lockFileName),
CREATE_NEW, WRITE);
} catch (FileAlreadyExistsException ix) {
// try the next lock file name in the sequence
continue;
}
{code}
and the difference is that it uses Paths.get()
so in both cases, brit returns the same, but if pass path with "/" Paths.get()
it fails where File api is happy about it.
To be fair, Path api behaves correctly...
Relative path error in context parameter on Windows
---------------------------------------------------
Key: WFLY-4325
URL:
https://issues.jboss.org/browse/WFLY-4325
Project: WildFly
Issue Type: Bug
Components: Web (Undertow)
Affects Versions: 9.0.0.Beta1
Environment: Windows 8, JDK8
Reporter: Nicklas Karlsson
Assignee: Tomaz Cerar
Fix For: 9.0.0.Beta1
Deploying the Eclipse BIRT viewer with a context parameter containing a relative
reference as a context parameter on a windows machine
<param-value>../birtdata/logs</param-value>
results in
{quote}
2015-02-05 10:07:37,736 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1)
MSC000001: Failed to start service
jboss.undertow.deployment.default-server.default-host./birt:
org.jboss.msc.service.StartException in service
jboss.undertow.deployment.default-server.default-host./birt: Failed to start service
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.RuntimeException: java.nio.file.InvalidPathException: Illegal char
<:> at index 2:
\C:\Java\WildFly-9.x-testi\standalone\deployments\birt-4.4.0.war\..\birtdata\logs\org.eclipse.datatools.connectivity.oda_2015_02_05_10_07_37.log.lck
at
io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:221)
at
org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:86)
at
org.wildfly.extension.undertow.deployment.UndertowDeploymentService.start(UndertowDeploymentService.java:71)
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
... 3 more
Caused by: java.nio.file.InvalidPathException: Illegal char <:> at index 2:
\C:\Java\WildFly-9.x-testi\standalone\deployments\birt-4.4.0.war\..\birtdata\logs\org.eclipse.datatools.connectivity.oda_2015_02_05_10_07_37.log.lck
at sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182)
at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)
at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
at sun.nio.fs.WindowsPath.parse(WindowsPath.java:94)
at sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:255)
at java.nio.file.Paths.get(Paths.java:84)
at java.util.logging.FileHandler.openFiles(FileHandler.java:438)
at java.util.logging.FileHandler.<init>(FileHandler.java:318)
at org.eclipse.birt.report.utility.LoggingUtil.initFileLogger(LoggingUtil.java:103)
at org.eclipse.birt.report.utility.LoggingUtil.configureLoggers(LoggingUtil.java:76)
at
org.eclipse.birt.report.service.ReportEngineService.<init>(ReportEngineService.java:229)
at
org.eclipse.birt.report.service.ReportEngineService.initEngineInstance(ReportEngineService.java:271)
at
org.eclipse.birt.report.service.BirtViewerReportService.<init>(BirtViewerReportService.java:83)
at
org.eclipse.birt.report.listener.ViewerServletContextListener.contextInitialized(ViewerServletContextListener.java:57)
at
io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:173)
at
io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:192)
... 7 more
{quote}
This used to work on the 8.x-series
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)