Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows, native: uncaught exception in java.util.Logging #2576

Closed
laszlocsomor opened this issue Feb 23, 2017 · 1 comment
Closed

Windows, native: uncaught exception in java.util.Logging #2576

laszlocsomor opened this issue Feb 23, 2017 · 1 comment
Assignees
Labels
P3 We're not considering working on this, but happy to review a PR. (No assignee) platform: windows type: bug
Milestone

Comments

@laszlocsomor
Copy link
Contributor

laszlocsomor commented Feb 23, 2017

If you build Bazel with --cpu=x64_windows_msvc and run with --batch --output_user_base=c:\tmp3, you'll see an uncaught exception:

Can't load log handler "java.util.logging.FileHandler"
java.nio.file.InvalidPathException: Illegal char <      > at index 2: c:        mp3l90hcebl\java.log.lck
java.nio.file.InvalidPathException: Illegal char <      > at index 2: c:        mp3l90hcebl\java.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:453)
        at java.util.logging.FileHandler.<init>(FileHandler.java:263)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at java.lang.Class.newInstance(Class.java:442)
        at java.util.logging.LogManager$5.run(LogManager.java:966)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.util.logging.LogManager.loadLoggerHandlers(LogManager.java:958)
        at java.util.logging.LogManager.initializeGlobalHandlers(LogManager.java:1578)
        at java.util.logging.LogManager.access$1500(LogManager.java:145)
        at java.util.logging.LogManager$RootLogger.accessCheckedHandlers(LogManager.java:1667)
        at java.util.logging.Logger.getHandlers(Logger.java:1777)
        at java.util.logging.Logger.log(Logger.java:735)
        at java.util.logging.Logger.doLog(Logger.java:765)
        at java.util.logging.Logger.log(Logger.java:788)
        at java.util.logging.Logger.info(Logger.java:1490)
        at com.google.devtools.build.lib.analysis.BlazeVersionInfo.logVersionInfo(BlazeVersionInfo.java:65)
        at com.google.devtools.build.lib.analysis.BlazeVersionInfo.setBuildInfo(BlazeVersionInfo.java:80)
        at com.google.devtools.build.lib.bazel.BazelMain.main(BazelMain.java:56)

The problem is in startup_options.cc: we write java.util.logging.FileHandler.pattern=c:\tmp3\l90hcebl/java.log into the javalog.properties file and the \t after c: is interpreted as a tab character. You can see that rendered in the error message too.

@laszlocsomor laszlocsomor self-assigned this Feb 23, 2017
@laszlocsomor laszlocsomor added platform: windows category: skylark > skylark build defs P3 We're not considering working on this, but happy to review a PR. (No assignee) type: bug and removed category: skylark > skylark build defs labels Feb 23, 2017
@laszlocsomor
Copy link
Contributor Author

@philwo : FYI

@laszlocsomor laszlocsomor added this to the 0.5 milestone Feb 23, 2017
laszlocsomor added a commit to laszlocsomor/bazel that referenced this issue Sep 7, 2018
Fixes bazelbuild#6099
Fixes bazelbuild#6098
Related to bazelbuild#2576

Change-Id: Iabff91cca715d08e2977234e8615b2e0bf8a5dbc
bazel-io pushed a commit that referenced this issue Sep 7, 2018
Fixes #6099
Fixes #6098
Related to #2576

Change-Id: Iabff91cca715d08e2977234e8615b2e0bf8a5dbc

Closes #6100.

Change-Id: Ib55e01b5a82315d2a5f1a861f56079013d1cfec8
PiperOrigin-RevId: 211983456
laurentlb pushed a commit that referenced this issue Sep 10, 2018
Fixes #6099
Fixes #6098
Related to #2576

Change-Id: Iabff91cca715d08e2977234e8615b2e0bf8a5dbc

Closes #6100.

Change-Id: Ib55e01b5a82315d2a5f1a861f56079013d1cfec8
PiperOrigin-RevId: 211983456
laurentlb pushed a commit that referenced this issue Sep 10, 2018
Fixes #6099
Fixes #6098
Related to #2576

Change-Id: Iabff91cca715d08e2977234e8615b2e0bf8a5dbc

Closes #6100.

Change-Id: Ib55e01b5a82315d2a5f1a861f56079013d1cfec8
PiperOrigin-RevId: 211983456
laurentlb pushed a commit that referenced this issue Sep 12, 2018
Fixes #6099
Fixes #6098
Related to #2576

Change-Id: Iabff91cca715d08e2977234e8615b2e0bf8a5dbc

Closes #6100.

Change-Id: Ib55e01b5a82315d2a5f1a861f56079013d1cfec8
PiperOrigin-RevId: 211983456
laurentlb pushed a commit that referenced this issue Sep 12, 2018
Fixes #6099
Fixes #6098
Related to #2576

Change-Id: Iabff91cca715d08e2977234e8615b2e0bf8a5dbc

Closes #6100.

Change-Id: Ib55e01b5a82315d2a5f1a861f56079013d1cfec8
PiperOrigin-RevId: 211983456
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 We're not considering working on this, but happy to review a PR. (No assignee) platform: windows type: bug
Projects
None yet
Development

No branches or pull requests

1 participant