Squadless
asked on
Hibernate error
Hello, im running a java application which works with hibernate
when i compile my code it works fine, but half way through running it, if i hit a certain button i get this error
///:code:///
Configuration forAlias = configurationForAlias();
Session session = forAlias.buildSessionFacto ry().openS ession();
//the above line fails...give the error below
[java] Initial Session Factory creation failed org.hibernate.HibernateExc eption: database product name cannot be null
[java] org.hibernate.HibernateExc eption: database product name cannot be null
What does that mean exactly...i checked my config file, property files, hbm file, and the database supplied is there and is valid...it also gets passed to the function correctly.
Does anyone know what this error on line one means??
Thanks
when i compile my code it works fine, but half way through running it, if i hit a certain button i get this error
///:code:///
Configuration forAlias = configurationForAlias();
Session session = forAlias.buildSessionFacto
//the above line fails...give the error below
[java] Initial Session Factory creation failed org.hibernate.HibernateExc
[java] org.hibernate.HibernateExc
What does that mean exactly...i checked my config file, property files, hbm file, and the database supplied is there and is valid...it also gets passed to the function correctly.
Does anyone know what this error on line one means??
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
this has something to do with the config.. not sure why it is occuring in one scenario
ASKER
ok i fixed it, I was doing it in a singleton...apparently its not allowed to be in one...
Thanks for your help
Thanks for your help
ASKER
Session session = forAlias.configure().build
Session sessionFactory = new Configuration().configure(
doesnt work...
do you know what the problem is?? i mean why do i get an exception (it does say something abuot database... is somthign not getting set or what)
Thanks