Hello Alexey,

there seems to be an issue with the secure random device /dev/random
on Linux if there isn't enough entropy available. It will then block.

You need to set in $JAVA_HOME/jre/lib/security/java.security the

securerandom.source=file:/dev/random

to 

securerandom.source=file:/dev/urandom

(/dev/urandom is the non-blocking companion of /dev/random).

Then it should work.

Regards
Alexander Schröder
SAP DB, SAP Labs Berlin


-----Original Message-----
From: Alexey Gaidukov [mailto:[EMAIL PROTECTED] 
Sent: Montag, 16. Januar 2006 11:12
To: maxdb@lists.mysql.com
Subject: jdbc driver freezes in connect under linux

JDBC 7_6_00_16_4753. MaxDB 7.6.00.16 linux 32 and 64 bit. On client side 
linux kernels 2.6.14-1.1653_FC4smp and 2.6.14.4 from kernel.org were 
tested. Tested java runtime: jre-1.5.0-6, jre-1.5.0-4 and j2sdk1.4.2_10.


When I run the following simple application then this application is 
freezed in "getConnection" and will waiting keyboard events. If there is 
no keyboard events then waiting can be very long. I'm waiting about half 
of hour. If to connect with NetBeans debugger then jre is waiting in 
com.sap.dbtech.util.security line 50 ( "while (true)" line). I have this 
problem with all programs on linux with JDBC driver - sync manager 
message server, sync manager GUI and other. In GUI programs mouse events 
can help. In console program only keyboard events can help. If I connect 
to linux with scp or telnet then nothing can help and waiting time is 
random.


package javaapplication3;
import java.sql.*;
public class Main {
    static final java.util.Properties connectionInfo = new 
java.util.Properties();
    public Main() {}
    public static void main(String[] args) {
        try {
            String driver = "com.sap.dbtech.jdbc.DriverSapDB";
            String url = "jdbc:sapdb://maxdb/DCDB";
            Class.forName(driver);
            connectionInfo.put("driver", driver);
            connectionInfo.put("url", url);
            connectionInfo.put("user", "GIS");
            connectionInfo.put("password", "1");
            Connection connection = DriverManager.getConnection(url, 
connectionInfo);
            System.out.println("connection:"+connection);
        }
        catch (Exception e) {
            e.printStackTrace();
        }
    }
}


-- 
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to