#920 ✓ invalid
Lukas Wöhrl

"play start" crashes on Windows, "play run" works

Reported by Lukas Wöhrl | January 6th, 2013 @ 01:47 PM

When I try to start my application with "play start" the application crashes immediately with the following error (play run works as expected):

(Starting server. Type Ctrl+D to exit logs, the server will remain in background)

Error occurred during initialization of VM
java.lang.ExceptionInInitializerError
    at java.lang.Runtime.loadLibrary0(Unknown Source)
    at java.lang.System.loadLibrary(Unknown Source)
    at java.lang.System.initializeSystemClass(Unknown Source)
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: 0
    at java.lang.String.charAt(Unknown Source)
    at java.io.Win32FileSystem.<init>(Unknown Source)
    at java.io.WinNTFileSystem.<init>(Unknown Source)
    at java.io.FileSystem.getFileSystem(Native Method)
    at java.io.File.<clinit>(Unknown Source)
    at java.lang.Runtime.loadLibrary0(Unknown Source)
    at java.lang.System.loadLibrary(Unknown Source)
    at java.lang.System.initializeSystemClass(Unknown Source)

My versions are:

PS C:\Users\woehrl> java -version
java version "1.7.0_10"
Java(TM) SE Runtime Environment (build 1.7.0_10-b18)
Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode)

PS C:\Users\woehrl> javac -version
javac 1.7.0_10

[xxx] $ play-version
[info] 2.0.4

regarding to https://groups.google.com/forum/?fromgroups=#!topic/play-framework/... this also occurses in 2.1-RC1

Comments and changes to this ticket

  • James Roper

    James Roper January 6th, 2013 @ 02:10 PM

    • State changed from “new” to “confirmed”

    Jetbrains also have this issue with teamcity, according to this stack overflow thread:

    http://stackoverflow.com/questions/13913196/file-separator-java-7-o...

    The conclusion there is that it's a bug in the JDK version 7 update 10. We can work around this bug in Play, in the mean time, you have two options:

    1. Downgrade to JDK 1.7.0_09
    2. Don't use play start. Windows is not officially supported as a production platform for Play yet anyway.
  • Lukas Wöhrl

    Lukas Wöhrl January 6th, 2013 @ 02:30 PM

    Another workaround I just found is:

    running "play dist"

    create a start.bat with:

    @echo off
    setlocal
    set p=%~dp0
    set p=%p:\=/%
    java %* -cp "%p%/lib/*;" play.core.server.NettyServer %p%
    

    and start it through the bat file

    but that involves unzipping of the created .zip first.

  • Lukas Wöhrl

    Lukas Wöhrl January 14th, 2013 @ 08:17 AM

    also occures with the new 1.7.0_11 version:

    Error occurred during initialization of VM java.lang.ExceptionInInitializerError

        at java.lang.Runtime.loadLibrary0(Unknown Source)
        at java.lang.System.loadLibrary(Unknown Source)
        at java.lang.System.initializeSystemClass(Unknown Source)
    

    Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: 0

        at java.lang.String.charAt(Unknown Source)
        at java.io.Win32FileSystem.<init>(Unknown Source)
        at java.io.WinNTFileSystem.<init>(Unknown Source)
        at java.io.FileSystem.getFileSystem(Native Method)
        at java.io.File.<clinit>(Unknown Source)
        at java.lang.Runtime.loadLibrary0(Unknown Source)
        at java.lang.System.loadLibrary(Unknown Source)
        at java.lang.System.initializeSystemClass(Unknown Source)
    

    PS C:\Users\xxx\xxx> java -version java version "1.7.0_11" Java(TM) SE Runtime Environment (build 1.7.0_11-b21) Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode)

  • James Roper

    James Roper February 18th, 2013 @ 10:20 AM

    • State changed from “confirmed” to “invalid”

    Either use Java 1.7.0_09, or wait for Oracle to fix the issue. We can't help JDK bugs in Play.

  • Adam Lane

    Adam Lane February 22nd, 2013 @ 06:34 AM

    FYI still a problem in 1.7.0_15.

    Another workaround I found is to run this...

    play -Dfile.separator=\/ start

  • Peanut

    Peanut February 24th, 2013 @ 07:47 PM

    This isn't a bug of the VM and wo't be fixed by Orcacle. The JVM seems to strip slashes from the passed properties.

  • James Roper

    James Roper February 25th, 2013 @ 01:10 PM

    How is it not a bug in the JVM? The behaviour didn't happen before 1.7.0_09, and what if you want to pass properties with trailing slashes? This behaviour doesn't happen on other platforms. It's definitely a bug in the JVM.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

We no longer use lighthouse to track issues. Please do not create any issues here. Instead create them at https://github.com/playframework/Play20/issues

Shared Ticket Bins

Pages