-
Bug
-
Resolution: Not a Bug
-
Major
-
None
-
15.0
-
None
-
Undefined
I try to use wildfly+teiid and get strange exception
1. Download wildfly-teiid-server V15 (last released)
2. Add resource adapter to standalone config
<resource-adapter id="salesforcefour"> <module slot="main" id="org.jboss.teiid.resource-adapter.salesforce-41"/> <connection-definitions> <connection-definition class-name="org.teiid.resource.adapter.salesforce.SalesForceManagedConnectionFactory" jndi-name="java:/sfDS41" enabled="true" connectable="true" use-java-context="true" pool-name="sfDS41"> <config-property name="connectTimeout">30000</config-property> <config-property name="password">ppp</config-property> <config-property name="URL">https://test.salesforce.com/services/Soap/u/45.0</config-property> <config-property name="requestTimeout">120000</config-property> <config-property name="username">uuu</config-property> </connection-definition> </connection-definitions> </resource-adapter>
3. Start the server by command ./bin/standalone.sh -c=standalone-teiid.xml
4. Try to deploy ddl
CREATE DATABASE db; USE DATABASE db; CREATE FOREIGN DATA WRAPPER salesforce; CREATE SERVER salesforce FOREIGN DATA WRAPPER salesforce OPTIONS ("resource-name" 'sfDS41'); CREATE SCHEMA salesforce SERVER salesforce; IMPORT FROM SERVER salesforce INTO salesforce OPTIONS("importer.useFullSchemaName" 'false', "importer.NormalizeNames" 'false', "importer.modelAuditFields" 'true', "importer.importStatstics" 'true');
I tried use some other wrapper names in DDL, as salesforce-41, salesforce-34, but get the error of parsing DDL
{"jboss.deployment.unit.\"sf-vdb.ddl\".PARSE" => "WFLYSRV0153: Failed to process phase PARSE of deployment \"sf-vdb.ddl\" Caused by: org.teiid.metadata.ParseException: TEIID30386 org.teiid.api.exception.query.QueryParserException: TEIID31100 Parsing error: Encountered \"DATA WRAPPER salesforce[*]-[*]41;\" at line 3, column 39. Was expecting: <EOF> | \"options\" | \"type\" | \"handler\" | \";\" Caused by: org.teiid.api.exception.query.QueryParserException: TEIID31100 Parsing error: Encountered \"DATA WRAPPER salesforce[*]-[*]41;\" at line 3, column 39. Was expecting: <EOF> | \"options\" | \"type\" | \"handler\" | \";\""}}
5. Got the exception
17:54:14,450 ERROR [org.teiid.RUNTIME] (Worker3) TEIID30021 Uncaught exception processing work: java.lang.ClassCastException: class org.teiid.resource.adapter.salesforce.SalesforceConnectionImpl cannot be cast to class org.teiid.translator.salesforce.SalesforceConnection (org.teiid.resource.adapter.salesforce.SalesforceConnectionImpl is in unnamed module of loader 'org.jboss.teiid.resource-adapter.salesforce-41@15.0.0' @4fc75d56; org.teiid.translator.salesforce.SalesforceConnection is in unnamed module of loader 'org.jboss.teiid.translator.salesforce@15.0.0' @549eaee5) at org.jboss.teiid.translator.salesforce@15.0.0//org.teiid.translator.salesforce.SalesForceMetadataProcessor.process(SalesForceMetadataProcessor.java:56) at org.jboss.teiid.api@15.0.0//org.teiid.translator.ExecutionFactory.getMetadata(ExecutionFactory.java:989) at org.jboss.teiid@15.0.0//org.teiid.query.metadata.NativeMetadataRepository.getMetadata(NativeMetadataRepository.java:89) at org.jboss.teiid@15.0.0//org.teiid.query.metadata.NativeMetadataRepository.loadMetadata(NativeMetadataRepository.java:55)