eXist-db 4.2.0

# Release Notes

## v4.2.0 - June 6, 2018

eXist-db v4.2.0 has just been released. This is a minor release, which contains an important security fix, as well as several new features and bug fixes.

### Security Fixes Added avoidance for Zip Slip / Zip Exit attacks. NOTE: Developers should take care when writing their own $entry-data functions for compression:unzip or compression:untar if they are writing the file entries to persistent storage using the name of the entry from the archive; Consideration should be given to employing further exit attack protections of their own.
### Features XQuery compression:unzip and compression:untar functions have received some lower-arity signatures which should simplify use. Also some helper functions have been added: compression:no-filter, `compression:db-store-, and compression:fs-store-`. The XQuery util:eval-with-context function now allows a timeout to be set. XQSuite gains the annotation %test:assumeInternetAccess for ensuring Internet Access is XML-RPC Server character set is now configurable, defaults to UTF-8. XQueryURLRewrite challenge is now configurable, defaults to always challenging for basic authentication. Building YAJSW no longer requires `JAVAHOME if java is available on the system PATH`. ClassLoaderSource now tracks source file for easy referencing. Display the specific JVM version details when building eXist-db. Updated third-party dependencies: Apache Commons Configuration 1.17 Java 8 Functional Utilities 1.16 FasterXML Jackson 2.9.5 Jargo 0.4.14 XMLUnit 2.6.0 Eclipse Jetty 9.4.10.v20180503 * Eclipse AspectJ 1.9.1
## Performance Improvements Minor performance improvements when streaming binary files from the database. Replaced many uses of Reflection with use of Constructor lambda functions and Method Handles. Broker construction functions are now cached. In the XML:DB Remote API small transfers will not be compressed, which saves both time and space (due to compression overhead). * XML:DB Remote API no longer allocates full-chunks in memory if they are not required.
### Bug Fixes Fixed a memory leak which manifests when making heavy use of higher-order-functions in XQuery. Fixed a problem with serialization where empty namespace declarations could be lost. This applies to the XML:DB, XML-RPC and WebDAV interfaces. SAX Serialization now handles lexical CDATA sections and DTD's. Fixed a potential deadlock when validating XML documents against various types of Schema. EXPath HTTP Client now correctly adheres to the character set of the server's response. Reduced severity of log messages in the Temporary File Manager. Memory Mapping of temporary files is now handled correctly on Microsoft Windows. One eXist-db instance can no longer accidentally delete the temporary files of another instance (which may be in use). Fixed concurrent use issues with the Index Manager. Index configuration changes now cause the Index Controller to be reloaded. fn:format-date previously calculated the name of the day of the week incorrectly (off by one e.g. Monday -> Tuesday). file:mkdirs no longer incorrectly raises an error if the directory already exists. Fixed a NullPointerException when uploading large documents via the XML-RPC and XML:DB Remote APIs. Handling of Zip entry filenames are now compatible with Java 10. Fixed the behaviour of the XMLUnit functions. XQSuite now correctly displays results when an error is expected. XQSuite now shows the correct messages for %test:assertTrue and %test:assertFalse. XSuite test resources are now correctly loaded from the classpath.

### Backwards Compatibility

  • eXist-db v4.2.0 is backwards binary-compatible as far as v3.0, but not with earlier versions. Users who are upgrading should always consult the Upgrading Guide in the documentation.
  • NOTE: The version of Dashboard that was installed with eXist-db 3.6.1 (or earlier) is incompatible with eXist-db 4.0.0 and newer. If you plan to migrate your entire database to eXist-db 4.2.0, you MUST take one of the following steps to allow Dashboard to work after the upgrade:
    1. If you have not yet installed eXist-db 4.2.0, open Dashboard > Package Manager, and upgrade Dashboard to 0.4.10, or run this script in eXide or the Java Admin Client: repo:install-and-deploy("http://exist-db.org/apps/dashboard", "http://demo.exist-db.org/exist/apps/public-repo/modules/find.xql"). Then you may safely install eXist-db 4.2.0 and use Dashboard.
    2. If you install eXist-db 4.2.0 before upgrading Dashboard, run this script in eXide or the Java Admin Client: repo:install-and-deploy("http://exist-db.org/apps/dashboard", "http://demo.exist-db.org/exist/apps/public-repo/modules/find.xql"). Then you may use Dashboard.
### Downloading This Version * eXist-db v4.2.0 is available for download from GitHub. * Docker images for are available from EvolvedBinary's DockerHub. * Maven artifacts are available from our mvn-repo. * Mac users of the Homebrew package repository may acquire eXist 4.2.0 directly from there.

eXist-db 4.1.0

Release Notes

v4.1.0 - April 16, 2018

eXist-db v4.1.0 has just been released. This is a minor release, which contains important bug fixes. Updating to this release is recommended to users experiencing any of the issues below:

Important Bug Fixes

  • A long standing bug caused 0-byte XML documents to appear in database collections. The bug occurred randomly. The document showed up in the collection but was empty when opened.
  • Wrong nodes being returned as the result of an XQuery predicate using a range index. Serializing the returned sequence would show seemingly random nodes from the same document.
  • Several issues and regressions concerning handling binary resources have been fixed.

Features

  • XSuite - Proper integration between JUnit, and XQSuite and XML XQuery tests.
  • Add more Travis CI JDKs (including Java 9).
  • Support more locales for month and day names in format-date.
  • Add support for charset encoding from http response.
  • Updates:
    • Jetty 9.4.9.v20180320
    • YAJSW 12.12
    • AspectJ 1.9.0.RC4
    • cglib 3.2.6
    • j8fu 1.13
    • Jackson 2.9.4
    • jctools 2.1.2
    • log4j 2.11.0
    • Commons Compress 1.16.1
    • Apache HTTP Components 4.5.5

Performance Improvements

  • Switch to non-concurrent ByteArrayOutputStream.

Bug Fixes

  • Fix regression with binary values from files and strings.
  • Fix parsing of QNames in XQuery: The XQuery parser ignored whitespace when parsing a qname, leading to a wrong interpretation of ':' in some contexts, e.g. map constructors.
  • Close input stream in fn:json-doc.
  • Enable previously disabled tests.
  • Fix wildcard lookup in ft:query.
  • Align xml:id handling with saxon and basex.
  • Closing inputstreams and improve ByteArrayOutputStream usage.

Apps

The bundled applications of eXide, and Monex have all been updated to the latest versions.

Backwards Compatibility

  • eXist-db v4.1.0 is backwards binary-compatible as far as v3.0, but not with earlier versions. Users who are upgrading should always consult the Upgrading Guide in the documentation.
  • NOTE: The version of Dashboard that was installed with eXist-db 3.6.1 (or earlier) is incompatible with eXist-db 4.0.0 and later. If you plan to migrate your entire database to eXist-db 4.1.0, you MUST take one of the following steps to allow Dashboard to work after the upgrade:
    1. If you have not yet installed eXist-db 4.1.0, open Dashboard > Package Manager, and upgrade Dashboard to 0.4.10, or run this script in eXide or the Java Admin Client: repo:install-and-deploy("http://exist-db.org/apps/dashboard", "http://demo.exist-db.org/exist/apps/public-repo/modules/find.xql"). Then you may safely install eXist-db 4.0.0 and use Dashboard.
    2. If you install eXist-db 4.1.0 before upgrading Dashboard, run this script in eXide or the Java Admin Client: repo:install-and-deploy("http://exist-db.org/apps/dashboard", "http://demo.exist-db.org/exist/apps/public-repo/modules/find.xql"). Then you may use Dashboard.

Downloading This Version

  • eXist-db v4.1.0 is available for download from Bintray.
  • Docker images for are available from EvolvedBinary's DockerHub.
  • Maven artifacts are available from our mvn-repo.
  • Mac users of the Homebrew package repository may acquire eXist 4.1.0 directly from there.

eXist-db and Web Components - Part 1

Part one gives a short overview of Web Components and why they matter. Read article ...

eXist-db v4.0.0

# Release Notes

## v4.0.0 - February 14, 2018

eXist-db v4.0.0 has just been released. This is a major release, which contains, API changes, several new features and bug fixes.

### Features Added fn:unparsed-text, fn:unparsed-text-lines and fn:unparsed-text-available functions. Implemented HTML ASCII Case Insensitive Collation for XPath 3.1. Replaced ASCIIFoldingFilter with ICUFoldingFilter in NoDiacriticsAnalyzer for better language search support. New User Manager application shipped for the Dashboard. Updated Cache Extension Module: Now implements an LRU policy with both TTL and size options. New functions: cache:names(), cache:keys($name), and cache:destroy($name). Scheduled task option unschedule-on-exception is now exposed in conf.xml. Each thread that eXist creates is now explicitly named for easier identification. Bash Scripts now use /bin/env to locate bash. Updated third-party dependencies: Apache Commons Configuration 2 2.2 Apache Commons IO 2.6 Caffeine 2.6.1 EasyMock 3.5.1 Eclipse AspectJ 1.9.0.RC2 Eclipse Jetty 9.4.8.v20171121 IBM ICU4j 60.2 Jackson 2.9.3 Java 8 Functional Utilities 1.12 Log4J 2.10.0 XMLUnit 2.5.1 * YAJSW 12.11
## Performance Improvements * Cache Extension Module rewritten to use Caffeine.
### Bug Fixes Corrected concurrent access to Document Metadata, previously incorrect due to lazy-loading and incorrect locking. DocumentSets now always unlock all locks that they acquired. Fixed a number of issues with xs:base64Binary and xs:hexBinary returned from XQuery execution in various API's. Fixed a regression with XQuery Update insert into an empty element. Fixed a bug in the EXPath HTTP Client with connection pooling. Fixed a bad thread synchronization in JMX. Corrected invalid type empty() to empty-sequence(). Fixed overzealous locking in XML:DB Local API copy operations. Fix to Namespace handling on in-memory DOM nodes. Fixed a NullPointerException in fn:id. Fixed comparison issue with empty sequences. Fixed broker leak in Image Extension Module. Math Extension Module functions now correctly report their namespace prefix. Improved function signatures types: map to `map()` array to `array()` function to `function()` Fixed the XQuery Error Codes of several atomic value comparison operators. Improved warning and error messages during EXPath Package deployment. Many file path related fixes for building and running on Microsoft Windows platforms. Removed last Java Endorsed Library paths to support Java 9. Updated the Java AppBundler (which is used for staring eXist), to provide better Java 9 support. Build labels are now correctly calculated when building from an installed (not-git) product. * IntelliJ IDEA project files now support correct ApectJ tools.
### Apps The bundled applications of the Documentation, eXide, and Monex have all been updated to the latest versions. A new UserManager application is also shipped, which replaces the previous in-built UserManager of the Dashboard.
### API Changes Legacy XQuery draft syntax empty() has been removed. You should now use the spec. compliant syntax empty-sequence(). The previously numeric type was renamed to xs:numeric. numeric is now marked as legacy. The legacy Atom module (org.exist.atom) has been removed. Sending an invalid XQuery to the RESTServer now correctly returns HTTP 400 Bad Request, instead of HTTP 202 Accepted. XMLDB API interfaces have been renamed to be more consistent (e.g. EXistXQueryService) Locks are now re-acquired by a Transaction rather than ownership transferred.

### Backwards Compatibility

  • eXist-db v4.0.0 is backwards binary-compatible as far as v3.0, but not with earlier versions. Users who are upgrading should always consult the Upgrading Guide in the documentation.
  • NOTE: The version of Dashboard that was installed with eXist-db 3.6.1 (or earlier) is incompatible with eXist-db 4.0.0. If you plan to migrate your entire database to eXist-db 4.0.0, you MUST take one of the following steps to allow Dashboard to work after the upgrade:
    1. If you have not yet installed eXist-db 4.0.0, open Dashboard > Package Manager, and upgrade Dashboard to 0.4.10, or run this script in eXide or the Java Admin Client: repo:install-and-deploy("http://exist-db.org/apps/dashboard", "http://demo.exist-db.org/exist/apps/public-repo/modules/find.xql"). Then you may safely install eXist-db 4.0.0 and use Dashboard.
    2. If you install eXist-db 4.0.0 before upgrading Dashboard, run this script in eXide or the Java Admin Client: repo:install-and-deploy("http://exist-db.org/apps/dashboard", "http://demo.exist-db.org/exist/apps/public-repo/modules/find.xql"). Then you may use Dashboard.
### Downloading This Version * eXist-db v4.0.0 is available for download from GitHub. * Docker images for are available from EvolvedBinary's DockerHub. * Maven artifacts are available from our mvn-repo. * Mac users of the Homebrew package repository may acquire eXist 4.0.0 directly from there.

eXist-db v3.6.1

v3.6.1 - January 03, 2018

eXist-db v3.6.1 has just been released. This is a hotfix release, which contains bug fixes for several important issues discovered since eXist-db v3.6.0.

We recommend that all users of eXist 3.6.0 should upgrade to eXist 3.6.1.

Bug fixes

  • Fixed issue where the package manager wrote non-well-formed XML that caused problems during backup/restore. #1620
  • Fixed namespace prefix for attributes and namespace nodes.
  • Made sure the localName of a in memory element is correctly obtained under various namespace declaration conditions
  • Fix for NPE in org.exist.xquery.functions.fn.FunId #1642
  • Several atomic comparisons raise wrong error code #1638
  • General comparison to empty sequence sometimes raises an error #1639
  • Warn if no <target> is found in an EXPath packages's repo.xml

Backwards Compatibility

  • eXist-db v3.6.1 is backwards binary-compatible as far as v3.0, but not with earlier versions. Users upgrading from previous versions should perform a full backup and restore to migrate their data.

Downloading This Version

eXist-db v3.6.1 is available for download from GitHub. Maven artifacts for eXist-db v3.6.1 are available from our mvn-repo. Mac users of the Homebrew package repository may acquire eXist 3.6.1 directly from there.