[ 
https://issues.apache.org/activemq/browse/SMX4-134?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46681#action_46681
 ] 

Edell Nolan commented on SMX4-134:
----------------------------------

When I try to deploy one of the zip files to smx4 I get an error indicating 
that it cannot find the file - this error is thrown from CXF but it's not the 
real error.  

I have the following in my xbean.xml file 

<cxfbc:provider service="ware:WarehouseServiceSoapJMS"

            endpoint="WarehouseEndpointSoapJMS" 

            useJBIWrapper="false"

            wsdl="classpath:warehouse-soapjms.wsdl"            

            interfaceName="ware:Warehouse"

            busCfg="/spring-jms.xml">                                           
     

</cxfbc:provider>

 
In my spring-jms.xml file I have  

<jms:conduit 
name="{http://logisticx.demo.fuse.iona.com/warehouseService/}WarehouseEndpointSoapJMS.jms-conduit";>

                        <jms:clientConfig clientReceiveTimeout="40000" 
messageTimeToLive="40000" />

</jms:conduit> 

So the error on deployment I get is  

WARNING: Could not find the configuration file /spring-jms.xml on the classpath.
 

But is covered up by the code in CXF 

org.apache.cxf.bus.spring.SpringBusFactory

private BusApplicationContext createApplicationContext(String cfgFiles[], 
boolean includeDefaults) {

        try {      

            return new BusApplicationContext(cfgFiles, includeDefaults, 
context);

        } catch (BeansException ex) {

            ClassLoader contextLoader = 
Thread.currentThread().getContextClassLoader();

            if (contextLoader != BusApplicationContext.class.getClassLoader()) {

                Thread.currentThread().setContextClassLoader(

                    BusApplicationContext.class.getClassLoader());

                try {

                    return new BusApplicationContext(cfgFiles, includeDefaults, 
context);        

                } finally {

                    Thread.currentThread().setContextClassLoader(contextLoader);

                }

            } else {

                throw ex;

            }

        }

    }


Basically when it does get an error it changes the classloaders - so it gets 
changed from a jarFileClassloader so it will never find the file. 

I have debugged the code and the real error seems to be that it cannot convert 
from  

org.apache.cxf.bus.spring.BusApplicationContextResourceResolver to 
org.apache.cxf.resource.ResourceResolver 

So this looks like they are being loaded by different classloaders. 


> Bundle Resource loader fails to find extra config files specified
> -----------------------------------------------------------------
>
>                 Key: SMX4-134
>                 URL: https://issues.apache.org/activemq/browse/SMX4-134
>             Project: ServiceMix 4
>          Issue Type: Bug
>    Affects Versions: 4.0-m2
>            Reporter: Edell Nolan
>
> If I attempt to deploy an SU that has config like the following - it will 
> fail to find the spring-jms.xml file. 
>       <cxfbc:provider service="ware:WarehouseServiceSoapJMS"
>             endpoint="WarehouseEndpointSoapJMS" 
>             useJBIWrapper="false"
>             wsdl="classpath:warehouse-soapjms.wsdl"            
>             interfaceName="ware:Warehouse"
>             busCfg="classpath:spring-jms.xml">
> this file is located in the same location as the xbean.xml file.
> Output of deployment :
> 07-Oct-2008 10:39:18 org.apache.cxf.bus.spring.BusApplicationContext 
> getConfigRe
> sources
> WARNING: Could not find the configuration file classpath:spring-jms.xml on 
> the classpath.

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

Reply via email to