This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate Named Query Exceptions In WebLogic.

 
Amit kull
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am trying to deploy my application on WebLogic on Weblogic 10gr3. DB is Oracle 10g and Spring version is 2.5

In my GenericDAOImpl, I am injecting a session factory by refering to a bean named hibernateSessionFactory.
I have the bibernate mapping files in correct path.

I get following error:
Cannot resolve reference to bean 'hibernateSessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'saasHibernateSessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Errors in named queries: Tenant.byUserName, SLA.getSlaList

So I think it is something related to named queries. My SLA.hbm.xml contains


where SLA is the name of the class and slaCriterionName is a class variable.

This works fine in case of Tomcat and WAS. So is it some compatibility problem here? Any pointers would be helpful.

Thanks.
 
Marcos Maia
Ranch Hand
Posts: 977
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

it's strange this is not working with weblogic. Maybe you're using the wrong driver.

http://e-docs.bea.com/wls/docs103/notes/new.html#wp1091177


[]s
 
Amit kull
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Thanks for the response.
However, when I remove the named query from mapping file, it all works ine. So I don't think that this error is due to driver. I guess, it would be something hibernate specific.
Any further pointers would be helpful.
Thanks again.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic