-
15. Re: Not able to run query
shawkins Sep 23, 2017 11:18 AM (in response to vijayjose)So we need to narrow in on what is happening between your server and salesforce. Can your provide some additional logging from the CXF level? You would adjust the CXF logger:
<logger category="org.apache.cxf"> <level name="TRACE"/> </logger>
And enabled request/response logging. For that you need to update the salesforce resource adapter config to point to a CXF config file:
<config-property name="ConfigFile"> /path/to/cxf.xml </config-property>
Where the CXF config file looks like:
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:cxf="http://cxf.apache.org/core" xsi:schemaLocation="http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"> <bean id="loggingFeature" class="org.apache.cxf.feature.LoggingFeature"/> <cxf:bus> <cxf:features> <ref bean="loggingFeature"/> </cxf:features> </cxf:bus> </beans>
-
16. Re: Not able to run query
shawkins Sep 25, 2017 5:32 PM (in response to shawkins)There is also a system property for CXF logging that is simpler to set: Advanced User Guide - JBoss Web Services - Project Documentation Editor
Also would it be possible to take a thread dump when the salesforce connection is not responsive as that can confirm where it is waiting and from the methods/line numbers will confirm the library versions.
-
17. Re: Not able to run query
vijayjose Sep 26, 2017 2:34 AM (in response to shawkins)Attaching the new server.log after adding above mentioned changes
got a new warning :
WARNING [org.apache.cxf.bus.spring.SpringBusFactory] (Worker12_QueryProcessorQueue44) Uz9B7SJJaPx9 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)
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:334)
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:106)
at org.apache.cxf.bus.spring.BusApplicationContext$1.run(BusApplicationContext.java:104)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.cxf.bus.spring.BusApplicationContext.<init>(BusApplicationContext.java:104)
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:1253)
at org.apache.cxf.jaxrs.client.WebClient.create(WebClient.java:206)
at org.teiid.resource.adapter.salesforce.transport.SalesforceCXFTransport.connectRaw(SalesforceCXFTransport.java:123)
at org.teiid.resource.adapter.salesforce.transport.SalesforceCXFTransport.connectLocal(SalesforceCXFTransport.java:87)
at org.teiid.resource.adapter.salesforce.transport.SalesforceCXFTransport.connectLocal(SalesforceCXFTransport.java:82)
at org.teiid.resource.adapter.salesforce.transport.SalesforceCXFTransport.connect(SalesforceCXFTransport.java:78)
at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:94)
at com.sforce.soap.partner.PartnerConnection.getUserInfo(PartnerConnection.java:763)
at org.teiid.resource.adapter.salesforce.SalesforceConnectionImpl.login(SalesforceConnectionImpl.java:175)
at org.teiid.resource.adapter.salesforce.SalesforceConnectionImpl.<init>(SalesforceConnectionImpl.java:90)
at org.teiid.resource.adapter.salesforce.SalesForceManagedConnectionFactory$1.getConnection(SalesForceManagedConnectionFactory.java:98)
at org.teiid.resource.adapter.salesforce.SalesForceManagedConnectionFactory$1.getConnection(SalesForceManagedConnectionFactory.java:93)
at org.teiid.resource.spi.BasicManagedConnectionFactory.createManagedConnection(BasicManagedConnectionFactory.java:71)
at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreConcurrentLinkedDequeManagedConnectionPool.createConnectionEventListener(SemaphoreConcurrentLinkedDequeManagedConnectionPool.java:1319)
at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreConcurrentLinkedDequeManagedConnectionPool.getConnection(SemaphoreConcurrentLinkedDequeManagedConnectionPool.java:496)
at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getSimpleConnection(AbstractPool.java:626)
at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getConnection(AbstractPool.java:598)
at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:590)
at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:563)
at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:747)
at org.teiid.resource.spi.WrappedConnectionFactory.getConnection(WrappedConnectionFactory.java:58)
at org.teiid.translator.ExecutionFactory.getConnection(ExecutionFactory.java:184)
at org.teiid.translator.ExecutionFactory.getConnection(ExecutionFactory.java:205)
at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:329)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:220)
at com.sun.proxy.$Proxy28.execute(Unknown Source)
at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:306)
at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:112)
at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65)
at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:284)
at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119)
at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
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)
... 62 more
-
server.log.zip 65.9 KB
-
-
18. Re: Not able to run query
shawkins Sep 26, 2017 1:08 PM (in response to vijayjose)1 of 1 people found this helpfulThe log shows that you are hitting the 34 services endpoint, even though you are using the salesforce resource adapter. This is due to a bug with the kitting changes that were done in 9.3 to support feature packs. The [TEIID-4501] Salesforce 34 resource adapter should default to the 34 api - JBoss Issue Tracker change ended up getting applied to both translators as the kitting change must have used the 34 configuration for both.
The workaround is to manually set the url on the salesforce resource adapter config:
- <config-property name="URL">
- https://www.salesforce.com/services/Soap/u/22.0
- </config-property>
Could you log an issue to get this corrected? I'll add some warning or other logs as well when there are mismatched versions.
As for the exception related to the META-INF cxf.xml, I haven't tracked down yet why that would be occurring. That file is present in the cxf core jar, and the exception does not seem to have any actual impact.
-
-
20. Re: Not able to run query
shawkins Sep 27, 2017 8:33 AM (in response to vijayjose)Logged this issue as [TEIID-5082] Salesforce default URL incorrect - JBoss Issue Tracker