Open me4502 opened 9 years ago
Is there any update on this?
I just updated the stacktrace to 2.0.0
It appears that only 1 thing is actually called in the method that has the nullpointerexception, something on the field that is set to null the previous line.
It appears that the method should be used to set the value of that, instead of direct access to the field.
I could not reproduce this error. Would you tell me your environment such as Gradle version, JVM or OS? Template project works well.
The issue is weird because I can only reproduce it with some projects.
I've tested this with Gradle 2.8 -> 2.13, running Java 8 1.8.0_77 x86_64, Windows 10.
The current project I'm having an issue with contains two sub-projects, both of which also make use of this plugin for deployment. I'll try only having the single deployment setup in place - it may have something to do with multiple.
Nope: Same when I remove the subprojects.
Here's my main gradle file, http://pastebin.com/tPbf49Qe It imports common, which is here - http://pastebin.com/r0Zpd7iX
It seems that JSch 0.1.46 is loaded on your environment but 0.1.52 is expected. com.jcraft.jsch.JSch.removeAllIdentity(JSch.java:287)
means 0.1.46. Maybe classpath is something wrong. Would you try below syntax to load the plugin?
plugins {
id 'org.hidetake.ssh' version '2.0.0'
}
or comment out below, the plugin is available on JCenter.
maven {
name = "ssh"
url = "https://dl.bintray.com/int128/maven/"
}
Thanks.
I still get the issue if I add this,
configurations.all { resolutionStrategy { force 'com.jcraft:jsch:0.1.52' } }
Also, this is my output of gradlew buildEnvironment
classpath +--- net.minecraftforge.gradle:ForgeGradle:2.1-SNAPSHOT | +--- com.github.tony19:named-regexp:0.2.3 | +--- net.sf.opencsv:opencsv:2.3 | +--- com.nothome:javaxdelta:2.0.1 | | --- trove:trove:1.0.2 | +--- org.ow2.asm:asm-debug-all:5.0.3 | +--- com.github.jponge:lzma-java:1.3 | +--- com.github.abrarsyed.jastyle:jAstyle:1.3 | +--- net.sf.trove4j:trove4j:2.1.0 | +--- org.apache.httpcomponents:httpclient:4.3.3 | | +--- org.apache.httpcomponents:httpcore:4.3.2 | | +--- commons-logging:commons-logging:1.1.3 | | --- commons-codec:commons-codec:1.6 | +--- com.google.code.gson:gson:2.2.4 | +--- com.google.guava:guava:18.0 | +--- net.minecraftforge:fernflower:2.0-SNAPSHOT | +--- org.apache.httpcomponents:httpmime:4.3.3 | | --- org.apache.httpcomponents:httpclient:4.3.3 (*) | --- com.cloudbees:diff4j:1.1 | +--- org.jvnet.localizer:localizer:1.12 | --- commons-io:commons-io:1.4 +--- org.spongepowered:mixingradle:0.4-SNAPSHOT | +--- com.google.guava:guava:17.0 -> 18.0 | --- org.ow2.asm:asm-debug-all:5.0.3 --- org.hidetake:gradle-ssh-plugin:2.0.0 --- org.hidetake:groovy-ssh:2.0.0 +--- org.slf4j:slf4j-api:1.7.7 +--- com.jcraft:jsch:0.1.52 +--- com.jcraft:jsch.agentproxy.connector-factory:0.0.7 | +--- com.jcraft:jsch.agentproxy.core:0.0.7 | +--- com.jcraft:jsch.agentproxy.usocket-jna:0.0.7 | | +--- com.jcraft:jsch.agentproxy.core:0.0.7 | | +--- net.java.dev.jna:jna:3.4.0 | | --- net.java.dev.jna:platform:3.4.0 | +--- com.jcraft:jsch.agentproxy.usocket-nc:0.0.7 | | --- com.jcraft:jsch.agentproxy.core:0.0.7 | +--- com.jcraft:jsch.agentproxy.sshagent:0.0.7 | | --- com.jcraft:jsch.agentproxy.core:0.0.7 | --- com.jcraft:jsch.agentproxy.pageant:0.0.7 | +--- com.jcraft:jsch.agentproxy.core:0.0.7 | +--- net.java.dev.jna:jna:3.4.0 | --- net.java.dev.jna:platform:3.4.0 --- com.jcraft:jsch.agentproxy.jsch:0.0.7 +--- com.jcraft:jsch:0.1.49 -> 0.1.52 --- com.jcraft:jsch.agentproxy.core:0.0.7
Would you try println ssh.version
on the plugin 2.2.0? It will show version of jsch visible from the plugin.
gradle-ssh-plugin-2.2.0 (groovy-ssh-2.2.0, jsch-0.1.52, groovy-2.4.4, java-1.8.0_74)
My gradle cache doesn't even contain jsch-0.1.46, it only contains 0.1.52 and 0.1.53
Since 2.6.0 ConnectionManager
class has been rewritten thoroughly. Please try it if possible.
+1 on this issue. Running with Gradle 5.1 and gradle-ssh-plugin 2.9.0
Used the same way as in the example.
The line in question that the stacktrace refers to is,