christian wrote:
Your HibernateUtil class is not correct, because it obviously does return a SessionFactory when you ask it for a Session. You probably made some mistake when copy/pasting it from the tutorial. You probably have many other trivial mistakes in your code as well, judging from the other errors you get.
Since you get easily upset if someone points out these things to you, find someone else to help you from now on.
If i were upset, i wouldn't keep going through the tutorial. I believe one can do and say whatever one's want. What matters is not "what is done", but "how things are done". Pointing out possible mistakes on the code is one thing, disencouraging someone to use Hibernate is not the adequate behaviour to a technical support person.
I'm working with JDeveloper, and due to prior errors, it automatically made a few changes to my imports and the code i copied from the tutorial. That was the problem.
As for looking somewhere else for answers, i'll execute my right to keep asking here, once this is supposed the best place to look for answers on Hibernate. Please, feel free to exercise you rights, in case you don't feel like ansering them. I'll keep thanking any kind of help.
Right now, for example, i have this output:
Buildfile: build.xml
clean:
[delete] Deleting directory D:\Program Files\JDeveloper\jdev\mywork\Teste Hi
ernate\Model\bin
[mkdir] Created dir: D:\Program Files\JDeveloper\jdev\mywork\Teste Hibernat
\Model\bin
copy-resources:
[copy] Copying 3 files to D:\Program Files\JDeveloper\jdev\mywork\Teste Hi
ernate\Model\bin
compile:
[javac] Compiling 3 source files to D:\Program Files\JDeveloper\jdev\mywork
Teste Hibernate\Model\bin
run:
[java] java.lang.NoClassDefFoundError: EventManager
[java] Exception in thread "main"
[java] Java Result: 1
BUILD SUCCESSFUL
Total time: 2 seconds
I don't understand how it can not find the EventManager class, since the main method is within it. I'll keep digging.
Thanks a lot