Play framework 2: an error occurred while trying to run the application in production mode

OS: Windows 7 64bit

java version: 1.7.0_17

javac Version: 1.7.0_17

I am new to the Play Framework, I basically wanted to get an idea of โ€‹โ€‹everything.

Here is an example java / helloworld application. They did not change anything and continued to use the "start" command.

[helloworld] $ start (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) 
+4
source share
2 answers

I do not think this is related to Play. It seems that you are facing this problem , which looks like a JVM error in your taste of Windows.

To run sample applications in production mode, you may need to do the following:

  • Run the play stage command (outside the Play console, on the command line only). This stage task is described here.
  • Add this JVM argument to the target\start script generated by the stage task before launching the application.
+1
source

As a workaround add

  -Dfile.separator=\/ 

for play.bat and build.bat.

0
source

All Articles