wise-coders / dbf-jdbc-driver

DBF & FoxPro JDBC Driver | DbSchema DBF Designer
https://dbschema.com/databases/dbf-management-gui.html
Other
23 stars 15 forks source link

java.nio.file.NoSuchFileException #5

Closed thislucasme closed 1 year ago

thislucasme commented 2 years ago

When I connect to dbf I am getting this error. But if I do a select like the following example, apparently it's working. Why this error?

java.nio.file.NoSuchFileException: C:\Users\Success.DbSchema\logs\DbfJdbcDriver.log.lck at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:85) at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103) at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108) at java.base/sun.nio.fs.WindowsFileSystemProvider.newFileChannel(WindowsFileSystemProvider.java:120) at java.base/java.nio.channels.FileChannel.open(FileChannel.java:292) at java.base/java.nio.channels.FileChannel.open(FileChannel.java:345) at java.logging/java.util.logging.FileHandler.openFiles(FileHandler.java:512) at java.logging/java.util.logging.FileHandler.(FileHandler.java:308) at com.wisecoders.dbschema.dbf.JdbcDriver.(JdbcDriver.java:44) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490) at java.base/java.util.ServiceLoader$ProviderImpl.newInstance(ServiceLoader.java:780) at java.base/java.util.ServiceLoader$ProviderImpl.get(ServiceLoader.java:722) at java.base/java.util.ServiceLoader$3.next(ServiceLoader.java:1395) at java.sql/java.sql.DriverManager$2.run(DriverManager.java:614) at java.sql/java.sql.DriverManager$2.run(DriverManager.java:594) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.sql/java.sql.DriverManager.ensureDriversInitialized(DriverManager.java:594) at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:665) at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:251) at javateste.Main.main(Main.java:14) jul 06, 2022 10:20:00 AM com.wisecoders.dbschema.dbf.JdbcDriver getConnection INFORMAÇÕES: Create H2 database 'jdbc:h2:file:~/.DbSchema/jdbc-dbf-cache/97c587a242cdcd1420a820f0af14f5df;database_to_lower=true;case_insensitive_identifiers=true' erro

thislucasme commented 2 years ago

`package javateste;

import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement;

public class Main {

public static void main(String[] args) throws SQLException {
    // TODO Auto-generated method stub
    try {
    Connection con = DriverManager.getConnection( "jdbc:dbschema:dbf:/C:\\Users\\Success\\eclipse-workspace\\javateste\\src\\javateste" );
    Statement st = con.createStatement();
    ResultSet rs = st.executeQuery("select * from de0401");
    while(rs.next()) {
        System.out.println(rs.getString(1));
    }
    st.close();
    }catch(Exception e) {
        System.out.println(e.getMessage());
    }
}

} `

wise-coders commented 2 years ago

I think is something wrong in Gradle. The path C:\Users\Success.DbSchema\logs\DbfJdbcDriver.log.lck is missing one backslash between Success and .Dbschema We are checking how to migrate to the latest gradle version and we will provide a fix.

Best regards, Dragos Pruteanu

thislucasme commented 2 years ago

Thank you very much, Wise-coders, I'll be waiting :)

wise-coders commented 2 years ago

A new driver has been deployed on our website. Please download and test.

Best regards, Dragos Pruteanu

thislucasme commented 2 years ago

thank u so much!