java.sql.SQLException: JZ0S2: Statement object has already been closed.

JIRA | Gaston Dombiak | 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

    2006.10.27 04:01:56 org.jivesoftware.wildfire.roster.RosterItemProvider.getItems(RosterItemProvider.java:330) java.sql.SQLException: JZ0S2: Statement object has already been closed. at com.sybase.jdbc3.jdbc.ErrorMessage.raiseError(ErrorMessage.java:572) at com.sybase.jdbc3.jdbc.SybStatement.checkDead(SybStatement.java:2058) at com.sybase.jdbc3.jdbc.SybStatement.close(SybStatement.java:494) at com.sybase.jdbc3.jdbc.SybStatement.close(SybStatement.java:482) at org.jivesoftware.wildfire.roster.RosterItemProvider.getItems(RosterItemProvider.java:329) at org.jivesoftware.wildfire.roster.Roster.<init>(Roster.java:94) at org.jivesoftware.wildfire.roster.RosterManager.getRoster(RosterManager.java:94) at org.jivesoftware.wildfire.user.User.getRoster(User.java:289) at org.jivesoftware.wildfire.handler.IQRosterHandler.manageRoster(IQRosterHandler.java:187) at org.jivesoftware.wildfire.handler.IQRosterHandler.handleIQ(IQRosterHandler.java:104) at org.jivesoftware.wildfire.handler.IQHandler.process(IQHandler.java:48) at org.jivesoftware.wildfire.IQRouter.handle(IQRouter.java:268) at org.jivesoftware.wildfire.IQRouter.route(IQRouter.java:96) at org.jivesoftware.wildfire.spi.PacketRouterImpl.route(PacketRouterImpl.java:67) at org.jivesoftware.wildfire.net.SocketReader.processIQ(SocketReader.java:250) at org.jivesoftware.wildfire.net.ClientSocketReader.processIQ(ClientSocketReader.java:51) at org.jivesoftware.wildfire.net.SocketReader.process(SocketReader.java:216) at org.jivesoftware.wildfire.net.BlockingReadingMode.readStream(BlockingReadingMode.java:156) at org.jivesoftware.wildfire.net.BlockingReadingMode.run(BlockingReadingMode.java:62) at org.jivesoftware.wildfire.net.SocketReader.run(SocketReader.java:123) at java.lang.Thread.run(Unknown Source)

    Jive Software Open Source | 1 decade ago | Gaston Dombiak
    java.sql.SQLException: JZ0S2: Statement object has already been closed.
  2. 0

    2006.10.27 04:01:56 org.jivesoftware.wildfire.roster.RosterItemProvider.getItems(RosterItemProvider.java:330) java.sql.SQLException: JZ0S2: Statement object has already been closed. at com.sybase.jdbc3.jdbc.ErrorMessage.raiseError(ErrorMessage.java:572) at com.sybase.jdbc3.jdbc.SybStatement.checkDead(SybStatement.java:2058) at com.sybase.jdbc3.jdbc.SybStatement.close(SybStatement.java:494) at com.sybase.jdbc3.jdbc.SybStatement.close(SybStatement.java:482) at org.jivesoftware.wildfire.roster.RosterItemProvider.getItems(RosterItemProvider.java:329) at org.jivesoftware.wildfire.roster.Roster.<init>(Roster.java:94) at org.jivesoftware.wildfire.roster.RosterManager.getRoster(RosterManager.java:94) at org.jivesoftware.wildfire.user.User.getRoster(User.java:289) at org.jivesoftware.wildfire.handler.IQRosterHandler.manageRoster(IQRosterHandler.java:187) at org.jivesoftware.wildfire.handler.IQRosterHandler.handleIQ(IQRosterHandler.java:104) at org.jivesoftware.wildfire.handler.IQHandler.process(IQHandler.java:48) at org.jivesoftware.wildfire.IQRouter.handle(IQRouter.java:268) at org.jivesoftware.wildfire.IQRouter.route(IQRouter.java:96) at org.jivesoftware.wildfire.spi.PacketRouterImpl.route(PacketRouterImpl.java:67) at org.jivesoftware.wildfire.net.SocketReader.processIQ(SocketReader.java:250) at org.jivesoftware.wildfire.net.ClientSocketReader.processIQ(ClientSocketReader.java:51) at org.jivesoftware.wildfire.net.SocketReader.process(SocketReader.java:216) at org.jivesoftware.wildfire.net.BlockingReadingMode.readStream(BlockingReadingMode.java:156) at org.jivesoftware.wildfire.net.BlockingReadingMode.run(BlockingReadingMode.java:62) at org.jivesoftware.wildfire.net.SocketReader.run(SocketReader.java:123) at java.lang.Thread.run(Unknown Source)

    JIRA | 1 decade ago | Gaston Dombiak
    java.sql.SQLException: JZ0S2: Statement object has already been closed.
  3. 0

    2006.10.27 04:01:56 org.jivesoftware.wildfire.roster.RosterItemProvider.getItems(RosterItemProvider.java:330) java.sql.SQLException: JZ0S2: Statement object has already been closed. at com.sybase.jdbc3.jdbc.ErrorMessage.raiseError(ErrorMessage.java:572) at com.sybase.jdbc3.jdbc.SybStatement.checkDead(SybStatement.java:2058) at com.sybase.jdbc3.jdbc.SybStatement.close(SybStatement.java:494) at com.sybase.jdbc3.jdbc.SybStatement.close(SybStatement.java:482) at org.jivesoftware.wildfire.roster.RosterItemProvider.getItems(RosterItemProvider.java:329) at org.jivesoftware.wildfire.roster.Roster.<init>(Roster.java:94) at org.jivesoftware.wildfire.roster.RosterManager.getRoster(RosterManager.java:94) at org.jivesoftware.wildfire.user.User.getRoster(User.java:289) at org.jivesoftware.wildfire.handler.IQRosterHandler.manageRoster(IQRosterHandler.java:187) at org.jivesoftware.wildfire.handler.IQRosterHandler.handleIQ(IQRosterHandler.java:104) at org.jivesoftware.wildfire.handler.IQHandler.process(IQHandler.java:48) at org.jivesoftware.wildfire.IQRouter.handle(IQRouter.java:268) at org.jivesoftware.wildfire.IQRouter.route(IQRouter.java:96) at org.jivesoftware.wildfire.spi.PacketRouterImpl.route(PacketRouterImpl.java:67) at org.jivesoftware.wildfire.net.SocketReader.processIQ(SocketReader.java:250) at org.jivesoftware.wildfire.net.ClientSocketReader.processIQ(ClientSocketReader.java:51) at org.jivesoftware.wildfire.net.SocketReader.process(SocketReader.java:216) at org.jivesoftware.wildfire.net.BlockingReadingMode.readStream(BlockingReadingMode.java:156) at org.jivesoftware.wildfire.net.BlockingReadingMode.run(BlockingReadingMode.java:62) at org.jivesoftware.wildfire.net.SocketReader.run(SocketReader.java:123) at java.lang.Thread.run(Unknown Source)

    Jive Software Open Source | 1 decade ago | Gaston Dombiak
    java.sql.SQLException: JZ0S2: Statement object has already been closed.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    SQLException JZ0S2 using Sybase jconn3

    eclipsesql | 1 decade ago | vbains
    java.sql.SQLException: JZ0S2: Statement object has already been closed.
  6. 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; } 报的错误信息如:

    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

      JZ0S2: Statement object has already been closed.

      at com.sybase.jdbc3.jdbc.ErrorMessage.raiseError()
    2. com.sybase.jdbc3
      SybStatement.close
      1. com.sybase.jdbc3.jdbc.ErrorMessage.raiseError(ErrorMessage.java:572)
      2. com.sybase.jdbc3.jdbc.SybStatement.checkDead(SybStatement.java:2058)
      3. com.sybase.jdbc3.jdbc.SybStatement.close(SybStatement.java:494)
      4. com.sybase.jdbc3.jdbc.SybStatement.close(SybStatement.java:482)
      4 frames
    3. org.jivesoftware.wildfire
      SocketReader.run
      1. org.jivesoftware.wildfire.roster.RosterItemProvider.getItems(RosterItemProvider.java:329)
      2. org.jivesoftware.wildfire.roster.Roster.<init>(Roster.java:94)
      3. org.jivesoftware.wildfire.roster.RosterManager.getRoster(RosterManager.java:94)
      4. org.jivesoftware.wildfire.user.User.getRoster(User.java:289)
      5. org.jivesoftware.wildfire.handler.IQRosterHandler.manageRoster(IQRosterHandler.java:187)
      6. org.jivesoftware.wildfire.handler.IQRosterHandler.handleIQ(IQRosterHandler.java:104)
      7. org.jivesoftware.wildfire.handler.IQHandler.process(IQHandler.java:48)
      8. org.jivesoftware.wildfire.IQRouter.handle(IQRouter.java:268)
      9. org.jivesoftware.wildfire.IQRouter.route(IQRouter.java:96)
      10. org.jivesoftware.wildfire.spi.PacketRouterImpl.route(PacketRouterImpl.java:67)
      11. org.jivesoftware.wildfire.net.SocketReader.processIQ(SocketReader.java:250)
      12. org.jivesoftware.wildfire.net.ClientSocketReader.processIQ(ClientSocketReader.java:51)
      13. org.jivesoftware.wildfire.net.SocketReader.process(SocketReader.java:216)
      14. org.jivesoftware.wildfire.net.BlockingReadingMode.readStream(BlockingReadingMode.java:156)
      15. org.jivesoftware.wildfire.net.BlockingReadingMode.run(BlockingReadingMode.java:62)
      16. org.jivesoftware.wildfire.net.SocketReader.run(SocketReader.java:123)
      16 frames
    4. Java RT
      Thread.run
      1. java.lang.Thread.run(Unknown Source)
      1 frame