Hi,
I'm trying to access a Visual Foxpro DBC database from a Windows shared folder. I have it mounted under Linux as /mnt/apps/Hydra/DsysTest/Vbn using this line from /etc/fstab:
//10.10.10.2/apps /mnt/apps cifs
username=XXX,password=XXX,uid=0,gid=500,mod=777
A ls -l /mnt/apps/Hydra/DsysTest/Vbn gives:
-rwxrwSrwt 1 root patrick 14203467 Aug 3 2006 vista.dbc
...
I'm running my program as root (for now). When I run it it gives me this error:
java.sql.SQLException: /mnt/apps/Hydra/DsysTest/Vbn/; doesn't exist or can't be accessed!
Given that I am running as the appropriate user with RW permissions and can list the directory contents using ls why is the HXTT code giving an error?
The SecurityManager the Java program is running under also has the following line which is too generous but seems like it should work:
grant codeBase "file:deps/hxtt-dbf.jar"
{
permission java.security.AllPermission;
};
|
I should have posted the full exception earlier. Here it is:
java.sql.SQLException: /mnt/apps/Hydra/DsysTest/Vbn/; doesn't exist or can't be accessed!
at com.hxtt.global.SQLState.SQLException(Unknown Source)
at com.hxtt.sql.bm.a(Unknown Source)
at com.hxtt.sql.bm.a(Unknown Source)
at com.hxtt.sql.dbf.u.(Unknown Source)
at com.hxtt.sql.dbf.EmbeddedDriver.connect(Unknown Source)
at com.hxtt.global.SQLState.getConnection(Unknown Source)
at com.hxtt.sql.HxttDriver.if(Unknown Source)
at com.hxtt.sql.HxttDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:154)
at com.vanbelle.hyrdra.dsys.server.Application.(Application.java:61)
at com.vanbelle.hyrdra.dsys.server.Application.instance(Application.java:100)
at com.vanbelle.hyrdra.dsys.server.Application.main(Application.java:93)
Also, do most people trying to use the HXTT DBF driver use the JCIFS Java library or the built-in Linux SAMBA support?
|
> /mnt/apps/Hydra/DsysTest/Vbn/;
What's your jdbc url? It seemsn that there's /; after Vbn?
|
>> /mnt/apps/Hydra/DsysTest/Vbn/;
> What's your jdbc url? It seemsn that there's /; after Vbn?
Its a Visual FoxPro DBC database.
/mnt/apps/Hydra/DsysTest/Vbn/Vista.dbc
I've tried with and without the trailing / and it returns the same error either way.
|
Actually, the vista is lowercase. It should be
/mnt/apps/Hydra/DsysTest/Vbn/vista.dbc
Does the HXTT driver change the case anywhere?
|
On Linux/Unix, path is case sensitive.
You can try:
jdbc:dbf:////mnt/apps/Hydra/DsysTest/Vbn
|
I found the problem.
Somehow I got a trailing semicolon in the path. Now that I look at the error message I see the semicolon there too...
|