Server-Side Kotlin with Ktor · Exposed and H2 | raywenderlich.com


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/2885892-server-side-kotlin-with-ktor/lessons/19

Hi I am unable to see my pictures that I added any suggestions what could be the problem??
12

Hi @mtalha thanks for the question! My first thoughts would be to double check the FreeMarker templates and also that you’ve set up accessing static files as described in the course. Hope that helps and thanks again!

im having trouble with the ““id”” column here. ExposedSQLException:JdbcSQLSyntaxErrorException: Column not found; SQL statement.

from the EmojiPhrases : IntIdTable() class

this fixed itself when i didnt use latest versions of “h2” and “hikari”

was using
h2_version=1.4.200
hikaricp_version=3.4.1

changed to
h2_version=1.4.199
hikaricp_version=3.3.1

now its ok?

also didnt wrap in a coroutine. so nothing was happening. ooops!

@eoin_a Do you still have issues with this?

Here are the newest dependency versions in Aug 2020
exposed_version=0.26.2
h2_version=1.4.200
hikaricp_version=3.4.5

in build.gradle:
implementation “org.jetbrains.exposed:exposed-core:$exposed_version”
implementation “org.jetbrains.exposed:exposed-jdbc:$exposed_version”
implementation “com.h2database:h2:$h2_version”
implementation “com.zaxxer:HikariCP:$hikaricp_version”

@macsimus Hey Joe, I’m a little green on kotlin coroutine so I have this question: why didn’t you use dbQuery on “add” and “clear” functions like you did for “phrase” and “remove” ? What was the difference?

@macsimus Can you please help with this when you get a chance? Thank you - much appreciated! :]