Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
0.1
-
None
-
None
-
Windows, DerbyDB 10.6.x)
Description
Samples shipped with Aries recommend following installation instructions from http://db.apache.org/derby/papers/DerbyTut/install_software.html#derby when installing Derby.
The issue is that this guide suggests installing the latest version of Derby DB. A new version of Derby (v10.6.x) was released in May 2010 and it is incompatible with version of Derby client library (bundle) used in Aries (v10.5.3.0_1).
When running the Blog sample, in the browser I get:
java.lang.IllegalArgumentException: Failed to start database 'blogDB', see the next exception for details.
at org.apache.aries.samples.blog.persistence.jdbc.BlogPersistenceServiceImpl.createAuthor(BlogPersistenceServiceImpl.java:84)
And in the logs I can see:
C:\svn_checkouts\aries\samples\blog\blog-assembly\target\blogDB has an incompatible format with the current version of the software. The database was created by or upgraded by version 10.6.
at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)
at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
... 45 more
Caused by: ERROR XSLAN: Database at C:\svn_checkouts\aries\samples\blog\blog-assembly\target\blogDB has an incompatible format with the current version of the software. The database was created by or upgraded by version 10.6.
at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
at org.apache.derby.impl.store.raw.log.LogToFile.readControlFile(Unknown Source)
at org.apache.derby.impl.store.raw.log.LogToFile.boot(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source)
at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknown Source)
at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unknown Source)
at org.apache.derby.impl.store.raw.data.BaseDataFileFactory.bootLogFactory(Unknown Source)
at org.apache.derby.impl.store.raw.data.BaseDataFileFactory.setRawStoreFactory(Unknown Source)
at org.apache.derby.impl.store.raw.RawStore.boot(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source)
at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknown Source)
at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unknown Source)
at org.apache.derby.impl.store.access.RAMAccessManager.boot(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source)
at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknown Source)
at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unknown Source)
at org.apache.derby.impl.db.BasicDatabase.bootStore(Unknown Source)
at org.apache.derby.impl.db.BasicDatabase.boot(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source)
at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.bootService(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.startProviderService(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.findProviderAndStartService(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.startPersistentService(Unknown Source)
at org.apache.derby.iapi.services.monitor.Monitor.startPersistentService(Unknown Source)
... 45 more
Version 10.5.3.0_1 is hardcoded inside pom.xml files in many Aries subprojects. Changing the version of Derby in all of these files does not really make sense and would not bring a lot of value.
I think that a better approach is to just add a short note to all samples that use Derby and explicitly specify the recommended version of Derby to be installed when preparing env for running Aries samples.