RCross
RCross

Reputation: 5118

Jenkins SBT plugin fails with classpath error

I'm trying to get the Jenkins SBT plugin working, which involves referencing the launcher jar, rather than the full SBT install.

This results in "class not found errors", which I believe is because the manifest does not contain the appropriate classpath to allow the launcher to be run like this:

java -Xms512M -Xmx1536M -Xss1M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=256M -Dsbt.log.noformat=true -jar /path-to/sbt/sbt-launch.jar package

However, this is exactly how the manual installation instructions at http://www.scala-sbt.org/0.13/tutorial/Manual-Installation.html say it should run.

Have I missed something, or should I be filing a bug report (either with the jenkins SBT plugin team or with SBT)?

EDIT: On closer inspection, it's actually failing due to "java.io.EOFException: Unexpected end of ZLIB input stream". I'll investigate this further and update my own question, as I have seen a few other people run into this same problem with SBT.

Upvotes: 0

Views: 638

Answers (1)

Andrzej Jozwik
Andrzej Jozwik

Reputation: 14649

Try:

java -Xms512M -Xmx1536M -Xss1M -XX:MaxPermSize=256M -Dsbt.log.noformat=true -jar /path-to/sbt/sbt-launch.jar

If you create own file use (bash script):

java -Xms512M -Xmx1536M -Xss1M -XX:MaxPermSize=256M -Dsbt.log.noformat=true -jar /path-to/sbt/sbt-launch.jar "$@"

Note: -XX:+CMSClassUnloadingEnabled is only valid for CMS Garbage collector. If you use java 7+ you can remove it. For java 8 remove also -XX:MaxPermSize=256M

Upvotes: 1

Related Questions