if instead i make:
String query =
"select ut from Utilizador as ut where ut.palavraPasse like :pp order by ut.relatorio.turma.q2 desc";
i get this errors:
16:07:42,453 WARN JDBCExceptionReporter:38 - SQL Error: 0, SQLState: 07001
16:07:42,453 ERROR JDBCExceptionReporter:46 - No value specified for parameter 1
16:07:42,453 WARN JDBCExceptionReporter:38 - SQL Error: 0, SQLState: 07001
16:07:42,468 ERROR JDBCExceptionReporter:46 - No value specified for parameter 1
16:07:42,468 ERROR JDBCExceptionReporter:38 - Could not execute query
java.sql.SQLException: No value specified for parameter 1
at com.mysql.jdbc.PreparedStatement.fillSendPacket(PreparedStatement.java:2212)
at com.mysql.jdbc.PreparedStatement.fillSendPacket(PreparedStatement.java:2165)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1519)
at net.sf.hibernate.impl.BatcherImpl.getResultSet(BatcherImpl.java:87)
at net.sf.hibernate.loader.Loader.getResultSet(Loader.java:800)
at net.sf.hibernate.loader.Loader.doQuery(Loader.java:189)
at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:133)
at net.sf.hibernate.loader.Loader.doList(Loader.java:955)
at net.sf.hibernate.loader.Loader.list(Loader.java:946)
at net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:834)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1536)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1513)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1505)
at escola.TesteLogin.getUtilizador(TesteLogin.java:45)
at escola.FrameA.<init>(FrameA.java:545)
at escola.TesteLogin.main(TesteLogin.java:160)
net.sf.hibernate.JDBCException: Could not execute query
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1539)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1513)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1505)
at escola.TesteLogin.getUtilizador(TesteLogin.java:45)
at escola.FrameA.<init>(FrameA.java:545)
at escola.TesteLogin.main(TesteLogin.java:160)
Caused by: java.sql.SQLException: No value specified for parameter 1
at com.mysql.jdbc.PreparedStatement.fillSendPacket(PreparedStatement.java:2212)
at com.mysql.jdbc.PreparedStatement.fillSendPacket(PreparedStatement.java:2165)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1519)
at net.sf.hibernate.impl.BatcherImpl.getResultSet(BatcherImpl.java:87)
at net.sf.hibernate.loader.Loader.getResultSet(Loader.java:800)
at net.sf.hibernate.loader.Loader.doQuery(Loader.java:189)
at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:133)
at net.sf.hibernate.loader.Loader.doList(Loader.java:955)
at net.sf.hibernate.loader.Loader.list(Loader.java:946)
at net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:834)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1536)
... 5 more
16:07:42,796 WARN JDBCExceptionReporter:38 - SQL Error: 0, SQLState: 07001
16:07:42,796 ERROR JDBCExceptionReporter:46 - No value specified for parameter 1
16:07:42,796 WARN JDBCExceptionReporter:38 - SQL Error: 0, SQLState: 07001
16:07:42,796 ERROR JDBCExceptionReporter:46 - No value specified for parameter 1
16:07:42,796 ERROR JDBCExceptionReporter:38 - Could not execute query
java.sql.SQLException: No value specified for parameter 1
at com.mysql.jdbc.PreparedStatement.fillSendPacket(PreparedStatement.java:2212)
at com.mysql.jdbc.PreparedStatement.fillSendPacket(PreparedStatement.java:2165)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1519)
at net.sf.hibernate.impl.BatcherImpl.getResultSet(BatcherImpl.java:87)
at net.sf.hibernate.loader.Loader.getResultSet(Loader.java:800)
at net.sf.hibernate.loader.Loader.doQuery(Loader.java:189)
at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:133)
at net.sf.hibernate.loader.Loader.doList(Loader.java:955)
at net.sf.hibernate.loader.Loader.list(Loader.java:946)
at net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:834)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1536)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1513)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1505)
at escola.TesteLogin.getUtilizador(TesteLogin.java:45)
at escola.FrameA.<init>(FrameA.java:545)
at escola.TesteLogin.main(TesteLogin.java:161)
net.sf.hibernate.JDBCException: Could not execute query
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1539)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1513)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1505)
at escola.TesteLogin.getUtilizador(TesteLogin.java:45)
at escola.FrameA.<init>(FrameA.java:545)
at escola.TesteLogin.main(TesteLogin.java:161)
Caused by: java.sql.SQLException: No value specified for parameter 1
at com.mysql.jdbc.PreparedStatement.fillSendPacket(PreparedStatement.java:2212)
at com.mysql.jdbc.PreparedStatement.fillSendPacket(PreparedStatement.java:2165)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1519)
at net.sf.hibernate.impl.BatcherImpl.getResultSet(BatcherImpl.java:87)
at net.sf.hibernate.loader.Loader.getResultSet(Loader.java:800)
at net.sf.hibernate.loader.Loader.doQuery(Loader.java:189)
at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:133)
at net.sf.hibernate.loader.Loader.doList(Loader.java:955)
at net.sf.hibernate.loader.Loader.list(Loader.java:946)
at net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:834)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1536)
... 5 more
16:07:42,843 WARN JDBCExceptionReporter:38 - SQL Error: 0, SQLState: 07001
16:07:42,843 ERROR JDBCExceptionReporter:46 - No value specified for parameter 1
16:07:42,843 WARN JDBCExceptionReporter:38 - SQL Error: 0, SQLState: 07001
16:07:42,843 ERROR JDBCExceptionReporter:46 - No value specified for parameter 1
16:07:42,843 ERROR JDBCExceptionReporter:38 - Could not execute query
java.sql.SQLException: No value specified for parameter 1
at com.mysql.jdbc.PreparedStatement.fillSendPacket(PreparedStatement.java:2212)
at com.mysql.jdbc.PreparedStatement.fillSendPacket(PreparedStatement.java:2165)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1519)
at net.sf.hibernate.impl.BatcherImpl.getResultSet(BatcherImpl.java:87)
at net.sf.hibernate.loader.Loader.getResultSet(Loader.java:800)
at net.sf.hibernate.loader.Loader.doQuery(Loader.java:189)
at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:133)
at net.sf.hibernate.loader.Loader.doList(Loader.java:955)
at net.sf.hibernate.loader.Loader.list(Loader.java:946)
at net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:834)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1536)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1513)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1505)
at escola.TesteLogin.getUtilizador(TesteLogin.java:45)
at escola.TesteLogin.setTudo(TesteLogin.java:84)
at escola.TesteLogin.main(TesteLogin.java:169)
net.sf.hibernate.JDBCException: Could not execute query
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1539)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1513)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1505)
at escola.TesteLogin.getUtilizador(TesteLogin.java:45)
at escola.TesteLogin.setTudo(TesteLogin.java:84)
at escola.TesteLogin.main(TesteLogin.java:169)
Caused by: java.sql.SQLException: No value specified for parameter 1
at com.mysql.jdbc.PreparedStatement.fillSendPacket(PreparedStatement.java:2212)
at com.mysql.jdbc.PreparedStatement.fillSendPacket(PreparedStatement.java:2165)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1519)
at net.sf.hibernate.impl.BatcherImpl.getResultSet(BatcherImpl.java:87)
at net.sf.hibernate.loader.Loader.getResultSet(Loader.java:800)
at net.sf.hibernate.loader.Loader.doQuery(Loader.java:189)
at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:133)
at net.sf.hibernate.loader.Loader.doList(Loader.java:955)
at net.sf.hibernate.loader.Loader.list(Loader.java:946)
at net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:834)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1536)
... 5 more
16:07:43,296 WARN JDBCExceptionReporter:38 - SQL Error: 0, SQLState: 07001
16:07:43,296 ERROR JDBCExceptionReporter:46 - No value specified for parameter 1
16:07:43,296 WARN JDBCExceptionReporter:38 - SQL Error: 0, SQLState: 07001
16:07:43,296 ERROR JDBCExceptionReporter:46 - No value specified for parameter 1
16:07:43,296 ERROR JDBCExceptionReporter:38 - Could not execute query
java.sql.SQLException: No value specified for parameter 1
at com.mysql.jdbc.PreparedStatement.fillSendPacket(PreparedStatement.java:2212)
at com.mysql.jdbc.PreparedStatement.fillSendPacket(PreparedStatement.java:2165)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1519)
at net.sf.hibernate.impl.BatcherImpl.getResultSet(BatcherImpl.java:87)
at net.sf.hibernate.loader.Loader.getResultSet(Loader.java:800)
at net.sf.hibernate.loader.Loader.doQuery(Loader.java:189)
at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:133)
at net.sf.hibernate.loader.Loader.doList(Loader.java:955)
at net.sf.hibernate.loader.Loader.list(Loader.java:946)
at net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:834)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1536)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1513)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1505)
at escola.TesteLogin.getUtilizador(TesteLogin.java:45)
at escola.FrameA.<init>(FrameA.java:545)
at escola.A.<init>(A.java:11)
at escola.TesteLogin.main(TesteLogin.java:175)
net.sf.hibernate.JDBCException: Could not execute query
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1539)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1513)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1505)
at escola.TesteLogin.getUtilizador(TesteLogin.java:45)
at escola.FrameA.<init>(FrameA.java:545)
at escola.A.<init>(A.java:11)
at escola.TesteLogin.main(TesteLogin.java:175)
Caused by: java.sql.SQLException: No value specified for parameter 1
at com.mysql.jdbc.PreparedStatement.fillSendPacket(PreparedStatement.java:2212)
at com.mysql.jdbc.PreparedStatement.fillSendPacket(PreparedStatement.java:2165)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1519)
at net.sf.hibernate.impl.BatcherImpl.getResultSet(BatcherImpl.java:87)
at net.sf.hibernate.loader.Loader.getResultSet(Loader.java:800)
at net.sf.hibernate.loader.Loader.doQuery(Loader.java:189)
at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:133)
at net.sf.hibernate.loader.Loader.doList(Loader.java:955)
at net.sf.hibernate.loader.Loader.list(Loader.java:946)
at net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:834)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1536)
... 6 more
|