hey guys, im still blocking when trying to deploy ...
# kobweb
e
hey guys, im still blocking when trying to deploy on render working in the stevdza-san' courses: the console says:
Copy code
Exception in thread "main" java.lang.NullPointerException: getenv(...) must not be null
May 29 11:19:13 AM	at com.exxample.kobweb.data.MongoDB.<init>(MongoDB.kt:36)
May 29 11:19:13 AM	at com.exxample.kobweb.data.MongoDBKt.initMongoDB(MongoDB.kt:
Any idea? Has anyone had the same experience?? thanks
c
The error seems fairly clear: you have a MongoDB constructor that requires an environment variable, and you didn't provide it. What are you trying to do? What were you expecting?
e
im setting the variable here! here you have more context: https://kotlinlang.slack.com/archives/C04RTD72RQ8/p1716910081587279 in another thread i started yesterday
c
Maybe a typo in the environment variable name?
You can use
printenv
on the command line to see what environment variables exist.
Or,
Copy code
System.getenv().forEach { println("Environment: ${it.key}: ${it.value}") }
e
and wehere i can see the logs? is any way to run this locally? or in the render console i can see it too?
c
No idea, I don't use Render