You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Michael Cugini <mi...@escapemg.com> on 2008/04/04 02:35:08 UTC
Problem initializing XMLPropertyListConfiguration
Hey all,
I've been recently attempting to parse iTunes music library xml plists,
and have run into an issue. When loading an
XMLPropertyListConfiguration the following exception is thrown:
org.apache.commons.configuration.ConfigurationException: Unable to
parse the configuration file
at
org.apache.commons.configuration.plist.XMLPropertyListConfiguration.load(XMLPropertyListConfiguration.java:249)
.....
Caused by: java.lang.NumberFormatException: For input string:
"3290007019"
at
java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Integer.parseInt(Integer.java:459)
at java.lang.Integer.<init>(Integer.java:620)
The offending line in the XML file is:
<key>Play Date</key><integer>3290007019</integer>
3290007019 is outside of the range of an int, so I'm guessing that is
the issue. Is this a case of a malformed plist, or a bug
XMLPropertyListConfiguration?
Is there any way I can solve this?
Thanks in advance
--
Michael Cugini
Software Engineer
Escape Media Group, Inc.
201 SE 2nd Ave. Ste 209
Gainesville, FL 32601
Cell: (941) 504-0479
http://www.escapemg.com/
http://www.grooveshark.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
Re: Problem initializing XMLPropertyListConfiguration
Posted by Michael Cugini <mi...@escapemg.com>.
Thanks Emmanuel, I was unsure if the spec limited the integer size or not.
Michael Cugini
Emmanuel Bourg wrote:
>
> Hi Michael,
>
> I think that's a bug, the plist spec doesn't limit the size of the
> integer. We should probably parse the value as a Long or a BigInteger.
>
> Get a nightly build in a couple of days, I'll fix this issue.
>
> Emmanuel Bourg
>
>
>
>
> Michael Cugini a écrit :
>> Hey all,
>>
>> I've been recently attempting to parse iTunes music library xml plists,
>> and have run into an issue. When loading an
>> XMLPropertyListConfiguration the following exception is thrown:
>>
>> org.apache.commons.configuration.ConfigurationException: Unable to
>> parse the configuration file
>> at
>> org.apache.commons.configuration.plist.XMLPropertyListConfiguration.load(XMLPropertyListConfiguration.java:249)
>>
>> .....
>> Caused by: java.lang.NumberFormatException: For input string:
>> "3290007019"
>> at
>> java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
>>
>> at java.lang.Integer.parseInt(Integer.java:459)
>> at java.lang.Integer.<init>(Integer.java:620)
>>
>> The offending line in the XML file is:
>> <key>Play Date</key><integer>3290007019</integer>
>>
>> 3290007019 is outside of the range of an int, so I'm guessing that is
>> the issue. Is this a case of a malformed plist, or a bug
>> XMLPropertyListConfiguration?
>> Is there any way I can solve this?
>>
>> Thanks in advance
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/Problem-initializing-XMLPropertyListConfiguration-tp16505252p16568727.html
Sent from the Commons - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
Re: Problem initializing XMLPropertyListConfiguration
Posted by Emmanuel Bourg <eb...@apache.org>.
Hi Michael,
I think that's a bug, the plist spec doesn't limit the size of the
integer. We should probably parse the value as a Long or a BigInteger.
Get a nightly build in a couple of days, I'll fix this issue.
Emmanuel Bourg
Michael Cugini a écrit :
> Hey all,
>
> I've been recently attempting to parse iTunes music library xml plists,
> and have run into an issue. When loading an
> XMLPropertyListConfiguration the following exception is thrown:
>
> org.apache.commons.configuration.ConfigurationException: Unable to
> parse the configuration file
> at
> org.apache.commons.configuration.plist.XMLPropertyListConfiguration.load(XMLPropertyListConfiguration.java:249)
>
> .....
> Caused by: java.lang.NumberFormatException: For input string:
> "3290007019"
> at
> java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
>
> at java.lang.Integer.parseInt(Integer.java:459)
> at java.lang.Integer.<init>(Integer.java:620)
>
> The offending line in the XML file is:
> <key>Play Date</key><integer>3290007019</integer>
>
> 3290007019 is outside of the range of an int, so I'm guessing that is
> the issue. Is this a case of a malformed plist, or a bug
> XMLPropertyListConfiguration?
> Is there any way I can solve this?
>
> Thanks in advance
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
Re: Problem initializing XMLPropertyListConfiguration
Posted by Romualdo Rubens de Freitas <ro...@gmail.com>.
Hi Michael,
Maybe it's not a bug. If you read carefully the value in the <integer>
element seems to be a date value.
So, as Emmanuel suggests, you can read it as a long value because, in
Java, date values are stored
as a long value inside java.util.Date class or you can construct a
java.util.GregorianCalendar object and
call its setTimeInMillis() method passing in the long value.
Regards,
Romualdo Rubens de Freitas
2008/4/3 Michael Cugini <mi...@escapemg.com>:
> Hey all,
>
> I've been recently attempting to parse iTunes music library xml plists, and
> have run into an issue. When loading an XMLPropertyListConfiguration the
> following exception is thrown:
>
> org.apache.commons.configuration.ConfigurationException: Unable to parse
> the configuration file
> at
> org.apache.commons.configuration.plist.XMLPropertyListConfiguration.load(XMLPropertyListConfiguration.java:249)
> .....
> Caused by: java.lang.NumberFormatException: For input string:
> "3290007019"
> at
> java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
> at java.lang.Integer.parseInt(Integer.java:459)
> at java.lang.Integer.<init>(Integer.java:620)
>
> The offending line in the XML file is:
> <key>Play Date</key><integer>3290007019</integer>
>
> 3290007019 is outside of the range of an int, so I'm guessing that is the
> issue. Is this a case of a malformed plist, or a bug
> XMLPropertyListConfiguration?
> Is there any way I can solve this?
>
> Thanks in advance
>
> --
> Michael Cugini
> Software Engineer Escape Media Group, Inc. 201 SE 2nd Ave. Ste 209
> Gainesville, FL 32601 Cell: (941) 504-0479 http://www.escapemg.com/
> http://www.grooveshark.com/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>
--
Romualdo Rubens de Freitas
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org