Развертывание проходит гладко, но когда я пытаюсь просмотреть страницу, происходит сбой с
Exception in thread "main" java.lang.NoClassDefFoundError: io/reactivex/rxjava3/core/ObservableSource
Это журнал:
2020-06-16T19:51:11.803792+00:00 heroku[web.1]: State changed from crashed to starting
2020-06-16T19:51:14.817284+00:00 heroku[web.1]: Starting process with command `java -jar BoardStar.jar 6060`
2020-06-16T19:51:16.771301+00:00 app[web.1]: Setting JAVA_TOOL_OPTIONS defaults based on dyno size. Custom settings will override them.
2020-06-16T19:51:16.775498+00:00 app[web.1]: Picked up JAVA_TOOL_OPTIONS: -XX:+UseContainerSupport -Xmx300m -Xss512k
-XX:CICompilerCount=2 -Dfile.encoding=UTF-8
2020-06-16T19:51:17.005105+00:00 app[web.1]: Exception in thread "main" java.lang.NoClassDefFoundError: io/reactivex/rxjava3/core/ObservableSource
2020-06-16T19:51:17.005428+00:00 app[web.1]: at boardstar.webapp.BoardstarWebApp.<clinit>(BoardstarWebApp.java:31)
2020-06-16T19:51:17.005908+00:00 app[web.1]: Caused by: java.lang.ClassNotFoundException: io.reactivex.rxjava3.core.ObservableSource
2020-06-16T19:51:17.006060+00:00 app[web.1]: at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
2020-06-16T19:51:17.006174+00:00 app[web.1]: at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
2020-06-16T19:51:17.006256+00:00 app[web.1]: at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
2020-06-16T19:51:17.006348+00:00 app[web.1]: ... 1 more
2020-06-16T19:51:17.069174+00:00 heroku[web.1]: Process exited with status 1
2020-06-16T19:51:17.104655+00:00 heroku[web.1]: State changed from starting to crashed
2020-06-16T19:51:22.000000+00:00 app[api]: Build succeeded
Это мой build.gradle:
plugins {
// Apply the java-library plugin to add support for Java Library
id 'java-library'
}
sourceCompatibility = '11'
jar {
manifest {
attributes(
'Main-Class': 'boardstar.webapp.BoardstarWebApp'
)
}
}
repositories {
// Use jcenter for resolving dependencies.
// You can declare any Maven/Ivy/file repository here.
jcenter()
}
task stage(dependsOn: ['build', 'clean'])
build.mustRunAfter clean
task copyLib(type: Copy) {
from jar.archivePath
into project.rootDir
rename {
'BoardStar.jar'
}
}
stage.dependsOn(copyLib)
dependencies {
// JSON Parser
compile 'com.google.code.gson:gson:2.8.6'
// HTTP Async Client
implementation 'org.asynchttpclient:async-http-client:2.12.1'
//Reactive Java
implementation 'io.reactivex.rxjava3:rxjava:3.0.3'
// Javalin
implementation 'io.javalin:javalin:3.8.0'
implementation 'org.slf4j:slf4j-jdk14:1.7.30'
//FreeMarker
implementation 'org.freemarker:freemarker:2.3.30'
// Use JUnit test framework
testImplementation 'junit:junit:4.12'
}