From: Brian W. <bwe...@xb...> - 2005-11-30 19:02:29
|
On Wed, 30 Nov 2005, Ian Kallen wrote: > OK, thanks for the usage example with update, that helped. I have code > now that runs and passes its tests. A peculiar thing seems evident > from my experience with this, the dnsjava 2.0.0 classes appear to be > sensitive to how the classes are loaded. I found this when the > simplest thing worked in a command line class (in public static void > main), worked from the command line invoked by a JUnit TestCase but > failed with NullPointerExceptions when the same TestCase was run by > the the maven (v1.0.2) build system I had. A typical stacktrace would > look like this: > > [junit] java.lang.NullPointerException > [junit] at org.xbill.DNS.Record.getTypedObject(Record.java:64) > [junit] at org.xbill.DNS.Record.getEmptyRecord(Record.java:87) > [junit] at org.xbill.DNS.Record.fromString(Record.java:503) > [junit] at org.xbill.DNS.Record.fromString(Record.java:527) > [junit] at org.xbill.DNS.Update.add(Update.java:136) > [junit] at org.xbill.DNS.Update.replace(Update.java:253) > > Anway, I worked around it by throwing together an ant build system for > my project and everything worked. Weird. There have definitely been some problems relating to class loading, and I think they should all be solved in 2.0.1 when it's released. Brian |