You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2006/01/04 12:55:28 UTC

DO NOT REPLY [Bug 38117] New: - XMLConfiguration contructor not loading the resource

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=38117>.
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=38117

           Summary: XMLConfiguration contructor not loading the resource
           Product: Commons
           Version: 1.2 Final
          Platform: All
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Configuration
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: abhaykale@rediffmail.com


Problem:
XMLConfiguration(URL url) constructor does not load the the resource specified
in argument. 

Solution:
XMLConfiguration(URL url) constructor must call load(url) method instead of
load() method.


Description:
In an web application,
If the resource mentioned is in somex.jar file and the ConfigurationManager
which loads the resource is in another.jar file. Then using XMLConfiguration(URL
url) constructor, it gives exception 'ConfigurationException'. 

But if we do as follows.
(new XMLConfiguration()).load(url), then it loads the resource properly.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


DO NOT REPLY [Bug 38117] - [configuration] XMLConfiguration contructor not loading the resource

Posted by bu...@apache.org.
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=38117>.
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=38117


ebourg@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|XMLConfiguration contructor |[configuration]
                   |not loading the resource    |XMLConfiguration contructor
                   |                            |not loading the resource




-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


DO NOT REPLY [Bug 38117] - [configuration] XMLConfiguration contructor not loading the resource

Posted by bu...@apache.org.
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=38117>.
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=38117





------- Additional Comments From abhaykale@rediffmail.com  2006-01-09 06:05 -------
(In reply to comment #1)
> In theory, load(URL) should be called by load() if the URL has been correctly
> set. I think, it is possible that load() is called before initialization is
> complete. Can you provide a stack trace of the exception thrown by the
> constructor? Maybe this helps us to understand what happens here.
> 
> Thanks.

Exception detailed message is :
org.apache.commons.configuration.ConfigurationException: Cannot locate
configuration source ExceptionHandler.xml
CAUSE is null
STACKTRACE is null 

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


DO NOT REPLY [Bug 38117] - [configuration] XMLConfiguration contructor not loading the resource

Posted by bu...@apache.org.
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=38117>.
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=38117





------- Additional Comments From oliver.heger@t-online.de  2006-01-05 19:18 -------
In theory, load(URL) should be called by load() if the URL has been correctly
set. I think, it is possible that load() is called before initialization is
complete. Can you provide a stack trace of the exception thrown by the
constructor? Maybe this helps us to understand what happens here.

Thanks.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


DO NOT REPLY [Bug 38117] - [configuration] XMLConfiguration contructor not loading the resource

Posted by bu...@apache.org.
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=38117>.
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=38117





------- Additional Comments From oliver.heger@t-online.de  2006-01-16 21:40 -------
(In reply to comment #2)
> 
> Exception detailed message is :
> org.apache.commons.configuration.ConfigurationException: Cannot locate
> configuration source ExceptionHandler.xml
> CAUSE is null
> STACKTRACE is null 

Are you sure the stack trace is null? This is not very useful :-(

Okay, I stepped through the code, but could not find anything, which seems
obviously wrong. The only location where the exception you receive is thrown is
in AbstractFileConfiguration.load(String). This method should not be called at
all when the constructor that takes an URL is used!

Are you able to load configuration files from URLs that point to the file system
or to the same jar file (i.e. does the URL-constructor work for easy cases)? In
our unit tests such cases do work.

Last, but not least: Do you really use the newest version of configuration
(1.2)? In 1.1 there were some bugs related to file based configurations.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


DO NOT REPLY [Bug 38117] - [configuration] XMLConfiguration contructor not loading the resource

Posted by bu...@apache.org.
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=38117>.
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=38117


oliver.heger@t-online.de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO




------- Additional Comments From oliver.heger@t-online.de  2006-01-29 20:23 -------
Does the problem still persist, even with the newest version of Commons
Configuration?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


DO NOT REPLY [Bug 38117] - [configuration] XMLConfiguration contructor not loading the resource

Posted by bu...@apache.org.
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=38117>.
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=38117


oliver.heger@t-online.de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |RESOLVED
         Resolution|                            |WORKSFORME




------- Additional Comments From oliver.heger@t-online.de  2006-03-10 15:51 -------
Closing this issue because lack of feedback. Please reopen if the problem
persists and you can provide more details.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org