As Lasantha suggested. I have added the class in the siddhi.extension and
resolved the issue.

*T. Pranavan*
*BSc Eng Undergraduate| Department of Computer Science & Engineering
,University of Moratuwa*
*Mobile| *0775136836

On 22 June 2015 at 17:58, Pranavan Theivendiram <[email protected]>
wrote:

> Hi Lasantha,
>
> I have created a custom window processor and I have built stratos from
> source. Then I have started up the server. When the server is starting up,
> I am getting the following error.
>
> ERROR {org.wso2.carbon.event.processor.core.EventProcessorDeployer} -
>  Execution plan is not deployed and in inactive state :
> CurveFinderOfRequestsInFlightFinder.xml, Invalid query specified, No
> extension exist for WindowExtension{extensionName='stratos',
> functionName='curveFitting'}
> org.wso2.carbon.event.processor.core.exception.ExecutionPlanConfigurationException:
> Invalid query specified, No extension exist for
> WindowExtension{extensionName='stratos', functionName='curveFitting'}
> at
> org.wso2.carbon.event.processor.core.internal.CarbonEventProcessorService.addExecutionPlanConfiguration(CarbonEventProcessorService.java:242)
> at
> org.wso2.carbon.event.processor.core.EventProcessorDeployer.processDeploy(EventProcessorDeployer.java:136)
> at
> org.wso2.carbon.event.processor.core.internal.util.EventProcessorConfigurationFilesystemInvoker.reload(EventProcessorConfigurationFilesystemInvoker.java:86)
> at
> org.wso2.carbon.event.processor.core.internal.CarbonEventProcessorService.activateInactiveExecutionPlanConfigurations(CarbonEventProcessorService.java:678)
> at
> org.wso2.carbon.event.processor.core.internal.CarbonEventProcessorService.addExternalStream(CarbonEventProcessorService.java:753)
> at
> org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl.addedNewEventStream(EventReceiverStreamNotificationListenerImpl.java:39)
>
>
> What could be the possible reason?
>
> The window processor I have written is cited below.
>
>
> https://github.com/Pranavan135/stratos/blob/CurveFittingGSoC/extensions/cep/stratos-cep-extension/src/main/java/org/apache/stratos/cep/extension/CurveFinderWindowProcessor.java
>
> Thanks in advance.
>
> *T. Pranavan*
> *BSc Eng Undergraduate| Department of Computer Science & Engineering
> ,University of Moratuwa*
> *Mobile| *0775136836
>
> On 22 June 2015 at 17:00, Pranavan Theivendiram <[email protected]
> > wrote:
>
>> Thanks Lasantha for the information.
>>
>> *T. Pranavan*
>> *BSc Eng Undergraduate| Department of Computer Science & Engineering
>> ,University of Moratuwa*
>> *Mobile| *0775136836
>>
>> On 22 June 2015 at 14:16, Lasantha Fernando <[email protected]> wrote:
>>
>>> Hi Pranavan,
>>>
>>> I assume that you are using Siddhi-2.x branch? If so, how the extension
>>> loading process happens with annotations is as below.
>>>
>>> The annotation for Siddhi extension itself is defined in [1]. This is a
>>> standard Java annotation. When the annotation is set, since it has a
>>> retention policy set to runtime for target type, this information will be
>>> available for a particular class that uses this annotation during runtime.
>>> We make use of this to check whether this particular annotation is set
>>> before loading an extension class into Siddhi runtime.
>>> See the code segment below from [2]
>>>
>>>                     if
>>> (extension.isAnnotationPresent(SiddhiExtension.class)) {
>>>                         SiddhiExtension siddhiExtension =
>>> (SiddhiExtension) extension.getAnnotation(SiddhiExtension.class);
>>>                         String extensionKey =
>>> siddhiExtension.namespace() + EXTENSION_SEPARATOR +
>>> siddhiExtension.function();
>>>                         if (extensionMap.containsKey(extensionKey)) {
>>>                             log.error("Extension class " +
>>> extension.getName() + " not loaded, as there is already an matching
>>> extension " + extensionKey + ", implemented at " +
>>> extensionMap.get(extensionKey).getName());
>>>                         } else {
>>>                             extensionMap.put(extensionKey, extension);
>>>                         }
>>>
>>>                     } else {
>>>                         log.error("Extension class " +
>>> extension.getName() + " not loaded, as it does not have SiddhiExtension
>>> Annotation!");
>>>                     }
>>>
>>> In the above code segment, we check for the annotation and then only
>>> puts it into a map as an annotation. The annotation is there to simply
>>> identify a class as a Siddhi extension and to extract the namespace and
>>> function from it. This namespace and function is used to derive the key
>>> that maps to an extension reference in Siddhi QL. i.e. we refer to siddhi
>>> extensions in Siddhi QL with <namespace>:<function> format.
>>>
>>> Hope you can get an idea from the above explanation. You can browse
>>> through the Siddhi-2.2.x code to get a more detailed idea on how the Siddhi
>>> extension loading process works.
>>>
>>> [1]
>>> https://github.com/wso2/siddhi/blob/2.2.x/modules/siddhi-api/src/main/java/org/wso2/siddhi/query/api/extension/annotation/SiddhiExtension.java
>>> [2]
>>> https://github.com/wso2/siddhi/blob/2.2.x/modules/siddhi-core/src/main/java/org/wso2/siddhi/core/extension/holder/AbstractExtensionHolder.java
>>>
>>> Thanks,
>>> Lasantha
>>>
>>> On 22 June 2015 at 13:28, Nirmal Fernando <[email protected]> wrote:
>>>
>>>> Can someone please help Pranavan?
>>>>
>>>> On Sun, Jun 21, 2015 at 3:03 PM, Pranavan Theivendiram <
>>>> [email protected]> wrote:
>>>>
>>>>> Adding Nirmal.
>>>>>
>>>>> *T. Pranavan*
>>>>> *BSc Eng Undergraduate| Department of Computer Science & Engineering
>>>>> ,University of Moratuwa*
>>>>> *Mobile| *0775136836
>>>>>
>>>>> On 21 June 2015 at 14:29, Pranavan Theivendiram <
>>>>> [email protected]> wrote:
>>>>>
>>>>>> Hi Devs,
>>>>>>
>>>>>> I need a brief explanation about how $Subject work?
>>>>>>
>>>>>> The following is an annotation of a custom window processor.
>>>>>>
>>>>>> @SiddhiExtension(namespace = "stratos", function = "secondDerivative"
>>>>>> )
>>>>>>
>>>>>> I need to know how these annotations work.
>>>>>>
>>>>>> Thanks in advance.
>>>>>>
>>>>>> Thanks
>>>>>> *T. Pranavan*
>>>>>> *BSc Eng Undergraduate| Department of Computer Science & Engineering
>>>>>> ,University of Moratuwa*
>>>>>> *Mobile| *0775136836
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> Thanks & regards,
>>>> Nirmal
>>>>
>>>> Associate Technical Lead - Data Technologies Team, WSO2 Inc.
>>>> Mobile: +94715779733
>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> *Lasantha Fernando*
>>> Senior Software Engineer - Data Technologies Team
>>> WSO2 Inc. http://wso2.com
>>>
>>> email: [email protected]
>>> mobile: (+94) 71 5247551
>>>
>>
>>
>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to