Access dbf files outside context/docbase

2011-12-15 Thread David kerber
I am trying to figure out how to access .dbf files that are on a 
networked drive from my TC 5.5.xx server.  I have no trouble with the 
coding; it all works fine from my Eclipse dev environment.  I believe 
the issue is tomcat's contexts on the production server.  I've seen 
plenty of suggestions for just reading and streaming files from outside 
the docbase, but nothing for accessing them for database purposes.  I'm 
using the Microsoft DBF driver.


As I said above, it all works fine in my dev environment through 
Eclipse, connection to the dbf files in their real home on the network. 
 However, when I try to do it from my production server, I get the 
following log entries:


2011-12-15 14:47:53:  debugValue = 32: In WraDbfJdbc:  Connect params: 
urlPrefix=jdbc:odbc:DRIVER={Microsoft dBase Driver (*.dbf)};DBQ=, 
databaseName = //172.17.47.9/dbase/customer/delta


Thu Dec 15 14:47:53 EST 2011:  Exception in class: 
com.wra.websira.WraDbfJdbc, Msg: 'Creating database: 
//172.17.47.9/dbase/customer/delta', Exception: java.sql.SQLException: 
[Microsoft][ODBC Driver Manager] Data source name not found and no 
default driver specified



I belive that means it can't get to the UNC name listed as the database.

Any hints?  I've been googling and reading for a couple of hours now, 
and haven't come up with anything.


D

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Access dbf files outside context/docbase

2011-12-15 Thread Pid
On 15/12/2011 20:56, David kerber wrote:
> I am trying to figure out how to access .dbf files that are on a
> networked drive from my TC 5.5.xx server.  I have no trouble with the
> coding; it all works fine from my Eclipse dev environment.  I believe
> the issue is tomcat's contexts on the production server.  I've seen
> plenty of suggestions for just reading and streaming files from outside
> the docbase, but nothing for accessing them for database purposes.  I'm
> using the Microsoft DBF driver.
> 
> As I said above, it all works fine in my dev environment through
> Eclipse, connection to the dbf files in their real home on the network.
>  However, when I try to do it from my production server, I get the
> following log entries:
> 
> 2011-12-15 14:47:53:  debugValue = 32: In WraDbfJdbc:  Connect params:
> urlPrefix=jdbc:odbc:DRIVER={Microsoft dBase Driver (*.dbf)};DBQ=,
> databaseName = //172.17.47.9/dbase/customer/delta
> 
> Thu Dec 15 14:47:53 EST 2011:  Exception in class:
> com.wra.websira.WraDbfJdbc, Msg: 'Creating database:
> //172.17.47.9/dbase/customer/delta', Exception: java.sql.SQLException:
> [Microsoft][ODBC Driver Manager] Data source name not found and no
> default driver specified
> 
> 
> I belive that means it can't get to the UNC name listed as the database.
> 
> Any hints?  I've been googling and reading for a couple of hours now,
> and haven't come up with anything.

Obvious first question: file permissions?


p



-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Access dbf files outside context/docbase

2011-12-15 Thread David Kerber

On 12/15/2011 4:47 PM, Pid wrote:

On 15/12/2011 20:56, David kerber wrote:

I am trying to figure out how to access .dbf files that are on a
networked drive from my TC 5.5.xx server.  I have no trouble with the
coding; it all works fine from my Eclipse dev environment.  I believe
the issue is tomcat's contexts on the production server.  I've seen
plenty of suggestions for just reading and streaming files from outside
the docbase, but nothing for accessing them for database purposes.  I'm
using the Microsoft DBF driver.

As I said above, it all works fine in my dev environment through
Eclipse, connection to the dbf files in their real home on the network.
  However, when I try to do it from my production server, I get the
following log entries:

2011-12-15 14:47:53:  debugValue = 32: In WraDbfJdbc:  Connect params:
urlPrefix=jdbc:odbc:DRIVER={Microsoft dBase Driver (*.dbf)};DBQ=,
databaseName = //172.17.47.9/dbase/customer/delta

Thu Dec 15 14:47:53 EST 2011:  Exception in class:
com.wra.websira.WraDbfJdbc, Msg: 'Creating database:
//172.17.47.9/dbase/customer/delta', Exception: java.sql.SQLException:
[Microsoft][ODBC Driver Manager] Data source name not found and no
default driver specified


I belive that means it can't get to the UNC name listed as the database.

Any hints?  I've been googling and reading for a couple of hours now,
and haven't come up with anything.

Obvious first question: file permissions?


p



Wide open.  And from previous experience, permissions and file-in-use 
errors give different text in the message.



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Access dbf files outside context/docbase

2011-12-15 Thread Mark Eggers
- Original Message -

> From: Pid 
> To: Tomcat Users List 
> Cc: 
> Sent: Thursday, December 15, 2011 1:47 PM
> Subject: Re: Access dbf files outside context/docbase
> 
> On 15/12/2011 20:56, David kerber wrote:
>>  I am trying to figure out how to access .dbf files that are on a
>>  networked drive from my TC 5.5.xx server.  I have no trouble with the
>>  coding; it all works fine from my Eclipse dev environment.  I believe
>>  the issue is tomcat's contexts on the production server.  I've seen
>>  plenty of suggestions for just reading and streaming files from outside
>>  the docbase, but nothing for accessing them for database purposes.  I'm
>>  using the Microsoft DBF driver.
>> 
>>  As I said above, it all works fine in my dev environment through
>>  Eclipse, connection to the dbf files in their real home on the network.
>>   However, when I try to do it from my production server, I get the
>>  following log entries:
>> 
>>  2011-12-15 14:47:53:  debugValue = 32: In WraDbfJdbc:  Connect params:
>>  urlPrefix=jdbc:odbc:DRIVER={Microsoft dBase Driver (*.dbf)};DBQ=,
>>  databaseName = //172.17.47.9/dbase/customer/delta
>> 
>>  Thu Dec 15 14:47:53 EST 2011:  Exception in class:
>>  com.wra.websira.WraDbfJdbc, Msg: 'Creating database:
>>  //172.17.47.9/dbase/customer/delta', Exception: java.sql.SQLException:
>>  [Microsoft][ODBC Driver Manager] Data source name not found and no
>>  default driver specified
>> 
>> 
>>  I belive that means it can't get to the UNC name listed as the 
> database.
>> 
>>  Any hints?  I've been googling and reading for a couple of hours now,
>>  and haven't come up with anything.
> 
> Obvious first question: file permissions?
> 
> 
> p


I'm going to expand on Pid's question and make some assumptions.

if you're running this on a Windows server (assumption 1) as a service 
(assumption 2), using the Service account (assumption 3), you will not have 
access to UNC paths or network drives.

There are several games you can play here.

1. Run the service under an account that has network and UNC privileges.
2. Try some ways to map drives so that a Service account can see them

See the following for example:

http://stackoverflow.com/questions/182750/how-to-map-a-network-drive-to-be-used-by-a-service


Disclaimer - I'm not a Windows person, so it's best to do research before 
trying any of these suggestions.

just my two cents . . . .
/mde/

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Access dbf files outside context/docbase

2011-12-16 Thread André Warnier

David Kerber wrote:

On 12/15/2011 4:47 PM, Pid wrote:

On 15/12/2011 20:56, David kerber wrote:

I am trying to figure out how to access .dbf files that are on a
networked drive from my TC 5.5.xx server.  I have no trouble with the
coding; it all works fine from my Eclipse dev environment.  I believe
the issue is tomcat's contexts on the production server.  I've seen
plenty of suggestions for just reading and streaming files from outside
the docbase, but nothing for accessing them for database purposes.  I'm
using the Microsoft DBF driver.

As I said above, it all works fine in my dev environment through
Eclipse, connection to the dbf files in their real home on the network.
  However, when I try to do it from my production server, I get the
following log entries:

2011-12-15 14:47:53:  debugValue = 32: In WraDbfJdbc:  Connect params:
urlPrefix=jdbc:odbc:DRIVER={Microsoft dBase Driver (*.dbf)};DBQ=,
databaseName = //172.17.47.9/dbase/customer/delta

Thu Dec 15 14:47:53 EST 2011:  Exception in class:
com.wra.websira.WraDbfJdbc, Msg: 'Creating database:
//172.17.47.9/dbase/customer/delta', Exception: java.sql.SQLException:
[Microsoft][ODBC Driver Manager] Data source name not found and no
default driver specified


I belive that means it can't get to the UNC name listed as the database.

Any hints?  I've been googling and reading for a couple of hours now,
and haven't come up with anything.

Obvious first question: file permissions?


p



Wide open.  And from previous experience, permissions and file-in-use 
errors give different text in the message.



Are you sure that the driver understands UNC path notation ?
What if you "map" that path to a "device letter" on the local system, and try to connect 
using that local path ?


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Access dbf files outside context/docbase

2011-12-16 Thread André Warnier

André Warnier wrote:

David Kerber wrote:

On 12/15/2011 4:47 PM, Pid wrote:

On 15/12/2011 20:56, David kerber wrote:

I am trying to figure out how to access .dbf files that are on a
networked drive from my TC 5.5.xx server.  I have no trouble with the
coding; it all works fine from my Eclipse dev environment.  I believe
the issue is tomcat's contexts on the production server.  I've seen
plenty of suggestions for just reading and streaming files from outside
the docbase, but nothing for accessing them for database purposes.  I'm
using the Microsoft DBF driver.

As I said above, it all works fine in my dev environment through
Eclipse, connection to the dbf files in their real home on the network.
  However, when I try to do it from my production server, I get the
following log entries:

2011-12-15 14:47:53:  debugValue = 32: In WraDbfJdbc:  Connect params:
urlPrefix=jdbc:odbc:DRIVER={Microsoft dBase Driver (*.dbf)};DBQ=,
databaseName = //172.17.47.9/dbase/customer/delta

Thu Dec 15 14:47:53 EST 2011:  Exception in class:
com.wra.websira.WraDbfJdbc, Msg: 'Creating database:
//172.17.47.9/dbase/customer/delta', Exception: java.sql.SQLException:
[Microsoft][ODBC Driver Manager] Data source name not found and no
default driver specified


I belive that means it can't get to the UNC name listed as the 
database.


Any hints?  I've been googling and reading for a couple of hours now,
and haven't come up with anything.

Obvious first question: file permissions?


p



Wide open.  And from previous experience, permissions and file-in-use 
errors give different text in the message.



Are you sure that the driver understands UNC path notation ?
What if you "map" that path to a "device letter" on the local system, 
and try to connect using that local path ?


Addendum : but if your are indeed running Tomcat as a Service, then the previous 
explanation from Mark Eggers is more likely to be the problem.
(and my suggestion won't help, because it's still a network drive, and the LocalSystem 
account does not have access to Windows network resources (like network drives and 
printers e.g.)).


You should try starting Tomcat under your own user-id, in a command window, using the 
startup.bat script, and then see if it can connect.

If it can then, then your problem is the LocalSystem account.
If it still can't, then it may be the UNC path notation.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Access dbf files outside context/docbase

2011-12-16 Thread David kerber

On 12/16/2011 6:03 AM, André Warnier wrote:

André Warnier wrote:

David Kerber wrote:

On 12/15/2011 4:47 PM, Pid wrote:

On 15/12/2011 20:56, David kerber wrote:

I am trying to figure out how to access .dbf files that are on a
networked drive from my TC 5.5.xx server. I have no trouble with the
coding; it all works fine from my Eclipse dev environment. I believe
the issue is tomcat's contexts on the production server. I've seen
plenty of suggestions for just reading and streaming files from
outside
the docbase, but nothing for accessing them for database purposes. I'm
using the Microsoft DBF driver.


...




Are you sure that the driver understands UNC path notation ?
What if you "map" that path to a "device letter" on the local system,
and try to connect using that local path ?


Addendum : but if your are indeed running Tomcat as a Service, then the
previous explanation from Mark Eggers is more likely to be the problem.
(and my suggestion won't help, because it's still a network drive, and
the LocalSystem account does not have access to Windows network
resources (like network drives and printers e.g.)).


I already knew that, and should have mentioned it in my original post 
(sorry for the lack of details).  I'm running TC as a service on Windows 
server 2008, as a user that does have permissions for the network and 
the drive where the db is located, not as Local system.




You should try starting Tomcat under your own user-id, in a command
window, using the startup.bat script, and then see if it can connect.
If it can then, then your problem is the LocalSystem account.
If it still can't, then it may be the UNC path notation.


Hmm, good idea; I hadn't thought that it just may not like UNC notation. 
 I hope that's not the problem, because if I have to have a drive 
letter, then I think I'll have to have the user actually logged onto the 
server.


D

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Access dbf files outside context/docbase

2011-12-16 Thread André Warnier

David kerber wrote:

On 12/16/2011 6:03 AM, André Warnier wrote:

André Warnier wrote:

David Kerber wrote:

On 12/15/2011 4:47 PM, Pid wrote:

On 15/12/2011 20:56, David kerber wrote:

I am trying to figure out how to access .dbf files that are on a
networked drive from my TC 5.5.xx server. I have no trouble with the
coding; it all works fine from my Eclipse dev environment. I believe
the issue is tomcat's contexts on the production server. I've seen
plenty of suggestions for just reading and streaming files from
outside
the docbase, but nothing for accessing them for database purposes. 
I'm

using the Microsoft DBF driver.


...




Are you sure that the driver understands UNC path notation ?
What if you "map" that path to a "device letter" on the local system,
and try to connect using that local path ?


Addendum : but if your are indeed running Tomcat as a Service, then the
previous explanation from Mark Eggers is more likely to be the problem.
(and my suggestion won't help, because it's still a network drive, and
the LocalSystem account does not have access to Windows network
resources (like network drives and printers e.g.)).


I already knew that, and should have mentioned it in my original post 
(sorry for the lack of details).  I'm running TC as a service on Windows 
server 2008, as a user that does have permissions for the network and 
the drive where the db is located, not as Local system.




You should try starting Tomcat under your own user-id, in a command
window, using the startup.bat script, and then see if it can connect.
If it can then, then your problem is the LocalSystem account.
If it still can't, then it may be the UNC path notation.


Hmm, good idea; I hadn't thought that it just may not like UNC notation. 
 I hope that's not the problem, because if I have to have a drive 
letter, then I think I'll have to have the user actually logged onto the 
server.


Not necessarily. I have software (in perl, not in Java) which runs as a Windows Service 
and needs to access network directories. In that software, I execute the O.S. command

net use \\server\\share {[password] /USER:\domain\userid}
In perl, that's "$status = system($command)".
In Java, I don't know (and I don't know how you would persuade Tomcat to do that before 
opening your db connection either).


What I have noticed sometimes, is that the "net use" is succesful (as per its exit code), 
but then the first access to that "drive" doesn't succeed, but the second and after do.

So I also do a dummy "dir" or something, ignoring the result, right after the "net 
use".
I know it's a terrible hack, and I'm just mentioning it here in case that would hit you 
too, so that you may know to not necessarily give up if it doesn't work right away.


There may be more elegant ways to do this under Java, such as Samba's jcifs 
library.



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Access dbf files outside context/docbase

2011-12-16 Thread David kerber

On 12/16/2011 8:54 AM, André Warnier wrote:

David kerber wrote:

On 12/16/2011 6:03 AM, André Warnier wrote:

André Warnier wrote:

David Kerber wrote:

On 12/15/2011 4:47 PM, Pid wrote:

On 15/12/2011 20:56, David kerber wrote:

I am trying to figure out how to access .dbf files that are on a
networked drive from my TC 5.5.xx server. I have no trouble with the
coding; it all works fine from my Eclipse dev environment. I believe
the issue is tomcat's contexts on the production server. I've seen
plenty of suggestions for just reading and streaming files from
outside
the docbase, but nothing for accessing them for database
purposes. I'm
using the Microsoft DBF driver.


...




Are you sure that the driver understands UNC path notation ?
What if you "map" that path to a "device letter" on the local system,
and try to connect using that local path ?


Addendum : but if your are indeed running Tomcat as a Service, then the
previous explanation from Mark Eggers is more likely to be the problem.
(and my suggestion won't help, because it's still a network drive, and
the LocalSystem account does not have access to Windows network
resources (like network drives and printers e.g.)).


I already knew that, and should have mentioned it in my original post
(sorry for the lack of details). I'm running TC as a service on
Windows server 2008, as a user that does have permissions for the
network and the drive where the db is located, not as Local system.



You should try starting Tomcat under your own user-id, in a command
window, using the startup.bat script, and then see if it can connect.
If it can then, then your problem is the LocalSystem account.
If it still can't, then it may be the UNC path notation.


Hmm, good idea; I hadn't thought that it just may not like UNC
notation. I hope that's not the problem, because if I have to have a
drive letter, then I think I'll have to have the user actually logged
onto the server.


Not necessarily. I have software (in perl, not in Java) which runs as a
Windows Service and needs to access network directories. In that
software, I execute the O.S. command
net use \\server\\share {[password] /USER:\domain\userid}
In perl, that's "$status = system($command)".
In Java, I don't know (and I don't know how you would persuade Tomcat to
do that before opening your db connection either).


I do all the db connection handling explicitly in my code, rather than 
letting TC handle it, so that's not an issue.  *If* the capability 
exists to do it in java, I can easily execute it before making the db 
connection.





What I have noticed sometimes, is that the "net use" is succesful (as
per its exit code), but then the first access to that "drive" doesn't
succeed, but the second and after do.
So I also do a dummy "dir" or something, ignoring the result, right
after the "net use".
I know it's a terrible hack, and I'm just mentioning it here in case
that would hit you too, so that you may know to not necessarily give up
if it doesn't work right away.

There may be more elegant ways to do this under Java, such as Samba's
jcifs library.


Thanks for the suggestions.  Another hack I'm considering is copying the 
dbf to a local drive, or even inside my context path, and accessing it 
from there.  I've got lots of playing to do...


D

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Access dbf files outside context/docbase

2011-12-16 Thread David kerber

On 12/15/2011 3:56 PM, David kerber wrote:

I am trying to figure out how to access .dbf files that are on a
networked drive from my TC 5.5.xx server. I have no trouble with the
coding; it all works fine from my Eclipse dev environment. I believe the
issue is tomcat's contexts on the production server. I've seen plenty of
suggestions for just reading and streaming files from outside the
docbase, but nothing for accessing them for database purposes. I'm using
the Microsoft DBF driver.

As I said above, it all works fine in my dev environment through
Eclipse, connection to the dbf files in their real home on the network.
However, when I try to do it from my production server, I get the
following log entries:

2011-12-15 14:47:53: debugValue = 32: In WraDbfJdbc: Connect params:
urlPrefix=jdbc:odbc:DRIVER={Microsoft dBase Driver (*.dbf)};DBQ=,
databaseName = //172.17.47.9/dbase/customer/delta

Thu Dec 15 14:47:53 EST 2011: Exception in class:
com.wra.websira.WraDbfJdbc, Msg: 'Creating database:
//172.17.47.9/dbase/customer/delta', Exception: java.sql.SQLException:
[Microsoft][ODBC Driver Manager] Data source name not found and no
default driver specified


I belive that means it can't get to the UNC name listed as the database.

Any hints? I've been googling and reading for a couple of hours now, and
haven't come up with anything.

D


FIgured out the cause, though I don't have it fixed yet:  I'm running 
under a 64-bit JRE, and there is no 64-bit dBAse driver installed, just 
32-bit.  So I have to either find a 64-bit dbase ODBC driver (Hah!), or 
switch to a 32-bit TC and JRE.


To answer various other issues and possibilities that had been 
mentioned:  I verfied that the driver works fine on my dev machine with 
UNC names, and I changed the user under which the TC is running to the 
domain administrator, and that didn't help.


D



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org





-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Access dbf files outside context/docbase

2011-12-16 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

David,

Thanks for posting back.

On 12/16/11 2:50 PM, David kerber wrote:
> Figured out the cause, though I don't have it fixed yet:  I'm
> running under a 64-bit JRE, and there is no 64-bit dBAse driver
> installed, just 32-bit.  So I have to either find a 64-bit dbase
> ODBC driver (Hah!), or switch to a 32-bit TC and JRE.

Unless you need a huge heap, running a 32-bit process might be a
better idea, anyway. You can probably improve performance a bit, too.

Another good idea is probably to "upgrade" from Access (or are you
really using dBase?) to Microsoft SQL Server (or any actual RDBMS for
that matter). :)

> To answer various other issues and possibilities that had been 
> mentioned:  I verfied that the driver works fine on my dev machine
> with UNC names, and I changed the user under which the TC is
> running to the domain administrator, and that didn't help.

I believe Sun's Java started supporting UNC path names somewhere
around the late 1.5 or initial 1.6 releases, so it might not have
anything to do with the driver itself.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk7rzCEACgkQ9CaO5/Lv0PD5UACfUMMdYdQ4ve6ywhSmosgJNiDa
+EsAoK0JpO/eovFKmRu41ZDCngTr/5IA
=U4Z/
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Access dbf files outside context/docbase

2011-12-16 Thread David Kerber

On 12/16/2011 5:54 PM, Christopher Schultz wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

David,

Thanks for posting back.

On 12/16/11 2:50 PM, David kerber wrote:

Figured out the cause, though I don't have it fixed yet:  I'm
running under a 64-bit JRE, and there is no 64-bit dBAse driver
installed, just 32-bit.  So I have to either find a 64-bit dbase
ODBC driver (Hah!), or switch to a 32-bit TC and JRE.

Unless you need a huge heap, running a 32-bit process might be a
better idea, anyway. You can probably improve performance a bit, too.

Another good idea is probably to "upgrade" from Access (or are you
really using dBase?) to Microsoft SQL Server (or any actual RDBMS for
that matter). :)
Yes, using real .dbf files.  They're much more reliable than Access 
.mdbs are, IME.  We're actually using them in parallel with a real SQL 
backend, for different purposes.  It's kind of an awkward architecture 
the way it's being used in this particular case, but it worked great 
when it was first implemented, and still does for 98% of our needs.  
This is the first time we've had to mix the two.


The real answer, as I did a bit more digging, is to switch to a java 
native dbase driver, rather than going through MS's ODBC kludge.  Since 
my app is fairly well modularized, that shouldn't be too tough (famous 
last words)






To answer various other issues and possibilities that had been
mentioned:  I verfied that the driver works fine on my dev machine
with UNC names, and I changed the user under which the TC is
running to the domain administrator, and that didn't help.

I believe Sun's Java started supporting UNC path names somewhere
around the late 1.5 or initial 1.6 releases, so it might not have
anything to do with the driver itself.
Ok, thanks for that tidbit; I didn't realize they came to the UNC table 
that late in the game.


D


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Access dbf files outside context/docbase - fixed

2011-12-19 Thread David Kerber
Just to close out this thread, it's now fixed.  I found a native Java 
dBase (.dbf) file driver, and it works great in both 32- and 64-bit 
environments, without having to mess with ODBC or the screwy Microsoft 
database file drivers.


D


On 12/16/2011 10:09 PM, David Kerber wrote:

On 12/16/2011 5:54 PM, Christopher Schultz wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

David,

Thanks for posting back.

On 12/16/11 2:50 PM, David kerber wrote:

Figured out the cause, though I don't have it fixed yet:  I'm
running under a 64-bit JRE, and there is no 64-bit dBAse driver
installed, just 32-bit.  So I have to either find a 64-bit dbase
ODBC driver (Hah!), or switch to a 32-bit TC and JRE.

Unless you need a huge heap, running a 32-bit process might be a
better idea, anyway. You can probably improve performance a bit, too.

Another good idea is probably to "upgrade" from Access (or are you
really using dBase?) to Microsoft SQL Server (or any actual RDBMS for
that matter). :)
Yes, using real .dbf files.  They're much more reliable than Access 
.mdbs are, IME.  We're actually using them in parallel with a real SQL 
backend, for different purposes.  It's kind of an awkward architecture 
the way it's being used in this particular case, but it worked great 
when it was first implemented, and still does for 98% of our needs.  
This is the first time we've had to mix the two.


The real answer, as I did a bit more digging, is to switch to a java 
native dbase driver, rather than going through MS's ODBC kludge.  
Since my app is fairly well modularized, that shouldn't be too tough 
(famous last words)






To answer various other issues and possibilities that had been
mentioned:  I verfied that the driver works fine on my dev machine
with UNC names, and I changed the user under which the TC is
running to the domain administrator, and that didn't help.

I believe Sun's Java started supporting UNC path names somewhere
around the late 1.5 or initial 1.6 releases, so it might not have
anything to do with the driver itself.
Ok, thanks for that tidbit; I didn't realize they came to the UNC 
table that late in the game.


D


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org







-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Access dbf files outside context/docbase - fixed

2011-12-20 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

David,

On 12/19/11 8:28 PM, David Kerber wrote:
> Just to close out this thread, it's now fixed.  I found a native
> Java dBase (.dbf) file driver, and it works great in both 32- and
> 64-bit environments, without having to mess with ODBC or the screwy
> Microsoft database file drivers.

Cool. Plus, now you can move to *NIX since you aren't dependent upon ODBC.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk7wz3cACgkQ9CaO5/Lv0PAwWQCfQ4t94Fb78T5hIERfge0H/RZP
WlwAnj2lTorjjbS7k3SRVfaKUyiPmgNV
=bdrl
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Access dbf files outside context/docbase - fixed

2011-12-20 Thread David kerber

On 12/20/2011 1:09 PM, Christopher Schultz wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

David,

On 12/19/11 8:28 PM, David Kerber wrote:

Just to close out this thread, it's now fixed.  I found a native
Java dBase (.dbf) file driver, and it works great in both 32- and
64-bit environments, without having to mess with ODBC or the screwy
Microsoft database file drivers.


Cool. Plus, now you can move to *NIX since you aren't dependent upon ODBC.

- -chris


That thought has crossed my mind more than once!

D

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org