【问题标题】:HSQLDB client version is not compatibleHSQLDB客户端版本不兼容
【发布时间】:2018-01-29 01:57:28
【问题描述】:

我正在尝试使用 jmeter 对我的 webAPI 运行 http 请求测试,但是出现错误:

[Server@4517d9a3]: Rejected attempt from client using hsql HTTP protocol
org.hsqldb.HsqlException: HSQLDB server version is '2.4.0'  client version 
'-1195.-72.-58.-56' is not compatible.
at org.hsqldb.error.Error.error(Unknown Source)
at org.hsqldb.server.ServerConnection.init(Unknown Source)
at org.hsqldb.server.ServerConnection.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

JDBC 连接测试工作正常。

【问题讨论】:

    标签: maven jmeter hsqldb


    【解决方案1】:

    不清楚为什么你需要这两种协议,你需要坚持被测试的应用程序正在使用的协议,而我能想到的切换到 HTTP 的唯一用例是所有其他端口分开时从 HTTP/HTTPS 被防火墙阻止(除非您正在测试 HSQLDB 本身,在这种情况下您应该联系您的开发人员)

    一些故障排除提示:

    1. 确保您使用相同的 JDBC 驱动程序版本 - JMeter Classpath 中的 2.4.0 并且没有任何其他(即旧客户端库)
    2. 确保您的JDBC HTTP URL is correct
    3. 如果您使用HTTPS 协议,则可能是在HSQLDB 和JMeter are using different keystores 方面的JMeter 配置错误。
    4. 在查看ServerConnection 类时,HSQLDB 本身也可能存在问题:

      switch (streamProtocol) {
      
          case HSQL_STREAM_PROTOCOL :
              if (firstInt
                      != ClientConnection
                          .NETWORK_COMPATIBILITY_VERSION_INT) {
                  if (firstInt == -1900000) {
                      firstInt = -2000000;
                  }
      
                  String verString =
                      ClientConnection.toNetCompVersionString(firstInt);
      
                  throw Error.error(
                      null, ErrorCode.SERVER_VERSIONS_INCOMPATIBLE, 0,
                      new String[] {
                      HsqlDatabaseProperties.THIS_VERSION, verString
                  });
              }
      
              int msgType = dataInput.readByte();
      
              receiveResult(msgType);
              break;
      
          case ODBC_STREAM_PROTOCOL :
              odbcConnect(firstInt);
              break;
      

      ClientConnection 类中,字段看起来像:

      public static final String NETWORK_COMPATIBILITY_VERSION     = "2.3.4.0";
      public static final int    NETWORK_COMPATIBILITY_VERSION_INT = -2030400;
      

    【讨论】:

      猜你喜欢
      • 2011-08-25
      • 1970-01-01
      • 2021-06-14
      • 2010-10-14
      • 1970-01-01
      • 1970-01-01
      • 2013-05-31
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多