java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Invalid parameter binding(s).

Hibernate JIRA | Hrituc Ovidiu | 1 decade ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    Insert for classes with composite-id crashes when persisting to SQL Server 2000. The composite id consists of the COD, DATA_FIN combination. I am trying to keep the history of a person in the same table and the current record to be the combination (COD_Value, 01/01/3000) The current manager's data gets pulled out with a many-to-one relationship with a composite fk (MGR_ID, BOGUS_DT_FIN). Loading goes ok. Insert doesn't, the exceptions look like this: Hibernate: insert into PERSON (PKID, NAME, DATA_INI, DEPT_ID, MGR_ID, BOGUS_DT_FIN, COD, DATA_FIN) values (?, ?, ?, ?, ?, ?, ?, ?) Jun 19, 2003 6:02:16 PM net.sf.hibernate.util.JDBCExceptionReporter logExceptions WARNING: SQL Error: 0, SQLState: 07009 Jun 19, 2003 6:02:16 PM net.sf.hibernate.util.JDBCExceptionReporter logExceptions SEVERE: [Microsoft][SQLServer 2000 Driver for JDBC]Invalid parameter binding(s). Jun 19, 2003 6:02:17 PM net.sf.hibernate.JDBCException <init> SEVERE: Could not synchronize database state with session java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Invalid parameter binding(s). at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source) at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source) at com.microsoft.jdbc.base.BasePreparedStatement.validateParameterIndex(Unknown Source) at com.microsoft.jdbc.base.BasePreparedStatement.setObjectInternal(Unknown Source) at com.microsoft.jdbc.base.BasePreparedStatement.setTimestamp(Unknown Source) at com.evermind.sql.FilterPreparedStatement.setTimestamp(FilterPreparedStatement.java:394) at com.evermind.sql.FilterPreparedStatement.setTimestamp(FilterPreparedStatement.java:394) at net.sf.hibernate.type.TimestampType.set(TimestampType.java:27) at net.sf.hibernate.type.NullableType.nullSafeSet(NullableType.java:46) at net.sf.hibernate.type.NullableType.nullSafeSet(NullableType.java:31) at net.sf.hibernate.type.ComponentType.nullSafeSet(ComponentType.java:163) at net.sf.hibernate.persister.EntityPersister.dehydrate(EntityPersister.java:369) at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:446) at net.sf.hibernate.impl.ScheduledInsertion.execute(ScheduledInsertion.java:20) at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2064) at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2036) at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:1980) at it.saga.library.commonDataTypes.impl.CdtBLGBaseSessionBean.save(CdtBLGBaseSessionBean.java:247) at CdtBLGPerson_StatelessSessionBeanWrapper10.save(CdtBLGPerson_StatelessSessionBeanWrapper10.java:133) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:119) at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:48) at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:797) at java.lang.Thread.run(Thread.java:536)

    Hibernate JIRA | 1 decade ago | Hrituc Ovidiu
    java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Invalid parameter binding(s).
  2. 0

    Insert for classes with composite-id crashes when persisting to SQL Server 2000. The composite id consists of the COD, DATA_FIN combination. I am trying to keep the history of a person in the same table and the current record to be the combination (COD_Value, 01/01/3000) The current manager's data gets pulled out with a many-to-one relationship with a composite fk (MGR_ID, BOGUS_DT_FIN). Loading goes ok. Insert doesn't, the exceptions look like this: Hibernate: insert into PERSON (PKID, NAME, DATA_INI, DEPT_ID, MGR_ID, BOGUS_DT_FIN, COD, DATA_FIN) values (?, ?, ?, ?, ?, ?, ?, ?) Jun 19, 2003 6:02:16 PM net.sf.hibernate.util.JDBCExceptionReporter logExceptions WARNING: SQL Error: 0, SQLState: 07009 Jun 19, 2003 6:02:16 PM net.sf.hibernate.util.JDBCExceptionReporter logExceptions SEVERE: [Microsoft][SQLServer 2000 Driver for JDBC]Invalid parameter binding(s). Jun 19, 2003 6:02:17 PM net.sf.hibernate.JDBCException <init> SEVERE: Could not synchronize database state with session java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Invalid parameter binding(s). at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source) at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source) at com.microsoft.jdbc.base.BasePreparedStatement.validateParameterIndex(Unknown Source) at com.microsoft.jdbc.base.BasePreparedStatement.setObjectInternal(Unknown Source) at com.microsoft.jdbc.base.BasePreparedStatement.setTimestamp(Unknown Source) at com.evermind.sql.FilterPreparedStatement.setTimestamp(FilterPreparedStatement.java:394) at com.evermind.sql.FilterPreparedStatement.setTimestamp(FilterPreparedStatement.java:394) at net.sf.hibernate.type.TimestampType.set(TimestampType.java:27) at net.sf.hibernate.type.NullableType.nullSafeSet(NullableType.java:46) at net.sf.hibernate.type.NullableType.nullSafeSet(NullableType.java:31) at net.sf.hibernate.type.ComponentType.nullSafeSet(ComponentType.java:163) at net.sf.hibernate.persister.EntityPersister.dehydrate(EntityPersister.java:369) at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:446) at net.sf.hibernate.impl.ScheduledInsertion.execute(ScheduledInsertion.java:20) at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2064) at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2036) at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:1980) at it.saga.library.commonDataTypes.impl.CdtBLGBaseSessionBean.save(CdtBLGBaseSessionBean.java:247) at CdtBLGPerson_StatelessSessionBeanWrapper10.save(CdtBLGPerson_StatelessSessionBeanWrapper10.java:133) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:119) at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:48) at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:797) at java.lang.Thread.run(Thread.java:536)

    Hibernate JIRA | 1 decade ago | Hrituc Ovidiu
    java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Invalid parameter binding(s).
  3. 0

    java.sql.SQLException: No value specified for parameter 1解决办法_IT知识问答_希赛网

    educity.cn | 2 years ago
    java.sql.SQLException: No value specified for parameter 1 代码如下 public boolean login(UserInfo user)throws Exception{ //用户登录 boolean flag=false; int userNo=Integer.parseInt(user.getUserNo()); String password=user.getPassword(); //测试是否从现在的user对象中取到了值 System.out.println(userNo+"我是USER对象的userNo"); System.out.println(password+"我是USER对象的password"); DatabaseConnection dbc=new DatabaseConnection();//取得数据库连接和关闭对象; try{ String sql="SELECT userNo FROM userInfo where userNo= and password= "; this.conn=dbc.getConnection(); this.pst=conn.prepareStatement(sql); //this.pst.setInt(1, userNo);//给sql中参数赋值 this.pst.setLong(1, userNo); this.pst.setString(2, password); ResultSet rs=pst.executeQuery(); if(rs.next()){//传入用户账号和对应的密码都存在时为真 flag=true; System.out.println(rs.getString(userNo)+"我是从数据库里取出来的"); System.out.print(flag+"测试flag");//测试flag,看是否进入了if里面,true则进入了 rs.close(); } }catch(Exception e){ e.printStackTrace(); }finally{ if(this.pst!=null){ this.pst.close(); } this.conn.close(); } return flag; } 报的错误信息如:
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    java.sql.SQLException: No suitable driver - Toolbox for IT Groups

    ittoolbox.com | 9 months ago
    java.sql.SQLException: No suitable driver at java.sql.DriverManager.getConnection(DriverManager .java:545) at java.sql.DriverManager.getConnection(DriverManager .java:171) at com.stc.sql.framework.jdbc.DBConnectionFactory.cre ateConnection(DBConnectionFactory.java:372) at com.stc.sql.framework.jdbc.DBConnectionFactory.get Connection(DBConnectionFactory.java:281) at com.stc.etl.engine.impl.SimpleTask.getConnection(S impleTask.java:254) at com.stc.etl.engine.impl.Extractor.getSelectData(Ex tractor.java:376) at com.stc.etl.engine.impl.Extractor.process(Extracto r.java:190) at com.stc.etl.engine.impl.ETLTaskThread.run(ETLTaskT hread.java:147)
  6. 0

    1 more error - Java Programming Help - KnowCoding.com

    knowcoding.com | 2 years ago
    java.sql.SQLException: Protocol violation at oracle.jdbc.dbaccess.DBError.throwSqlException(DBE rror.java:134) at oracle.jdbc.dbaccess.DBError.throwSqlException(DBE rror.java:179) at oracle.jdbc.dbaccess.DBError.check_error(DBError.j ava:1160) at oracle.jdbc.ttc7.Ocommoncall.receive(Ocommoncall.j ava:149) at oracle.jdbc.ttc7.TTC7Protocol.rollback(TTC7Protoco l.java:488) at oracle.jdbc.driver.OracleConnection.rollback(Oracl eConnection.java:1412) at net.sf.hibernate.transaction.JDBCTransaction.rollb ack(JDBCTransaction.java:86) at com.azure.spark.database.hibernate.util.HibernateU til.doSessionWork(HibernateUtil.java:90) at com.azure.spark.database.hibernate.util.HibernateU til.doSessionWork(HibernateUtil.java:59) at com.azure.spark.database.hibernate.util.HibernateU til.get(HibernateUtil.java:569) at com.azure.spark.database.hibernate.util.HibernateS ession.get(HibernateSession.java:340) at com.azure.spark.taskcontroller.TaskControllerCompo nent.taskCompleted(TaskControllerComponent.java:11 54) at com.azure.spark.taskcontroller.TaskControllerCompo nent.onTaskEvent(TaskControllerComponent.java:1111 ) at com.azure.spark.taskcontroller.tasks.AbstractTaskC omponent.run(AbstractTaskComponent.java:354)

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.sql.SQLException

      [Microsoft][SQLServer 2000 Driver for JDBC]Invalid parameter binding(s).

      at com.microsoft.jdbc.base.BaseExceptions.createException()
    2. com.microsoft.jdbc
      BasePreparedStatement.setTimestamp
      1. com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)
      2. com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
      3. com.microsoft.jdbc.base.BasePreparedStatement.validateParameterIndex(Unknown Source)
      4. com.microsoft.jdbc.base.BasePreparedStatement.setObjectInternal(Unknown Source)
      5. com.microsoft.jdbc.base.BasePreparedStatement.setTimestamp(Unknown Source)
      5 frames
    3. com.evermind.sql
      FilterPreparedStatement.setTimestamp
      1. com.evermind.sql.FilterPreparedStatement.setTimestamp(FilterPreparedStatement.java:394)
      2. com.evermind.sql.FilterPreparedStatement.setTimestamp(FilterPreparedStatement.java:394)
      2 frames
    4. net.sf.hibernate
      SessionImpl.flush
      1. net.sf.hibernate.type.TimestampType.set(TimestampType.java:27)
      2. net.sf.hibernate.type.NullableType.nullSafeSet(NullableType.java:46)
      3. net.sf.hibernate.type.NullableType.nullSafeSet(NullableType.java:31)
      4. net.sf.hibernate.type.ComponentType.nullSafeSet(ComponentType.java:163)
      5. net.sf.hibernate.persister.EntityPersister.dehydrate(EntityPersister.java:369)
      6. net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:446)
      7. net.sf.hibernate.impl.ScheduledInsertion.execute(ScheduledInsertion.java:20)
      8. net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2064)
      9. net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2036)
      10. net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:1980)
      10 frames
    5. it.saga.library
      CdtBLGBaseSessionBean.save
      1. it.saga.library.commonDataTypes.impl.CdtBLGBaseSessionBean.save(CdtBLGBaseSessionBean.java:247)
      1 frame
    6. Unknown
      CdtBLGPerson_StatelessSessionBeanWrapper10.save
      1. CdtBLGPerson_StatelessSessionBeanWrapper10.save(CdtBLGPerson_StatelessSessionBeanWrapper10.java:133)
      1 frame
    7. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:324)
      4 frames
    8. com.evermind.server
      RMICallHandler.run
      1. com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:119)
      2. com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:48)
      2 frames
    9. Dough Lea's util.concurrent package
      PooledExecutor$Worker.run
      1. EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:797)
      1 frame
    10. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:536)
      1 frame