You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Raymond Feng (JIRA)" <de...@tuscany.apache.org> on 2009/09/09 20:17:58 UTC

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

    [ 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.