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?