Skip to content
This repository has been archived by the owner on Sep 1, 2022. It is now read-only.

NoSuchMethodError #11

Open
aaronlyt opened this issue Jun 10, 2020 · 5 comments
Open

NoSuchMethodError #11

aaronlyt opened this issue Jun 10, 2020 · 5 comments

Comments

@aaronlyt
Copy link

aaronlyt commented Jun 10, 2020

pytorch: 1.5 statble
libtorch: https://download.pytorch.org/libtorch/cu102/libtorch-shared-with-deps-1.5.0.zip

run command: ./gradlew run --stacktrace --debug

stop at:

<=========----> 75% EXECUTING [1m 37s]

:run

debug infomation:

2020-06-10T13:43:15.052+0800 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire shared lock on daemon addresses registry.
2020-06-10T13:43:15.052+0800 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired on daemon addresses registry.
2020-06-10T13:43:15.053+0800 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on daemon addresses registry.

2020-06-10T10:45:56.962+0800 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Changing state to: STARTED
2020-06-10T10:45:56.962+0800 [INFO] [org.gradle.process.internal.DefaultExecHandle] Successfully started process 'command '/home/ks/software/jdk-9.0.4/bin/java''
2020-06-10T10:45:56.962+0800 [DEBUG] [org.gradle.process.internal.ExecHandleRunner] waiting until streams are handled...
2020-06-10T10:45:57.206+0800 [ERROR] [system.err] Exception in thread "main" java.lang.NoSuchMethodError: nativeNewTensor
2020-06-10T10:45:57.207+0800 [ERROR] [system.err] at org.pytorch.NativePeer.forward(Native Method)
2020-06-10T10:45:57.207+0800 [ERROR] [system.err] at org.pytorch.Module.forward(Module.java:37)
2020-06-10T10:45:57.207+0800 [ERROR] [system.err] at demo.App.main(App.java:17)
2020-06-10T10:46:02.923+0800 [LIFECYCLE] [org.gradle.cache.internal.DefaultFileLockManager]
2020-06-10T10:46:02.923+0800 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire shared lock on daemon addresses registry.

@ares89
Copy link

ares89 commented Jun 30, 2020

you need upgrade the pytorch_java_only.jar to version 1.5.0.

@aaronlyt
Copy link
Author

aaronlyt commented Jul 3, 2020

@ares89
Copy link

ares89 commented Jul 6, 2020

https://download.pytorch.org/libtorch/cu102/libtorch-shared-with-deps-1.5.0.zip, is not 1.5.0?

yes,libtorch version is 1.5.0, but what's the version of your pytorch_java_only.jar ?

@aaronlyt
Copy link
Author

aaronlyt commented Jul 8, 2020

I downloaded from the link, it's 1.5.0

@dreiss
Copy link
Contributor

dreiss commented Jul 19, 2021

Can you try with the latest release and tell me if you're still seeing this? Please make sure that the version of libtorch that you've downloaded matches the jar that you're using.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants