You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Simon Laws (JIRA)" <tu...@ws.apache.org> on 2007/05/31 09:22:16 UTC

[jira] Created: (TUSCANY-1309) NPE if SCDL uses component reference that is not defined consistently in the implementation

NPE if SCDL uses component reference that is not defined consistently in the implementation
-------------------------------------------------------------------------------------------

                 Key: TUSCANY-1309
                 URL: https://issues.apache.org/jira/browse/TUSCANY-1309
             Project: Tuscany
          Issue Type: Bug
         Environment: Win XP
            Reporter: Simon Laws
            Assignee: Simon Laws
            Priority: Minor


For example,

public class AlertsServiceImpl {

    private RSSCheckerService    rssChecker;
    
    private AlertsSourcesService alertsSources;

    @Reference
    public void setRssChecker(RSSCheckerService rssChecker) {
        this.rssChecker = rssChecker;
    }
    
    // missing explicit reference defintion for alertsSources. 
    ...
}

Then the SCDL...

    <component name="AlertsServiceComponent">
        <implementation.java class="org.apache.tuscany.sca.samples.aggregator.AlertsServiceImpl" />
        <reference name="rssChecker" target="RSSCheckerComponent"/>
        <reference name="alertsSources" target="AlertsSourcesServiceComponent"/>
    </component>

Results in NPE

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


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


[jira] Assigned: (TUSCANY-1309) NPE if SCDL uses component reference that is not defined consistently in the implementation

Posted by "Jean-Sebastien Delfino (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-1309?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jean-Sebastien Delfino reassigned TUSCANY-1309:
-----------------------------------------------

    Assignee: Jean-Sebastien Delfino  (was: Simon Laws)

> NPE if SCDL uses component reference that is not defined consistently in the implementation
> -------------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-1309
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1309
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Assembly Model
>    Affects Versions: Java-SCA-0.90
>         Environment: Win XP
>            Reporter: Simon Laws
>            Assignee: Jean-Sebastien Delfino
>            Priority: Minor
>             Fix For: Java-SCA-Next
>
>
> For example,
> public class AlertsServiceImpl {
>     private RSSCheckerService    rssChecker;
>     
>     private AlertsSourcesService alertsSources;
>     @Reference
>     public void setRssChecker(RSSCheckerService rssChecker) {
>         this.rssChecker = rssChecker;
>     }
>     
>     // missing explicit reference defintion for alertsSources. 
>     ...
> }
> Then the SCDL...
>     <component name="AlertsServiceComponent">
>         <implementation.java class="org.apache.tuscany.sca.samples.aggregator.AlertsServiceImpl" />
>         <reference name="rssChecker" target="RSSCheckerComponent"/>
>         <reference name="alertsSources" target="AlertsSourcesServiceComponent"/>
>     </component>
> Results in NPE

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


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


[jira] Resolved: (TUSCANY-1309) NPE if SCDL uses component reference that is not defined consistently in the implementation

Posted by "Raymond Feng (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-1309?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Raymond Feng resolved TUSCANY-1309.
-----------------------------------

    Resolution: Invalid

If the reference/service under the <component> doesn't match what are declared (or introspected) on the componentType, we produce a warning. In this case, the variable is not a SCA reference and no injection happens. So it's default to null and NPE is a user error.

> NPE if SCDL uses component reference that is not defined consistently in the implementation
> -------------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-1309
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1309
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Assembly Model
>    Affects Versions: Java-SCA-0.90
>         Environment: Win XP
>            Reporter: Simon Laws
>            Assignee: Jean-Sebastien Delfino
>            Priority: Minor
>             Fix For: Java-SCA-Next
>
>
> For example,
> public class AlertsServiceImpl {
>     private RSSCheckerService    rssChecker;
>     
>     private AlertsSourcesService alertsSources;
>     @Reference
>     public void setRssChecker(RSSCheckerService rssChecker) {
>         this.rssChecker = rssChecker;
>     }
>     
>     // missing explicit reference defintion for alertsSources. 
>     ...
> }
> Then the SCDL...
>     <component name="AlertsServiceComponent">
>         <implementation.java class="org.apache.tuscany.sca.samples.aggregator.AlertsServiceImpl" />
>         <reference name="rssChecker" target="RSSCheckerComponent"/>
>         <reference name="alertsSources" target="AlertsSourcesServiceComponent"/>
>     </component>
> Results in NPE

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


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


[jira] Updated: (TUSCANY-1309) NPE if SCDL uses component reference that is not defined consistently in the implementation

Posted by "Simon Laws (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-1309?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Simon Laws updated TUSCANY-1309:
--------------------------------

          Component/s: Java SCA Assembly Model
    Affects Version/s: Java-SCA-0.90

> NPE if SCDL uses component reference that is not defined consistently in the implementation
> -------------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-1309
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1309
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Assembly Model
>    Affects Versions: Java-SCA-0.90
>         Environment: Win XP
>            Reporter: Simon Laws
>            Assignee: Simon Laws
>            Priority: Minor
>
> For example,
> public class AlertsServiceImpl {
>     private RSSCheckerService    rssChecker;
>     
>     private AlertsSourcesService alertsSources;
>     @Reference
>     public void setRssChecker(RSSCheckerService rssChecker) {
>         this.rssChecker = rssChecker;
>     }
>     
>     // missing explicit reference defintion for alertsSources. 
>     ...
> }
> Then the SCDL...
>     <component name="AlertsServiceComponent">
>         <implementation.java class="org.apache.tuscany.sca.samples.aggregator.AlertsServiceImpl" />
>         <reference name="rssChecker" target="RSSCheckerComponent"/>
>         <reference name="alertsSources" target="AlertsSourcesServiceComponent"/>
>     </component>
> Results in NPE

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


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