You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Hasan Muhammad (JIRA)" <de...@tuscany.apache.org> on 2009/09/09 18:06:57 UTC

[jira] Created: (TUSCANY-3268) Noise exception generated when deploying a composite using properties

Noise exception generated when deploying a composite using properties
---------------------------------------------------------------------

                 Key: TUSCANY-3268
                 URL: https://issues.apache.org/jira/browse/TUSCANY-3268
             Project: Tuscany
          Issue Type: Bug
          Components: Java SCA Assembly Model
    Affects Versions: Java-SCA-1.5
         Environment: All
            Reporter: Hasan Muhammad
            Priority: Minor


When we have a composite with properties and try to build it, it generates a harmless noise exception which can be avoided. The following is the exception

java.lang.NullPointerException
	at org.apache.tuscany.sca.assembly.builder.impl.PropertyConfigurationUtil.evaluate(PropertyConfigurationUtil.java:73)
	at org.apache.tuscany.sca.assembly.builder.impl.PropertyConfigurationUtil.sourceComponentProperties(PropertyConfigurationUtil.java:146)
	at org.apache.tuscany.sca.assembly.builder.impl.BaseConfigurationBuilderImpl.configureSourcedProperties(BaseConfigurationBuilderImpl.java:828)
	at org.apache.tuscany.sca.assembly.builder.impl.BaseConfigurationBuilderImpl.configureComponents(BaseConfigurationBuilderImpl.java:100)
	at org.apache.tuscany.sca.assembly.builder.impl.ComponentConfigurationBuilderImpl.build(ComponentConfigurationBuilderImpl.java:65)

The reason is the following block of code not checking for null PropertyConfigurationUtil.evaluate()

 Document document = documentBuilderFactory.newDocumentBuilder().newDocument();

the documentBuilderFactory is null in this case, and we can simply check for it and if it is null, return null. We do check for the returned value is null or not in the method sourceComponentProperties, so no worries if we change this.



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


[jira] Updated: (TUSCANY-3268) Noise exception generated when deploying a composite using properties

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

Simon Laws updated TUSCANY-3268:
--------------------------------

    Affects Version/s:     (was: Java-SCA-1.5)
                       Java-SCA-Next
        Fix Version/s: Java-SCA-Next

Moved to SCA next. 

> Noise exception generated when deploying a composite using properties
> ---------------------------------------------------------------------
>
>                 Key: TUSCANY-3268
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-3268
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Assembly Model
>    Affects Versions: Java-SCA-Next
>         Environment: All
>            Reporter: Hasan Muhammad
>            Priority: Minor
>             Fix For: Java-SCA-Next
>
>
> When we have a composite with properties and try to build it, it generates a harmless noise exception which can be avoided. The following is the exception
> java.lang.NullPointerException
> 	at org.apache.tuscany.sca.assembly.builder.impl.PropertyConfigurationUtil.evaluate(PropertyConfigurationUtil.java:73)
> 	at org.apache.tuscany.sca.assembly.builder.impl.PropertyConfigurationUtil.sourceComponentProperties(PropertyConfigurationUtil.java:146)
> 	at org.apache.tuscany.sca.assembly.builder.impl.BaseConfigurationBuilderImpl.configureSourcedProperties(BaseConfigurationBuilderImpl.java:828)
> 	at org.apache.tuscany.sca.assembly.builder.impl.BaseConfigurationBuilderImpl.configureComponents(BaseConfigurationBuilderImpl.java:100)
> 	at org.apache.tuscany.sca.assembly.builder.impl.ComponentConfigurationBuilderImpl.build(ComponentConfigurationBuilderImpl.java:65)
> The reason is the following block of code not checking for null PropertyConfigurationUtil.evaluate()
>  Document document = documentBuilderFactory.newDocumentBuilder().newDocument();
> the documentBuilderFactory is null in this case, and we can simply check for it and if it is null, return null. We do check for the returned value is null or not in the method sourceComponentProperties, so no worries if we change this.

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


[jira] Commented: (TUSCANY-3268) Noise exception generated when deploying a composite using properties

Posted by "Simon Laws (JIRA)" <de...@tuscany.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-3268?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12754946#action_12754946 ] 

Simon Laws commented on TUSCANY-3268:
-------------------------------------

There is a deprecated constructor that passes in some nulls by default. We should remove the deprecated constructor noe but I think this is a 1.6 issue and not a 1.5.1 issue so I'll reassign this.

> Noise exception generated when deploying a composite using properties
> ---------------------------------------------------------------------
>
>                 Key: TUSCANY-3268
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-3268
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Assembly Model
>    Affects Versions: Java-SCA-1.5
>         Environment: All
>            Reporter: Hasan Muhammad
>            Priority: Minor
>
> When we have a composite with properties and try to build it, it generates a harmless noise exception which can be avoided. The following is the exception
> java.lang.NullPointerException
> 	at org.apache.tuscany.sca.assembly.builder.impl.PropertyConfigurationUtil.evaluate(PropertyConfigurationUtil.java:73)
> 	at org.apache.tuscany.sca.assembly.builder.impl.PropertyConfigurationUtil.sourceComponentProperties(PropertyConfigurationUtil.java:146)
> 	at org.apache.tuscany.sca.assembly.builder.impl.BaseConfigurationBuilderImpl.configureSourcedProperties(BaseConfigurationBuilderImpl.java:828)
> 	at org.apache.tuscany.sca.assembly.builder.impl.BaseConfigurationBuilderImpl.configureComponents(BaseConfigurationBuilderImpl.java:100)
> 	at org.apache.tuscany.sca.assembly.builder.impl.ComponentConfigurationBuilderImpl.build(ComponentConfigurationBuilderImpl.java:65)
> The reason is the following block of code not checking for null PropertyConfigurationUtil.evaluate()
>  Document document = documentBuilderFactory.newDocumentBuilder().newDocument();
> the documentBuilderFactory is null in this case, and we can simply check for it and if it is null, return null. We do check for the returned value is null or not in the method sourceComponentProperties, so no worries if we change this.

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


[jira] Commented: (TUSCANY-3268) Noise exception generated when deploying a composite using properties

Posted by "Raymond Feng (JIRA)" <de...@tuscany.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-3268?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12753199#action_12753199 ] 

Raymond Feng commented on TUSCANY-3268:
---------------------------------------

The documentBuilderFactory should be passed as non-null instance. Can you find out the code on the stack that passes in the null documentBuilderFactory? We should fix that at the root.

> Noise exception generated when deploying a composite using properties
> ---------------------------------------------------------------------
>
>                 Key: TUSCANY-3268
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-3268
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Assembly Model
>    Affects Versions: Java-SCA-1.5
>         Environment: All
>            Reporter: Hasan Muhammad
>            Priority: Minor
>
> When we have a composite with properties and try to build it, it generates a harmless noise exception which can be avoided. The following is the exception
> java.lang.NullPointerException
> 	at org.apache.tuscany.sca.assembly.builder.impl.PropertyConfigurationUtil.evaluate(PropertyConfigurationUtil.java:73)
> 	at org.apache.tuscany.sca.assembly.builder.impl.PropertyConfigurationUtil.sourceComponentProperties(PropertyConfigurationUtil.java:146)
> 	at org.apache.tuscany.sca.assembly.builder.impl.BaseConfigurationBuilderImpl.configureSourcedProperties(BaseConfigurationBuilderImpl.java:828)
> 	at org.apache.tuscany.sca.assembly.builder.impl.BaseConfigurationBuilderImpl.configureComponents(BaseConfigurationBuilderImpl.java:100)
> 	at org.apache.tuscany.sca.assembly.builder.impl.ComponentConfigurationBuilderImpl.build(ComponentConfigurationBuilderImpl.java:65)
> The reason is the following block of code not checking for null PropertyConfigurationUtil.evaluate()
>  Document document = documentBuilderFactory.newDocumentBuilder().newDocument();
> the documentBuilderFactory is null in this case, and we can simply check for it and if it is null, return null. We do check for the returned value is null or not in the method sourceComponentProperties, so no worries if we change this.

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