General Does this work on Linux/Unix?

Yep, Jackcess is pure Java. It will work on any Java Virtual Machine (1.5+).

What Access formats does it support?

As of the 1.2.4 release, Jackcess supports Access database versions 2000-2010 read/write and Access 97 read-only.

Are password protected databases supported?

Basic password protection (Access 2003 or earlier) is merely software enforced, and Jackcess does not do any password checking at this point. So, a password protected database can be used the same as any other.

What sorts of input/data validation does Jackcess support?

Data validation in Access is controlled via a variety of mechanisms, not all of which are supported by Jackces. See the table below for details:

Data Validation Type Support
Data types (Text, Number, etc.) Yes
Field sizes (min/max length, precision, etc.) Yes
Unique constraints (indexes) Yes
"Enforce Referential Integrity" (aka foreign key constraints) Off by default, optional support available in 1.2.10 release.
Field/Table Properties (Validation rules, Input masks, etc) No
How is this different from mdbtools?

We want to give a lot of credit to mdbtools. They have been around much longer than Jackcess, and, along with POI, inspired us that a project like this could be done. mdbtools is written in C. There is a Java port of it, but if you've ever read or used a Java port of a C library, you can appreciate the difference between such a library and one written from scratch in Java.

At the time of this writing, mdbtools could only read Access databases. Jackcess can also write to them. According to their web site, "Write support is currently being worked on and the first cut is expected to be included in the 0.6 release." This status hasn't changed since we first started work on Jackcess.

mdbtools supports Access 97 databases, which Jackcess does not. The Java port of mdbtools also includes an implementation of a small subset of the JDBC APIs. Jackcess does not currently, but a pure Java JDBC driver for Access could certainly be written on top of Jackcess.

This looks like a logical addition to POI. Why not integrate with that project?

POI is released under The Apache License. Jackcess is released under The GNU Lesser General Public License. The Apache license allows closed-source and/or commercial forks. The LGPL does not. If you change or enhance Jackcess, you must contribute your changes back to the project.

I'm using the JDBC/ODBC bridge. Why should I try Jackcess?

  • Portability - With Jackcess, your app has one less dependency on Windows.
  • Speed - We had an app that used the ODBC bridge to write data to an Access database. When we switched it over to use Jackcess, it was 5 times faster.
  • Stability - With large amounts of data, we found the ODBC brige to be pretty unreliable.
  • Simplicity - With Jackcess, there is no ODBC configuration to set up.

What version of the JDK does this require?

Version 1.0 requires JDK 1.4 or higher. The version in SVN trunk and all future releases will require JDK 1.5 or higher.

However, some users have contributed patches to make later versions compatible with JDK 1.4. Please check the contributions/ directory in the source repository for any such patches. Note that any code in this directory is untested and unsupported, so please use at your own risk and do not file bugs based on that code.

Why do I get a NoClassDefFoundError?

Probably because you're missing a jar that Jackcess depends on from your classpath. Take a look at the dependencies list. The "compile" and "runtime" dependencies are necessary for using Jackcess in your application. One great place to track down these dependencies is in the Ibiblio Maven Repository.

Why is jackcess so slow for large updates?

In general, the focus of Jackcess is functionality, not speed. However, one major speed factor is whether or not all writes are automatically forced to disk. By default, "autoSync" is enabled, which keeps the database file in a more consistent state, but can be very slow for large updates. Disabling "autoSync" can dramatically increase update speed, but exceptions during update can leave the file in an unusable state (when disabled, you can call Database.flush() manually to force updates to disk). Modifying this option essentially trades off speed for recoverability.

Additionally, adding rows in batches instead of one at a time can increase insert speed.

Finally, always make sure you are using the latest release, as speed improvements are happening periodically.

Why am I getting an IOException with the message "unmapped string index value"?

Update: As of the 1.1.21 release, the text index handling supports the entire Basic Multilingual Plane 0 (i.e. any unicode character 0x0000-0xFFFF). Consequently table names can (as of this release) contain any character in this character set. Therefore, the rest of this answer should no longer be an issue, but keeping it here for reference.

Jackcess cannot currently update a text column index with values which contain non-ascii characters. This situation often arises when tables are created with names which contain international characters. Access stores the table names in another table which has an index on the table name column. The index encoding is not simple to reverse engineer, so it is not likely that Jackcess will support this anytime soon.

Update: As of the 1.1.13 release, the text index handling supports the entire ISO-8859-1 character set. Consequently table names can (as of this release) contain any character in this character set.

Some suggestions (for older releases):

  • Use only ascii (or ISO-8859-1 as of 1.1.13) characters in table names if at all possible
  • If tables with international characters are required, create the tables using Access, then update the tables using jackcess.
  • For indexes on user created tables, populate the table without indexes in jackcess, then add the index using Access.
Why am I getting an UnsupportedOperationException (or IOException) when updating an indexed table? Previously index update support only handled tables with small numbers of rows. When the index size limit was reached an UnsupportedOperationException (or possibly an IOException) was thrown. As of the 1.1.14 release, experimental, optional large index support has been added. As of the 1.2.0 release, large index support is enabled by default. This support is enabled/disabled via a few different means. Please see the Database javadocs for details on enabling/disabling large index support. Does Jackcess provide a JDBC driver for Microsoft Access databases? Unfortunately, no. The Jackcess API is a direct implementation of the features available for interacting with an Access database. There is currently no implementation of the JDBC API included with the Jackcess library. While this library would be a great foundation for a JDBC driver, implementing the JDBC API is currently outside the scope of this project. There have been a few attempts to use Jackcess to build JDBC drivers for Access databases, but none of the projects seem to have progressed very far before becoming inactive. Can Jackcess execute SQL queries? As of the 1.1.19 release, Jackcess has the ability to read the Queries saved in an Access database (i.e. interpret the data stored in the system Queries table). However, Jackcess does not have the ability to execute these Queries. See this question for more details regarding JDBC and Jackcess. Why do I get an OutOfMemoryError or NullPointerException when creating a new database on the Android platform?

There are 2 issues which need to be dealt with when using Jackcess on the Android platform. The first is that non-class resources need to be in a special location. The second is that the nio implementation has some "weaknesses".

The following steps will make Jackcess compatible with the Android platform.

  • Set the system property "com.healthmarketscience.jackcess.brokenNio=true"
  • Set the system property "com.healthmarketscience.jackcess.resourcePath=/res/raw/"
  • Copy the *.txt, *.mdb, and *.accdb files from the "com/healthmarketscience/jackcess/" directory in the Jackcess jar to the "/res/raw" Android application directory.
  • Before executing any Jackcess code, set the current Thread's context classloader, e.g. "Thread.currentThread().setContextClassLoader(Database.class.getClassLoader())".

Why do I get an UnsupportedCodecException with the message "Decoding not supported"? This exception indicates that the Access database you are attempting to open is "encrypted" using one of the various forms of encryption utilized by Microsoft. Due to various constraints, the Jackcess project does not directly support decrypting Access databases, but does, however, support plugging in encryption support using a custom CodecProvider. The separate Jackcess Encrypt project contains the CryptCodecProvider, which implements the Jackess CodecProvider interface and supports some forms of Access database encryption. Who is Health Market Science?

HMS is a small company located in suburban Philadelphia. Using proprietary matching and consolidation software, HMS scientifically manufactures the most comprehensive and accurate healthcare data sets in the market today.

It doesn't work!

Ok, that wasn't a question, but we'll try to respond anyway. :) As you might imagine, it's kind of hard to test, simply by its nature. There are bugs that we are aware of, and certainly many more that we are not. If you find what looks like a bug, please report it. Even better, fix it, and submit a patch.