Closed GoogleCodeExporter closed 9 years ago
this bug since h2-2015-03-02 ,the h2-2015-1-16 is ok
Original comment by yuedaxi...@gmail.com
on 9 Mar 2015 at 2:08
I can't upload test file and db file.The test file:
package com.ecc.test;
import java.sql.Connection;
import java.sql.Driver;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.Properties;
import com.gentlesoft.commons.util.ObjectType;
public class Testh2 {
public static void main(String[] args) throws Exception {
ddff();
}
private static void ddff() throws Exception {
Connection connection=getConnection();//getnewCon();
Statement ss=connection.createStatement();
ResultSet rs=ss.executeQuery("call current_timestamp()");
while (rs.next()){
Object tem= rs.getObject(1);
System.out.println(tem);
}
rs.close();
ss.close();
System.out.println("Connection h2 ok");
connection.close();
}
public static Connection getConnection() throws SQLException, InstantiationException, IllegalAccessException, ClassNotFoundException{
DriverManager.registerDriver((Driver)Class.forName("org.h2.Driver").newInstance());
Connection connection=DriverManager.getConnection("jdbc:h2:D:\\eclipse\\mydb", "sa", "");
return connection;
}
public static Connection getnewCon() throws Exception{
Driver driver=createDriver("org.h2.Driver");
String url="jdbc:h2:D:\\eclipse\\mydb";
Properties info=new Properties();
info.put("user", "sa");
info.put("password", "");
Connection nativeConnection = driver.connect(url, info);
return nativeConnection;
}
public static Driver createDriver(String className) throws SQLException, ClassNotFoundException {
Class<?> rawDriverClass = ObjectType.loadClass(className);
if (rawDriverClass == null) {
throw new SQLException("jdbc-driver's class not found. '" + className + "'");
}
Driver rawDriver;
try {
rawDriver = (Driver) rawDriverClass.newInstance();
} catch (InstantiationException e) {
throw new SQLException("create driver instance error, driver className '" + className + "'", e);
} catch (IllegalAccessException e) {
throw new SQLException("create driver instance error, driver className '" + className + "'", e);
}
return rawDriver;
}
}
Original comment by yuedaxi...@gmail.com
on 9 Mar 2015 at 2:33
This bug cause by lob ,if a table has lob data ,cause dead cycle
Original comment by yuedaxi...@gmail.com
on 9 Mar 2015 at 2:36
Hi,
The issue tracker is only if you have a simple, standalone test case. But your
test code is just connecting to the database, so with that alone I can't
reproduce the problem of course.
Could you use the mailing list next time instead of filing a non-reproducible
bug? There, you can send the database file (we would need that). Or send it to
me directly.
Regards,
Thomas
Original comment by thomas.t...@gmail.com
on 12 Mar 2015 at 6:54
Original comment by thomas.t...@gmail.com
on 12 Mar 2015 at 6:54
I can't upload db file,Because GFW.In china can't visite google any service.
What your email,I send db to you,my email:yuedaxia76@gmail.com
Original comment by yuedaxi...@gmail.com
on 12 Mar 2015 at 2:27
Hi,
Thanks a lot! You are right, this is an endless loop, it is a bug introduced in
version 1.4.186. I have fixed this bug now (in the trunk).
Regards,
Thomas
Original comment by thomas.t...@gmail.com
on 13 Mar 2015 at 6:44
Should be fixed with version 1.4.187
Original comment by thomas.t...@gmail.com
on 10 Apr 2015 at 6:54
Original issue reported on code.google.com by
yuedaxi...@gmail.com
on 8 Mar 2015 at 2:27