#1304 Error if JRE1.7 is installed

current-release
closed-fixed
Fred Toussi
jvm (7)
1
2014-10-03
2013-06-11
viniciusmss
No

Doesn't matter which JRE you use to compile the code below, if you run it under JRE1.7 you will get the error.

The code:
//------------------------------------------------------------
import java.sql.DriverManager;
import java.sql.SQLException;
import javax.swing.JFileChooser;
import javax.swing.JOptionPane;
public class TesteFileChooser{
public static void main(String[] args){
try{
//If you comment the code below, no error will occur
DriverManager.getConnection(
"jdbc:hsqldb:file:C:/DB_Test/DB_Test",
"userAdmin", "pass");
}catch(SQLException e){
JOptionPane.showMessageDialog(null,e.getMessage());
}
JFileChooser chooser = new JFileChooser("C:");
chooser.showOpenDialog(null);
System.exit(0);
}
}
//------------------------------------------------------------

The test (to reproduce the error):
1 - Compile and run the code below with JRE1.7
2 - It will open a JFileChooser
3 - Click the button to List Details of the files (at top right)
4 - It will show a table of the files and its details
5 - Click on the header of the table
6 - The program will exit abruptly and a file hs_err_pid will be created

Discussion

  • Fred Toussi
    Fred Toussi
    2013-06-11

    This does not seem to be directly related to HSQLDB. But indirectly, it may have to do with the class loading of the javax.swing classes.

    In any case you can try Class.forName("org.hsqldb.jdbcDriver") before using getConnection(). You can use the same method for the javax.swing classes and see if there is a difference.

     
  • viniciusmss
    viniciusmss
    2013-06-11

    Thanks for responding.

    I tried your suggestion:
    - Used Class.forName("org.hsqldb.jdbcDriver") before using DriverManager.getConnection.
    -And used Class.forName("org.hsqldb.jdbcDriver") before using JFileChooser.

    There was no difference. The bug persisted.

    We have a software with 1400 users and they were complaining that sometimes the software was closing abruptly. For a long time we couldn't find out why, but after lots of tests we found out the example we described to you. But, for sure, the situation that I described is not the only one that is causing this problem.

    The bug occurs only when using HSQLDB. So we can say that it is directly associated with it. I am not here to complain, but to help reporting the bug. If you think that it is not a problem of HSQLDB, I respect it, but it will happen with other HSQLDB users too, and occasionaly they will find out that if they change the change HSQLDB for another database they will get rid of the problems.

     
  • viniciusmss
    viniciusmss
    2013-06-11

    Correcting...
    Used Class.forName("javax.swing.JFileChooser") before using JFileChooser.

     
  • Fred Toussi
    Fred Toussi
    2013-06-11

    I will look into this anyway. You can also try compiling and using the hsqldbmin.jar which does not contain any swing classes and see if it makes any difference.

     
  • viniciusmss
    viniciusmss
    2013-06-11

    Thank you Fred.
    We will wait updates about this.

     
  • Fred Toussi
    Fred Toussi
    2013-06-29

    We are getting near the next release. I have just run you test case on Windows7 64bit with the current SVN code and latest "Java(TM) SE Runtime Environment (build 1.7.0_25-b17)" 64 bit and see no issue.

    Please test again with the next snapshot jar #51 and the latest Java. If the issue is still there, compile the hsqldbmain.jar which does not have any GUI code and try that. If you are still seeing the issue, please provide OS details so we can follow it up.

     
  • viniciusmss
    viniciusmss
    2013-07-02

    Hello Fred,

    I have downloaded hsqldb-20130629.235800-51.jar and run the test case. The problem persist.

    The OS details:
    - Windows7 Ultimate 64 Bits - Service Pack 1

    Name of Operating System Microsoft Windows 7 Ultimate
    Version 6.1.7601 Service Pack 1 Build 7601
    Other Information Operating System Not available
    Manufacturer Operating System Microsoft Corporation
    System Manufacturer INTEL_
    System model DG33FB__
    System Type x64-based PC
    Intel (R) Core (TM) 2 Duo CPU E6550@2.33GHz, 2331 Mhz, 2 Core (s), 2 Processor (s) course (s)
    Version / date BIOS Intel Corp. DPP3510J.86A.0216.2007.0502.1916, 02/05/2007
    SMBIOS Version 2.4
    Windows folder C: \ Windows
    System folder C: \ Windows \ system32
    Boot Device \ Device \ HarddiskVolume1
    Location Brazil
    Hardware Abstraction Layer Version = "6.1.7601.17514"
    Timezone Standard Time Brazil
    Physical Memory (RAM) 2.00 GB Installed
    Total Physical Memory 1.97 GB
    Available Physical Memory 364 MB
    Total Virtual Memory 3.95 GB
    Available Virtual Memory 1.41 GB
    Space 1.97 GB Page File
    Page File C: \ pagefile.sys

     
  • Fred Toussi
    Fred Toussi
    2013-07-02

     
    Attachments
  • Fred Toussi
    Fred Toussi
    2013-07-02

     
  • Fred Toussi
    Fred Toussi
    2013-07-02

     
    Attachments
  • Fred Toussi
    Fred Toussi
    2013-07-02

    I have included the TesteFileChooser .java and .class files with a text file showing how to run the program. I used the HSQLDB snapshot #51 (renamed to hsqldb.jar).

    It runs fine and no crash happens after steps 2,3, 4 and 5 listed above. The file chooser sorts the file listing according to the clicked header.

    Tested on Windows 7 Ultimate 64-bit Service Pack 1 on quad core machine and Java 1.7.0_25-b17 64-bit, also 1.7.0_03 64-bit

    Others can test this

     
  • Fred Toussi
    Fred Toussi
    2013-07-02

    I suggest you ask some prople who have not installed your software to download and test with the attached class file and HSQLDB snapshot #51.

     
  • Fred Toussi
    Fred Toussi
    2013-09-20

    • assigned_to: nobody --> fredt
    • priority: 5 --> 1
    • status: open --> open-invalid
     
  • viniciusmss
    viniciusmss
    2013-09-27

    The error persists. It seems to occur at Windows 32 Bits. I've just tested at another machine. I will downgrade my software to Java 1.6, because the error only occurs with Java 1.7. I would like this problem to be solved, not just archived as "Invalid". If you want, I can grant you remote access to my machine to show you that the bug is real.

     
  • Fred Toussi
    Fred Toussi
    2013-12-30

    Thanks. Will look into this when there is time.

     
  • Fred Toussi
    Fred Toussi
    2013-12-30

    • priority: 1 --> 2
    • status: open-invalid --> open-later
     
    • viniciusmss
      viniciusmss
      2014-09-08

      Hello Fred!

      Good news: It seems that version 2.3.2 of HSQLDB eliminated the bug.

      I've done some extra tests. I've found out that it was not happening with Windows 32 bits only. It was also happening with Windows 64 bits. But the problem happens only with older versions of JAVA 1.7 combined with older versions of HSQLDB.

      Here are the results of my tests:

      JRE 1.7u0 + HSQLDB 2.2.9 = BUG!!
      JRE 1.7u67 + HSQLDB 2.2.9 = ok
      JRE 1.7u0 + HSQLDB 2.3.2 = ok
      JRE 1.7u67 + HSQLDB 2.3.2 = ok

      (Same results for both Windows 32 bits and Windows 64 bits)

       
  • Fred Toussi
    Fred Toussi
    2014-09-08

    Thanks for checking this out.

     
  • Fred Toussi
    Fred Toussi
    2014-09-08

    • status: open-later --> closed-fixed
    • Priority: 2 --> 1