[prev in list] [next in list] [prev in thread] [next in thread] 

List:       tuscany-user
Subject:    Re: Apache Tuscany SCA : Error - cannot be resolved to a type
From:       Poonam Mane <poonam.mane () opennotus ! com>
Date:       2011-07-28 14:36:24
Message-ID: CAE3YcbJuYisc4eDWL8awN9pAZDZYTsx_KwrAp0CCAK23YtEbqQ () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Thanks Ramond for your reply.

Yes, the EventsStastics is in the class path (it runs from Test.java). I can
show you the part of .rf file where this component (EventsStastics) is
called. Please find attached the .rf file daigram.
Below is the part of the code from .rf that calls EventsStastics

SCADomain scaDomain = (SCADomain) kcontext.getVariable("scaContext");

EventsStatistics eventsStastics =
scaDomain.getService(EventsStatistics.class,"EventsStatisticsComponent");

eventsStastics.createEvent("Kimstaff","HealthNet","CARRIERFILE", "HealthNet
Validation", discrepancyURL, "KimstaffEvents", "Discrepancies found!.",
"Serious",  (String) kcontext.getVariable("ofbizCustomerId"), (String)
kcontext.getVariable("ofbizPartnerId"));

CarrierStatsDTO carrierStats = (CarrierStatsDTO)
kcontext.getVariable("carrierStats");

eventsStastics.updateCarrierStat("Kimstaff","HealthNet",(String)
kcontext.getVariable("ofbizCustomerId"), (String)
kcontext.getVariable("ofbizPartnerId"), carrierStats.getSubscribers(),
carrierStats.getDependents(), carrierStats.getSuccesses(),
carrierStats.getFailures(), "Discrepancies found",
discrepancyURL,"verification", "", "WARN");


On Wed, Jul 27, 2011 at 4:09 PM, Raymond Feng <enjoyjava@gmail.com> wrote:

> Hi,
>
> It seems that you try to call Tuscany from the Drools flow. Can you show us
> the .rf file? Do you have EventsStatistics on the class path? You can also
> check if the kimstaff/ruleflow/Process_kimstaff_ruleflow_0.java has the
> fully-qualified class name of EventsStatistics?
>
> Thanks,
> Raymond
> ________________________________________________________________
> Raymond Feng
> rfeng@apache.org
> Apache Tuscany PMC member and committer: tuscany.apache.org
> Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
> Personal Web Site: www.enjoyjava.com
> ________________________________________________________________
>
> On Jul 27, 2011, at 2:54 PM, Poonam Mane wrote:
>
> > Hi,
> >
> > I am a newbie in Apche Tuscany SCA. I am getting any error while running
> the some components I have written in Apache Tuscany SCA. I will appreciate
> any help on this error. Please let me know if you need more information.
> >
> > Scenario 1: Success
> > If the Events Stasticts is directly called from a test.java, the code run
> successfully.
> > Test.java
> > EventsStatistics eventsStastics =
> scaDomain.getService(EventsStatistics.class,"EventsStatisticsComponent");
> >
> > Scenario 2: Failure
> > I call the same file via .rf file (drool file) it throws me error:
> > Process Compilation error : org.drools.lang.descr.ProcessDescr@3f3fbd
> >       kimstaff/ruleflow/Process_kimstaff_ruleflow_0.java (259:10381) :
> EventsStatistics cannot be resolved to a type
> >
> > <1.PNG>
> >
> > composite file
> > <sca:component name="EventsStatisticsComponent">
> >     <sca:implementation.java
> class="opennotus.ba.impl.EventsStatisticsImpl"/>
> >     <sca:service name="EventsStatistics">
> >       <sca:interface.java interface="opennotus.ba.EventsStatistics"/>
> >     </sca:service>
> >     <sca:reference name="existConnection"
> target="ExistAppConfigComponent"/>
> >   </sca:component>
> >
> >   <sca:component name="ExistAppConfigComponent">
> >       <sca:service name="ExistAppConfig">
> >       <sca:interface.java interface="opennotus.ba.ExistAppConfig"/>
> >     </sca:service>
> >     <sca:implementation.java
> class="opennotus.ba.impl.ExistAppConfigImpl"/>
> >     <sca:property name="existConfigFile"> </sca:property>
> >       <sca:property name="hostName"> </sca:property>
> >       <sca:property name="hostPort"></sca:property>
> >       <sca:property name="connectionProtocol"> </sca:property>
> >       <sca:property name="existBaseURI"> </sca:property>
> >       <sca:property name="existUserId"> </sca:property>
> >       <sca:property name="existPasswd"></sca:property>
> >   </sca:component>
> >
> > Thanks,
> > Poonam
>
>

[Attachment #5 (text/html)]

Thanks Ramond for your reply.<div><br></div><div>Yes, the EventsStastics is in the \
class path (it runs from Test.java). I can show you the part of .rf file where this \
component (EventsStastics) is called. Please find attached the .rf file \
daigram.</div>

<div>Below is the part of the code from .rf that calls EventsStastics</div>
<div><span class="Apple-style-span" style="background-color: rgb(255, 255, \
153);"><br></span></div><div><div><span class="Apple-style-span" \
style="background-color: rgb(255, 255, 153);">SCADomain scaDomain = (SCADomain) \
kcontext.getVariable(&quot;scaContext&quot;);</span></div>

<div><span class="Apple-style-span" style="background-color: rgb(255, 255, \
153);"><br></span></div><div><span class="Apple-style-span" style="background-color: \
rgb(255, 255, 153);">EventsStatistics eventsStastics = \
scaDomain.getService(EventsStatistics.class,&quot;EventsStatisticsComponent&quot;);</span></div>



<div><span class="Apple-style-span" style="background-color: rgb(255, 255, \
153);"><br></span></div><div><span class="Apple-style-span" style="background-color: \
rgb(255, 255, 153);">eventsStastics.createEvent(&quot;Kimstaff&quot;,&quot;HealthNet&quot;,&quot;CARRIERFILE&quot;, \
&quot;HealthNet Validation&quot;, discrepancyURL, &quot;KimstaffEvents&quot;, \
&quot;Discrepancies found!.&quot;, &quot;Serious&quot;,  (String) \
kcontext.getVariable(&quot;ofbizCustomerId&quot;), (String) \
kcontext.getVariable(&quot;ofbizPartnerId&quot;));</span></div>


<div><span class="Apple-style-span" style="background-color: rgb(255, 255, \
153);"><br></span></div><div><span class="Apple-style-span" style="background-color: \
rgb(255, 255, 153);">CarrierStatsDTO carrierStats = (CarrierStatsDTO) \
kcontext.getVariable(&quot;carrierStats&quot;);</span></div>

<div><span class="Apple-style-span" style="background-color: rgb(255, 255, \
153);"><br></span></div><div><span class="Apple-style-span" style="background-color: \
rgb(255, 255, 153);">eventsStastics.updateCarrierStat(&quot;Kimstaff&quot;,&quot;HealthNet&quot;,(String) \
kcontext.getVariable(&quot;ofbizCustomerId&quot;),<span \
style="white-space:pre-wrap">	</span>(String) \
kcontext.getVariable(&quot;ofbizPartnerId&quot;), carrierStats.getSubscribers(), \
carrierStats.getDependents(),<span \
style="white-space:pre-wrap">	</span>carrierStats.getSuccesses(), \
carrierStats.getFailures(), &quot;Discrepancies found&quot;, \
discrepancyURL,&quot;verification&quot;, &quot;&quot;, \
&quot;WARN&quot;);</span></div>


<div><br></div></div><div><br><div class="gmail_quote">On Wed, Jul 27, 2011 at 4:09 \
PM, Raymond Feng <span dir="ltr">&lt;<a href="mailto:enjoyjava@gmail.com" \
target="_blank">enjoyjava@gmail.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">


Hi,<br>
<br>
It seems that you try to call Tuscany from the Drools flow. Can you show us the .rf \
file? Do you have EventsStatistics on the class path? You can also check if the \
kimstaff/ruleflow/Process_kimstaff_ruleflow_0.java has the fully-qualified class name \
of EventsStatistics?<br>



<br>
Thanks,<br>
Raymond<br>
<font color="#888888">________________________________________________________________<br>
 Raymond Feng<br>
<a href="mailto:rfeng@apache.org" target="_blank">rfeng@apache.org</a><br>
Apache Tuscany PMC member and committer: <a href="http://tuscany.apache.org" \
target="_blank">tuscany.apache.org</a><br> Co-author of Tuscany SCA In Action book: \
<a href="http://www.tuscanyinaction.com" \
target="_blank">www.tuscanyinaction.com</a><br> Personal Web Site: <a \
href="http://www.enjoyjava.com" target="_blank">www.enjoyjava.com</a><br> \
________________________________________________________________<br> </font><div><br>
On Jul 27, 2011, at 2:54 PM, Poonam Mane wrote:<br>
<br>
&gt; Hi,<br>
&gt;<br>
&gt; I am a newbie in Apche Tuscany SCA. I am getting any error while running the \
some components I have written in Apache Tuscany SCA. I will appreciate any help on \
this error. Please let me know if you need more information.<br>



&gt;<br>
&gt; Scenario 1: Success<br>
&gt; If the Events Stasticts is directly called from a test.java, the code run \
successfully.<br> &gt; Test.java<br>
&gt; EventsStatistics eventsStastics = \
scaDomain.getService(EventsStatistics.class,&quot;EventsStatisticsComponent&quot;);<br>
 &gt;<br>
&gt; Scenario 2: Failure<br>
&gt; I call the same file via .rf file (drool file) it throws me error:<br>
&gt; Process Compilation error : org.drools.lang.descr.ProcessDescr@3f3fbd<br>
&gt;       kimstaff/ruleflow/Process_kimstaff_ruleflow_0.java (259:10381) : \
EventsStatistics cannot be resolved to a type<br> &gt;<br>
</div><div><div></div><div>&gt; &lt;1.PNG&gt;<br>
&gt;<br>
&gt; composite file<br>
&gt; &lt;sca:component name=&quot;EventsStatisticsComponent&quot;&gt;<br>
&gt;     &lt;sca:implementation.java \
class=&quot;opennotus.ba.impl.EventsStatisticsImpl&quot;/&gt;<br> &gt;     \
&lt;sca:service name=&quot;EventsStatistics&quot;&gt;<br> &gt;       \
&lt;sca:interface.java interface=&quot;opennotus.ba.EventsStatistics&quot;/&gt;<br> \
&gt;     &lt;/sca:service&gt;<br> &gt;     &lt;sca:reference \
name=&quot;existConnection&quot; target=&quot;ExistAppConfigComponent&quot;/&gt;<br> \
&gt;   &lt;/sca:component&gt;<br> &gt;<br>
&gt;   &lt;sca:component name=&quot;ExistAppConfigComponent&quot;&gt;<br>
&gt;       &lt;sca:service name=&quot;ExistAppConfig&quot;&gt;<br>
&gt;       &lt;sca:interface.java \
interface=&quot;opennotus.ba.ExistAppConfig&quot;/&gt;<br> &gt;     \
&lt;/sca:service&gt;<br> &gt;     &lt;sca:implementation.java \
class=&quot;opennotus.ba.impl.ExistAppConfigImpl&quot;/&gt;<br> &gt;     \
&lt;sca:property name=&quot;existConfigFile&quot;&gt; &lt;/sca:property&gt;<br> &gt;  \
&lt;sca:property name=&quot;hostName&quot;&gt; &lt;/sca:property&gt;<br> &gt;       \
&lt;sca:property name=&quot;hostPort&quot;&gt;&lt;/sca:property&gt;<br> &gt;       \
&lt;sca:property name=&quot;connectionProtocol&quot;&gt; &lt;/sca:property&gt;<br> \
&gt;       &lt;sca:property name=&quot;existBaseURI&quot;&gt; \
&lt;/sca:property&gt;<br> &gt;       &lt;sca:property \
name=&quot;existUserId&quot;&gt; &lt;/sca:property&gt;<br> &gt;       \
&lt;sca:property name=&quot;existPasswd&quot;&gt;&lt;/sca:property&gt;<br> &gt;   \
&lt;/sca:component&gt;<br> &gt;<br>
&gt; Thanks,<br>
&gt; Poonam<br>
<br>
</div></div></blockquote></div><br></div>

--001636b2af530aa9f104a9221838--


["2.PNG" (image/png)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic