cancel
Showing results for 
Search instead for 
Did you mean: 

Ultralite Error when starting up

2,717

We have a mobile sync app deployed using ASA 12 and UltraJ. It runs on a laptop and is written in Java. Everything works pretty good except that every once in a while we get a call from a user who get an Array Index out of Bounds error when starting the app. We ask them to send the UDB file to us and in every instance of this problem occurring we notice the size of the UDB file is huge. The issue is that when they start the program it says:

QL Anywhere UltraLiteJ Database Unload Utility Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: -5 at com.ianywhere.ultralitej12.implementation.PsCache.unlock(Unknown Source) at com.ianywhere.ultralitej12.implementation.PsPersist.pendingRowRead(Unknown Source) at com.ianywhere.ultralitej12.implementation.PsUnpack.unpackRow(Unknown Source) at com.ianywhere.ultralitej12.implementation.PsTransactionUpdate.unpack(Unknown Source) at com.ianywhere.ultralitej12.implementation.PsPersist.getTransactions(Unknown Source) at com.ianywhere.ultralitej12.implementation.PsPersist.openStore(Unknown Source) at com.ianywhere.ultralitej12.implementation.PsPersist.connectDatabase(Unknown Source) at com.ianywhere.ultralitej12.implementation.JrConfigPersistent.connectDatabase(Unknown Source) at com.ianywhere.ultralitej12.implementation.DbMgr.Connect(Unknown Source) at com.ianywhere.ultralitej12.DatabaseManager.connect(Unknown Source) at com.ianywhere.ultralitej.pgmsutility.ULjUnload.main(Unknown Source)

Does anyone know what is causing this to happen? Also, what is the best strategy for managing the size of the DB? They just seem to grow and grow. I know some growth is not bad but it doesn't appear to re-use any of the space. It just keeps getting bigger. We have taken an approach to automatically unload and reload the DB when we see it getting too big. This would be done when the user logs in. Is this a good approach or is there something wrong in our code that makes it grow. Should you ever have to unload reload Ultralite DBs?

Accepted Solutions (0)

Answers (1)

Answers (1)

philippefbertrand
Participant
0 Kudos

This type of error is indicative of a db corruption. Do you have the latest EBF? What is the version and build number of UltraLiteJ you are using?

To check the manifest of the jar file you are using:

jar xf UltraLIteJ12.jar META-INF/MANIFEST.MF
cat META-INF\\MANIFEST.MF
rm META-INF\\MANIFEST.MF

Ideal is that you contact support with one of your large databases and one that is corrupt.