Comments (4)
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'DHTServer': Unsatisfied dependency expressed through field 'b'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serverBootstrap' defined in class path resource [cc/dodder/dhtserver/netty/config/NettyConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [io.netty.bootstrap.Bootstrap]: Circular reference involving containing bean 'nettyConfig' - consider declaring the factory method as static for independence from its containing instance. Factory method 'bootstrap' threw exception; nested exception is java.lang.NullPointerException: handler
from dodder.
希望作者能帮我一下,没弄过netty,这个问题,我实在解决不了。明明idea里面运行没任何问题,但是打成包后,就直接报错了,我也是懵了。。。
from dodder.
一模一样的错误,楼主解决了吗?愿意付费 [email protected]
from dodder.
So after few attempts changing the spring-boot and netty versions and no luck, I think it all lies with some classpath precedence problem that I've no time to investigate further.
What you can do is just take the command line that is executed from the IDE and run it in a script, here an example in PowerShell
Please note that some libraries here below have been updated, as I've forked the project
# check your classpath and run with powershell .\run-dht-server.ps1
$m2repo = "$Env:USERPROFILE\.m2\repository" # your Maven repo with downloaded jars
$dodderHome = "C:\prj\p2p\LezyDodder" # home of the Dodder root project
$jvmArgs = "-Dfile.encoding=UTF-8 -Xms1024m" # any other JVM arg
$ps = New-Object System.Diagnostics.Process
# your java exe
$ps.StartInfo.Filename = "c:\bin\jdk-18.0.1\bin\java.exe"
Write-Output "M2 Repo [$m2repo] Dodder Home [$dodderHome]"
Write-Output "Starting.."
$ps.StartInfo.Arguments = "$jvmArgs -classpath $dodderHome\dodder-dht-server\target\classes;$dodderHome\dodder-common\target\classes;$dodderHome\words\target\classes;$m2repo\commons-codec\commons-codec\1.15\commons-codec-1.15.jar;$m2repo\com\optimaize\languagedetector\language-detector\0.6\language-detector-0.6.jar;$m2repo\net\arnx\jsonic\1.2.11\jsonic-1.2.11.jar;$m2repo\com\intellij\annotations\12.0\annotations-12.0.jar;$m2repo\com\google\guava\guava\18.0\guava-18.0.jar;$m2repo\org\springframework\boot\spring-boot-starter\2.4.3\spring-boot-starter-2.4.3.jar;$m2repo\org\springframework\boot\spring-boot\2.4.3\spring-boot-2.4.3.jar;$m2repo\org\springframework\spring-context\5.3.4\spring-context-5.3.4.jar;$m2repo\org\springframework\spring-beans\5.3.4\spring-beans-5.3.4.jar;$m2repo\org\springframework\spring-expression\5.3.4\spring-expression-5.3.4.jar;$m2repo\org\springframework\boot\spring-boot-autoconfigure\2.4.3\spring-boot-autoconfigure-2.4.3.jar;$m2repo\org\springframework\boot\spring-boot-starter-logging\2.4.3\spring-boot-starter-logging-2.4.3.jar;$m2repo\ch\qos\logback\logback-classic\1.2.3\logback-classic-1.2.3.jar;$m2repo\ch\qos\logback\logback-core\1.2.3\logback-core-1.2.3.jar;$m2repo\org\apache\logging\log4j\log4j-to-slf4j\2.13.3\log4j-to-slf4j-2.13.3.jar;$m2repo\org\apache\logging\log4j\log4j-api\2.13.3\log4j-api-2.13.3.jar;$m2repo\org\slf4j\jul-to-slf4j\1.7.30\jul-to-slf4j-1.7.30.jar;$m2repo\jakarta\annotation\jakarta.annotation-api\1.3.5\jakarta.annotation-api-1.3.5.jar;$m2repo\org\springframework\spring-core\5.3.4\spring-core-5.3.4.jar;$m2repo\org\springframework\spring-jcl\5.3.4\spring-jcl-5.3.4.jar;$m2repo\org\yaml\snakeyaml\1.27\snakeyaml-1.27.jar;$m2repo\org\springframework\cloud\spring-cloud-starter-stream-kafka\3.1.2\spring-cloud-starter-stream-kafka-3.1.2.jar;$m2repo\org\springframework\cloud\spring-cloud-stream-binder-kafka\3.1.2\spring-cloud-stream-binder-kafka-3.1.2.jar;$m2repo\org\springframework\cloud\spring-cloud-stream-binder-kafka-core\3.1.2\spring-cloud-stream-binder-kafka-core-3.1.2.jar;$m2repo\org\springframework\integration\spring-integration-kafka\5.4.4\spring-integration-kafka-5.4.4.jar;$m2repo\org\springframework\cloud\spring-cloud-stream\3.1.2\spring-cloud-stream-3.1.2.jar;$m2repo\org\springframework\boot\spring-boot-starter-validation\2.4.3\spring-boot-starter-validation-2.4.3.jar;$m2repo\org\glassfish\jakarta.el\3.0.3\jakarta.el-3.0.3.jar;$m2repo\org\hibernate\validator\hibernate-validator\6.1.7.Final\hibernate-validator-6.1.7.Final.jar;$m2repo\jakarta\validation\jakarta.validation-api\2.0.2\jakarta.validation-api-2.0.2.jar;$m2repo\org\jboss\logging\jboss-logging\3.4.1.Final\jboss-logging-3.4.1.Final.jar;$m2repo\com\fasterxml\classmate\1.5.1\classmate-1.5.1.jar;$m2repo\org\springframework\spring-messaging\5.3.4\spring-messaging-5.3.4.jar;$m2repo\org\springframework\integration\spring-integration-core\5.4.4\spring-integration-core-5.4.4.jar;$m2repo\org\springframework\integration\spring-integration-jmx\5.4.4\spring-integration-jmx-5.4.4.jar;$m2repo\org\springframework\retry\spring-retry\1.3.1\spring-retry-1.3.1.jar;$m2repo\javax\annotation\javax.annotation-api\1.3.2\javax.annotation-api-1.3.2.jar;$m2repo\org\springframework\cloud\spring-cloud-function-context\3.1.2\spring-cloud-function-context-3.1.2.jar;$m2repo\net\jodah\typetools\0.6.2\typetools-0.6.2.jar;$m2repo\org\springframework\cloud\spring-cloud-function-core\3.1.2\spring-cloud-function-core-3.1.2.jar;$m2repo\com\fasterxml\jackson\core\jackson-databind\2.11.4\jackson-databind-2.11.4.jar;$m2repo\com\fasterxml\jackson\core\jackson-annotations\2.11.4\jackson-annotations-2.11.4.jar;$m2repo\com\fasterxml\jackson\core\jackson-core\2.11.4\jackson-core-2.11.4.jar;$m2repo\org\apache\kafka\kafka-clients\2.6.0\kafka-clients-2.6.0.jar;$m2repo\com\github\luben\zstd-jni\1.4.4-7\zstd-jni-1.4.4-7.jar;$m2repo\org\lz4\lz4-java\1.7.1\lz4-java-1.7.1.jar;$m2repo\org\xerial\snappy\snappy-java\1.1.7.3\snappy-java-1.1.7.3.jar;$m2repo\org\springframework\kafka\spring-kafka\2.6.6\spring-kafka-2.6.6.jar;$m2repo\io\netty\netty-all\4.1.76.Final\netty-all-4.1.76.Final.jar;$m2repo\io\netty\netty-buffer\4.1.59.Final\netty-buffer-4.1.59.Final.jar;$m2repo\io\netty\netty-codec\4.1.59.Final\netty-codec-4.1.59.Final.jar;$m2repo\io\netty\netty-codec-dns\4.1.59.Final\netty-codec-dns-4.1.59.Final.jar;$m2repo\io\netty\netty-codec-haproxy\4.1.59.Final\netty-codec-haproxy-4.1.59.Final.jar;$m2repo\io\netty\netty-codec-http\4.1.59.Final\netty-codec-http-4.1.59.Final.jar;$m2repo\io\netty\netty-codec-http2\4.1.59.Final\netty-codec-http2-4.1.59.Final.jar;$m2repo\io\netty\netty-codec-memcache\4.1.59.Final\netty-codec-memcache-4.1.59.Final.jar;$m2repo\io\netty\netty-codec-mqtt\4.1.59.Final\netty-codec-mqtt-4.1.59.Final.jar;$m2repo\io\netty\netty-codec-redis\4.1.59.Final\netty-codec-redis-4.1.59.Final.jar;$m2repo\io\netty\netty-codec-smtp\4.1.59.Final\netty-codec-smtp-4.1.59.Final.jar;$m2repo\io\netty\netty-codec-socks\4.1.59.Final\netty-codec-socks-4.1.59.Final.jar;$m2repo\io\netty\netty-codec-stomp\4.1.59.Final\netty-codec-stomp-4.1.59.Final.jar;$m2repo\io\netty\netty-codec-xml\4.1.59.Final\netty-codec-xml-4.1.59.Final.jar;$m2repo\io\netty\netty-common\4.1.59.Final\netty-common-4.1.59.Final.jar;$m2repo\io\netty\netty-handler\4.1.59.Final\netty-handler-4.1.59.Final.jar;$m2repo\io\netty\netty-handler-proxy\4.1.59.Final\netty-handler-proxy-4.1.59.Final.jar;$m2repo\io\netty\netty-resolver\4.1.59.Final\netty-resolver-4.1.59.Final.jar;$m2repo\io\netty\netty-resolver-dns\4.1.59.Final\netty-resolver-dns-4.1.59.Final.jar;$m2repo\io\netty\netty-transport\4.1.59.Final\netty-transport-4.1.59.Final.jar;$m2repo\io\netty\netty-transport-rxtx\4.1.59.Final\netty-transport-rxtx-4.1.59.Final.jar;$m2repo\io\netty\netty-transport-sctp\4.1.59.Final\netty-transport-sctp-4.1.59.Final.jar;$m2repo\io\netty\netty-transport-udt\4.1.59.Final\netty-transport-udt-4.1.59.Final.jar;$m2repo\io\netty\netty-transport-classes-epoll\4.1.76.Final\netty-transport-classes-epoll-4.1.76.Final.jar;$m2repo\io\netty\netty-transport-native-unix-common\4.1.59.Final\netty-transport-native-unix-common-4.1.59.Final.jar;$m2repo\io\netty\netty-transport-classes-kqueue\4.1.76.Final\netty-transport-classes-kqueue-4.1.76.Final.jar;$m2repo\io\netty\netty-resolver-dns-classes-macos\4.1.76.Final\netty-resolver-dns-classes-macos-4.1.76.Final.jar;$m2repo\io\netty\netty-transport-native-epoll\4.1.59.Final\netty-transport-native-epoll-4.1.59.Final-linux-x86_64.jar;$m2repo\io\netty\netty-transport-native-epoll\4.1.59.Final\netty-transport-native-epoll-4.1.59.Final-linux-aarch_64.jar;$m2repo\io\netty\netty-transport-native-kqueue\4.1.59.Final\netty-transport-native-kqueue-4.1.59.Final-osx-x86_64.jar;$m2repo\io\netty\netty-transport-native-kqueue\4.1.76.Final\netty-transport-native-kqueue-4.1.76.Final-osx-aarch_64.jar;$m2repo\io\netty\netty-resolver-dns-native-macos\4.1.59.Final\netty-resolver-dns-native-macos-4.1.59.Final-osx-x86_64.jar;$m2repo\io\netty\netty-resolver-dns-native-macos\4.1.76.Final\netty-resolver-dns-native-macos-4.1.76.Final-osx-aarch_64.jar;$m2repo\org\springframework\boot\spring-boot-starter-data-redis\2.4.3\spring-boot-starter-data-redis-2.4.3.jar;$m2repo\org\springframework\data\spring-data-redis\2.4.5\spring-data-redis-2.4.5.jar;$m2repo\org\springframework\data\spring-data-keyvalue\2.4.5\spring-data-keyvalue-2.4.5.jar;$m2repo\org\springframework\data\spring-data-commons\2.4.5\spring-data-commons-2.4.5.jar;$m2repo\org\springframework\spring-tx\5.3.4\spring-tx-5.3.4.jar;$m2repo\org\springframework\spring-oxm\5.3.4\spring-oxm-5.3.4.jar;$m2repo\org\springframework\spring-aop\5.3.4\spring-aop-5.3.4.jar;$m2repo\org\springframework\spring-context-support\5.3.4\spring-context-support-5.3.4.jar;$m2repo\io\lettuce\lettuce-core\6.0.2.RELEASE\lettuce-core-6.0.2.RELEASE.jar;$m2repo\io\projectreactor\reactor-core\3.4.3\reactor-core-3.4.3.jar;$m2repo\org\reactivestreams\reactive-streams\1.0.3\reactive-streams-1.0.3.jar;$m2repo\redis\clients\jedis\3.1.0\jedis-3.1.0.jar;$m2repo\org\slf4j\slf4j-api\1.7.30\slf4j-api-1.7.30.jar;$m2repo\org\apache\commons\commons-pool2\2.9.0\commons-pool2-2.9.0.jar;$m2repo\commons-io\commons-io\2.11.0\commons-io-2.11.0.jar;$m2repo\org\projectlombok\lombok\1.18.18\lombok-1.18.18.jar cc.dodder.dhtserver.DhtServerApplication"
$ps.StartInfo.UseShellExecute = $false
$ps.Start()
from dodder.
Related Issues (11)
- 关于启动顺序
- no issue HOT 2
- dodder-dht-server项目这个类建议改成这样写 HOT 4
- 可以只提取出 爬取磁力的模块吗 HOT 1
- bencode 解析乱码问题 HOT 1
- 求更新
- 关于各个组件的版本 HOT 3
- Can`t download the resources; HOT 3
- the password
- Failure to find cc.dodder:dodder-common:pom:1.0-SNAPSHOT in http://maven.nuiton.org/release/ was cached in the local repository, resolution will not be reattempted until the update interval of nuiton has elapsed or updates are forced HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dodder.