DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=28308>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=28308 ExtendedPropertiesReader broken on NFS files ------- Additional Comments From [EMAIL PROTECTED] 2004-04-10 09:14 ------- I've read your comments and tried to narrow the problem down some more. I've created two new Eclipse (3.0 M6) projects, one locally and one on the NFS. The velocity jar resides in each project dir and is included as an external JAR in the 'java build path -> libraries' settings in the project preferences. The program code is as follows: //////////////////// import java.io.File; import java.io.FileInputStream; import java.util.Properties; import org.apache.velocity.app.VelocityEngine; public class Propstest { public static void main(String[] args) { Properties props = new Properties(); try { props.load( new FileInputStream(new File("test.properties")) ); } catch (Exception exc) { System.out.println(exc.getMessage()); } VelocityEngine vEngine= new VelocityEngine(); try { vEngine.init( "test.properties" ); } catch (Exception exc) { System.out.println(exc.getMessage()); } } } //////////////// The test.properties file resides in each project dir and includes only one line with the statement a=b and a Unix style \n newline. The props.load() command works in both projects, however to my surprise Velocity now always throws the exception, no matter whether I run locally or on the NFS. I've attached the stack below. Also note, that this exception is not caught by the try/catch statement which wraps the init() command. Thanks for your help again. Thread [main] (Suspended (exception NullPointerException)) ExtendedProperties$PropertiesReader.readProperty() line: 250 [local variables unavailable] ExtendedProperties.load(InputStream, String) line: 467 ExtendedProperties.load(InputStream) line: 429 ExtendedProperties.<init>(String, String) line: 370 ExtendedProperties.<init>(String) line: 352 RuntimeInstance.init(String) line: 453 VelocityEngine.init(String) line: 135 Propstest.main(String[]) line: 19 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
