• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How can I pass my FXML variable to mongoDB?

 
drashti pandya
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It works fine when I manually pass string for name key like "Name1".But when I pass variable It gives me following error



 
chris webster
Bartender
Posts: 2407
33
Linux Oracle Postgres Database Python Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have no idea what FXML is, or why you would want to write it directly to MongoDB. But your stack trace appears to show that the initial error is a NullPointerException i.e. a missing value:

You probably need to break your code up more clearly and test each step in the process so you can find out where the NPE error occurs. It might not be anything to do with MongoDB.

PS: Remember to put code tags around any code or stack traces you post, so other people can read it more easily.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic