activator start errror - Bad application path: -Dhttp.port=9000 #3081

Closed
polanskya opened this Issue Jun 25, 2014 · 32 comments

Comments

Projects
None yet
@polanskya

Unable to start app in PROD mode in PlayJava, even sample app fails when running in Windows.

C:\Dev\my-first-app>activator start
[info] Loading project definition from C:\Dev\my-first-app\project
[info] Set current project to my-first-app (in build file:/C:/Dev/my-first-app/)

[info] Packaging C:\Dev\my-first-app\target\scala-2.11\my-first-app_2.11-1.0-SNA
PSHOT-sources.jar ...
[info] Done packaging.
[info] Wrote C:\Dev\my-first-app\target\scala-2.11\my-first-app_2.11-1.0-SNAPSHO
T.pom
[info] Packaging C:\Dev\my-first-app\target\my-first-app-1.0-SNAPSHOT-assets.jar
...
[info] Done packaging.
[info] Compiling 4 Scala sources and 2 Java sources to C:\Dev\my-first-app\targe
t\scala-2.11\classes...
[info] Main Scala API documentation to C:\Dev\my-first-app\target\scala-2.11\api
...
model contains 17 documentable templates
[info] Main Scala API documentation successful.
[info] Packaging C:\Dev\my-first-app\target\scala-2.11\my-first-app_2.11-1.0-SNA
PSHOT-javadoc.jar ...
[info] Done packaging.
[info] Packaging C:\Dev\my-first-app\target\scala-2.11\my-first-app_2.11-1.0-SNA
PSHOT.jar ...
[info] Done packaging.

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

Bad application path: -Dhttp.port=9000

Thank you.

@jroper

This comment has been minimized.

Show comment
Hide comment
@jroper

jroper Jun 25, 2014

Member

Do you have anything set in javaOptions in Production?

Member

jroper commented Jun 25, 2014

Do you have anything set in javaOptions in Production?

@polanskya

This comment has been minimized.

Show comment
Hide comment
@polanskya

polanskya Jun 25, 2014

I do set JAVA_OPTION env variable in bat file to set Xmx and Xms java args.

I do set JAVA_OPTION env variable in bat file to set Xmx and Xms java args.

@jroper

This comment has been minimized.

Show comment
Hide comment
@jroper

jroper Jun 25, 2014

Member

I wonder if this is causing it... it's odd because that argument, java should interpret as a system property. But it's not.

Member

jroper commented Jun 25, 2014

I wonder if this is causing it... it's odd because that argument, java should interpret as a system property. But it's not.

@polanskya

This comment has been minimized.

Show comment
Hide comment
@polanskya

polanskya Jun 26, 2014

I just did a clean windows activator app with no java args set in console and still getting same error , so it's not JAVA_OPTIONS.

Also ran the sample app on linux and "activator start" works like a charm.

So this looks like activator.bat startup script error and should only effect Windows platform.

Thanks

I just did a clean windows activator app with no java args set in console and still getting same error , so it's not JAVA_OPTIONS.

Also ran the sample app on linux and "activator start" works like a charm.

So this looks like activator.bat startup script error and should only effect Windows platform.

Thanks

@polanskya

This comment has been minimized.

Show comment
Hide comment
@polanskya

polanskya Jul 2, 2014

Any update on this one? Downloaded 2.3.1 and still can't execute activator start on Windows.

Any update on this one? Downloaded 2.3.1 and still can't execute activator start on Windows.

@richdougherty

This comment has been minimized.

Show comment
Hide comment
@richdougherty

richdougherty Jul 2, 2014

Member

@jroper, is hinting at it, but the reason for that error is because the -Dhttp.port=9000 is getting passed as a command line argument to the Java application rather than to the JRE.

i.e. We should be running

java -Dhttp.port=9000 play.core.server.NettyServer

but we're actually running

java play.core.server.NettyServer -Dhttp.port=9000 

This is probably a bug in sbt-native-packager, which is what Play uses to bundle its prod mode applications.

@polanskya, is there any chance you could run activator dist and see if you get the same problem when you launch your application in the created distribution?

If you want, you could even look in the generated launcher bat file and see if there's anything obvious that looks wrong. But no worries if you can't. :)

Member

richdougherty commented Jul 2, 2014

@jroper, is hinting at it, but the reason for that error is because the -Dhttp.port=9000 is getting passed as a command line argument to the Java application rather than to the JRE.

i.e. We should be running

java -Dhttp.port=9000 play.core.server.NettyServer

but we're actually running

java play.core.server.NettyServer -Dhttp.port=9000 

This is probably a bug in sbt-native-packager, which is what Play uses to bundle its prod mode applications.

@polanskya, is there any chance you could run activator dist and see if you get the same problem when you launch your application in the created distribution?

If you want, you could even look in the generated launcher bat file and see if there's anything obvious that looks wrong. But no worries if you can't. :)

@jroper

This comment has been minimized.

Show comment
Hide comment
@jroper

jroper Jul 2, 2014

Member

Disregard my last (deleted) comment. The problem I believe is that SBT native packager simply doesn't support extracting out -D args and putting them in the right place on Windows... doing that in a Windows batch script is... well... crazy. So it's sort of a bug in Play, in that it's using the batch script in a way that isn't supported.

What we should probably do is put the arguments into an environment variable instead of passing them on the command line.

Member

jroper commented Jul 2, 2014

Disregard my last (deleted) comment. The problem I believe is that SBT native packager simply doesn't support extracting out -D args and putting them in the right place on Windows... doing that in a Windows batch script is... well... crazy. So it's sort of a bug in Play, in that it's using the batch script in a way that isn't supported.

What we should probably do is put the arguments into an environment variable instead of passing them on the command line.

@mickyp

This comment has been minimized.

Show comment
Hide comment
@mickyp

mickyp Jul 22, 2014

I am using Windows 7.

I occurred "Bad application path: -Dhttp.port=9000" when I invoke "activator start".

Then I try to run "activator dist", unzip the package, run the batch file, it shows me the error message the value is too long.

I echo out the value as this

APP_LIB_DIR = D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\

APP_CLASSPATH=D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\play2-3-2.play2-3-2-1.0-SNAPSHOT.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\org.scala-lang.scala-library-2.11.1.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\com.typesafe.play.twirl-api_2.11-1.0.2.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\org.apache.commons.commons-lang3-3.1.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\org.scala-lang.modules.scala-xml_2.11-1.0.1.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\com.typesafe.play.play_2.11-2.3.2.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\com.typesafe.play.build-link-2.3.2.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\com.typesafe.play.play-exceptions-2.3.2.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\org.javassist.javassist-3.18.2-GA.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\com.typesafe.play.play-iteratees_2.11-2.3.2.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\org.scala-stm.scala-stm_2.11-0.7.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\com.typesafe.config-1.2.1.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\com.typesafe.play.play-json_2.11-2.3.2.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\com.typesafe.play.play-functional_2.11-2.3.2.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\com.typesafe.play.play-datacommons_2.11-2.3.2.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\joda-time.joda-time-2.3.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\org.joda.joda-convert-1.6.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\com.fasterxml.jackson.core.jackson-annotations-2.3.2.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\com.fasterxml.jackson.core.jackson-core-2.3.2.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\com.fasterxml.jackson.core.jackson-databind-2.3.2.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\org.scala-lang.scala-reflect-2.11.1.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\org.scala-lang.modules.scala-parser-combinators_2.11-1.0.1.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\io.netty.netty-3.9.2.Final.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\com.typesafe.netty.netty-http-pipelining-1.1.2.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\org.slf4j.slf4j-api-1.7.6.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\org.slf4j.jul-to-slf4j-1.7.6.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\org.slf4j.jcl-over-slf4j-1.7.6.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\ch.qos.logback.logback-core-1.1.1.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\ch.qos.logback.logback-classic-1.1.1.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\com.typesafe.akka.akka-actor_2.11-2.3.4.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\com.typesafe.akka.akka-slf4j_2.11-2.3.4.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\commons-codec.commons-codec-1.9.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\xerces.xercesImpl-2.11.0.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\xml-apis.xml-apis-1.4.01.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\javax.transaction.jta-1.1.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\com.typesafe.play.play-java_2.11-2.3.2.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\org.yaml.snakeyaml-1.13.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\org.hibernate.hibernate-validator-5.0.3.Final.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\javax.validation.validation-api-1.1.0.Final.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\org.jboss.logging.jboss-logging-3.1.1.GA.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\com.fasterxml.classmate-1.0.0.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\org.springframework.spring-context-4.0.3.RELEASE.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\org.springframework.spring-core-4.0.3.RELEASE.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\org.springframework.spring-beans-4.0.3.RELEASE.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\org.reflections.reflections-0.9.8.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\com.google.guava.guava-16.0.1.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\dom4j.dom4j-1.6.1.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\com.google.code.findbugs.jsr305-2.0.3.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\org.apache.tomcat.tomcat-servlet-api-8.0.5.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\com.typesafe.play.play-java-jdbc_2.11-2.3.2.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\com.typesafe.play.play-jdbc_2.11-2.3.2.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\com.jolbox.bonecp-0.8.0.RELEASE.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\com.h2database.h2-1.3.175.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\tyrex.tyrex-1.0.1.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\com.typesafe.play.play-java-ebean_2.11-2.3.2.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\org.avaje.ebeanorm.avaje-ebeanorm-3.3.4.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\org.avaje.ebeanorm.avaje-ebeanorm-agent-3.2.2.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\org.hibernate.javax.persistence.hibernate-jpa-2.0-api-1.0.1.Final.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\com.typesafe.play.play-cache_2.11-2.3.2.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\net.sf.ehcache.ehcache-core-2.6.8.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\com.typesafe.play.play-java-ws_2.11-2.3.2.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\com.typesafe.play.play-ws_2.11-2.3.2.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\com.ning.async-http-client-1.8.8.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\oauth.signpost.signpost-core-1.2.1.2.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\oauth.signpost.signpost-commonshttp4-1.2.1.2.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\org.apache.httpcomponents.httpcore-4.0.1.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\org.apache.httpcomponents.httpclient-4.0.1.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\commons-logging.commons-logging-1.1.1.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\play2-3-2.play2-3-2-1.0-SNAPSHOT-assets.jar

When I change my project directory to d:\temp\1.0, the problem is solved.

My conclusion is
if you need to run production with "activator start" but failed, then you can run it in "dist" package.
just be careful on the too long variables value due to too long project directory structure.

Sincerely,
Micky

mickyp commented Jul 22, 2014

I am using Windows 7.

I occurred "Bad application path: -Dhttp.port=9000" when I invoke "activator start".

Then I try to run "activator dist", unzip the package, run the batch file, it shows me the error message the value is too long.

I echo out the value as this

APP_LIB_DIR = D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\

APP_CLASSPATH=D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\play2-3-2.play2-3-2-1.0-SNAPSHOT.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\org.scala-lang.scala-library-2.11.1.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\com.typesafe.play.twirl-api_2.11-1.0.2.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\org.apache.commons.commons-lang3-3.1.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\org.scala-lang.modules.scala-xml_2.11-1.0.1.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\com.typesafe.play.play_2.11-2.3.2.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\com.typesafe.play.build-link-2.3.2.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\com.typesafe.play.play-exceptions-2.3.2.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\org.javassist.javassist-3.18.2-GA.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\com.typesafe.play.play-iteratees_2.11-2.3.2.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\org.scala-stm.scala-stm_2.11-0.7.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\com.typesafe.config-1.2.1.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\com.typesafe.play.play-json_2.11-2.3.2.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\com.typesafe.play.play-functional_2.11-2.3.2.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\com.typesafe.play.play-datacommons_2.11-2.3.2.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\joda-time.joda-time-2.3.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\org.joda.joda-convert-1.6.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\com.fasterxml.jackson.core.jackson-annotations-2.3.2.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\com.fasterxml.jackson.core.jackson-core-2.3.2.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\com.fasterxml.jackson.core.jackson-databind-2.3.2.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\org.scala-lang.scala-reflect-2.11.1.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\org.scala-lang.modules.scala-parser-combinators_2.11-1.0.1.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\io.netty.netty-3.9.2.Final.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\com.typesafe.netty.netty-http-pipelining-1.1.2.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\org.slf4j.slf4j-api-1.7.6.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\org.slf4j.jul-to-slf4j-1.7.6.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\org.slf4j.jcl-over-slf4j-1.7.6.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\ch.qos.logback.logback-core-1.1.1.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\ch.qos.logback.logback-classic-1.1.1.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\com.typesafe.akka.akka-actor_2.11-2.3.4.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\com.typesafe.akka.akka-slf4j_2.11-2.3.4.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\commons-codec.commons-codec-1.9.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\xerces.xercesImpl-2.11.0.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\xml-apis.xml-apis-1.4.01.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\javax.transaction.jta-1.1.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\com.typesafe.play.play-java_2.11-2.3.2.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\org.yaml.snakeyaml-1.13.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\org.hibernate.hibernate-validator-5.0.3.Final.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\javax.validation.validation-api-1.1.0.Final.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\org.jboss.logging.jboss-logging-3.1.1.GA.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\com.fasterxml.classmate-1.0.0.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\org.springframework.spring-context-4.0.3.RELEASE.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\org.springframework.spring-core-4.0.3.RELEASE.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\org.springframework.spring-beans-4.0.3.RELEASE.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\org.reflections.reflections-0.9.8.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\com.google.guava.guava-16.0.1.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\dom4j.dom4j-1.6.1.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\com.google.code.findbugs.jsr305-2.0.3.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\org.apache.tomcat.tomcat-servlet-api-8.0.5.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\com.typesafe.play.play-java-jdbc_2.11-2.3.2.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\com.typesafe.play.play-jdbc_2.11-2.3.2.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\com.jolbox.bonecp-0.8.0.RELEASE.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\com.h2database.h2-1.3.175.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\tyrex.tyrex-1.0.1.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\com.typesafe.play.play-java-ebean_2.11-2.3.2.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\org.avaje.ebeanorm.avaje-ebeanorm-3.3.4.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\org.avaje.ebeanorm.avaje-ebeanorm-agent-3.2.2.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\org.hibernate.javax.persistence.hibernate-jpa-2.0-api-1.0.1.Final.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\com.typesafe.play.play-cache_2.11-2.3.2.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\net.sf.ehcache.ehcache-core-2.6.8.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\com.typesafe.play.play-java-ws_2.11-2.3.2.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\com.typesafe.play.play-ws_2.11-2.3.2.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\com.ning.async-http-client-1.8.8.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\oauth.signpost.signpost-core-1.2.1.2.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\oauth.signpost.signpost-commonshttp4-1.2.1.2.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\org.apache.httpcomponents.httpcore-4.0.1.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\org.apache.httpcomponents.httpclient-4.0.1.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\commons-logging.commons-logging-1.1.1.jar;D:\temp\play2.3.2\target\universal\play2-3-2-1.0-SNAPSHOT\1.0\bin\\\..\lib\\play2-3-2.play2-3-2-1.0-SNAPSHOT-assets.jar

When I change my project directory to d:\temp\1.0, the problem is solved.

My conclusion is
if you need to run production with "activator start" but failed, then you can run it in "dist" package.
just be careful on the too long variables value due to too long project directory structure.

Sincerely,
Micky

@richdougherty

This comment has been minimized.

Show comment
Hide comment
@richdougherty

richdougherty Aug 4, 2014

Member

@mickyp, thanks for the extra info!

Member

richdougherty commented Aug 4, 2014

@mickyp, thanks for the extra info!

@jroper jroper added the ddd label Aug 21, 2014

@luobotao

This comment has been minimized.

Show comment
Hide comment
@luobotao

luobotao Sep 4, 2014

You solve this problem? I also encountered this problem.Can you help me ?

luobotao commented Sep 4, 2014

You solve this problem? I also encountered this problem.Can you help me ?

@richdougherty

This comment has been minimized.

Show comment
Hide comment
@richdougherty

richdougherty Sep 10, 2014

Member

I don't think this has been fixed yet, sorry. @mickyp seems to have found a workaround. It also looks like a problem with the generated .bat file, so you could try editing that.

Member

richdougherty commented Sep 10, 2014

I don't think this has been fixed yet, sorry. @mickyp seems to have found a workaround. It also looks like a problem with the generated .bat file, so you could try editing that.

@lampz

This comment has been minimized.

Show comment
Hide comment
@lampz

lampz Oct 9, 2014

Windows solution:
1 - "activator stage" in the command line
2 - Copy the stage directory from target\universal\stage to c:\stage to avoid issues with long file paths
3 - To avoid the Bad Application Path issues just create a new .bat file with the following (my project is called proj):
set PROJ_OPTS="-Dconfig.file=../conf/application.conf"
proj.bat

Note: change PROJ_OPTS to YOURPROJECTNAME_OPTS and proj.bat to yourprojectname.bat

lampz commented Oct 9, 2014

Windows solution:
1 - "activator stage" in the command line
2 - Copy the stage directory from target\universal\stage to c:\stage to avoid issues with long file paths
3 - To avoid the Bad Application Path issues just create a new .bat file with the following (my project is called proj):
set PROJ_OPTS="-Dconfig.file=../conf/application.conf"
proj.bat

Note: change PROJ_OPTS to YOURPROJECTNAME_OPTS and proj.bat to yourprojectname.bat

@gakuzzzz gakuzzzz referenced this issue in t2v/play2-auth Oct 11, 2014

Closed

Doesn't work with secure cookies enabled #104

@matthewswain

This comment has been minimized.

Show comment
Hide comment
@matthewswain

matthewswain Oct 21, 2014

I'm also experiencing this issue when running "activator run", but not when running "activator dist" and unzipping the package on my desktop. As with mickyp if I unzip the package in \target\universal and run the .bat I get "The input line is too long. The syntax of the command is incorrect."

I'm also experiencing this issue when running "activator run", but not when running "activator dist" and unzipping the package on my desktop. As with mickyp if I unzip the package in \target\universal and run the .bat I get "The input line is too long. The syntax of the command is incorrect."

@jroper

This comment has been minimized.

Show comment
Hide comment
@jroper

jroper Oct 21, 2014

Member

I reckon this bug should be filed against Windows - every other platform supports arbitrarily long commands, why doesn't Windows support it?

Member

jroper commented Oct 21, 2014

I reckon this bug should be filed against Windows - every other platform supports arbitrarily long commands, why doesn't Windows support it?

@gmethvin

This comment has been minimized.

Show comment
Hide comment
@gmethvin

gmethvin Oct 22, 2014

Member

Here's a Microsoft support article about the command length problem: https://support.microsoft.com/kb/830473.

Member

gmethvin commented Oct 22, 2014

Here's a Microsoft support article about the command length problem: https://support.microsoft.com/kb/830473.

@jroper

This comment has been minimized.

Show comment
Hide comment
@jroper

jroper Oct 22, 2014

Member

Well, at least they agree that it's a "limitation" - I've seen a lot worse from Microsoft.

Member

jroper commented Oct 22, 2014

Well, at least they agree that it's a "limitation" - I've seen a lot worse from Microsoft.

@matthewswain

This comment has been minimized.

Show comment
Hide comment
@matthewswain

matthewswain Oct 22, 2014

I seem to be able to get around this by using Git Bash instead of the Windows Command Prompt, might be a simpler work around for now.

I seem to be able to get around this by using Git Bash instead of the Windows Command Prompt, might be a simpler work around for now.

@eve1234

This comment has been minimized.

Show comment
Hide comment
@eve1234

eve1234 Nov 10, 2014

I am having this problem and I am on Mac. java version -

java -version
java version "1.7.0_60"
Java(TM) SE Runtime Environment (build 1.7.0_60-b19)
Java HotSpot(TM) 64-Bit Server VM (build 24.60-b09, mixed mode)

It used to work ok before. How do I investigate this further?

Regards

eve

eve1234 commented Nov 10, 2014

I am having this problem and I am on Mac. java version -

java -version
java version "1.7.0_60"
Java(TM) SE Runtime Environment (build 1.7.0_60-b19)
Java HotSpot(TM) 64-Bit Server VM (build 24.60-b09, mixed mode)

It used to work ok before. How do I investigate this further?

Regards

eve

@arobertn

This comment has been minimized.

Show comment
Hide comment
@arobertn

arobertn Nov 20, 2014

Contributor

I get the -Dhttp.port=9000 issue on Windows 7 even when running activator under git bash. Evidently activator uses the batch file to start the app if it detects it is running on Windows, regardless of how it itself was started.

Contributor

arobertn commented Nov 20, 2014

I get the -Dhttp.port=9000 issue on Windows 7 even when running activator under git bash. Evidently activator uses the batch file to start the app if it detects it is running on Windows, regardless of how it itself was started.

@James-Parsons

This comment has been minimized.

Show comment
Hide comment
@James-Parsons

James-Parsons Dec 15, 2014

Is anyone working to actually fix this.

Is anyone working to actually fix this.

@jroper

This comment has been minimized.

Show comment
Hide comment
@jroper

jroper Dec 15, 2014

Member

No, but your contribution would be welcomed.

Member

jroper commented Dec 15, 2014

No, but your contribution would be welcomed.

@simplemx

This comment has been minimized.

Show comment
Hide comment
@simplemx

simplemx Jan 8, 2015

@lampz thx for your solution.it help me alot

simplemx commented Jan 8, 2015

@lampz thx for your solution.it help me alot

@pbaris

This comment has been minimized.

Show comment
Hide comment
@pbaris

pbaris Jan 13, 2015

@lampz solution works form me. Thanks

pbaris commented Jan 13, 2015

@lampz solution works form me. Thanks

@vnicolici

This comment has been minimized.

Show comment
Hide comment
@vnicolici

vnicolici Jan 15, 2015

@jroper don't you think a command line longer than 8000 characters is a bit excessive?

I mean I know "M$ sucks" and we must hate them, but look what people can do with only 4 KB of binary code: https://www.youtube.com/watch?v=AWcbj7ksqwE . But it's probably easier to bash MS than to fix the issue.

Back to the topic, and fixing the issue, this bullshit starts with the

if "%YODEL_BASE_HOME%"=="" set "YODEL_BASE_HOME=%~dp0\\.."

line in the stage/bin bat file.

In my case, that returns

c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..

Then we have:

set "APP_LIB_DIR=%YODEL_BASE_HOME%\lib\"

So that thing becomes:

c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\

A few lines later we have:

set "APP_CLASSPATH=%APP_LIB_DIR%\yodel-base.yodel-base-1.1.jar;%APP_LIB_DIR%\org.scala-lang.scala-library-2.11.4.jar;%APP_LIB_DIR%\com.typesafe.play.twirl-api_2.11-1.0.2.jar;%APP_LIB_DIR%\org.apache.commons.commons-lang3-3.1.jar;%APP_LIB_DIR%\com.typesafe.play.play_2.11-2.3.7.jar;%APP_LIB_DIR%\com.typesafe.play.build-link-2.3.7.jar;%APP_LIB_DIR%\com.typesafe.play.play-exceptions-2.3.7.jar;%APP_LIB_DIR%\org.javassist.javassist-3.18.2-GA.jar;%APP_LIB_DIR%\com.typesafe.play.play-iteratees_2.11-2.3.7.jar;%APP_LIB_DIR%\org.scala-stm.scala-stm_2.11-0.7.jar;%APP_LIB_DIR%\com.typesafe.config-1.2.1.jar;%APP_LIB_DIR%\com.typesafe.play.play-json_2.11-2.3.7.jar;%APP_LIB_DIR%\com.typesafe.play.play-functional_2.11-2.3.7.jar;%APP_LIB_DIR%\com.typesafe.play.play-datacommons_2.11-2.3.7.jar;%APP_LIB_DIR%\org.joda.joda-convert-1.6.jar;%APP_LIB_DIR%\com.fasterxml.jackson.core.jackson-annotations-2.3.2.jar;%APP_LIB_DIR%\com.fasterxml.jackson.core.jackson-core-2.3.2.jar;%APP_LIB_DIR%\com.fasterxml.jackson.core.jackson-databind-2.3.2.jar;%APP_LIB_DIR%\org.scala-lang.scala-reflect-2.11.1.jar;%APP_LIB_DIR%\org.scala-lang.modules.scala-parser-combinators_2.11-1.0.1.jar;%APP_LIB_DIR%\io.netty.netty-3.9.3.Final.jar;%APP_LIB_DIR%\com.typesafe.netty.netty-http-pipelining-1.1.2.jar;%APP_LIB_DIR%\org.slf4j.jul-to-slf4j-1.7.6.jar;%APP_LIB_DIR%\org.slf4j.jcl-over-slf4j-1.7.6.jar;%APP_LIB_DIR%\ch.qos.logback.logback-core-1.1.1.jar;%APP_LIB_DIR%\ch.qos.logback.logback-classic-1.1.1.jar;%APP_LIB_DIR%\com.typesafe.akka.akka-actor_2.11-2.3.4.jar;%APP_LIB_DIR%\com.typesafe.akka.akka-slf4j_2.11-2.3.4.jar;%APP_LIB_DIR%\commons-codec.commons-codec-1.9.jar;%APP_LIB_DIR%\xerces.xercesImpl-2.11.0.jar;%APP_LIB_DIR%\xml-apis.xml-apis-1.4.01.jar;%APP_LIB_DIR%\javax.transaction.jta-1.1.jar;%APP_LIB_DIR%\com.typesafe.play.play-jdbc_2.11-2.3.7.jar;%APP_LIB_DIR%\com.jolbox.bonecp-0.8.0.RELEASE.jar;%APP_LIB_DIR%\com.h2database.h2-1.3.175.jar;%APP_LIB_DIR%\tyrex.tyrex-1.0.1.jar;%APP_LIB_DIR%\com.typesafe.play.play-ws_2.11-2.3.7.jar;%APP_LIB_DIR%\com.google.guava.guava-16.0.1.jar;%APP_LIB_DIR%\com.ning.async-http-client-1.8.14.jar;%APP_LIB_DIR%\oauth.signpost.signpost-core-1.2.1.2.jar;%APP_LIB_DIR%\oauth.signpost.signpost-commonshttp4-1.2.1.2.jar;%APP_LIB_DIR%\org.apache.httpcomponents.httpcore-4.0.1.jar;%APP_LIB_DIR%\org.apache.httpcomponents.httpclient-4.0.1.jar;%APP_LIB_DIR%\commons-logging.commons-logging-1.1.1.jar;%APP_LIB_DIR%\com.github.aselab.scala-activerecord_2.11-0.3.0.jar;%APP_LIB_DIR%\org.squeryl.squeryl_2.11-0.9.6-RC3.jar;%APP_LIB_DIR%\cglib.cglib-nodep-2.2.jar;%APP_LIB_DIR%\org.scala-lang.scalap-2.11.1.jar;%APP_LIB_DIR%\org.scala-lang.scala-compiler-2.11.1.jar;%APP_LIB_DIR%\org.scala-lang.modules.scala-xml_2.11-1.0.2.jar;%APP_LIB_DIR%\io.backchat.inflector.scala-inflector_2.11-1.3.5.jar;%APP_LIB_DIR%\com.github.nscala-time.nscala-time_2.11-1.4.0.jar;%APP_LIB_DIR%\joda-time.joda-time-2.4.jar;%APP_LIB_DIR%\commons-validator.commons-validator-1.4.0.jar;%APP_LIB_DIR%\commons-beanutils.commons-beanutils-1.8.3.jar;%APP_LIB_DIR%\commons-digester.commons-digester-1.8.jar;%APP_LIB_DIR%\org.slf4j.slf4j-api-1.7.7.jar;%APP_LIB_DIR%\com.github.aselab.scala-activerecord-play2_2.11-0.3.0.jar;%APP_LIB_DIR%\org.postgresql.postgresql-9.3-1100-jdbc41.jar;%APP_LIB_DIR%\net.spy.spymemcached-2.10.2.jar;%APP_LIB_DIR%\yodel-base.yodel-base-1.1-assets.jar"

That becomes:

c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\yodel-base.yodel-base-1.1.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\org.scala-lang.scala-library-2.11.4.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\com.typesafe.play.twirl-api_2.11-1.0.2.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\org.apache.commons.commons-lang3-3.1.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\com.typesafe.play.play_2.11-2.3.7.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\com.typesafe.play.build-link-2.3.7.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\com.typesafe.play.play-exceptions-2.3.7.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\org.javassist.javassist-3.18.2-GA.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\com.typesafe.play.play-iteratees_2.11-2.3.7.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\org.scala-stm.scala-stm_2.11-0.7.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\com.typesafe.config-1.2.1.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\com.typesafe.play.play-json_2.11-2.3.7.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\com.typesafe.play.play-functional_2.11-2.3.7.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\com.typesafe.play.play-datacommons_2.11-2.3.7.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\org.joda.joda-convert-1.6.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\com.fasterxml.jackson.core.jackson-annotations-2.3.2.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\com.fasterxml.jackson.core.jackson-core-2.3.2.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\com.fasterxml.jackson.core.jackson-databind-2.3.2.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\org.scala-lang.scala-reflect-2.11.1.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\org.scala-lang.modules.scala-parser-combinators_2.11-1.0.1.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\io.netty.netty-3.9.3.Final.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\com.typesafe.netty.netty-http-pipelining-1.1.2.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\org.slf4j.jul-to-slf4j-1.7.6.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\org.slf4j.jcl-over-slf4j-1.7.6.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\ch.qos.logback.logback-core-1.1.1.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\ch.qos.logback.logback-classic-1.1.1.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\com.typesafe.akka.akka-actor_2.11-2.3.4.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\com.typesafe.akka.akka-slf4j_2.11-2.3.4.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\commons-codec.commons-codec-1.9.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\xerces.xercesImpl-2.11.0.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\xml-apis.xml-apis-1.4.01.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\javax.transaction.jta-1.1.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\com.typesafe.play.play-jdbc_2.11-2.3.7.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\com.jolbox.bonecp-0.8.0.RELEASE.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\com.h2database.h2-1.3.175.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\tyrex.tyrex-1.0.1.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\com.typesafe.play.play-ws_2.11-2.3.7.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\com.google.guava.guava-16.0.1.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\com.ning.async-http-client-1.8.14.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\oauth.signpost.signpost-core-1.2.1.2.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\oauth.signpost.signpost-commonshttp4-1.2.1.2.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\org.apache.httpcomponents.httpcore-4.0.1.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\org.apache.httpcomponents.httpclient-4.0.1.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\commons-logging.commons-logging-1.1.1.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\com.github.aselab.scala-activerecord_2.11-0.3.0.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\org.squeryl.squeryl_2.11-0.9.6-RC3.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\cglib.cglib-nodep-2.2.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\org.scala-lang.scalap-2.11.1.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\org.scala-lang.scala-compiler-2.11.1.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\org.scala-lang.modules.scala-xml_2.11-1.0.2.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\io.backchat.inflector.scala-inflector_2.11-1.3.5.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\com.github.nscala-time.nscala-time_2.11-1.4.0.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\joda-time.joda-time-2.4.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\commons-validator.commons-validator-1.4.0.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\commons-beanutils.commons-beanutils-1.8.3.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\commons-digester.commons-digester-1.8.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\org.slf4j.slf4j-api-1.7.7.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\com.github.aselab.scala-activerecord-play2_2.11-0.3.0.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\org.postgresql.postgresql-9.3-1100-jdbc41.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\net.spy.spymemcached-2.10.2.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\yodel-base.yodel-base-1.1-assets.jar

Anyway, the obvious solution to reduce the length is to replace this:

set "APP_LIB_DIR=%YODEL_BASE_HOME%\lib\"

with

cd "%YODEL_BASE_HOME%"
set "APP_LIB_DIR=.\lib"

That will reduce APP_CLASSPATH from 6750 characters to 2846 characters in my case:

.\lib\yodel-base.yodel-base-1.1.jar;.\lib\org.scala-lang.scala-library-2.11.4.jar;.\lib\com.typesafe.play.twirl-api_2.11-1.0.2.jar;.\lib\org.apache.commons.commons-lang3-3.1.jar;.\lib\com.typesafe.play.play_2.11-2.3.7.jar;.\lib\com.typesafe.play.build-link-2.3.7.jar;.\lib\com.typesafe.play.play-exceptions-2.3.7.jar;.\lib\org.javassist.javassist-3.18.2-GA.jar;.\lib\com.typesafe.play.play-iteratees_2.11-2.3.7.jar;.\lib\org.scala-stm.scala-stm_2.11-0.7.jar;.\lib\com.typesafe.config-1.2.1.jar;.\lib\com.typesafe.play.play-json_2.11-2.3.7.jar;.\lib\com.typesafe.play.play-functional_2.11-2.3.7.jar;.\lib\com.typesafe.play.play-datacommons_2.11-2.3.7.jar;.\lib\org.joda.joda-convert-1.6.jar;.\lib\com.fasterxml.jackson.core.jackson-annotations-2.3.2.jar;.\lib\com.fasterxml.jackson.core.jackson-core-2.3.2.jar;.\lib\com.fasterxml.jackson.core.jackson-databind-2.3.2.jar;.\lib\org.scala-lang.scala-reflect-2.11.1.jar;.\lib\org.scala-lang.modules.scala-parser-combinators_2.11-1.0.1.jar;.\lib\io.netty.netty-3.9.3.Final.jar;.\lib\com.typesafe.netty.netty-http-pipelining-1.1.2.jar;.\lib\org.slf4j.jul-to-slf4j-1.7.6.jar;.\lib\org.slf4j.jcl-over-slf4j-1.7.6.jar;.\lib\ch.qos.logback.logback-core-1.1.1.jar;.\lib\ch.qos.logback.logback-classic-1.1.1.jar;.\lib\com.typesafe.akka.akka-actor_2.11-2.3.4.jar;.\lib\com.typesafe.akka.akka-slf4j_2.11-2.3.4.jar;.\lib\commons-codec.commons-codec-1.9.jar;.\lib\xerces.xercesImpl-2.11.0.jar;.\lib\xml-apis.xml-apis-1.4.01.jar;.\lib\javax.transaction.jta-1.1.jar;.\lib\com.typesafe.play.play-jdbc_2.11-2.3.7.jar;.\lib\com.jolbox.bonecp-0.8.0.RELEASE.jar;.\lib\com.h2database.h2-1.3.175.jar;.\lib\tyrex.tyrex-1.0.1.jar;.\lib\com.typesafe.play.play-ws_2.11-2.3.7.jar;.\lib\com.google.guava.guava-16.0.1.jar;.\lib\com.ning.async-http-client-1.8.14.jar;.\lib\oauth.signpost.signpost-core-1.2.1.2.jar;.\lib\oauth.signpost.signpost-commonshttp4-1.2.1.2.jar;.\lib\org.apache.httpcomponents.httpcore-4.0.1.jar;.\lib\org.apache.httpcomponents.httpclient-4.0.1.jar;.\lib\commons-logging.commons-logging-1.1.1.jar;.\lib\com.github.aselab.scala-activerecord_2.11-0.3.0.jar;.\lib\org.squeryl.squeryl_2.11-0.9.6-RC3.jar;.\lib\cglib.cglib-nodep-2.2.jar;.\lib\org.scala-lang.scalap-2.11.1.jar;.\lib\org.scala-lang.scala-compiler-2.11.1.jar;.\lib\org.scala-lang.modules.scala-xml_2.11-1.0.2.jar;.\lib\io.backchat.inflector.scala-inflector_2.11-1.3.5.jar;.\lib\com.github.nscala-time.nscala-time_2.11-1.4.0.jar;.\lib\joda-time.joda-time-2.4.jar;.\lib\commons-validator.commons-validator-1.4.0.jar;.\lib\commons-beanutils.commons-beanutils-1.8.3.jar;.\lib\commons-digester.commons-digester-1.8.jar;.\lib\org.slf4j.slf4j-api-1.7.7.jar;.\lib\com.github.aselab.scala-activerecord-play2_2.11-0.3.0.jar;.\lib\org.postgresql.postgresql-9.3-1100-jdbc41.jar;.\lib\net.spy.spymemcached-2.10.2.jar;.\lib\yodel-base.yodel-base-1.1-assets.jar

However, with or without this change, my project works when I start it by running the batch file manually from \target\universal\stage\bin\

Only when I use sbt start I receive:

Bad application path: -Dhttp.port=9000

That happens even if I move the project to C:, so I think this command line length is not the issue (at least in my case). There must be some other bug that causes the "Bad application path" error.

@jroper don't you think a command line longer than 8000 characters is a bit excessive?

I mean I know "M$ sucks" and we must hate them, but look what people can do with only 4 KB of binary code: https://www.youtube.com/watch?v=AWcbj7ksqwE . But it's probably easier to bash MS than to fix the issue.

Back to the topic, and fixing the issue, this bullshit starts with the

if "%YODEL_BASE_HOME%"=="" set "YODEL_BASE_HOME=%~dp0\\.."

line in the stage/bin bat file.

In my case, that returns

c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..

Then we have:

set "APP_LIB_DIR=%YODEL_BASE_HOME%\lib\"

So that thing becomes:

c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\

A few lines later we have:

set "APP_CLASSPATH=%APP_LIB_DIR%\yodel-base.yodel-base-1.1.jar;%APP_LIB_DIR%\org.scala-lang.scala-library-2.11.4.jar;%APP_LIB_DIR%\com.typesafe.play.twirl-api_2.11-1.0.2.jar;%APP_LIB_DIR%\org.apache.commons.commons-lang3-3.1.jar;%APP_LIB_DIR%\com.typesafe.play.play_2.11-2.3.7.jar;%APP_LIB_DIR%\com.typesafe.play.build-link-2.3.7.jar;%APP_LIB_DIR%\com.typesafe.play.play-exceptions-2.3.7.jar;%APP_LIB_DIR%\org.javassist.javassist-3.18.2-GA.jar;%APP_LIB_DIR%\com.typesafe.play.play-iteratees_2.11-2.3.7.jar;%APP_LIB_DIR%\org.scala-stm.scala-stm_2.11-0.7.jar;%APP_LIB_DIR%\com.typesafe.config-1.2.1.jar;%APP_LIB_DIR%\com.typesafe.play.play-json_2.11-2.3.7.jar;%APP_LIB_DIR%\com.typesafe.play.play-functional_2.11-2.3.7.jar;%APP_LIB_DIR%\com.typesafe.play.play-datacommons_2.11-2.3.7.jar;%APP_LIB_DIR%\org.joda.joda-convert-1.6.jar;%APP_LIB_DIR%\com.fasterxml.jackson.core.jackson-annotations-2.3.2.jar;%APP_LIB_DIR%\com.fasterxml.jackson.core.jackson-core-2.3.2.jar;%APP_LIB_DIR%\com.fasterxml.jackson.core.jackson-databind-2.3.2.jar;%APP_LIB_DIR%\org.scala-lang.scala-reflect-2.11.1.jar;%APP_LIB_DIR%\org.scala-lang.modules.scala-parser-combinators_2.11-1.0.1.jar;%APP_LIB_DIR%\io.netty.netty-3.9.3.Final.jar;%APP_LIB_DIR%\com.typesafe.netty.netty-http-pipelining-1.1.2.jar;%APP_LIB_DIR%\org.slf4j.jul-to-slf4j-1.7.6.jar;%APP_LIB_DIR%\org.slf4j.jcl-over-slf4j-1.7.6.jar;%APP_LIB_DIR%\ch.qos.logback.logback-core-1.1.1.jar;%APP_LIB_DIR%\ch.qos.logback.logback-classic-1.1.1.jar;%APP_LIB_DIR%\com.typesafe.akka.akka-actor_2.11-2.3.4.jar;%APP_LIB_DIR%\com.typesafe.akka.akka-slf4j_2.11-2.3.4.jar;%APP_LIB_DIR%\commons-codec.commons-codec-1.9.jar;%APP_LIB_DIR%\xerces.xercesImpl-2.11.0.jar;%APP_LIB_DIR%\xml-apis.xml-apis-1.4.01.jar;%APP_LIB_DIR%\javax.transaction.jta-1.1.jar;%APP_LIB_DIR%\com.typesafe.play.play-jdbc_2.11-2.3.7.jar;%APP_LIB_DIR%\com.jolbox.bonecp-0.8.0.RELEASE.jar;%APP_LIB_DIR%\com.h2database.h2-1.3.175.jar;%APP_LIB_DIR%\tyrex.tyrex-1.0.1.jar;%APP_LIB_DIR%\com.typesafe.play.play-ws_2.11-2.3.7.jar;%APP_LIB_DIR%\com.google.guava.guava-16.0.1.jar;%APP_LIB_DIR%\com.ning.async-http-client-1.8.14.jar;%APP_LIB_DIR%\oauth.signpost.signpost-core-1.2.1.2.jar;%APP_LIB_DIR%\oauth.signpost.signpost-commonshttp4-1.2.1.2.jar;%APP_LIB_DIR%\org.apache.httpcomponents.httpcore-4.0.1.jar;%APP_LIB_DIR%\org.apache.httpcomponents.httpclient-4.0.1.jar;%APP_LIB_DIR%\commons-logging.commons-logging-1.1.1.jar;%APP_LIB_DIR%\com.github.aselab.scala-activerecord_2.11-0.3.0.jar;%APP_LIB_DIR%\org.squeryl.squeryl_2.11-0.9.6-RC3.jar;%APP_LIB_DIR%\cglib.cglib-nodep-2.2.jar;%APP_LIB_DIR%\org.scala-lang.scalap-2.11.1.jar;%APP_LIB_DIR%\org.scala-lang.scala-compiler-2.11.1.jar;%APP_LIB_DIR%\org.scala-lang.modules.scala-xml_2.11-1.0.2.jar;%APP_LIB_DIR%\io.backchat.inflector.scala-inflector_2.11-1.3.5.jar;%APP_LIB_DIR%\com.github.nscala-time.nscala-time_2.11-1.4.0.jar;%APP_LIB_DIR%\joda-time.joda-time-2.4.jar;%APP_LIB_DIR%\commons-validator.commons-validator-1.4.0.jar;%APP_LIB_DIR%\commons-beanutils.commons-beanutils-1.8.3.jar;%APP_LIB_DIR%\commons-digester.commons-digester-1.8.jar;%APP_LIB_DIR%\org.slf4j.slf4j-api-1.7.7.jar;%APP_LIB_DIR%\com.github.aselab.scala-activerecord-play2_2.11-0.3.0.jar;%APP_LIB_DIR%\org.postgresql.postgresql-9.3-1100-jdbc41.jar;%APP_LIB_DIR%\net.spy.spymemcached-2.10.2.jar;%APP_LIB_DIR%\yodel-base.yodel-base-1.1-assets.jar"

That becomes:

c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\yodel-base.yodel-base-1.1.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\org.scala-lang.scala-library-2.11.4.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\com.typesafe.play.twirl-api_2.11-1.0.2.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\org.apache.commons.commons-lang3-3.1.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\com.typesafe.play.play_2.11-2.3.7.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\com.typesafe.play.build-link-2.3.7.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\com.typesafe.play.play-exceptions-2.3.7.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\org.javassist.javassist-3.18.2-GA.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\com.typesafe.play.play-iteratees_2.11-2.3.7.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\org.scala-stm.scala-stm_2.11-0.7.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\com.typesafe.config-1.2.1.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\com.typesafe.play.play-json_2.11-2.3.7.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\com.typesafe.play.play-functional_2.11-2.3.7.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\com.typesafe.play.play-datacommons_2.11-2.3.7.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\org.joda.joda-convert-1.6.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\com.fasterxml.jackson.core.jackson-annotations-2.3.2.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\com.fasterxml.jackson.core.jackson-core-2.3.2.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\com.fasterxml.jackson.core.jackson-databind-2.3.2.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\org.scala-lang.scala-reflect-2.11.1.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\org.scala-lang.modules.scala-parser-combinators_2.11-1.0.1.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\io.netty.netty-3.9.3.Final.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\com.typesafe.netty.netty-http-pipelining-1.1.2.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\org.slf4j.jul-to-slf4j-1.7.6.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\org.slf4j.jcl-over-slf4j-1.7.6.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\ch.qos.logback.logback-core-1.1.1.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\ch.qos.logback.logback-classic-1.1.1.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\com.typesafe.akka.akka-actor_2.11-2.3.4.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\com.typesafe.akka.akka-slf4j_2.11-2.3.4.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\commons-codec.commons-codec-1.9.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\xerces.xercesImpl-2.11.0.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\xml-apis.xml-apis-1.4.01.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\javax.transaction.jta-1.1.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\com.typesafe.play.play-jdbc_2.11-2.3.7.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\com.jolbox.bonecp-0.8.0.RELEASE.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\com.h2database.h2-1.3.175.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\tyrex.tyrex-1.0.1.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\com.typesafe.play.play-ws_2.11-2.3.7.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\com.google.guava.guava-16.0.1.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\com.ning.async-http-client-1.8.14.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\oauth.signpost.signpost-core-1.2.1.2.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\oauth.signpost.signpost-commonshttp4-1.2.1.2.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\org.apache.httpcomponents.httpcore-4.0.1.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\org.apache.httpcomponents.httpclient-4.0.1.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\commons-logging.commons-logging-1.1.1.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\com.github.aselab.scala-activerecord_2.11-0.3.0.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\org.squeryl.squeryl_2.11-0.9.6-RC3.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\cglib.cglib-nodep-2.2.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\org.scala-lang.scalap-2.11.1.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\org.scala-lang.scala-compiler-2.11.1.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\org.scala-lang.modules.scala-xml_2.11-1.0.2.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\io.backchat.inflector.scala-inflector_2.11-1.3.5.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\com.github.nscala-time.nscala-time_2.11-1.4.0.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\joda-time.joda-time-2.4.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\commons-validator.commons-validator-1.4.0.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\commons-beanutils.commons-beanutils-1.8.3.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\commons-digester.commons-digester-1.8.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\org.slf4j.slf4j-api-1.7.7.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\com.github.aselab.scala-activerecord-play2_2.11-0.3.0.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\org.postgresql.postgresql-9.3-1100-jdbc41.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\net.spy.spymemcached-2.10.2.jar;c:\Users\Vladimir\git\yodel_base\target\universal\stage\bin\\\..\lib\\yodel-base.yodel-base-1.1-assets.jar

Anyway, the obvious solution to reduce the length is to replace this:

set "APP_LIB_DIR=%YODEL_BASE_HOME%\lib\"

with

cd "%YODEL_BASE_HOME%"
set "APP_LIB_DIR=.\lib"

That will reduce APP_CLASSPATH from 6750 characters to 2846 characters in my case:

.\lib\yodel-base.yodel-base-1.1.jar;.\lib\org.scala-lang.scala-library-2.11.4.jar;.\lib\com.typesafe.play.twirl-api_2.11-1.0.2.jar;.\lib\org.apache.commons.commons-lang3-3.1.jar;.\lib\com.typesafe.play.play_2.11-2.3.7.jar;.\lib\com.typesafe.play.build-link-2.3.7.jar;.\lib\com.typesafe.play.play-exceptions-2.3.7.jar;.\lib\org.javassist.javassist-3.18.2-GA.jar;.\lib\com.typesafe.play.play-iteratees_2.11-2.3.7.jar;.\lib\org.scala-stm.scala-stm_2.11-0.7.jar;.\lib\com.typesafe.config-1.2.1.jar;.\lib\com.typesafe.play.play-json_2.11-2.3.7.jar;.\lib\com.typesafe.play.play-functional_2.11-2.3.7.jar;.\lib\com.typesafe.play.play-datacommons_2.11-2.3.7.jar;.\lib\org.joda.joda-convert-1.6.jar;.\lib\com.fasterxml.jackson.core.jackson-annotations-2.3.2.jar;.\lib\com.fasterxml.jackson.core.jackson-core-2.3.2.jar;.\lib\com.fasterxml.jackson.core.jackson-databind-2.3.2.jar;.\lib\org.scala-lang.scala-reflect-2.11.1.jar;.\lib\org.scala-lang.modules.scala-parser-combinators_2.11-1.0.1.jar;.\lib\io.netty.netty-3.9.3.Final.jar;.\lib\com.typesafe.netty.netty-http-pipelining-1.1.2.jar;.\lib\org.slf4j.jul-to-slf4j-1.7.6.jar;.\lib\org.slf4j.jcl-over-slf4j-1.7.6.jar;.\lib\ch.qos.logback.logback-core-1.1.1.jar;.\lib\ch.qos.logback.logback-classic-1.1.1.jar;.\lib\com.typesafe.akka.akka-actor_2.11-2.3.4.jar;.\lib\com.typesafe.akka.akka-slf4j_2.11-2.3.4.jar;.\lib\commons-codec.commons-codec-1.9.jar;.\lib\xerces.xercesImpl-2.11.0.jar;.\lib\xml-apis.xml-apis-1.4.01.jar;.\lib\javax.transaction.jta-1.1.jar;.\lib\com.typesafe.play.play-jdbc_2.11-2.3.7.jar;.\lib\com.jolbox.bonecp-0.8.0.RELEASE.jar;.\lib\com.h2database.h2-1.3.175.jar;.\lib\tyrex.tyrex-1.0.1.jar;.\lib\com.typesafe.play.play-ws_2.11-2.3.7.jar;.\lib\com.google.guava.guava-16.0.1.jar;.\lib\com.ning.async-http-client-1.8.14.jar;.\lib\oauth.signpost.signpost-core-1.2.1.2.jar;.\lib\oauth.signpost.signpost-commonshttp4-1.2.1.2.jar;.\lib\org.apache.httpcomponents.httpcore-4.0.1.jar;.\lib\org.apache.httpcomponents.httpclient-4.0.1.jar;.\lib\commons-logging.commons-logging-1.1.1.jar;.\lib\com.github.aselab.scala-activerecord_2.11-0.3.0.jar;.\lib\org.squeryl.squeryl_2.11-0.9.6-RC3.jar;.\lib\cglib.cglib-nodep-2.2.jar;.\lib\org.scala-lang.scalap-2.11.1.jar;.\lib\org.scala-lang.scala-compiler-2.11.1.jar;.\lib\org.scala-lang.modules.scala-xml_2.11-1.0.2.jar;.\lib\io.backchat.inflector.scala-inflector_2.11-1.3.5.jar;.\lib\com.github.nscala-time.nscala-time_2.11-1.4.0.jar;.\lib\joda-time.joda-time-2.4.jar;.\lib\commons-validator.commons-validator-1.4.0.jar;.\lib\commons-beanutils.commons-beanutils-1.8.3.jar;.\lib\commons-digester.commons-digester-1.8.jar;.\lib\org.slf4j.slf4j-api-1.7.7.jar;.\lib\com.github.aselab.scala-activerecord-play2_2.11-0.3.0.jar;.\lib\org.postgresql.postgresql-9.3-1100-jdbc41.jar;.\lib\net.spy.spymemcached-2.10.2.jar;.\lib\yodel-base.yodel-base-1.1-assets.jar

However, with or without this change, my project works when I start it by running the batch file manually from \target\universal\stage\bin\

Only when I use sbt start I receive:

Bad application path: -Dhttp.port=9000

That happens even if I move the project to C:, so I think this command line length is not the issue (at least in my case). There must be some other bug that causes the "Bad application path" error.

@alisa-rend

This comment has been minimized.

Show comment
Hide comment

👍

@fairjm

This comment has been minimized.

Show comment
Hide comment
@fairjm

fairjm Feb 7, 2015

agree with @vnicolici
running the \target\universal\stage\bin\PROJECTNAME.bat is ok but use start will crash.

fairjm commented Feb 7, 2015

agree with @vnicolici
running the \target\universal\stage\bin\PROJECTNAME.bat is ok but use start will crash.

@igor-ye

This comment has been minimized.

Show comment
Hide comment
@igor-ye

igor-ye Feb 19, 2015

Got the same error. To fix this issue find following lines in generated .BAT file:

rem Call the application and pass all arguments unchanged.
"%_JAVACMD%" %_JAVA_OPTS% %YOUR_APP_OPTS% -cp "%APP_CLASSPATH%" %APP_MAIN_CLASS% %*

And remove %* from the end of 2nd line (as we don't need to pass any parameters to play.core.server.NettyServer).
After fix you can run start-script with any -D or -J arguments:

your_app.bat -Dconfig.file=..\conf\local.dev.conf -Dhttp.port=8888

igor-ye commented Feb 19, 2015

Got the same error. To fix this issue find following lines in generated .BAT file:

rem Call the application and pass all arguments unchanged.
"%_JAVACMD%" %_JAVA_OPTS% %YOUR_APP_OPTS% -cp "%APP_CLASSPATH%" %APP_MAIN_CLASS% %*

And remove %* from the end of 2nd line (as we don't need to pass any parameters to play.core.server.NettyServer).
After fix you can run start-script with any -D or -J arguments:

your_app.bat -Dconfig.file=..\conf\local.dev.conf -Dhttp.port=8888
@muuki88

This comment has been minimized.

Show comment
Hide comment
@muuki88

muuki88 Feb 20, 2015

Contributor

If there are further issues with these, please open an issue in sbt-native-packager.

Considering the long classpaths mentioned here, there are different solutions provided in #72

  • ClasspathJar (available as AutoPlugin)
  • override classpath setting
Contributor

muuki88 commented Feb 20, 2015

If there are further issues with these, please open an issue in sbt-native-packager.

Considering the long classpaths mentioned here, there are different solutions provided in #72

  • ClasspathJar (available as AutoPlugin)
  • override classpath setting
@oldcwj

This comment has been minimized.

Show comment
Hide comment

oldcwj commented Apr 8, 2015

@igor-ye thanks!

@vnicolici

This comment has been minimized.

Show comment
Hide comment
@vnicolici

vnicolici Jan 19, 2016

After experiencing this annoying issue on Windows in the past now I'm starting to experience this issue on Linux as well.

After adding javaOptions += "-Xmx2048m" to my project file I get Bad application path: -Xmx2048m when starting my app.

It was working fine before adding that java option.

I use play scala 2.3.10, sbt 0.13.9, Java 8, Ubuntu 14.04.3 LTS.

I'm starting my app like this:

sbt dist
sbt start -Dhttp.port=3101

I'm starting to run out of excuses for why I keep trying to make this framework work for me.

After experiencing this annoying issue on Windows in the past now I'm starting to experience this issue on Linux as well.

After adding javaOptions += "-Xmx2048m" to my project file I get Bad application path: -Xmx2048m when starting my app.

It was working fine before adding that java option.

I use play scala 2.3.10, sbt 0.13.9, Java 8, Ubuntu 14.04.3 LTS.

I'm starting my app like this:

sbt dist
sbt start -Dhttp.port=3101

I'm starting to run out of excuses for why I keep trying to make this framework work for me.

@jroper jroper removed the ddd label Mar 10, 2016

@wsargent

This comment has been minimized.

Show comment
Hide comment
@wsargent

wsargent Mar 19, 2016

Member

This would be a lot nicer with a repeatable test case.

Member

wsargent commented Mar 19, 2016

This would be a lot nicer with a repeatable test case.

@wsargent

This comment has been minimized.

Show comment
Hide comment
@wsargent

wsargent Mar 19, 2016

Member

Also see http://stackoverflow.com/a/28224383/5266 and https://stackoverflow.com/questions/19391014/play-2-2-application-crashes-on-heroku which says:

set "APP_MAIN_CLASS= -DapplyEvolutions.default=true -Dhttp.port=9009 play.core.server.NettyServer"

Also see the #3081 (comment) comment -- this is sbt-native-packager related, and any bugs should be sent there, and "start" is deprecated in 2.5. Closing.

Member

wsargent commented Mar 19, 2016

Also see http://stackoverflow.com/a/28224383/5266 and https://stackoverflow.com/questions/19391014/play-2-2-application-crashes-on-heroku which says:

set "APP_MAIN_CLASS= -DapplyEvolutions.default=true -Dhttp.port=9009 play.core.server.NettyServer"

Also see the #3081 (comment) comment -- this is sbt-native-packager related, and any bugs should be sent there, and "start" is deprecated in 2.5. Closing.

@wsargent wsargent closed this Mar 19, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment