This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
hi cheryl:i think i fixed this problem in version 4.3 on 6/25/2012. can you download the current version and try again? thanks
John On 12/10/2012 10:55 AM, Cheryl Morse wrote:
I am currently using the toolsUI-4.2 library. I also tried toolsUI-4.3. On Mon, Dec 10, 2012 at 12:52 PM, John Caron <address@hidden <mailto:address@hidden>> wrote: On 12/10/2012 10:43 AM, Cheryl Morse wrote:Hello, I have an application that has been using the prefs package to store user preferences in an XML file. The code works well when using Java 1.6 but it does not work with Java 1.7. The application generates the following errors when attempting to read in the XML file: #ERROR beanDecoder; beanObject key = frameSize java.lang.ArrayIndexOutOfBoundsException: 0 at java.beans.XMLDecoder.readObject(Unknown Source) at ucar.util.prefs.XMLStore$MySaxHandler.startBeanObject(XMLStore.java:390) at ucar.util.prefs.XMLStore$MySaxHandler.startElement(XMLStore.java:322) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(Unknown Source) at javax.xml.parsers.SAXParser.parse(Unknown Source) at ucar.util.prefs.XMLStore.<init>(XMLStore.java:192) at ucar.util.prefs.XMLStore.createFromFile(XMLStore.java:110) Do you have any idea why this is occurring? Does the package not work with Java 1.7? Thank you! Cheryl Morsewhat version of the prefs library are you using?