Connexion to an Access database

One Star

Connexion to an Access database

Hello,
I have currently a problem with the execution of a Talend job which does at the first time a connexion to a database Access in 2007 version and try then to read data from this database (see below the error log).
The problem does not occur on all the computer. Only few are concerned but I do not manage to find the parameter(s) to change in order to have the job working on all the computer.
I found some articles as  or  that explain this problem comes from the ODBC rights in the register editor (regedit) but the solution described does not work for me.
Do you have another solutions to solve this problem ?
Thank you in advance for your help.
Xavier
Below the log of the error :
Exception in component tAccessConnection_1
java.sql.SQLException: Erreur générale Impossible d\'ouvrir la clé de Registre « Temporary (volatile) Ace DSN for process 0x14b0 Thread 0x9d8 DBC 0x2a47fb4 Jet ».
at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source)
at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source)
at sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcConnection.initialize(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
...
Exception in component tAccessInput_1
java.lang.NullPointerException
One Star

Re: Connexion to an Access database


Check that your ODBC connection is well configured (if you use a mapped drive, do not use E:/path..../, use //name/path.../)
Check that your account has the permissions to read your database and the folder where your access file is located
Moderator

Re: Connexion to an Access database

Hi,
Can you connect to your Access  successfully without using Talend tool? Have you installed MS Access Database Driver(*.mdb, *accdb) in your current computer? 

Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: Connexion to an Access database

Hello,
Thank you for your responses but it is still not working.
I change a little bit the description of my problem because there was something not enough accurate. This error occurs on several PCs which are in a different network than mine (different company). From my side, I can execute successfully the job.
I do not know if it is important but the job is launched through a .bat file.
So to respond to you xdshi, yes they can access and open the Access database without any problem and they have access 2007. (the access database is in 2007 version)
To respond to you Jcs19, the access database is in local on the computer where the job is launched and accessible through a configuratble path ../../FOLDER solely. And as it is a local execution, the user has all the rights on its folder.
Is it possible that the problem comes from an antivirus ? or a java version ?
Do you have any other idea ?
Thank you in advance,
One Star

Re: Connexion to an Access database

Hello,
Thank you for your responses but it is still not working.
I change a little bit the description of my problem because there was something not enough accurate. This error occurs on several PCs which are in a different network than mine (different company). From my side, I can execute successfully the job.
I do not know if it is important but the job is launched through a .bat file.
So to respond to you xdshi, yes they can access and open the Access database without any problem and they have access 2007. (the access database is in 2007 version)
To respond to you Jcs19, the access database is in local on the computer where the job is launched and accessible through a configuratble path ../../FOLDER solely. And as it is a local execution, the user has all the rights on its folder.
Is it possible that the problem comes from an antivirus ? or a java version ?
Do you have any other idea ?
Thank you in advance,

Yes, the problem may come from antivirus,firewalls or proxy but I don't think so.
Try to edit your bat file replace "java" by your 32 bits java path
java -Xms256M -Xmx1024M
to 
 "C:\Program Files (x86)\Java\jre7\bin\java.exe"  -Xms256M -Xmx1024M 
(dont forget double quotes)
If it's not working, try to create an odbc connection
One Star

Re: Connexion to an Access database

Thank you for your response Jcs. It has finally worked . I have only re-packaged the jars.
Maybe there were some conflicts but I am not ure of what was the real cause of the problem.
Thank you all
One Star

Re: Connexion to an Access database

Hello,
I have this error, please help.
It does not have enough user privileges or Object Found: NULL
WARNING:Error in the metadata of the table Estados Financieros: table's row count in the metadata is 6732 but 6672 records have been found and loaded by UCanAccess. All will work fine, but it's better to repair your database.
Exception in component tAccessConnection_1
net.ucanaccess.jdbc.UcanaccessSQLException: usuario no tiene privilegios suficientes o objeto no encontrado: NULL
at net.ucanaccess.jdbc.UcanaccessDriver.connect(UcanaccessDriver.java:247)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at local_project.ace_0_1.ACE.tAccessConnection_1Process(ACE.java:311)
at local_project.ace_0_1.ACE.runJobInTOS(ACE.java:574)
at local_project.ace_0_1.ACE.main(ACE.java:431)
Caused by: java.sql.SQLSyntaxErrorException: usuario no tiene privilegios suficientes o objeto no encontrado: NULL
Moderator

Re: Connexion to an Access database

Hi jfrapascal,
What's your Access DB version? 2007?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: Connexion to an Access database

the version is 2010
One Star

Re: Connexion to an Access database

I open the db with SQL SERVER INTEGRATION SERVICES and I not have error when open the conection but when open with Talent I can't
Moderator

Re: Connexion to an Access database

Hi,
Have you already checked document about:TalendHelpCenterSmiley Frustratedupported systems databases and business applications by Talend components?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: Connexion to an Access database

it helps!