Forums Register Login

Can Java Fx/hibernate use application.propperties? (Props with hibernate config)

+Pie Number of slices to send: Send

0
down vote
favorite
I'm trying to build my first javaFX application, but I have some difficulties writig the hibernate configuration. Can I use a application.propperties in java FX or is this only for spring? I included my hibernateconfigurationfile and the code for building my connection.

hibernate.cfg.xml:



Invocation:



StackTrace:


If there isn't a way to use a application.propperties in FX, could anyone point me in the direction of wat is wrong with my configuration?
And yes, I know you can use javaFx in spring, but don't want to start over again.
Sorry for my crappy English, but I'm not native.
Thanks in advance.
+Pie Number of slices to send: Send
Also posted here: https://stackoverflow.com/questions/46862898/can-java-fx-hibernate-use-application-propperties-props-with-hibernate-config

Daniel: It's permitted in CodeRanch to cross-post (post the same question in two places), but we ask that you state you have done this.  That way we at CodeRanch don't waste our time posting something that's already been posted at StackOverflow.
+Pie Number of slices to send: Send
And how do I edit my original post, so I can do so?
The question on stackoverflow is also posted by me.
The reason i posted on 2 forums is on stackoverflow, your question easily get's lost in all the other posts.
My appoligies, next time I will mention that I already posted somewhere else
+Pie Number of slices to send: Send
The stack trace seems to say that you're having trouble loading the FXML file.  What makes you think this is a Hibernate problem?
+Pie Number of slices to send: Send
Cause if I commit  the invocation out everything works
+Pie Number of slices to send: Send
I ment comment, not commit
+Pie Number of slices to send: Send
I know this can be done.  Googling JavaFX and Hibernate produces several tutorials.  

I am a great believer in creating very stripped-down programs that isolate the processes you want to test.  I would create a little JavaFX program with just a scene and try to connect to Hibernate.  Then try a program that only loads and displays your FXML resource.  Then put the two together.
1
+Pie Number of slices to send: Send
I rebuilded my program using Spring Boot and configured it to use FXML, that seems to work, so... Woehoe
+Pie Number of slices to send: Send
Glad you got it working!
If I had asked people what they wanted, they would have said faster horses - Ford. Tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1590 times.
Similar Threads
can't play mp3 on fedora from within javafx 2.2
how to pass variable in java class in java fx
how to reorder buttons within a vbox
Need help with these errors
Trouble passing objects between client and server
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 13:47:45.