Hi!
I sometimes get the message like:
Jcfis jcifs.smb.SmbException: Access is denied
I connect to database by:
jdbc:access:smb://user:password@host/dir/dd.mdb?lockType=ACCESS
Please check the following:
http://stackoverflow.com/questions/10433119/jcifs-smb-smbexception-access-is-denied-exception-for-smb-directories
Best regards
Waclaw
|
It should have not any relation with SmbFileInputStream for directory. Because your jdbc url is using dd.mdb . You should check your jdbc url to make sure tht your samba path for mdb file is correct, and you're using the correct user/password.
|
OK, once again.
Jdbc url, host, path, user/passowrd, etc are correct.
The MS Access files are on the Windows 2003 Server.
I connect to these files from another Windows 2003 Server.
In 99% connects everything is OK, but sometimes I get 'access is denied'.
I connect like that:
String jdbcUrl = "jdbc:access:smb://user:password@host/dir/a.dan";
Properties props = new Properties();
props.put("charSet", "CP1250");
props.put("lockType", "ACCESS");
props.put("versionNumber", "JET4");
props.put("otherExtension", "dan,DAN");
DriverManager.setLoginTimeout(10);
Connection conn = DriverManager.getConnection(jdbcUrl, props);
best regards
Waclaw
|
Exception details:
java.sql.SQLException: Failed to load database a:jcifs.smb.SmbException:
Access is denied.
at com.hxtt.global.SQLState.setNextException(Unknown Source)
at com.hxtt.sql.access.m.a(Unknown Source)
at com.hxtt.sql.access.m.if(Unknown Source)
at com.hxtt.sql.access.m.(Unknown Source)
at com.hxtt.sql.access.a0.a(Unknown Source)
at com.hxtt.concurrent.ab.a(Unknown Source)
at com.hxtt.sql.access.m.a(Unknown Source)
at com.hxtt.sql.access.am.a(Unknown Source)
at com.hxtt.concurrent.ab.a(Unknown Source)
at com.hxtt.sql.access.a3.a(Unknown Source)
at com.hxtt.sql.access.r.a(Unknown Source)
at com.hxtt.sql.b0.a(Unknown Source)
at com.hxtt.sql.d4.a(Unknown Source)
at com.hxtt.sql.d4.a(Unknown Source)
at com.hxtt.sql.df.a(Unknown Source)
at com.hxtt.sql.b0.a(Unknown Source)
at com.hxtt.sql.am.a(Unknown Source)
at com.hxtt.sql.d6.executeQuery(Unknown Source)
at server.SynchroZA$TimerTaskZa.updZA(SynchroZA.java:86)
at server.SynchroZA$TimerTaskZa.run(SynchroZA.java:297)
at java.util.TimerThread.mainLoop(Unknown Source)
at java.util.TimerThread.run(Unknown Source)
|
>In 99% connects everything is OK, but sometimes I get 'access is denied'.
Your code is runing as a loop for a long time?
|
Thread is running every 30min and running for around 10s.
For every loop connection is established, running something and always closing the connection.
Sometimes the exception is occured in 2nd loop, but sometimes after 2days. There's no rule :(
|
And another problem...
There's other program that use these MSAccess files.
I noticed, if the other program is connected there's no problem, but if I connect to MSAccess files as first user (by hxtt), the other users can't connect to these files (they get error #3050).
|
>but if I connect to MSAccess files as first user (by hxtt),
>the other users can't connect to these files (they get error #3050).
Could not lock file. (Error 3050) . It should be a right issue. Because dd.ldb is created by the first user.
|
>In 99% connects everything is OK, but sometimes I get 'access is denied'.
Please download the latest package, which will retry onE time when failed to login in SAMBA.
|