You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Felix Meschberger (JIRA)" <ji...@apache.org> on 2007/07/06 15:39:04 UTC

[jira] Created: (FELIX-322) Registering a PersistenceManager service causes a ClassCastException

Registering a PersistenceManager service causes a ClassCastException
--------------------------------------------------------------------

                 Key: FELIX-322
                 URL: https://issues.apache.org/jira/browse/FELIX-322
             Project: Felix
          Issue Type: Bug
          Components: Configuration Admin
            Reporter: Felix Meschberger
             Fix For: 1.0.0


When a Configuration object is requested and has to be loaded, the ConfigurationManager asks for the list of current PersistenceManagers. If a service has been registered, this list is being built and sorted according to  service.cmRanking property of the registered PersistenceManagers. The Comparator used assumes the objects to be compared to be ServiceReference instances (to get at the service properties) while the actual objects are the services themselves. Hence the ClassCastException and hence a side effect of not being able to access configuration any more.

Thanks to Tom Remoleur for reporting this.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-322) Registering a PersistenceManager service causes a ClassCastException

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-322?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12510707 ] 

Felix Meschberger commented on FELIX-322:
-----------------------------------------

There were actually more issues with ConfigurationManager and Comparator than met the eyes:

  > The Comparator did not work at all correctly with the order flag
  > The service.cmRanking property was used for comparison whereas the service.ranking property should have been used
  > The fallback check for the service.id property did not work as the service ID is a Long not an Integer, which was assumed
  > The ServiceTracker count was never updated locally leading to too much service reacquisitions
  > And of course the class cast issue reported by Tom

Fixed in Rev. 553930

> Registering a PersistenceManager service causes a ClassCastException
> --------------------------------------------------------------------
>
>                 Key: FELIX-322
>                 URL: https://issues.apache.org/jira/browse/FELIX-322
>             Project: Felix
>          Issue Type: Bug
>          Components: Configuration Admin
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>             Fix For: 1.0.0
>
>
> When a Configuration object is requested and has to be loaded, the ConfigurationManager asks for the list of current PersistenceManagers. If a service has been registered, this list is being built and sorted according to  service.cmRanking property of the registered PersistenceManagers. The Comparator used assumes the objects to be compared to be ServiceReference instances (to get at the service properties) while the actual objects are the services themselves. Hence the ClassCastException and hence a side effect of not being able to access configuration any more.
> Thanks to Tom Remoleur for reporting this.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Work stopped: (FELIX-322) Registering a PersistenceManager service causes a ClassCastException

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-322?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Work on FELIX-322 stopped by Felix Meschberger.

> Registering a PersistenceManager service causes a ClassCastException
> --------------------------------------------------------------------
>
>                 Key: FELIX-322
>                 URL: https://issues.apache.org/jira/browse/FELIX-322
>             Project: Felix
>          Issue Type: Bug
>          Components: Configuration Admin
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>             Fix For: 1.0.0
>
>
> When a Configuration object is requested and has to be loaded, the ConfigurationManager asks for the list of current PersistenceManagers. If a service has been registered, this list is being built and sorted according to  service.cmRanking property of the registered PersistenceManagers. The Comparator used assumes the objects to be compared to be ServiceReference instances (to get at the service properties) while the actual objects are the services themselves. Hence the ClassCastException and hence a side effect of not being able to access configuration any more.
> Thanks to Tom Remoleur for reporting this.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (FELIX-322) Registering a PersistenceManager service causes a ClassCastException

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-322?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger resolved FELIX-322.
-------------------------------------

    Resolution: Fixed

Fix confirmed by Tom.

Closing this issue and deploying a new snapshot

> Registering a PersistenceManager service causes a ClassCastException
> --------------------------------------------------------------------
>
>                 Key: FELIX-322
>                 URL: https://issues.apache.org/jira/browse/FELIX-322
>             Project: Felix
>          Issue Type: Bug
>          Components: Configuration Admin
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>             Fix For: 1.0.0
>
>
> When a Configuration object is requested and has to be loaded, the ConfigurationManager asks for the list of current PersistenceManagers. If a service has been registered, this list is being built and sorted according to  service.cmRanking property of the registered PersistenceManagers. The Comparator used assumes the objects to be compared to be ServiceReference instances (to get at the service properties) while the actual objects are the services themselves. Hence the ClassCastException and hence a side effect of not being able to access configuration any more.
> Thanks to Tom Remoleur for reporting this.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (FELIX-322) Registering a PersistenceManager service causes a ClassCastException

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-322?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger closed FELIX-322.
-----------------------------------


Snapshot deployed.

> Registering a PersistenceManager service causes a ClassCastException
> --------------------------------------------------------------------
>
>                 Key: FELIX-322
>                 URL: https://issues.apache.org/jira/browse/FELIX-322
>             Project: Felix
>          Issue Type: Bug
>          Components: Configuration Admin
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>             Fix For: 1.0.0
>
>
> When a Configuration object is requested and has to be loaded, the ConfigurationManager asks for the list of current PersistenceManagers. If a service has been registered, this list is being built and sorted according to  service.cmRanking property of the registered PersistenceManagers. The Comparator used assumes the objects to be compared to be ServiceReference instances (to get at the service properties) while the actual objects are the services themselves. Hence the ClassCastException and hence a side effect of not being able to access configuration any more.
> Thanks to Tom Remoleur for reporting this.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Work started: (FELIX-322) Registering a PersistenceManager service causes a ClassCastException

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-322?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Work on FELIX-322 started by Felix Meschberger.

> Registering a PersistenceManager service causes a ClassCastException
> --------------------------------------------------------------------
>
>                 Key: FELIX-322
>                 URL: https://issues.apache.org/jira/browse/FELIX-322
>             Project: Felix
>          Issue Type: Bug
>          Components: Configuration Admin
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>             Fix For: 1.0.0
>
>
> When a Configuration object is requested and has to be loaded, the ConfigurationManager asks for the list of current PersistenceManagers. If a service has been registered, this list is being built and sorted according to  service.cmRanking property of the registered PersistenceManagers. The Comparator used assumes the objects to be compared to be ServiceReference instances (to get at the service properties) while the actual objects are the services themselves. Hence the ClassCastException and hence a side effect of not being able to access configuration any more.
> Thanks to Tom Remoleur for reporting this.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (FELIX-322) Registering a PersistenceManager service causes a ClassCastException

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-322?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger reassigned FELIX-322:
---------------------------------------

    Assignee: Felix Meschberger

> Registering a PersistenceManager service causes a ClassCastException
> --------------------------------------------------------------------
>
>                 Key: FELIX-322
>                 URL: https://issues.apache.org/jira/browse/FELIX-322
>             Project: Felix
>          Issue Type: Bug
>          Components: Configuration Admin
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>             Fix For: 1.0.0
>
>
> When a Configuration object is requested and has to be loaded, the ConfigurationManager asks for the list of current PersistenceManagers. If a service has been registered, this list is being built and sorted according to  service.cmRanking property of the registered PersistenceManagers. The Comparator used assumes the objects to be compared to be ServiceReference instances (to get at the service properties) while the actual objects are the services themselves. Hence the ClassCastException and hence a side effect of not being able to access configuration any more.
> Thanks to Tom Remoleur for reporting this.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.