]
RH Bugzilla Integration commented on TEIID-5108:
------------------------------------------------
Jan Stastny <jstastny(a)redhat.com> changed the Status of [bug
Salesforce-34 ra loads also cxf.xml from default location
---------------------------------------------------------
Key: TEIID-5108
URL:
https://issues.jboss.org/browse/TEIID-5108
Project: Teiid
Issue Type: Quality Risk
Components: Misc. Connectors
Affects Versions: 8.12.x-6.4
Reporter: Jan Stastny
Assignee: Steven Hawkins
Priority: Minor
When I am using salesforce-34 resource-adapter together with ConfigFile property set to a
custom location, the adapter instantiates a WebClient instance, which tries to load a
default ApplicationContext from /META-INF/cxf/cxf.xml location on classpath. This results
to FileNotFound error logged at WARNING level:
{code}
09:52:20,365 WARNING [org.apache.cxf.bus.spring.SpringBusFactory] (teiid-async-threads -
4) Initial attempt to create application context was unsuccessful.:
org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML
document from class path resource [META-INF/cxf/cxf.xml]; nested exception is
java.io.FileNotFoundException: class path resource [META-INF/cxf/cxf.xml] cannot be opened
because it does not exist
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)
at
org.apache.cxf.bus.spring.ControlledValidationXmlBeanDefinitionReader.internalLoadBeanDefinitions(ControlledValidationXmlBeanDefinitionReader.java:154)
at
org.apache.cxf.bus.spring.ControlledValidationXmlBeanDefinitionReader.access$000(ControlledValidationXmlBeanDefinitionReader.java:66)
at
org.apache.cxf.bus.spring.ControlledValidationXmlBeanDefinitionReader$1.run(ControlledValidationXmlBeanDefinitionReader.java:141)
at
org.apache.cxf.bus.spring.ControlledValidationXmlBeanDefinitionReader$1.run(ControlledValidationXmlBeanDefinitionReader.java:139)
at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.8.0_121]
at
org.apache.cxf.bus.spring.ControlledValidationXmlBeanDefinitionReader.loadBeanDefinitions(ControlledValidationXmlBeanDefinitionReader.java:139)
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:303)
at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:174)
at
org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:123)
at
org.apache.cxf.bus.spring.BusApplicationContext.loadBeanDefinitions(BusApplicationContext.java:322)
at
org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)
at
org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:539)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:451)
at
org.apache.cxf.bus.spring.BusApplicationContext$1.run(BusApplicationContext.java:107)
at
org.apache.cxf.bus.spring.BusApplicationContext$1.run(BusApplicationContext.java:105)
at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.8.0_121]
at
org.apache.cxf.bus.spring.BusApplicationContext.<init>(BusApplicationContext.java:105)
at
org.apache.cxf.bus.spring.SpringBusFactory.createApplicationContext(SpringBusFactory.java:157)
at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:148)
at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:124)
at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:94)
at org.apache.cxf.jaxrs.client.WebClient.getBean(WebClient.java:1221)
at org.apache.cxf.jaxrs.client.WebClient.create(WebClient.java:202)
at
org.teiid.resource.adapter.salesforce.transport.SalesforceCXFTransport.connectRaw(SalesforceCXFTransport.java:115)
at
org.teiid.resource.adapter.salesforce.transport.SalesforceCXFTransport.connectLocal(SalesforceCXFTransport.java:84)
at
org.teiid.resource.adapter.salesforce.transport.SalesforceCXFTransport.connectLocal(SalesforceCXFTransport.java:79)
at
org.teiid.resource.adapter.salesforce.transport.SalesforceCXFTransport.connect(SalesforceCXFTransport.java:75)
at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:95)
[force-wsc-34.0.0.jar:]
at
com.sforce.soap.partner.PartnerConnection.describeSObjects(PartnerConnection.java:950)
[force-partner-api-34.0.0.jar:]
at
org.teiid.resource.adapter.salesforce.SalesforceConnectionImpl.getObjectMetaData(SalesforceConnectionImpl.java:491)
at
org.teiid.translator.salesforce.SalesForceMetadataProcessor.getColumnsAndRelationships(SalesForceMetadataProcessor.java:189)
[translator-salesforce-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
at
org.teiid.translator.salesforce.SalesForceMetadataProcessor.processMetadata(SalesForceMetadataProcessor.java:158)
[translator-salesforce-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
at
org.teiid.translator.salesforce.SalesForceMetadataProcessor.process(SalesForceMetadataProcessor.java:106)
[translator-salesforce-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
at
org.teiid.translator.salesforce.SalesForceMetadataProcessor.process(SalesForceMetadataProcessor.java:54)
[translator-salesforce-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
at org.teiid.translator.ExecutionFactory.getMetadata(ExecutionFactory.java:950)
[teiid-api-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
at
org.teiid.translator.salesforce.SalesForceExecutionFactory.getMetadata(SalesForceExecutionFactory.java:133)
[translator-salesforce-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
at
org.teiid.translator.salesforce.SalesForceExecutionFactory.getMetadata(SalesForceExecutionFactory.java:58)
[translator-salesforce-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
at
org.teiid.query.metadata.NativeMetadataRepository.getMetadata(NativeMetadataRepository.java:96)
at
org.teiid.query.metadata.NativeMetadataRepository.loadMetadata(NativeMetadataRepository.java:62)
at
org.teiid.query.metadata.ChainingMetadataRepository.loadMetadata(ChainingMetadataRepository.java:55)
at org.teiid.jboss.VDBService$6.run(VDBService.java:395)
at org.teiid.jboss.VDBService$7.run(VDBService.java:446)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[rt.jar:1.8.0_121]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[rt.jar:1.8.0_121]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_121]
at org.jboss.threads.JBossThread.run(JBossThread.java:122)
Caused by: java.io.FileNotFoundException: class path resource [META-INF/cxf/cxf.xml]
cannot be opened because it does not exist
at
org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:171)
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:329)
... 46 more
{code}
When the ConfigFile property is not set, such issue doesn't appear.