You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Pierre Bourret (JIRA)" <ji...@apache.org> on 2009/12/11 18:15:18 UTC
[jira] Updated: (FELIX-1938) Bad error message when an Event
Subscriber does not set the data type and data key
[ https://issues.apache.org/jira/browse/FELIX-1938?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pierre Bourret updated FELIX-1938:
----------------------------------
Attachment: checkMissingDataKeyAttribute.diff
The patch that checks the presence of the data-key attribute when the data-type attribute is provided.
> Bad error message when an Event Subscriber does not set the data type and data key
> ----------------------------------------------------------------------------------
>
> Key: FELIX-1938
> URL: https://issues.apache.org/jira/browse/FELIX-1938
> Project: Felix
> Issue Type: Bug
> Components: iPOJO
> Affects Versions: iPOJO-1.4.0
> Reporter: Clement Escoffier
> Attachments: checkMissingDataKeyAttribute.diff
>
>
> The event admin handler should do a better job in reporting error. Especially the following subscriber (missing the data_key attribute):
> @Subscriber(name = "tdmEventSubscriber-1", topics = "tdmEventTopic", data_type = "java.lang.String")
> public void receive(String msg) {
> System.out.println("[DATA RECEIVER] Receive event on tdmEventTopic : " + msg);
> }
> will throw this exception:
> -> [ERROR] de.akquinet.gomobile.ea.test.SubscriberTest : Cannot find callback method receive(org.osgi.service.event.Event)
> [ERROR] IPOJO-Extender : An error occurs when analyzing the content or starting the management of 17
> java.lang.IllegalStateException: Cannot find callback method receive(org.osgi.service.event.Event)
> at org.apache.felix.ipojo.IPojoFactory.computeDescription(IPojoFactory.java:673)
> at org.apache.felix.ipojo.IPojoFactory.computeFactoryState(IPojoFactory.java:700)
> at org.apache.felix.ipojo.ComponentFactory.addedService(ComponentFactory.java:358)
> at org.apache.felix.ipojo.util.Tracker$Tracked.trackAdding(Tracker.java:709)
> at org.apache.felix.ipojo.util.Tracker$Tracked.trackInitialServices(Tracker.java:595)
> at org.apache.felix.ipojo.util.Tracker.open(Tracker.java:203)
> at org.apache.felix.ipojo.ComponentFactory.starting(ComponentFactory.java:235)
> at org.apache.felix.ipojo.IPojoFactory.start(IPojoFactory.java:574)
> at org.apache.felix.ipojo.Extender.createAbstractFactory(Extender.java:426)
> at org.apache.felix.ipojo.Extender.parse(Extender.java:264)
> at org.apache.felix.ipojo.Extender.startManagementFor(Extender.java:208)
> at org.apache.felix.ipojo.Extender.access$600(Extender.java:52)
> at org.apache.felix.ipojo.Extender$CreatorThread.run(Extender.java:669)
> at java.lang.Thread.run(Thread.java:637)
> The handler has detected a problem but try to use a wrong method (receiver(Event) instead of reporting the bad configuration and rejecting it.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.