https://kotlinlang.org logo
Docs
Join the conversationJoin Slack
Channels
100daysofcode
100daysofkotlin
100daysofkotlin-2021
advent-of-code
aem
ai
alexa
algeria
algolialibraries
amsterdam
android
android-architecture
android-databinding
android-studio
androidgithubprojects
androidthings
androidx
androidx-xprocessing
anime
anko
announcements
apollo-kotlin
appintro
arabic
argentina
arkenv
arksemdevteam
armenia
arrow
arrow-contributors
arrow-meta
ass
atlanta
atm17
atrium
austin
australia
austria
awesome-kotlin
ballast
bangladesh
barcelona
bayarea
bazel
beepiz-libraries
belgium
berlin
big-data
books
boston
brazil
brikk
budapest
build
build-tools
bulgaria
bydgoszcz
cambodia
canada
carrat
carrat-dev
carrat-feed
chicago
chile
china
chucker
cincinnati-user-group
cli
clikt
cloudfoundry
cn
cobalt
code-coverage
codeforces
codemash-precompiler
codereview
codingame
codingconventions
coimbatore
collaborations
colombia
colorado
communities
competitive-programming
competitivecoding
compiler
compose
compose-android
compose-desktop
compose-hiring
compose-ios
compose-mp
compose-ui-showcase
compose-wear
compose-web
connect-audit-events
corda
cork
coroutines
couchbase
coursera
croatia
cryptography
cscenter-course-2016
cucumber-bdd
cyprus
czech
dagger
data2viz
databinding
datascience
dckotlin
debugging
decompose
decouple
denmark
deprecated
detekt
detekt-hint
dev-core
dfw
docs-revamped
dokka
domain-driven-design
doodle
dsl
dublin
dutch
eap
eclipse
ecuador
edinburgh
education
effective-kotlin
effectivekotlin
emacs
embedded-kotlin
estatik
event21-community-content
events
exposed
failgood
fb-internal-demo
feed
firebase
flow
fluid-libraries
forkhandles
forum
fosdem
fp-in-kotlin
framework-elide
freenode
french
fritz2
fuchsia
functional
funktionale
gamedev
ge-kotlin
general-advice
georgia
geospatial
german-lang
getting-started
github-workflows-kt
glance
godot-kotlin
google-io
gradle
graphic
graphkool
graphql
graphql-kotlin
graviton-browser
greece
grpc
gsoc
gui
hackathons
hacktoberfest
hamburg
hamkrest
helios
helsinki
hexagon
hibernate
hikari-cp
hire-me
hiring
hongkong
hoplite
http4k
hungary
hyderabad
image-processing
india
indonesia
inkremental
intellij
intellij-plugins
intellij-tricks
internships
introduce-yourself
io
ios
iran
israel
istanbulcoders
italian
jackson-kotlin
jadx
japanese
jasync-sql
java-to-kotlin-refactoring
javadevelopers
javafx
javalin
javascript
jdbi
jhipster-kotlin
jobsworldwide
jpa
jshdq
juul-libraries
jvm-ir-backend-feedback
jxadapter
k2-early-adopters
kaal
kafka
kakao
kalasim
kapt
karachi
karg
karlsruhe
kash_shell
kaskade
kbuild
kdbc
kgen-doc-tools
kgraphql
kinta
klaxon
klock
kloudformation
kmdc
kmm-español
kmongo
knbt
knote
koalaql
koans
kobalt
kobweb
kodein
kodex
kohesive
koin
koin-dev
komapper
kondor-json
kong
kontent
kontributors
korau
korean
korge
korim
korio
korlibs
korte
kotest
kotest-contributors
kotless
kotlick
kotlin-asia
kotlin-beam
kotlin-by-example
kotlin-csv
kotlin-data-storage
kotlin-foundation
kotlin-fuel
kotlin-in-action
kotlin-inject
kotlin-latam
kotlin-logging
kotlin-multiplatform-contest
kotlin-mumbai
kotlin-native
kotlin-pakistan
kotlin-plugin
kotlin-pune
kotlin-roadmap
kotlin-samples
kotlin-sap
kotlin-serbia
kotlin-spark
kotlin-szeged
kotlin-website
kotlinacademy
kotlinbot
kotlinconf
kotlindl
kotlinforbeginners
kotlingforbeginners
kotlinlondon
kotlinmad
kotlinprogrammers
kotlinsu
kotlintest
kotlintest-devs
kotlintlv
kotlinultimatechallenge
kotlinx-datetime
kotlinx-files
kotlinx-html
kotrix
kotson
kovenant
kprompt
kraph
krawler
kroto-plus
ksp
ktcc
ktfmt
ktlint
ktor
ktp
kubed
kug-leads
kug-torino
kvision
kweb
lambdaworld_cadiz
lanark
language-evolution
language-proposals
latvia
leakcanary
leedskotlinusergroup
lets-have-fun
libgdx
libkgd
library-development
linkeddata
lithuania
london
losangeles
lottie
love
lychee
macedonia
machinelearningbawas
madrid
malaysia
mathematics
meetkotlin
memes
meta
metro-detroit
mexico
miami
micronaut
minnesota
minutest
mirror
mockk
moko
moldova
monsterpuzzle
montreal
moonbean
morocco
motionlayout
mpapt
mu
multiplatform
mumbai
munich
mvikotlin
mvrx
myndocs-oauth2-server
naming
navigation-architecture-component
nepal
new-mexico
new-zealand
newname
nigeria
nodejs
norway
npm-publish
nyc
oceania
ohio-kotlin-users
oldenburg
oolong
opensource
orbit-mvi
osgi
otpisani
package-search
pakistan
panamá
pattern-matching
pbandk
pdx
peru
philippines
phoenix
pinoy
pocketgitclient
polish
popkorn
portugal
practical-functional-programming
proguard
prozis-android-backup
pyhsikal
python
python-contributors
quasar
random
re
react
reaktive
realm
realworldkotlin
reductor
reduks
redux
redux-kotlin
refactoring-to-kotlin
reflect
refreshversions
reports
result
rethink
revolver
rhein-main
rocksdb
romania
room
rpi-pico
rsocket
russian
russian_feed
russian-kotlinasfirst
rx
rxjava
san-diego
science
scotland
scrcast
scrimage
script
scripting
seattle
serialization
server
sg-user-group
singapore
skia-wasm-interop-temp
skrape-it
slovak
snake
sofl-user-group
southafrica
spacemacs
spain
spanish
speaking
spek
spin
splitties
spotify-mobius
spring
spring-security
squarelibraries
stackoverflow
stacks
stayhungrystayfoolish
stdlib
stlouis
strife-discord-lib
strikt
students
stuttgart
sudan
swagger-gradle-codegen
swarm
sweden
swing
swiss-user-group
switzerland
talking-kotlin
tallinn
tampa
teamcity
tegal
tempe
tensorflow
terminal
test
testing
testtestest
texas
tgbotapi
thailand
tornadofx
touchlab-tools
training
tricity-kotlin-user-group
trójmiasto
truth
tunisia
turkey
turkiye
twitter-feed
uae
udacityindia
uk
ukrainian
uniflow
unkonf
uruguay
utah
uuid
vancouver
vankotlin
vertx
videos
vienna
vietnam
vim
vkug
vuejs
web-mpp
webassembly
webrtc
wimix_sentry
wwdc
zircon
Powered by Linen
server
  • a

    Adam Hurwitz

    05/18/2019, 7:31 PM
    Anyone hear of plans to bring fully supported Kotlin to Firebase Cloud Functions?
    n
    g
    +1
    4 replies · 4 participants
  • r

    Rick Prata

    05/24/2019, 2:24 AM
    How to get XML from client get request on ktor?
    n
    b
    2 replies · 3 participants
  • g

    gotoOla

    05/26/2019, 7:41 PM
    Has anyone here found any nice event sourcing framework in kotlin?
    s
    d
    4 replies · 3 participants
  • j

    jaguililla

    06/05/2019, 5:29 PM
    Hello everyone, Hexagon 1.0 got released!!! It is a toolkit for developing web services in Kotlin heavily inspired in Javalin and Spark. I would like to gather feedback from the community, so if you could take a look at it, share your thoughts, spread the word among other Kotlin developers and/or give it a star 😉 It would be much appreciated 🙂 https://hexagonkt.com https://github.com/hexagonkt
    👍 2
    👋 5
    b
    j
    +1
    12 replies · 4 participants
  • m

    Maksim Vlasov

    06/06/2019, 9:12 AM
    I get the following error when I package a composite project with maven:
    [ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.0.5.RELEASE:repackage (default) on project pkt-event-manager: Execution default of goal org.springframework.boot:spring-boot-maven-plugin:2.0.5.RELEASE:repackage failed: Unable to find main class -> [Help 1]
    o
    2 replies · 2 participants
  • t

    tipsy

    06/06/2019, 6:01 PM
    #ktor
    m
    1 reply · 2 participants
  • o

    oday

    06/07/2019, 8:00 AM
    http://snpy.in/Jh28gi
    t
    s
    +1
    16 replies · 4 participants
  • o

    oday

    06/07/2019, 11:19 AM
    is this not correct for fetching ktor? http://snpy.in/FcvTCS
    3 replies · 1 participant
  • r

    Ryan

    06/13/2019, 2:08 AM
    Hey everyone 👋 I was wondering if anyone here has experience implementing a GraphQL API in Kotlin! I’d love to talk to you and hear about your experience! Did it go well? What tools did you use? Would you do it again? and more! Feel free to reply in thread or DM 🙂
    d
    y
    +2
    6 replies · 5 participants
  • h

    Horv

    06/13/2019, 7:05 AM
    Hello! I'm going to start a new hobby code project to learn Kotlin further. It will be frontend client apps (Android, iOS) and backend service. I'm a bit split on which framework to pickbfor backend. Any recommendations between Ktor and Javalin?
    g
    d
    +10
    14 replies · 13 participants
  • a

    Alexander Weickmann

    06/26/2019, 9:09 AM
    Hey all. How to integrate SAML SSO with ktor? I found this library (https://github.com/onelogin/java-saml), but it uses javax.servlet.HttpServletRequest and javax.servlet.HttpServletResponse. Therefore, I cannot pass it the io.ktor.application.ApplicationRequest / io.ktor.application.ApplicationResponse ...
    d
    2 replies · 2 participants
  • a

    Akram

    07/04/2019, 3:08 PM
    hello i'm starting up with ktor , and want to implement my own oauth2 provider can i do it with ktor ?
    i
    b
    3 replies · 3 participants
  • t

    Talha Malik

    07/08/2019, 10:23 PM
    I'm trying to build #ktor locally on my mac and I'm running into issues. Specifically the
    macos64x
    task is failing. Are there any docs for people that are trying to contribute?
    b
    1 reply · 2 participants
  • j

    Jonathan Chen

    07/17/2019, 12:40 AM
    Hey how is the adoption of Kotlin for serverside going? I’m looking to get back into the Java world and am deciding if its worth it for me to invest time into Kotlin as well.
    n
    k
    +4
    15 replies · 7 participants
  • s

    Sergio Casero

    07/17/2019, 8:43 AM
    Hello guys!, I'm getting this issue when I try to deploy a war (using ktor):
    java.lang.NoClassDefFoundError: javax/servlet/ReadListener
    . But the dependency
    'javax.servlet:javax.servlet-api:3.0.1'
    is already included Any ideas? If I try to run the app with
    application
    plugin works perfect. I'll put my build.gradle file in a thread.
    g
    3 replies · 2 participants
  • r

    Rodrigo Silva

    07/19/2019, 6:53 PM
    Hello everyone. Has anyone used yavi with Ktor?
    n
    2 replies · 2 participants
  • j

    jwd83

    07/21/2019, 2:55 PM
    Have just been getting started with Kotlin and wanted to make a basic http app on a remote VM via the Linux the command line. I'm not intimately familiar with Kotlin nor Java and have been working on getting kotlinc to build my app.
    kotlinc http.kt -include-runtime -d http.jar -cp ../libs/*.jar
    throws an error
    error: source entry is not a Kotlin file: ../libs/javalin-3.2.0.jar
    I'm realizing I'm probably going about this the complete wrong way but I've found the official documentation on command line compilation a bit thin. I just started with Javalin but am willing to swap to anything else that can get a little REST service up and running quickly.
    d
    c
    10 replies · 3 participants
  • c

    coder82

    07/26/2019, 9:40 AM
    Hi guys, I am building an API using Kotlin and KTOR. I have to connect to a legacy system which offers only blocking calls, so I guess even if I use the coroutines, ultimately a thread from the pool will be blocked on these calls right? I can't do otherwise. So if I use for example "withContext", and use a specific context with a pool of 20 threads, i can never serve more than 20 calls in parallel right? Ultimately want I want to do is to respond with some sort of backpressure message when these 20 threads are all busy. What do you reckon? the legacy system doesn't offer asynchronouse callbacks so i cannot build something with suspendCoroutine around it so I am kind of forced to pool threads it's be nice to have somebody's opinion on it
    d
    m
    +1
    8 replies · 4 participants
  • m

    Mani

    07/26/2019, 7:53 PM
    Hi guys, a naive doubt, please bear with me. Any good example with gzipping API responses in Kotlin?
    c
    z
    +2
    8 replies · 5 participants
  • p

    pyrkamarcin

    07/27/2019, 11:35 AM
    Hi Guys! Can you advice some good method to reduce this spaghetti:
    val confirmAccountDeletionEmailStatement = configurationConnection().prepareStatement("SELECT t.id,t.name,t.subject,t.content FROM email_templates t WHERE name='confirm_account_deletion'")
    
                    val confirmAccountDeletionEmailResultSet = confirmAccountDeletionEmailStatement.executeQuery()
                    var confirmAccountDeletionEmailId = 0
                    var confirmAccountDeletionEmailName = ""
                    var confirmAccountDeletionEmailSubject = ""
                    var confirmAccountDeletionEmailContent = ""
                    while (confirmAccountDeletionEmailResultSet.next()) {
                        confirmAccountDeletionEmailId = confirmAccountDeletionEmailResultSet.getInt(1)
                        confirmAccountDeletionEmailName = confirmAccountDeletionEmailResultSet.getString(2)
                        confirmAccountDeletionEmailSubject = confirmAccountDeletionEmailResultSet.getString(3)
                        confirmAccountDeletionEmailContent = confirmAccountDeletionEmailResultSet.getString(4)
                    }
    ?
    t
    f
    +2
    5 replies · 5 participants
  • t

    Tauhid Rehman

    07/29/2019, 6:48 PM
    if (addPaymentRequest.additionalAmount <= 0) {
                throw BorrowerServicingException("Loan amount must be greater than 0", EC_INVALID_LOAN_AMOUNT)
            }
    i
    3 replies · 2 participants
  • s

    Sandeep Gurram

    07/30/2019, 8:48 AM
    Hi all, am an android developer. I want to start learning server side programming, can any one suggest me where can i start ? I know nothing about server side programming.
    u
    1 reply · 2 participants
  • g

    Guru

    07/30/2019, 3:15 PM
    Guys I am having an issue - http://qaru.site/questions/18042490/whats-wrong-with-coroutine-context
    g
    8 replies · 2 participants
  • n

    Nidhin

    07/31/2019, 7:40 AM
    I’m trying to mock Spring mongo repository save(object) using mockk as below every { repositoryBean.save(any())} return Object(id=“1234”, timesatmp= 123446767, name= “sam”) but this shows me an error Type inference failed i also tried every { repositoryBean.save(Object(id=null, timestamp=any(), name=“sam”)} return Object(id=“1234", timesatmp= 123446767, name= “sam”) this also failed throwing Failed matching mocking signature for …..left matchers: [any(), any()] I don’t know the timestamp, as it is created dynamically and hence I can’t provide strict arguments can someone help me?
    j
    1 reply · 2 participants
  • j

    J. Pablo Fernández

    08/02/2019, 1:41 PM
    What web frameworks/libraries? Something Kotlin specific?
    t
    s
    +5
    8 replies · 8 participants
  • j

    J. Pablo Fernández

    08/02/2019, 8:57 PM
    In https://spring.io/guides/tutorials/spring-boot-kotlin/ it says that when creating the project we should add the web dependency, but I don't see that in spring boot initializr, is this referring to Spring Web Starter? https://start.spring.io/#!language=kotlin&amp;type=gradle-project
    a
    1 reply · 2 participants
  • t

    Tauhid Rehman

    08/02/2019, 9:02 PM
    hey you guys, need some help. want to use an existing function called
    mask()
    as an extension for a json property on the request itself. the property itself is called
    bankAccountNumber
    and the below code is the request class:
    @NotNull(message = "'bank_account_number' must be provided")
        @JsonProperty("bank_account_number")
        var bankAccountNumber: String = ""
    d
    1 reply · 2 participants
  • t

    Tauhid Rehman

    08/02/2019, 10:16 PM
    thansk David. Can you link me to any sample code?
    d
    1 reply · 2 participants
  • j

    J. Pablo Fernández

    08/06/2019, 1:37 PM
    What's the situation with testing in a Kotlin + Spring Boot application? I'm tempted to use TestNG, any reasons not to? Should I use kotlin.test?
    d
    j
    +5
    43 replies · 8 participants
  • v

    Velastroll

    08/13/2019, 12:15 PM
    I tried with the same machine using 127.0.0.1 and it's working. I tried with different machines on the same network using the local ip (168.192.X.X) and it's working. I tried with different machines on different networks using the external ip (84.X.X.X) but doesn't work.
    c
    m
    8 replies · 3 participants
Powered by Linen
Title
v

Velastroll

08/13/2019, 12:15 PM
I tried with the same machine using 127.0.0.1 and it's working. I tried with different machines on the same network using the local ip (168.192.X.X) and it's working. I tried with different machines on different networks using the external ip (84.X.X.X) but doesn't work.
c

Can Orhan

08/13/2019, 12:18 PM
84.x.x.x being your router address? Would it need to know which machine it should forward requests to?
v

Velastroll

08/13/2019, 12:21 PM
Yes, 84.X.X.X is my router address. So, have i got to configure the router to forward the request?
c

Can Orhan

08/13/2019, 12:23 PM
Based on my memory of setting up LAMP about 10 years ago - Yes. I think so 😄
v

Velastroll

08/13/2019, 1:10 PM
Ok, thank you. I'm going to try it.
c

Can Orhan

08/13/2019, 1:12 PM
Good luck!
m

molikuner

08/13/2019, 1:37 PM
You need a portforward
Or use IPv6, but that's most of the time not worth the effort and isn't as compatible or stable as IPv4.
BTW. Be aware, that most user grade internet connections reconnect once a day and get a new IP. That problem is fixable by using a DynDNS. Just search for it. You will get a domain name to connect to.
View count: 3