Menu

Decoding not supported also with not encrypted DB

Help
2015-08-04
2015-08-05
  • Daniele Renda

    Daniele Renda - 2015-08-04

    Hi,
    I'm trying to open a db that is not encrypted and it has not password. Unfortunally I have always this exception. What I can check to understand the meaning of this exception?

    Thanks

    net.ucanaccess.jdbc.UcanaccessSQLException: Decoding not supported. Please choose a CodecProvider which supports reading the current database encoding.
         at net.ucanaccess.jdbc.UcanaccessDriver.connect(UcanaccessDriver.java:247)
         at it.pianetatecno.ecall.plugins.JdbcDriver.connect(JdbcDriver.java:22)
         at java.sql.DriverManager.getConnection(DriverManager.java:664)
         at java.sql.DriverManager.getConnection(DriverManager.java:270)
         at  it.pianetatecno.ecall.plugins.PluginManager.getAppuntamenti(PluginManager.java:246)
         at it.pianetatecno.ecall.plugins.PluginManager$$FastClassBySpringCGLIB$$180b607d.invoke(<generated>)
         at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
         at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:717)
         at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
         at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
         at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
         at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
         at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
         at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:653)
         at it.pianetatecno.ecall.plugins.PluginManager$$EnhancerBySpringCGLIB$$73a7f664.getAppuntamenti(<generated>)
         at it.pianetatecno.ecall.task.AppuntamentiTask.esegui(AppuntamentiTask.java:193)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
         at java.lang.reflect.Method.invoke(Method.java:497)
         at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:65)
         at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
         at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
         at java.lang.Thread.run(Thread.java:745)
        Caused by: com.healthmarketscience.jackcess.impl.UnsupportedCodecException: Decoding not supported. Please choose a CodecProvider which supports reading the current database encoding.
         at com.healthmarketscience.jackcess.impl.DefaultCodecProvider$UnsupportedHandler.decodePage(DefaultCodecProvider.java:126)
         at com.healthmarketscience.jackcess.impl.PageChannel.readPage(PageChannel.java:224)
         at com.healthmarketscience.jackcess.impl.UsageMap.read(UsageMap.java:130)
         at com.healthmarketscience.jackcess.impl.PageChannel.initialize(PageChannel.java:117)
         at com.healthmarketscience.jackcess.impl.DatabaseImpl.<init>(DatabaseImpl.java:512)
         at com.healthmarketscience.jackcess.impl.DatabaseImpl.open(DatabaseImpl.java:386)
         at com.healthmarketscience.jackcess.DatabaseBuilder.open(DatabaseBuilder.java:248)
         at net.ucanaccess.jdbc.DefaultJackcessOpener.open(DefaultJackcessOpener.java:38)
         at net.ucanaccess.jdbc.DBReference.<init>(DBReference.java:158)
    
         at net.ucanaccess.jdbc.DBReferenceSingleton.loadReference(DBReferenceSingleton.java:57)
         at net.ucanaccess.jdbc.UcanaccessDriver.connect(UcanaccessDriver.java:103)
         ... 30 more
    
     

    Last edit: Daniele Renda 2015-08-04
  • Daniele Renda

    Daniele Renda - 2015-08-04

    I just tried with ucanaccess 3.0 but the problem still persist. Any idea? The db should be an "Access 2000" file type.

    net.ucanaccess.jdbc.UcanaccessSQLException: UCAExc:::3.x.x Decoding not supported.  Please choose a CodecProvider which supports reading the current database encoding.
        at net.ucanaccess.jdbc.UcanaccessDriver.connect(UcanaccessDriver.java:258) ~[?:?]
        at it.pianetatecno.ecall.plugins.JdbcDriver.connect(JdbcDriver.java:22) ~[ecall-java-3.0.3.jar:3.0.3]
        at java.sql.DriverManager.getConnection(DriverManager.java:664) ~[?:1.8.0_45]
        at java.sql.DriverManager.getConnection(DriverManager.java:270) ~[?:1.8.0_45]
        at  it.pianetatecno.ecall.plugins.PluginManager.getAppuntamenti(PluginManager.java:246) [ecall-java-3.0.3.jar:3.0.3]
        at it.pianetatecno.ecall.plugins.PluginManager$$FastClassBySpringCGLIB$$180b607d.invoke(<generated>) [spring-core-4.1.6.RELEASE.jar:3.0.3]
        at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) [spring-core-4.1.6.RELEASE.jar:4.1.6.RELEASE]
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:717) [spring-aop-4.1.6.RELEASE.jar:4.1.6.RELEASE]
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) [spring-aop-4.1.6.RELEASE.jar:4.1.6.RELEASE]
        at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99) [spring-tx-4.1.6.RELEASE.jar:4.1.6.RELEASE]
        at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281) [spring-tx-4.1.6.RELEASE.jar:4.1.6.RELEASE]
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) [spring-tx-4.1.6.RELEASE.jar:4.1.6.RELEASE]
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) [spring-aop-4.1.6.RELEASE.jar:4.1.6.RELEASE]
        at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:653) [spring-aop-4.1.6.RELEASE.jar:4.1.6.RELEASE]
        at it.pianetatecno.ecall.plugins.PluginManager$$EnhancerBySpringCGLIB$$9195d98c.getAppuntamenti(<generated>) [spring-core-4.1.6.RELEASE.jar:3.0.3]
        at it.pianetatecno.ecall.task.AppuntamentiTask.esegui(AppuntamentiTask.java:193) [ecall-java-3.0.3.jar:3.0.3]
        at sun.reflect.GeneratedMethodAccessor183.invoke(Unknown Source) ~[?:?]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_45]
        at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_45]
        at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:65) [spring-context-4.1.6.RELEASE.jar:4.1.6.RELEASE]
        at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54) [spring-context-4.1.6.RELEASE.jar:4.1.6.RELEASE]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_45]
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:1.8.0_45]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_45]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:1.8.0_45]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_45]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_45]
        at java.lang.Thread.run(Thread.java:745) [?:1.8.0_45]
    Caused by: com.healthmarketscience.jackcess.impl.UnsupportedCodecException: Decoding not supported.  Please choose a CodecProvider which supports reading the current database encoding.
        at com.healthmarketscience.jackcess.impl.DefaultCodecProvider$UnsupportedHandler.decodePage(DefaultCodecProvider.java:126) ~[jackcess-2.1.0.jar:?]
        at com.healthmarketscience.jackcess.impl.PageChannel.readPage(PageChannel.java:224) ~[jackcess-2.1.0.jar:?]
        at com.healthmarketscience.jackcess.impl.UsageMap.read(UsageMap.java:130) ~[jackcess-2.1.0.jar:?]
        at com.healthmarketscience.jackcess.impl.PageChannel.initialize(PageChannel.java:117) ~[jackcess-2.1.0.jar:?]
        at com.healthmarketscience.jackcess.impl.DatabaseImpl.<init>(DatabaseImpl.java:516) ~[jackcess-2.1.0.jar:?]
        at com.healthmarketscience.jackcess.impl.DatabaseImpl.open(DatabaseImpl.java:389) ~[jackcess-2.1.0.jar:?]
        at com.healthmarketscience.jackcess.DatabaseBuilder.open(DatabaseBuilder.java:248) ~[jackcess-2.1.0.jar:?]
        at net.ucanaccess.jdbc.DefaultJackcessOpener.open(DefaultJackcessOpener.java:32) ~[?:?]
        at net.ucanaccess.jdbc.DBReference.<init>(DBReference.java:160) ~[?:?]
        at net.ucanaccess.jdbc.DBReferenceSingleton.loadReference(DBReferenceSingleton.java:51) ~[?:?]
        at net.ucanaccess.jdbc.UcanaccessDriver.connect(UcanaccessDriver.java:97) ~[?:?]
        ... 29 more
    
     

    Last edit: Daniele Renda 2015-08-04
  • Marco Amadei

    Marco Amadei - 2015-08-04

    Hi Daniele, Access 2000 is fully supported and this exception may happen with encrypted database only(when you're not using a proper configuration). If your db isn't encrypted, that means a problem happens at the jackcess underlying layer in reading the format. Have you already tried to use the access compact and repair tool?

     
    • Daniele Renda

      Daniele Renda - 2015-08-04

      Hi Marco,
      I'm opening the Db with Access without any problem and any password required (this means that the db is not encrypted, right?). I yet tried to compact and repair the db but nothing changes.

      Any idea? Thanks

       
  • Daniele Renda

    Daniele Renda - 2015-08-04
     

    Last edit: Daniele Renda 2015-08-04
  • Daniele Renda

    Daniele Renda - 2015-08-04

    Just as info: I tried opening the MDB directly with Access and also with OpenOffice through ODBC and in both case all works fine.

    I tried to open it also with Dbever + Ucanaccess but I've the same exception (so is not a problem of my code :-) )
    There is a way to understand why the exception is raised (what is wrong with the encoding of this db)?

    If you want I can send you in private the db.

    Thanks

     
  • Marco Amadei

    Marco Amadei - 2015-08-04

    It isn't obviously a code problem
    Yes, having the db I may understand if it's a jackcess issue or a configuration issue; you can send it at amadei.mar@gmail.com

     
    • Daniele Renda

      Daniele Renda - 2015-08-05

      Ok sent. Thanks very much!

       
  • Marco Amadei

    Marco Amadei - 2015-08-05

    Configuring ucanaccess as if the db were encrypted solves the issue(see the ucanaccess website about the configuration steps). Notice that with this configuration you'll be able to open both encrypted and not encrypted files.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.