[Configuration] XMLConfiguration getFile() throws nullpointerexception

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Configuration] XMLConfiguration getFile() throws nullpointerexception

Mi Zhang
Hi,

I am using commons-configuration-20050414 nightly build. I am getting
nullpointerexception when I tried to retrieve the file, e.g.
      XMLConfiguration frameworkConfig = new XMLConfiguration();
      frameworkConfig.load("myconfig.xml");
      File file = frameworkConfig.getFile();

the line  frameworkConfig.getFile() will throw NPE.

Please help or confirm if it's a bug.

thanks,
Mi


The Distillery Pty Limited
ABN 69 080 932 467
PO Box 940, Dickson ACT 2602, AUSTRALIA
Phone: +61 2 6272 0200
Fax: +61 2 6262 5151
Web: www.thedistillery.com.au

The Distillery Inc
2111 Wilson Blvd, Suite 700,
Arlington, Virginia 22201, USA
Phone: +1 703 351 5082
Web: www.thedistilleryinc.com

The Distillery (Europe) Ltd
53 Chandos Place London WC2N 4HS
Tel: +44 (0)20 7812 6692
Fax: +44 (0)20 7812 6677


---------------------------------------------------------------------
The information contained in this email and any files attached may be
confidential and/or copyrighted information of The Distillery, Third
Parties and/or the intended recipient and may be the subject of legal
privilege or public interest immunity. You may only reproduce or
distribute the material if you are expressly authorised by us to do
so. If you are not the intended recipient, any use, disclosure,
copying, circulation, forwarding, printing or publication of this
message or attached files is strictly forbidden.

If you have received this document in error or are not an intended
recipient, please notify the sender and delete from your Inbox and/or
system.

The Distillery does not represent or warrant that files attached to
this e-mail are free from computer viruses or other defects and
liability is limited to the resupply (or cost of resupply) of the
attached files.
---------------------------------------------------------------------
Reply | Threaded
Open this post in threaded view
|

Re: [Configuration] XMLConfiguration getFile() throws nullpointerexception

Oliver Heger
This seems to be a bug. Could you please open a bugzilla ticket for this
and provide some additional information (the complete stack trace, from
where you load the config file [class path, absolute or relative path])?

Thanks.
Oliver

Mi Zhang wrote:

> Hi,
>
> I am using commons-configuration-20050414 nightly build. I am getting
> nullpointerexception when I tried to retrieve the file, e.g.
>       XMLConfiguration frameworkConfig = new XMLConfiguration();
>       frameworkConfig.load("myconfig.xml");
>       File file = frameworkConfig.getFile();
>
> the line  frameworkConfig.getFile() will throw NPE.
>
> Please help or confirm if it's a bug.
>
> thanks,
> Mi
>
>
> The Distillery Pty Limited
> ABN 69 080 932 467
> PO Box 940, Dickson ACT 2602, AUSTRALIA
> Phone: +61 2 6272 0200
> Fax: +61 2 6262 5151
> Web: www.thedistillery.com.au
>
> The Distillery Inc
> 2111 Wilson Blvd, Suite 700,
> Arlington, Virginia 22201, USA
> Phone: +1 703 351 5082
> Web: www.thedistilleryinc.com
>
> The Distillery (Europe) Ltd
> 53 Chandos Place London WC2N 4HS
> Tel: +44 (0)20 7812 6692
> Fax: +44 (0)20 7812 6677
>
>
> ---------------------------------------------------------------------
> The information contained in this email and any files attached may be
> confidential and/or copyrighted information of The Distillery, Third
> Parties and/or the intended recipient and may be the subject of legal
> privilege or public interest immunity. You may only reproduce or
> distribute the material if you are expressly authorised by us to do
> so. If you are not the intended recipient, any use, disclosure,
> copying, circulation, forwarding, printing or publication of this
> message or attached files is strictly forbidden.
>
> If you have received this document in error or are not an intended
> recipient, please notify the sender and delete from your Inbox and/or
> system.
>
> The Distillery does not represent or warrant that files attached to
> this e-mail are free from computer viruses or other defects and
> liability is limited to the resupply (or cost of resupply) of the
> attached files.
> ---------------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [Configuration] XMLConfiguration getFile() throws nullpointerexception

Oliver Heger-2
Okay, I could reproduce the problem and opened a bugzilla ticket:

http://issues.apache.org/bugzilla/show_bug.cgi?id=35807

I think I know what causes the problem, so I hope this will be solved soon.

Oliver

Oliver Heger wrote:

> This seems to be a bug. Could you please open a bugzilla ticket for
> this and provide some additional information (the complete stack
> trace, from where you load the config file [class path, absolute or
> relative path])?
>
> Thanks.
> Oliver
>
> Mi Zhang wrote:
>
>> Hi,
>>
>> I am using commons-configuration-20050414 nightly build. I am getting
>> nullpointerexception when I tried to retrieve the file, e.g.
>>       XMLConfiguration frameworkConfig = new XMLConfiguration();
>>       frameworkConfig.load("myconfig.xml");
>>       File file = frameworkConfig.getFile();
>>
>> the line  frameworkConfig.getFile() will throw NPE.
>>
>> Please help or confirm if it's a bug.
>>
>> thanks,
>> Mi
>>
>>
>> The Distillery Pty Limited
>> ABN 69 080 932 467
>> PO Box 940, Dickson ACT 2602, AUSTRALIA
>> Phone: +61 2 6272 0200
>> Fax: +61 2 6262 5151
>> Web: www.thedistillery.com.au
>>
>> The Distillery Inc
>> 2111 Wilson Blvd, Suite 700,
>> Arlington, Virginia 22201, USA
>> Phone: +1 703 351 5082
>> Web: www.thedistilleryinc.com
>>
>> The Distillery (Europe) Ltd
>> 53 Chandos Place London WC2N 4HS
>> Tel: +44 (0)20 7812 6692
>> Fax: +44 (0)20 7812 6677
>>
>>
>> ---------------------------------------------------------------------
>> The information contained in this email and any files attached may be
>> confidential and/or copyrighted information of The Distillery, Third
>> Parties and/or the intended recipient and may be the subject of legal
>> privilege or public interest immunity. You may only reproduce or
>> distribute the material if you are expressly authorised by us to do
>> so. If you are not the intended recipient, any use, disclosure,
>> copying, circulation, forwarding, printing or publication of this
>> message or attached files is strictly forbidden.
>>
>> If you have received this document in error or are not an intended
>> recipient, please notify the sender and delete from your Inbox and/or
>> system.
>>
>> The Distillery does not represent or warrant that files attached to
>> this e-mail are free from computer viruses or other defects and
>> liability is limited to the resupply (or cost of resupply) of the
>> attached files.
>> ---------------------------------------------------------------------
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]