|
From: Leif M. <le...@ta...> - 2005-03-25 23:54:12
|
Ted,
Unless you have specified an account to run as in the wrapper.conf
file, the Wrapper
will run as the SYSTEM user when running as an NT service. When run as
a console
app, it is run as the user you have logged in as.
From the error message, my first guess is that the file that stores
the ODBC
data source data. Make sure that the SYSTEM user has access to that file.
Another common mistake is to declare the ODBC data source for the
current
user rather than as a system-wide data source. If you do this then your
user will
be able to see it, but the SYSTEM user will not.
Post back with the results.
Cheers,
Leif
Ted Hammond wrote:
>My application runs off two datasources. One datasource uses a pure jdbc
>driver (to get to MySQL) and the other uses the jdbc:odbc bridge to reach
>Access.
>
>When I run the application as a Console as in
>
>--> Wrapper Started as Console
>
>everything runs super fine.
>
>When I run the application as a Service as in
>
>--> Wrapper Started as Service
>
>the pure jdbc datasource performs properly but the odbc datasource bombs :(
>
>I get (from wrapper.log only when running the application as a service):
>
>
>
>>java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver]
>>The Microsoft Jet database engine cannot open the file '(unknown)'.
>>It is already opened exclusively by another user, or you need permission to
>>
>>
>view its data.
>
>
>>at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6958)
>>at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7115)
>>at sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(JdbcOdbc.java:3074)
>>at sun.jdbc.odbc.JdbcOdbcConnection.initialize(JdbcOdbcConnection.java:323)
>>at sun.jdbc.odbc.JdbcOdbcDriver.connect(JdbcOdbcDriver.java:174)
>>at java.sql.DriverManager.getConnection(DriverManager.java:512)
>>at java.sql.DriverManager.getConnection(DriverManager.java:171)
>>
>>
>
>etc.
>
>The mdb (Access) datasource is set up without any username / password
>required.
>
>Why does everything work fine when run as a Console but not as a Service?
>
>I read the other ODBC thread from 8/2004 but that didn't seem to shine much
>light on my problem. The ODBC datasource is set up as "System DSN". I am
>having this problem on NT4 as well as on Win2k.
>
>Any help would be really appreciated. Thanks.
>
>
>
>-------------------------------------------------------
>SF email is sponsored by - The IT Product Guide
>Read honest & candid reviews on hundreds of IT Products from real users.
>Discover which products truly live up to the hype. Start reading now.
>http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
>_______________________________________________
>Wrapper-user mailing list
>Wra...@li...
>https://lists.sourceforge.net/lists/listinfo/wrapper-user
>
>
>
|