Closed Jerbell closed 2 months ago
Hi @Jerbell,
that's odd, both and jte-runtime have no dependency to jte-kotlin.
Since gg.jte:jte-kotlin:2.2.1
is quite old, I'm wondering if this is being pulled in transitive, e.g. by another framework?
I didn't notice the version but yes that's old. There are no other front end frameworks & can't imagine one including jte-kotlin. I'll have more of a look.
I should clarify this is an app start up/runtime error, not a compile error.
Also the KTE files are included in a sub-module. So we're talking about a jar inside the jar. (not sure if this is relevant, but maybe it is) If this isn't making sense I could do up a small sample project to demonstrate.
Also (sorry about the spam) generate()
and precompile()
both have the same issues.
Can you post the full stack trace for that error? Also, what is the output of running ./gradlew dependencies
?
I'm so sorry - it looks like this is coming from Javalin!
java.lang.IllegalStateException:
#########################################################################
You're missing the 'jte-kotlin' dependency in your project. Add the dependency:
pom.xml:
<dependency>
<groupId>gg.jte</groupId>
<artifactId>jte-kotlin</artifactId>
<version>2.2.1</version>
</dependency>
build.gradle or build.gradle.kts:
implementation("gg.jte:jte-kotlin:2.2.1")
#########################################################################
at io.javalin.rendering.util.Util.throwIfNotAvailable(RenderingDependency.kt:36)
at com.company.xxx.configLibConfig.<init>(LibConfig.kt:43)
at com.company.xxx.config.LibConfig.<init>(LibConfig.kt:20)
at com.company.xxx.config.AppConfig.<init>(AppConfig.kt:18)
at App.runApp(Main.kt:30)
at com.company.shared.commands.AbstractMain.run(AbstractMain.kt:53)
at com.github.ajalt.clikt.parsers.Parser.finalizeAndRun(Parser.kt:348)
at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:218)
at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:42)
at com.github.ajalt.clikt.core.CliktCommand.parse(CliktCommand.kt:457)
at com.github.ajalt.clikt.core.CliktCommand.parse$default(CliktCommand.kt:454)
at com.github.ajalt.clikt.core.CliktCommand.main(CliktCommand.kt:474)
at com.github.ajalt.clikt.core.CliktCommand.main(CliktCommand.kt:481)
at MainKt.main(Main.kt:65)
I'll hunt this down more & close when I've resolved where the issue is.
Ok - so it turns out I had some code in there which checked at runtime we had the required dependencies. I apologise for wasting your time. Thanks!
Hi - I'm trying to reduce dependency libraries in my app.
I've noticed that the docs say that
jte-kotlin
should be compile only (https://jte.gg/kotlin/):compileOnly "gg.jte:jte-kotlin:3.1.11"
. However, if I set normal JTE to be included at runtime, andjte-kotlin
to becompileOnly
then it doesn't work:You're missing the 'jte-kotlin' dependency in your project. Add the dependency:\n\npom.xml:\n<dependency>\n <groupId>gg.jte</groupId>\n <artifactId>jte-kotlin</artifactId>\n <version>2.2.1</version>\n</dependency>\n\nbuild.gradle or build.gradle.kts:\nimplementation("gg.jte:jte-kotlin:2.2.1")
Is it necessary to include
jte-kotlin
and by dependencykotlin-compiler-embeddable-1.9.10.jar
for the runtime?Thanks!