Hallo,
ich wollte die Query:
Code:
@NamedQuery(name = "Faksimile by seiteid", query = "from Faksimile where seiteid=:seiteid")
die so verwendet wird (und funktioniert):
Code:
Faksimile faksimile = (Faksimile) hiberSession.getNamedQuery("Faksimile by seiteid").setLong("seiteid", seite.getId()).list().get(0);
dahingehend abändern, daß nur bestimmte Felder geholt werden (da ich zu dem Zeitpunkt ein Blob-Feld nicht brauche).
Mein Versuch war:
Code:
@NamedQuery(name = "Faksimile by seiteid", query = "select f.id, f.timestamp from Faksimile f where f.seiteid=:seiteid")
Das führt aber an der gleichen Stelle zu der Exception:
Code:
java.lang.ClassCastException: [Ljava.lang.Object;
at de.retrobib.utils.Migrator.migrateBilder(Migrator.java:542)
at de.retrobib.actions.secure.ImportAction.executeAction(ImportAction.java:92)
at de.retrobib.actions.RetrobibAction.execute(RetrobibAction.java:72)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at de.retrobib.filter.SecurityFilter.doFilter(SecurityFilter.java:93)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:613)
Hat jemand einen Tipp, warum?
Grüße, Christian