You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Alessio Soldano (JIRA)" <ji...@apache.org> on 2010/08/04 16:54:16 UTC

[jira] Created: (CXF-2927) Missing ConfiguredBeanLocator in bus created by org.apache.cxf.bus.CXFBusFactory

Missing ConfiguredBeanLocator in bus created by org.apache.cxf.bus.CXFBusFactory
--------------------------------------------------------------------------------

                 Key: CXF-2927
                 URL: https://issues.apache.org/jira/browse/CXF-2927
             Project: CXF
          Issue Type: Bug
          Components: Bus
            Reporter: Alessio Soldano
             Fix For: 2.3


On the current trunk (2.3-SNAPSHOT) a ConfiguredBeanLocator instance is only installed when the Spring based Bus factory is used. Unfortunately not all the retrieval of that bus extensions are followed by a check for the extension being actually available, hence it's possible to get NPE.
I've reproduced this issue when manually enabling WS-Policy engine after building the Bus with the CXFBusFactory as well as using the wsdl2java tooling (without spring available).
In the latter, for instance, the BindingFactoryManagerImpl throws NPE when finding the BindingFactory for a wsdl segement like this:
    <binding name="Hello2Binding" type="tns:Hello2">
   <wsp:Policy>
     <wsam:Addressing wsp:Optional="true">
       <wsp:Policy/>
     </wsam:Addressing>
   </wsp:Policy> 

As a temporary workaround I've succesfully verified adding a dummy locator to the bus solves the problem. That would implement ConfiguredBeanLocator returning null/empty collections.
However, I'm worndering what we want to do here, we can either go and protect every access to this locator or install a default one that does nothing in the CXFBusFactory.

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


[jira] Resolved: (CXF-2927) Missing ConfiguredBeanLocator in bus created by org.apache.cxf.bus.CXFBusFactory

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-2927?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp resolved CXF-2927.
------------------------------

    Resolution: Fixed

> Missing ConfiguredBeanLocator in bus created by org.apache.cxf.bus.CXFBusFactory
> --------------------------------------------------------------------------------
>
>                 Key: CXF-2927
>                 URL: https://issues.apache.org/jira/browse/CXF-2927
>             Project: CXF
>          Issue Type: Bug
>          Components: Bus
>            Reporter: Alessio Soldano
>            Assignee: Daniel Kulp
>             Fix For: 2.3
>
>
> On the current trunk (2.3-SNAPSHOT) a ConfiguredBeanLocator instance is only installed when the Spring based Bus factory is used. Unfortunately not all the retrieval of that bus extensions are followed by a check for the extension being actually available, hence it's possible to get NPE.
> I've reproduced this issue when manually enabling WS-Policy engine after building the Bus with the CXFBusFactory as well as using the wsdl2java tooling (without spring available).
> In the latter, for instance, the BindingFactoryManagerImpl throws NPE when finding the BindingFactory for a wsdl segement like this:
>     <binding name="Hello2Binding" type="tns:Hello2">
>    <wsp:Policy>
>      <wsam:Addressing wsp:Optional="true">
>        <wsp:Policy/>
>      </wsam:Addressing>
>    </wsp:Policy> 
> As a temporary workaround I've succesfully verified adding a dummy locator to the bus solves the problem. That would implement ConfiguredBeanLocator returning null/empty collections.
> However, I'm worndering what we want to do here, we can either go and protect every access to this locator or install a default one that does nothing in the CXFBusFactory.

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


[jira] Assigned: (CXF-2927) Missing ConfiguredBeanLocator in bus created by org.apache.cxf.bus.CXFBusFactory

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-2927?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp reassigned CXF-2927:
--------------------------------

    Assignee: Daniel Kulp

> Missing ConfiguredBeanLocator in bus created by org.apache.cxf.bus.CXFBusFactory
> --------------------------------------------------------------------------------
>
>                 Key: CXF-2927
>                 URL: https://issues.apache.org/jira/browse/CXF-2927
>             Project: CXF
>          Issue Type: Bug
>          Components: Bus
>            Reporter: Alessio Soldano
>            Assignee: Daniel Kulp
>             Fix For: 2.3
>
>
> On the current trunk (2.3-SNAPSHOT) a ConfiguredBeanLocator instance is only installed when the Spring based Bus factory is used. Unfortunately not all the retrieval of that bus extensions are followed by a check for the extension being actually available, hence it's possible to get NPE.
> I've reproduced this issue when manually enabling WS-Policy engine after building the Bus with the CXFBusFactory as well as using the wsdl2java tooling (without spring available).
> In the latter, for instance, the BindingFactoryManagerImpl throws NPE when finding the BindingFactory for a wsdl segement like this:
>     <binding name="Hello2Binding" type="tns:Hello2">
>    <wsp:Policy>
>      <wsam:Addressing wsp:Optional="true">
>        <wsp:Policy/>
>      </wsam:Addressing>
>    </wsp:Policy> 
> As a temporary workaround I've succesfully verified adding a dummy locator to the bus solves the problem. That would implement ConfiguredBeanLocator returning null/empty collections.
> However, I'm worndering what we want to do here, we can either go and protect every access to this locator or install a default one that does nothing in the CXFBusFactory.

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


[jira] Commented: (CXF-2927) Missing ConfiguredBeanLocator in bus created by org.apache.cxf.bus.CXFBusFactory

Posted by "Alessio Soldano (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2927?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12918828#action_12918828 ] 

Alessio Soldano commented on CXF-2927:
--------------------------------------

Just tried removing the local workaround, everything seems fine now. Thanks.

> Missing ConfiguredBeanLocator in bus created by org.apache.cxf.bus.CXFBusFactory
> --------------------------------------------------------------------------------
>
>                 Key: CXF-2927
>                 URL: https://issues.apache.org/jira/browse/CXF-2927
>             Project: CXF
>          Issue Type: Bug
>          Components: Bus
>            Reporter: Alessio Soldano
>            Assignee: Daniel Kulp
>             Fix For: 2.3
>
>
> On the current trunk (2.3-SNAPSHOT) a ConfiguredBeanLocator instance is only installed when the Spring based Bus factory is used. Unfortunately not all the retrieval of that bus extensions are followed by a check for the extension being actually available, hence it's possible to get NPE.
> I've reproduced this issue when manually enabling WS-Policy engine after building the Bus with the CXFBusFactory as well as using the wsdl2java tooling (without spring available).
> In the latter, for instance, the BindingFactoryManagerImpl throws NPE when finding the BindingFactory for a wsdl segement like this:
>     <binding name="Hello2Binding" type="tns:Hello2">
>    <wsp:Policy>
>      <wsam:Addressing wsp:Optional="true">
>        <wsp:Policy/>
>      </wsam:Addressing>
>    </wsp:Policy> 
> As a temporary workaround I've succesfully verified adding a dummy locator to the bus solves the problem. That would implement ConfiguredBeanLocator returning null/empty collections.
> However, I'm worndering what we want to do here, we can either go and protect every access to this locator or install a default one that does nothing in the CXFBusFactory.

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


[jira] Commented: (CXF-2927) Missing ConfiguredBeanLocator in bus created by org.apache.cxf.bus.CXFBusFactory

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2927?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12895716#action_12895716 ] 

Daniel Kulp commented on CXF-2927:
----------------------------------


The other option is in the ExtensionBus that you get when you don't have spring is to have it have a special ConfiguredBeanLocator that does smart things with the loaded extensions.   Thus, the "get by class" things could iterator through the extensions for those that implement the class and such.

That MAY be a first step in getting some of the policy things auto loaded when not using Spring.   If the SecPolLoader bean is in the extension array, when the policy engine starts up and need the extensions, it would ask the locator for all the PolicyLoaders and this would then find them.



> Missing ConfiguredBeanLocator in bus created by org.apache.cxf.bus.CXFBusFactory
> --------------------------------------------------------------------------------
>
>                 Key: CXF-2927
>                 URL: https://issues.apache.org/jira/browse/CXF-2927
>             Project: CXF
>          Issue Type: Bug
>          Components: Bus
>            Reporter: Alessio Soldano
>             Fix For: 2.3
>
>
> On the current trunk (2.3-SNAPSHOT) a ConfiguredBeanLocator instance is only installed when the Spring based Bus factory is used. Unfortunately not all the retrieval of that bus extensions are followed by a check for the extension being actually available, hence it's possible to get NPE.
> I've reproduced this issue when manually enabling WS-Policy engine after building the Bus with the CXFBusFactory as well as using the wsdl2java tooling (without spring available).
> In the latter, for instance, the BindingFactoryManagerImpl throws NPE when finding the BindingFactory for a wsdl segement like this:
>     <binding name="Hello2Binding" type="tns:Hello2">
>    <wsp:Policy>
>      <wsam:Addressing wsp:Optional="true">
>        <wsp:Policy/>
>      </wsam:Addressing>
>    </wsp:Policy> 
> As a temporary workaround I've succesfully verified adding a dummy locator to the bus solves the problem. That would implement ConfiguredBeanLocator returning null/empty collections.
> However, I'm worndering what we want to do here, we can either go and protect every access to this locator or install a default one that does nothing in the CXFBusFactory.

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