Sybase « SQL « JPA Q&A





1. java.sql.SQLException: Parameter #1 has not been set. with hibernate/sybase/jtds executing StoreP    coderanch.com

Hi, I am getting the following error while executing store proc Exception in thread "main" org.hibernate.exception.SQLGrammarException: could not execute query at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) at org.hibernate.loader.Loader.doList(Loader.java:2223) at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104) at org.hibernate.loader.Loader.list(Loader.java:2099) at org.hibernate.loader.custom.CustomLoader.list(CustomLoader.java:289) at org.hibernate.impl.SessionImpl.listCustomQuery(SessionImpl.java:1695) at org.hibernate.impl.AbstractSessionImpl.list(AbstractSessionImpl.java:142) at org.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:152) at com.rbs.ird.cachemgr.dao.DefaultStaticDataLoaderStrategy.loadClassDataFromDatabase(DefaultStaticDataLoaderStrategy.java:44) at com.rbs.ird.cachemgr.dao.DefaultStaticDataLoaderStrategy.main(DefaultStaticDataLoaderStrategy.java:66) Caused by: java.sql.SQLException: Parameter #1 has not been set. at net.sourceforge.jtds.jdbc.ConnectionJDBC2.prepareSQL(ConnectionJDBC2.java:649) at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeQuery(JtdsPreparedStatement.java:777) at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:76) at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186) at org.hibernate.loader.Loader.getResultSet(Loader.java:1787) ...

2. Incorrect SQL generation in Sybase dialect    forum.hibernate.org

3. Hibernate with Sybase SQL Anywhere dialect    forum.hibernate.org

Newbie Joined: Wed Dec 10, 2008 2:57 pm Posts: 1 We are using hibernate with a Sybase SQLAnywhere dialect. We are using the hibernate mappings below for two objects: CaseInfoReq (parent) and CaseInfoReqPh (child) The child CaseInfoReqPh table has a foreign key column that contains the key id of its parent CaseInfoReq. Because we are running the application on many remote ...