DataNucleus JIRA is now in read-only mode. Raise any new issues in GitHub against the plugin that it applies to.
DataNucleus JIRA will remain for the foreseeable future but will eventually be discontinued

StringUtils.getDecodedStringFromURLString deals with '+' improperly

java.net.URLDecoder is a misnamed class, since it actually decodes x-www-form-urlencoded, which is different than URL encoding. StringUtils.getDecodedStringFromURLString uses this broken class and thus inherits a bug. Specifically, '+' characters in the filename get decoded as ' ' characters.

This manifests itself in NonManagedPluginRegistry if, for example, the jar is in a path that contains a plus:

java.net.URLDecoder is a misnamed class, since it actually decodes x-www-form-urlencoded, which is different than URL encoding. StringUtils.getDecodedStringFromURLString uses this broken class and thus inherits a bug. Specifically, '+' characters in the filename get decoded as ' ' characters.
This manifests itself in NonManagedPluginRegistry if, for example, the jar is in a path that contains a plus:
{noformat}
[datanucleusenhancer] Exception in thread "main" Error reading manifest file "jar:file:/home/todd/cloudera/cdh/build/hive/0.3.99+1/source/src/lib/datanucleus-enhancer-1.1.2.jar!/plugin.xml"
[datanucleusenhancer] org.datanucleus.exceptions.NucleusException: Error reading manifest file "jar:file:/home/todd/cloudera/cdh/build/hive/0.3.99+1/source/src/lib/datanucleus-enhancer-1.1.2.jar!/plugin.xml"
[datanucleusenhancer] at org.datanucleus.plugin.NonManagedPluginRegistry.registerBundle(NonManagedPluginRegistry.java:392)
[datanucleusenhancer] at org.datanucleus.plugin.NonManagedPluginRegistry.registerExtensions(NonManagedPluginRegistry.java:227)
[datanucleusenhancer] at org.datanucleus.plugin.NonManagedPluginRegistry.registerExtensionPoints(NonManagedPluginRegistry.java:159)
[datanucleusenhancer] at org.datanucleus.plugin.PluginManager.registerExtensionPoints(PluginManager.java:82)
[datanucleusenhancer] at org.datanucleus.OMFContext.<init>(OMFContext.java:164)
[datanucleusenhancer] at org.datanucleus.enhancer.DataNucleusEnhancer.<init>(DataNucleusEnhancer.java:153)
[datanucleusenhancer] at org.datanucleus.enhancer.DataNucleusEnhancer.main(DataNucleusEnhancer.java:1138)
[datanucleusenhancer] Caused by: java.util.zip.ZipException: error in opening zip file
[datanucleusenhancer] at java.util.zip.ZipFile.open(Native Method)
[datanucleusenhancer] at java.util.zip.ZipFile.<init>(ZipFile.java:114)
[datanucleusenhancer] at java.util.jar.JarFile.<init>(JarFile.java:133)
[datanucleusenhancer] at java.util.jar.JarFile.<init>(JarFile.java:97)
[datanucleusenhancer] at org.datanucleus.plugin.NonManagedPluginRegistry.registerBundle(NonManagedPluginRegistry.java:338)
{noformat}
The fix is to call urlString.replace('+', '%2B') before decoding the URL.
See: https://issues.apache.org/jira/browse/MAPREDUCE-714