Exception in thread "StateCollectionThread" java.lang.NoSuchMethodError: com.simsilica.mathd.Vec3d.set(Lcom/simsilica/mathd/Vec3d;)V
at com.simsilica.ethereal.NetworkStateListener.stateChanged(NetworkStateListener.java:345)
at com.simsilica.ethereal.zone.StateCollector.publish(StateCollector.java:184)
at com.simsilica.ethereal.zone.StateCollector.publishFrame(StateCollector.java:210)
at com.simsilica.ethereal.zone.StateCollector.collect(StateCollector.java:246)
at com.simsilica.ethereal.zone.StateCollector$Runner.run(StateCollector.java:301)
I decided to update from 1.0.3 and got that error. I’ve reported it on github as an issue:
apply plugin: 'java'
apply plugin: 'application'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'groovy'
mainClassName='example.Main'
repositories {
mavenLocal()
jcenter()
maven { url "https://jitpack.io" }
maven { url "https://oss.sonatype.org/content/repositories/snapshots"}
}
ext.jmeVersion = "[3.1,)"
project(":assets") {
apply plugin: "java"
buildDir = rootProject.file("build/assets")
sourceSets {
main {
resources {
srcDir '.'
}
}
}
}
dependencies {
// Need at least basic JME
compile "org.jmonkeyengine:jme3-core:$jmeVersion"
compile "org.jmonkeyengine:jme3-desktop:$jmeVersion"
compile "org.jmonkeyengine:jme3-lwjgl:$jmeVersion"
// We definitely want a UI
//compile "com.simsilica:lemur:[1.8,)"
compile "com.simsilica:lemur:1.9.1-SNAPSHOT"
//compile "com.simsilica:lemur-proto:[1.6,)"
compile "com.simsilica:lemur-proto:1.7.2-SNAPSHOT"
// And our base code for sim-etheral, SiO2, etc.
// (many of these need to be built locally and 'gradle install'ed as of this writing)
compile "com.simsilica:sio2:1.1.0"
compile "com.simsilica:sim-math:1.1.1"
//compile "com.simsilica:sim-ethereal:[1.1,)"
compile "com.simsilica:sim-ethereal:1.2.1-SNAPSHOT"
//Mapeditor format support
compile 'org.mapeditor:libtiled:0.17-SNAPSHOT'
// Standard utility stuff
compile 'com.google.guava:guava:19.0'
compile 'org.slf4j:slf4j-api:1.7.13'
runtime 'org.apache.logging.log4j:log4j-slf4j-impl:2.5'
//HSQLDB
runtime 'org.hsqldb:hsqldb:2.3.4'
//Groovy
compile 'org.codehaus.groovy:groovy-all:2.4.7'
runtime project(':assets')
compile 'junit:junit:4.12'
}
task wrapper(type: Wrapper) {
}
/*
This actually exits immediately since there is no standard input stream
task runServer(type: JavaExec) {
classpath sourceSets.main.runtimeClasspath
main = "example.net.server.GameServer"
jvmArgs '-Dlog4j.configurationFile=server-log4j2.xml'
}
*/
// Create a custom server start script in the distribution
task serverStartScript(type: CreateStartScripts) {
mainClassName = "example.net.server.GameServer"
applicationName = "server"
outputDir = new File(project.buildDir, 'scripts')
classpath = jar.outputs.files + project.configurations.runtime
defaultJvmOpts = ['-Dlog4j.configurationFile=server-log4j2.xml']
}
/*applicationDistribution.into("bin") {
from(serverStartScript)
fileMode = 0755
}*/
// I think this is ultimately clearer than the above
distributions {
main {
contents {
from(serverStartScript) {
into "bin"
}
}
}
}
// Either way we end up with dupes if we don't do this
distZip {
duplicatesStrategy = 'exclude'
}
// And our base code for sim-etheral, SiO2, etc.
// (many of these need to be built locally and 'gradle install'ed as of this writing)
compile "com.simsilica:sio2:1.1.0"
compile "com.simsilica:sim-math:1.1.1"
//compile "com.simsilica:sim-ethereal:[1.1,)"
compile "com.simsilica:sim-ethereal:1.2.1"
I did a dependencyreport in html and can see that Sim-Ethereal-1.2.1 depends on Sim-Math-1.0.2 and not Sim-Math-1.1.1. Gradle resolves this with the newest version, so if the error happens through reflection, could this be the source of the error?
after the release of Sim-Ethereal-1.2.1, so it wouldn’t be in the release. (I registered it as a serializable class in my game though to get around that issue).
then it works. The commit earlier mentioned is also where you change the dependency from sim-math-1.0.2 to sim-math-1.1.1
So right now I have:
// And our base code for sim-etheral, SiO2, etc.
// (many of these need to be built locally and 'gradle install'ed as of this writing)
compile "com.simsilica:sio2:1.1.0"
compile "com.simsilica:sim-math:1.1.1"
compile "com.simsilica:sim-ethereal:1.2.2-SNAPSHOT"
It shouldn’t do this automatically unless something is depending on the bracketed version and not the specific version.
I checked out sim-eth-es on a system that has never built any JME-related or Sim-related code ever before… and was able to compile and run with the build.gradle currently checked in for sim-eth-es. The only difference was that I depend on a slightly older version of sim-math.
So is there a reason you depend on the newer sim-math?
The reason was next:
I had the sim-eth-es example project with older sim-math lib.
I planned to add mphys lib. and it depends on newer version of sim-math.
Since sim-tool is taken from local repositories, Sim-math update starts versions conflict.
as the result, old versions were used.
Nope. I just prefer to stay updated. I think if Gradle encounters a lib that is to be loaded multiple times in different versions, it takes the newer version by default (i dont know gradle very well though).
And as I wrote, I can get it work as well if I choose the older Sim-Math-1.0.2, so we are aligned there.
I haven’t published it yet. I think I made a demo people could run that included it but if you try to use it then it’s still in a “use at your own risk” sort of state.