Compilation Crash NoClassDefFoundError for sbt

2,188 views
Skip to first unread message

michael...@hellosign.com

unread,
Dec 13, 2018, 4:30:27 PM12/13/18
to Gatling User Group
Upgrading to Gatling 3 happened at the same time as a required move to artifactory so I'm not sure which if one or both are responsible but I'm getting the following error running my simulation on Ubuntu.  Mac OS seems fine as well as Intellij.  I've tried adding sbt to the pom and a few different strategies for resolving dependencies, no luck.
java.lang.NoClassDefFoundError: Could not initialize class sbt.internal.io.Milli$
	at sbt.io.IO$.getModifiedTimeOrZero(IO.scala:1214)
	at sbt.internal.inc.caching.ClasspathCache$.fromCacheOrHash$1(ClasspathCache.scala:33)
	at sbt.internal.inc.caching.ClasspathCache$.$anonfun$hashClasspath$1(ClasspathCache.scala:42)
	at scala.collection.parallel.mutable.ParArray$Map.leaf(ParArray.scala:656)

Any suggestions on how to fix?

TIA, ML

Stéphane LANDELLE

unread,
Dec 13, 2018, 4:34:54 PM12/13/18
to gat...@googlegroups.com
Corrupted downloaded sbt artifact? Try removing ~/.sbt.

Stéphane Landelle
GatlingCorp CTO



--
You received this message because you are subscribed to the Google Groups "Gatling User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gatling+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Michael Lindsay

unread,
Dec 14, 2018, 12:46:16 AM12/14/18
to gat...@googlegroups.com
I don’t see a ~/.sbt directory.  I tried deleting everything from my .m2/repositories directory as well as mvn clean.  Still same error

Stéphane LANDELLE

unread,
Dec 14, 2018, 12:54:58 AM12/14/18
to gat...@googlegroups.com
Pure shot in the dark: this class seems to be using JNA, which by default extracts a native lib in /tmp and loads it.
Is /tmp mounted with noexec?

Stéphane Landelle
GatlingCorp CTO


Michael Lindsay

unread,
Dec 18, 2018, 2:37:22 PM12/18/18
to gat...@googlegroups.com
That was definitely it, excellent nighttime shooting ;)

Remounting with exec fixes the problem, though I’d prefer to change the java temp directory but haven’t had much success:

JAVA_OPTS="-Djava.io.tmpdir=/opt/tmp" MAVEN_OPTS="-Djava.io.tmpdir=/opt/tmp" mvn gatling:test

Still uses /tmp/

Francois Z

unread,
Apr 15, 2019, 4:51:48 AM4/15/19
to Gatling User Group
The following worked for me when using gatling-charts-highcharts-bundle-3.0.3/bin/gatling.sh :

export JAVA_OPTS="$JAVA_OPTS -Djna.tmpdir=/opt/tmp"
To unsubscribe from this group and stop receiving emails from it, send an email to gat...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Gatling User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gat...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Gatling User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gat...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Gatling User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gat...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages