-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Session.getNamedQuery and SQLQuery.
PostPosted: Fri Apr 06, 2007 10:10 am 
Newbie

Joined: Fri Apr 06, 2007 3:59 am
Posts: 2
Hibernate version: 3.1.3

Full stack trace of any exception that occurs:
Quote:
java.lang.UnsupportedOperationException
at java.util.AbstractList.add(AbstractList.java:150)
at java.util.AbstractList.add(AbstractList.java:88)
at org.hibernate.impl.SQLQueryImpl.addEntity(SQLQueryImpl.java:295)
at org.hibernate.impl.SQLQueryImpl.addEntity(SQLQueryImpl.java:276)
at org.hibernate.impl.SQLQueryImpl.addEntity(SQLQueryImpl.java:280)
at com.mycompany.myproject.stathst.dao.StatHstDao.getNaHistRecs(StatHstDao.java:366)
at com.mycompany.myproject.stathst.server.HstRepOutputServlet.buildReport(HstRepOutputServlet.java:109)
at com.mycompany.myproject.stathst.server.HstRepOutputServlet.doGet(HstRepOutputServlet.java:44)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1006)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
at com.mycompany.myproject.common.utils.CacheFilter.doFilter(CacheFilter.java:21)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6724)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3764)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2644)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)


Name and version of the database you are using: DB2 v5r3


Code:
SQLQuery query = (SQLQuery) sessionAS400.getNamedQuery("getHistoryForClients");
query.addEntity("entity1", Entity.class);

The last row causes an error. Why can't I use named queries for SQLQuery?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.