[jira] [Commented] (DAEMON-281) Jsvc not loading correct shared lib for Java 7 on MacOS
[ https://issues.apache.org/jira/browse/DAEMON-281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13835283#comment-13835283 ] Helmut Nagy commented on DAEMON-281: I have the same problem using commons-daemon-1.0.15-native-src Shouldn't that be fixed? Jsvc not loading correct shared lib for Java 7 on MacOS --- Key: DAEMON-281 URL: https://issues.apache.org/jira/browse/DAEMON-281 Project: Commons Daemon Issue Type: Bug Components: Jsvc Affects Versions: 1.0.13 Environment: MacOS 10.8.2 with Java 7: $ java -version java version 1.7.0_15 Java(TM) SE Runtime Environment (build 1.7.0_15-b03) Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode) Reporter: Ian Emmons Fix For: 1.0.14, 1.0.16 Attachments: java.c.diff, java.c.diff, location.c.diff, location.c.diff When I try to run my program via jsvc, it complains: Cannot find any VM in Java Home JAVA_HOME Cannot locate JVM library file where JAVA_HOME is set to /Library/Java/JavaVirtualMachines/jdk1.7.0_15.jdk/Contents/Home The -debug switch shows jsvc searching for several shared libraries in the folder $JAVA_HOME/../Libraries/ However, with Java 1.7 this folder does not exist, and jsvc should be trying to load this: $JAVA_HOME/jre/lib/server/libjvm.dylib If I change JAVA_HOME to point to Apple's Java 1.6, then jsvc successfully finds the JVM shared library. Note: I built jsvc myself with no problems, and the output of the build makes it clear that it used the Java 7 JNI headers in the compilation. Background: Apple has deprecated Java 1.6. It not longer is present unless the user explicitly installs it, and recent OS updates have disabled the browser plugin and removed the Java control panel. Apple is pushing customers toward's Oracle's Java 1.7. -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Commented] (CONFIGURATION-560) Receiving duplicate list entries for XPATH expression on XML document via org.apache.commons.configuration.HierarchicalConfiguration.configurationsAt
[ https://issues.apache.org/jira/browse/CONFIGURATION-560?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13835540#comment-13835540 ] Oliver Heger commented on CONFIGURATION-560: Any updates here? Did this solve your problem? Can we close this ticket? Receiving duplicate list entries for XPATH expression on XML document via org.apache.commons.configuration.HierarchicalConfiguration.configurationsAt - Key: CONFIGURATION-560 URL: https://issues.apache.org/jira/browse/CONFIGURATION-560 Project: Commons Configuration Issue Type: Bug Affects Versions: 1.10 Reporter: Martin Schlegel The XPATH expression used selects only one element, but getList and configurationsAT retrieves the same element twice ... or I am simply not getting the manual :-) Please see the simple example code attached below. Fedora Linux FC 17 Java 1.7 Apache Commons Components used: commons-collections-3.2.1.jar commons-configuration-1.10.jar commons-jxpath-1.3.jar commons-lang-2.6.jar commons-logging-1.1.3.jar XML document sample.xml: ?xml version=1.0 encoding=UTF-8? config names firstname id=1 Peter /firstname firstname id=2 Michael /firstname firstname id=3 Alex/firstname /names /config Java code: import java.util.List; import org.apache.commons.configuration.ConfigurationException; import org.apache.commons.configuration.HierarchicalConfiguration; import org.apache.commons.configuration.XMLConfiguration; import org.apache.commons.configuration.tree.xpath.XPathExpressionEngine; public class xmltest { public static void main(String[] args) { XMLConfiguration XMLconfig; try { XMLconfig = new XMLConfiguration(/tmp/sample.xml); XMLconfig.load(); XMLconfig.setExpressionEngine(new XPathExpressionEngine()); System.out.println(Retrieving firstname with id=2 via configurationsAt() ...); ListHierarchicalConfiguration fields = XMLconfig.configurationsAt(names/firstname[@id='2']); for (HierarchicalConfiguration sub : fields) { System.out.println(= names/firstname[@id='2'] = + sub.getString(.)); } System.out.println(\nRetrieving firstname with id=2 via getList() ...); ListObject liObjects = XMLconfig.getList(names/firstname[@id='2']); for (Object obj : liObjects) { System.out.println(= names/firstname[@id='2'] = + (String) obj); } System.out.println(\nRetrieving firstname with id=2 via getString() ...); System.out.println(= names/firstname[@id='2'] = + XMLconfig.getString(names/firstname[@id='2'])); } catch (ConfigurationException e) { e.printStackTrace(); } } } Output: Retrieving firstname with id=2 via configurationsAt() ... = names/firstname[@id='2'] = Michael = names/firstname[@id='2'] = Michael Retrieving firstname with id=2 via getList() ... = names/firstname[@id='2'] = Michael = names/firstname[@id='2'] = Michael Retrieving firstname with id=2 via getString() ... = names/firstname[@id='2'] = Michael -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Updated] (IO-412) AllOrNothingOutputStream
[ https://issues.apache.org/jira/browse/IO-412?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] BELUGA BEHR updated IO-412: --- Attachment: PartingFileOutputStream.java AllOrNothingOutputStream Key: IO-412 URL: https://issues.apache.org/jira/browse/IO-412 Project: Commons IO Issue Type: New Feature Components: Streams/Writers Reporter: BELUGA BEHR Priority: Minor Attachments: AllOrNothingFileOutputStream.java, PartingFileOutputStream.java Feel free to include this new FileOutputstream. No unit tests yet. Looking for feedback at this point. {code} /** * This is a wrapper around a FileOutputStream. It enables a stream to be * written to a hidden file in a directory and only then renamed to the final * destination if no exceptions occur. This implementation marks the file as * hidden by pre-appending the file name with a period. If any exceptions occur * during writing, the hidden file will be deleted once close() is called. This * class takes advantage of {@link File#renameTo(File)}; therefore, many aspects * of the behavior of this class are inherently platform-dependent: The rename * operation might not be able to move a file from one filesystem to another, it * might not be atomic, and it might not succeed if a file with the destination * abstract pathname already exists. This class is most useful when the rename * operation is atomic. It is designed for the case when one process is writing * to a directory and another process is polling the directory for files to * read. */ {code} -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Commented] (IO-412) AllOrNothingOutputStream
[ https://issues.apache.org/jira/browse/IO-412?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13835620#comment-13835620 ] BELUGA BEHR commented on IO-412: Apparently I was not the first to suggest this. Woops: [IO-316] AllOrNothingOutputStream Key: IO-412 URL: https://issues.apache.org/jira/browse/IO-412 Project: Commons IO Issue Type: New Feature Components: Streams/Writers Reporter: BELUGA BEHR Priority: Minor Attachments: AllOrNothingFileOutputStream.java, PartingFileOutputStream.java Feel free to include this new FileOutputstream. No unit tests yet. Looking for feedback at this point. {code} /** * This is a wrapper around a FileOutputStream. It enables a stream to be * written to a hidden file in a directory and only then renamed to the final * destination if no exceptions occur. This implementation marks the file as * hidden by pre-appending the file name with a period. If any exceptions occur * during writing, the hidden file will be deleted once close() is called. This * class takes advantage of {@link File#renameTo(File)}; therefore, many aspects * of the behavior of this class are inherently platform-dependent: The rename * operation might not be able to move a file from one filesystem to another, it * might not be atomic, and it might not succeed if a file with the destination * abstract pathname already exists. This class is most useful when the rename * operation is atomic. It is designed for the case when one process is writing * to a directory and another process is polling the directory for files to * read. */ {code} -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Created] (IO-413) deleteQuietly(File) should try to closeOnDelete too
BELUGA BEHR created IO-413: -- Summary: deleteQuietly(File) should try to closeOnDelete too Key: IO-413 URL: https://issues.apache.org/jira/browse/IO-413 Project: Commons IO Issue Type: Improvement Components: Utilities Reporter: BELUGA BEHR Priority: Minor Something like... {code} public static boolean deleteQuietly(final File file, final boolean deleteOnExit) { boolean fileDelete = false; if (file == null) { return false; } try { if (file.isDirectory()) { cleanDirectory(file); } } catch (final Exception ignored) { } try { fileDelete = file.delete(); } catch (final Exception ignored) { return false; } if (deleteOnExit !fileDeleted) { file.deleteOnExit(); } } {code} -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Updated] (IO-413) deleteQuietly(File) should try to closeOnDelete too
[ https://issues.apache.org/jira/browse/IO-413?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] BELUGA BEHR updated IO-413: --- Description: Something like... {code} public static boolean deleteQuietly(final File file, final boolean deleteOnExit) { boolean fileDeleted = false; if (file == null) { return false; } try { if (file.isDirectory()) { cleanDirectory(file); } } catch (final Exception ignored) { } try { fileDeleted = file.delete(); } catch (final Exception ignored) { return false; } if (deleteOnExit !fileDeleted) { file.deleteOnExit(); } return fileDeleted; } {code} was: Something like... {code} public static boolean deleteQuietly(final File file, final boolean deleteOnExit) { boolean fileDeleted = false; if (file == null) { return false; } try { if (file.isDirectory()) { cleanDirectory(file); } } catch (final Exception ignored) { } try { fileDeleted = file.delete(); } catch (final Exception ignored) { return false; } if (deleteOnExit !fileDeleted) { file.deleteOnExit(); } } {code} deleteQuietly(File) should try to closeOnDelete too --- Key: IO-413 URL: https://issues.apache.org/jira/browse/IO-413 Project: Commons IO Issue Type: Improvement Components: Utilities Reporter: BELUGA BEHR Priority: Minor Something like... {code} public static boolean deleteQuietly(final File file, final boolean deleteOnExit) { boolean fileDeleted = false; if (file == null) { return false; } try { if (file.isDirectory()) { cleanDirectory(file); } } catch (final Exception ignored) { } try { fileDeleted = file.delete(); } catch (final Exception ignored) { return false; } if (deleteOnExit !fileDeleted) { file.deleteOnExit(); } return fileDeleted; } {code} -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Updated] (IO-413) deleteQuietly(File) should try to closeOnDelete too
[ https://issues.apache.org/jira/browse/IO-413?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] BELUGA BEHR updated IO-413: --- Description: Something like... {code} public static boolean deleteQuietly(final File file, final boolean deleteOnExit) { boolean fileDeleted = false; if (file == null) { return false; } try { if (file.isDirectory()) { cleanDirectory(file); } } catch (final Exception ignored) { } try { fileDeleted = file.delete(); } catch (final Exception ignored) { return false; } if (deleteOnExit !fileDeleted) { file.deleteOnExit(); } } {code} was: Something like... {code} public static boolean deleteQuietly(final File file, final boolean deleteOnExit) { boolean fileDelete = false; if (file == null) { return false; } try { if (file.isDirectory()) { cleanDirectory(file); } } catch (final Exception ignored) { } try { fileDelete = file.delete(); } catch (final Exception ignored) { return false; } if (deleteOnExit !fileDeleted) { file.deleteOnExit(); } } {code} deleteQuietly(File) should try to closeOnDelete too --- Key: IO-413 URL: https://issues.apache.org/jira/browse/IO-413 Project: Commons IO Issue Type: Improvement Components: Utilities Reporter: BELUGA BEHR Priority: Minor Something like... {code} public static boolean deleteQuietly(final File file, final boolean deleteOnExit) { boolean fileDeleted = false; if (file == null) { return false; } try { if (file.isDirectory()) { cleanDirectory(file); } } catch (final Exception ignored) { } try { fileDeleted = file.delete(); } catch (final Exception ignored) { return false; } if (deleteOnExit !fileDeleted) { file.deleteOnExit(); } } {code} -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Commented] (COMPRESS-243) Provide Compressor for classic Unix compress (maybe based on LZW codec from imaging)
[ https://issues.apache.org/jira/browse/COMPRESS-243?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13835637#comment-13835637 ] Damjan Jovanovic commented on COMPRESS-243: --- I've rewritten .Z decompression from scratch, tested it and optimized it. It doesn't really get much better than what I've got now, so I am going to commit it. No compression at the moment though, so leaving this issue open for now. Provide Compressor for classic Unix compress (maybe based on LZW codec from imaging) Key: COMPRESS-243 URL: https://issues.apache.org/jira/browse/COMPRESS-243 Project: Commons Compress Issue Type: New Feature Reporter: Stefan Bodewig Priority: Minor https://svn.apache.org/repos/asf/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/mylzw/ -- This message was sent by Atlassian JIRA (v6.1#6144)