[teiid-issues] [JBoss JIRA] (TEIID-6030) OFFSET LIMIT is not work in multiple joins SOQLs
by Renat Eskenin (Jira)
[ https://issues.redhat.com/browse/TEIID-6030?page=com.atlassian.jira.plugi... ]
Renat Eskenin edited comment on TEIID-6030 at 9/9/20 7:34 AM:
--------------------------------------------------------------
If you just remove task.Request_Type__c as \"{Task}/Request_Type__c\", and task.Type = :type you get same behavior
was (Author: i3draven):
If you just remove Type and task.Type = :type you get same behavior
> OFFSET LIMIT is not work in multiple joins SOQLs
> ------------------------------------------------
>
> Key: TEIID-6030
> URL: https://issues.redhat.com/browse/TEIID-6030
> Project: Teiid
> Issue Type: Bug
> Components: Salesforce Connector
> Reporter: Renat Eskenin
> Assignee: Steven Hawkins
> Priority: Major
>
> In simple teiid spring boot applicatio we call SQL
> {code}
> select
> task.Id as \"{Task}/Id\",
> task.createddate as \"{Task}/CreatedDate\",
> owner.Name as \"{Owner}/Name\",
> contact.Name as \"{Contact}/Name\",
> lead.Name as \"{Lead}/Name\",
> task.ActivityDate as \"{Task}/ActivityDate\",
> task.Request_Type__c as \"{Task}/Request_Type__c\",
> task.subject as \"{Task}/Subject\",
> task.description as \"{Task}/Description\"
> from task
> LEFT OUTER JOIN /*+ MAKEDEP */ \"user\" AS creator ON task.CreatedById=creator.Id
> LEFT OUTER JOIN /*+ MAKEDEP */ \"user\" AS owner ON task.OwnerId=owner.Id
> LEFT OUTER JOIN /*+ MAKEDEP */ Contact AS contact ON task.whoid=contact.Id
> LEFT OUTER JOIN /*+ MAKEDEP */ Lead AS lead ON task.whoid=lead.Id
> where creator.Name = :name
> and task.Type = :type
> LIMIT 20 OFFSET 3000
> {code}
> And get Exception
> {code}
> org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [select task.Id as \"{Task}/Id\", task.createddate as \"{Task}/CreatedDate\", owner.Name as \"{Owner}/Name\", contact.Name as \"{Contact}/Name\", lead.Name as \"{Lead}/Name\", task.ActivityDate as \"{Task}/ActivityDate\", task.Request_Type__c as \"{Task}/Request_Type__c\", task.subject as \"{Task}/Subject\", task.description as \"{Task}/Description\" from task LEFT OUTER JOIN /*+ MAKEDEP */ \"user\" AS creator ON task.CreatedById=creator.Id LEFT OUTER JOIN /*+ MAKEDEP */ \"user\" AS owner ON task.OwnerId=owner.Id LEFT OUTER JOIN /*+ MAKEDEP */ Contact AS contact ON task.whoid=contact.Id LEFT OUTER JOIN /*+ MAKEDEP */ Lead AS lead ON task.whoid=lead.Id where creator.Name = ? and task.Type = ? LIMIT 20 OFFSET 3000 ]; SQL state [50000]; error code [30504]; TEIID30504 salesforce: null; nested exception is org.teiid.jdbc.TeiidSQLException: TEIID30504 salesforce: null
> {code}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
2 days, 10 hours
[JBoss JIRA] (TEIID-2605) Optimization substitutes wrong column in where clause
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-2605?page=com.atlassian.jira.plugin... ]
Steven Hawkins closed TEIID-2605.
---------------------------------
> Optimization substitutes wrong column in where clause
> -----------------------------------------------------
>
> Key: TEIID-2605
> URL: https://issues.jboss.org/browse/TEIID-2605
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 8.1
> Environment: z/OS
> Reporter: Jeff Hayes
> Assignee: Steven Hawkins
> Attachments: query_plan.txt, views.xml
>
>
> Optimization results in a query with a different column in the WHERE clause producing an empty result set.
> Full query plan is attached but the beginning and ending queries are shown below. Note that the subject column of the IN clause is SCOPEID but optimization changes it to AUTHID for some reason.
> USER COMMAND:
> SELECT * FROM SECURITY.SCPXREF AS CHORUS_B WHERE (CHORUS_B.SYSID = 'DE29') AND ((CHORUS_B.SCOPEID IN (SELECT SN5.SCOPEID FROM SECURI
> TY.SCPNEXT AS SN5 WHERE (SYSID = 'DE29') AND (NEXTREC IN (SELECT SN4.SCOPEID FROM SECURITY.SCPNEXT AS SN4 WHERE (SYSID = 'DE29') AND
> (NEXTREC IN (SELECT SN3.SCOPEID FROM SECURITY.SCPNEXT AS SN3 WHERE (SYSID = 'DE29') AND (NEXTREC IN (SELECT SN2.SCOPEID FROM SECURI
> TY.SCPNEXT AS SN2 WHERE (SYSID = 'DE29') AND (NEXTREC = 'CHRDEPT1'))))))))) OR (CHORUS_B.SCOPEID IN (SELECT SN4.SCOPEID FROM SECURIT
> Y.SCPNEXT AS SN4 WHERE (SYSID = 'DE29') AND (NEXTREC IN (SELECT SN3.SCOPEID FROM SECURITY.SCPNEXT AS SN3 WHERE (SYSID = 'DE29') AND
> (NEXTREC IN (SELECT SN2.SCOPEID FROM SECURITY.SCPNEXT AS SN2 WHERE (SYSID = 'DE29') AND (NEXTREC = 'CHRDEPT1'))))))) OR (CHORUS_B.SC
> OPEID IN (SELECT SN3.SCOPEID FROM SECURITY.SCPNEXT AS SN3 WHERE (SYSID = 'DE29') AND (NEXTREC IN (SELECT SN2.SCOPEID FROM SECURITY.S
> CPNEXT AS SN2 WHERE (SYSID = 'DE29') AND (NEXTREC = 'CHRDEPT1'))))) OR (CHORUS_B.SCOPEID IN (SELECT SN2.SCOPEID FROM SECURITY.SCPNEX
> T AS SN2 WHERE (SYSID = 'DE29') AND (NEXTREC = 'CHRDEPT1'))) OR (CHORUS_B.SCOPEID = 'CHRDEPT1'))
> OPTIMIZATION COMPLETE:
> PROCESSOR PLAN:
> AccessNode(10) output=[x.sysid AS sysid, x.scopeid AS authid, x.authid AS scopeid, x.authtype AS authtype] SELECT g_0.SYSID, g_0.SCO
> PEID, g_0.AUTHID, g_0.AUTHTYPE FROM SECURITY_CIA_DB2_D91BPTIB_CIADB01.SCPXREF AS g_0 WHERE (g_0.SYSID = 'DE29') AND ((g_0.AUTHID IN
> (SELECT g_1.SCOPEID FROM SECURITY_CIA_DB2_D91BPTIB_CIADB01.SCPNEXT AS g_1 WHERE (g_1.SYSID = 'DE29') AND (g_1.NEXTREC IN (SELECT g_2
> .SCOPEID FROM SECURITY_CIA_DB2_D91BPTIB_CIADB01.SCPNEXT AS g_2 WHERE (g_2.SYSID = 'DE29') AND (g_2.NEXTREC IN (SELECT g_3.SCOPEID FR
> OM SECURITY_CIA_DB2_D91BPTIB_CIADB01.SCPNEXT AS g_3 WHERE (g_3.SYSID = 'DE29') AND (g_3.NEXTREC IN (SELECT g_4.SCOPEID FROM SECURITY
> _CIA_DB2_D91BPTIB_CIADB01.SCPNEXT AS g_4 WHERE (g_4.SYSID = 'DE29') AND (g_4.NEXTREC = 'CHRDEPT1'))))))))) OR (g_0.AUTHID IN (SELECT
> g_5.SCOPEID FROM SECURITY_CIA_DB2_D91BPTIB_CIADB01.SCPNEXT AS g_5 WHERE (g_5.SYSID = 'DE29') AND (g_5.NEXTREC IN (SELECT g_6.SCOPEI
> D FROM SECURITY_CIA_DB2_D91BPTIB_CIADB01.SCPNEXT AS g_6 WHERE (g_6.SYSID = 'DE29') AND (g_6.NEXTREC IN (SELECT g_7.SCOPEID FROM SECU
> RITY_CIA_DB2_D91BPTIB_CIADB01.SCPNEXT AS g_7 WHERE (g_7.SYSID = 'DE29') AND (g_7.NEXTREC = 'CHRDEPT1'))))))) OR (g_0.AUTHID IN (SELE
> CT g_8.SCOPEID FROM SECURITY_CIA_DB2_D91BPTIB_CIADB01.SCPNEXT AS g_8 WHERE (g_8.SYSID = 'DE29') AND (g_8.NEXTREC IN (SELECT g_9.SCOP
> EID FROM SECURITY_CIA_DB2_D91BPTIB_CIADB01.SCPNEXT AS g_9 WHERE (g_9.SYSID = 'DE29') AND (g_9.NEXTREC = 'CHRDEPT1'))))) OR (g_0.AUTH
> ID IN (SELECT g_10.SCOPEID FROM SECURITY_CIA_DB2_D91BPTIB_CIADB01.SCPNEXT AS g_10 WHERE (g_10.SYSID = 'DE29') AND (g_10.NEXTREC = 'C
> HRDEPT1'))) OR (g_0.AUTHID = 'CHRDEPT1'))
> The view definitions are shown below:
> <view name="SCPNEXT">
> <columns>
> <column name="sysid" type="varchar"/>
> <column name="scopeid" type="varchar"/>
> <column name="nextrec" type="varchar"/>
> </columns>
> <definition>
> #if ($db.count("select count(*) from sys.tables where Name='config' and SchemaName = 'security_db'") > 0)
> #set ($count = 0)
> #foreach($t in $db.query("select DB_TYPE, DB_LOC, DB_QUAL from security_db.config WHERE TYPE = 'CIA'"))
> #if ($db.count("select count(*) from sys.tables where SchemaName = 'SECURITY_CIA_${t.DB_TYPE}_${t.DB_LOC}_${t.DB_QUAL}'") == 0)
> #set ($count = $count + 1)
> #end
> #end
> #if ($count == 0)
> SELECT t.sysid, t.scopeid, t.nextrec
> FROM (
> #foreach($t in $db.query("select DB_TYPE, DB_LOC, DB_QUAL from security_db.config WHERE TYPE = 'CIA'"))
> SELECT n.sysid, n.scopeid, n.nextrec
> FROM SECURITY_CIA_${t.DB_TYPE}_${t.DB_LOC}_${t.DB_QUAL}.SCPNEXT n
> #if( $velocityHasNext ) UNION #end
> #end
> ) AS t
> #end
> #end
> </definition>
> </view>
> <view name="SCPXREF">
> <columns>
> <column name="sysid" type="varchar"/>
> <column name="authid" type="varchar"/>
> <column name="scopeid" type="varchar"/>
> <column name="authtype" type="varchar"/>
> </columns>
> <definition>
> #if ($db.count("select count(*) from sys.tables where Name='config' and SchemaName = 'security_db'") > 0)
> #set ($count = 0)
> #foreach($t in $db.query("select DB_TYPE, DB_LOC, DB_QUAL from security_db.config WHERE TYPE = 'CIA'"))
> #if ($db.count("select count(*) from sys.tables where SchemaName = 'SECURITY_CIA_${t.DB_TYPE}_${t.DB_LOC}_${t.DB_QUAL}'") == 0)
> #set ($count = $count + 1)
> #end
> #end
> #if ($count == 0)
> SELECT sysid, scopeid, authid, authtype
> FROM (
> #foreach($t in $db.query("select DB_TYPE, DB_LOC, DB_QUAL from security_db.config WHERE TYPE = 'CIA'"))
> SELECT x.sysid, x.scopeid, x.authid, x.authtype
> FROM SECURITY_CIA_${t.DB_TYPE}_${t.DB_LOC}_${t.DB_QUAL}.SCPXREF x
> #if( $velocityHasNext ) UNION #end
> #end
> ) AS t
> #end
> #end
> </definition>
> </view>
> I guess the best way to test this is to define these views and run the input query with SHOWPLAN=DEBUG and see if the AUTHID substitution is occurring.
> Thanks!
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
1 year
[teiid-issues] [JBoss JIRA] (TEIID-6041) Connection pooling is not working for salesforce resource-adapter
by Renat Eskenin (Jira)
Renat Eskenin created TEIID-6041:
------------------------------------
Summary: Connection pooling is not working for salesforce resource-adapter
Key: TEIID-6041
URL: https://issues.redhat.com/browse/TEIID-6041
Project: Teiid
Issue Type: Bug
Components: Salesforce Connector
Reporter: Renat Eskenin
Assignee: Steven Hawkins
I have resource adapter with pooling settings in wildfly-teiid-server:
{code}
<resource-adapter id="salesforcefour" statistics-enabled="true">
<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"></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"></config-property>
<pool>
<min-pool-size>5</min-pool-size>
<initial-pool-size>5</initial-pool-size>
<prefill>true</prefill>
<use-strict-min>true</use-strict-min>
<flush-strategy>FailingConnectionOnly</flush-strategy>
</pool>
</connection-definition>
</connection-definitions>
</resource-adapter>
{code}
But really connections is not established from server:
{code}
sudo netstat -nlpat|grep java
tcp 0 0 127.0.0.1:31000 0.0.0.0:* LISTEN 27430/java
tcp 0 0 127.0.0.1:8443 0.0.0.0:* LISTEN 27430/java
tcp 0 0 127.0.0.1:9990 0.0.0.0:* LISTEN 27430/java
tcp 0 0 127.0.0.1:35432 0.0.0.0:* LISTEN 27430/java
tcp 0 0 127.0.0.1:8080 0.0.0.0:* LISTEN 27430/java
tcp 0 0 127.0.0.1:31000 127.0.0.1:51860 ESTABLISHED 27430/java
tcp 0 0 127.0.0.1:31000 127.0.0.1:51858 ESTABLISHED 27430/java
tcp 0 0 127.0.0.1:9990 127.0.0.1:60048 ESTABLISHED 27430/java
{code}
Connection pooling is not working?
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years
[teiid-issues] [JBoss JIRA] (TEIIDSB-227) Information about support for Hibernate-Spatial
by Fabian Knoll (Jira)
[ https://issues.redhat.com/browse/TEIIDSB-227?page=com.atlassian.jira.plug... ]
Fabian Knoll commented on TEIIDSB-227:
--------------------------------------
This is an example for the workaround. The geom attribute must be of type Clob, not String:
{code:java}
package com.example.teidvdbless.teidvdblessapp;
import org.locationtech.jts.geom.Geometry;
import org.locationtech.jts.geom.MultiLineString;
import org.locationtech.jts.io.ParseException;
import org.locationtech.jts.io.WKTReader;
import org.teiid.spring.annotations.SelectQuery;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Lob;
import java.io.IOException;
import java.sql.Clob;
import java.sql.SQLException;
@Entity
@SelectQuery("SELECT gid, ST_AsText(geom), name FROM nyc.nyc_streets")
public class Street {
@Id
int gid;
@Column
@Lob
Clob geom;
@Column
String name;
public MultiLineString getMultiLineString() throws ParseException, SQLException, IOException {
String wktString = getWktFromClob(this.geom);
WKTReader wktReader = new WKTReader();
Geometry geometry = wktReader.read(wktString);
return (MultiLineString) geometry;
}
private String getWktFromClob(Clob clob) throws SQLException, IOException {
int lengthInt = calculateLengthOfClob(clob);
char[] chars = new char[lengthInt];
this.geom.getCharacterStream().read(chars);
String wktString = String.copyValueOf(chars);
return wktString;
}
private int calculateLengthOfClob(Clob clob) throws SQLException {
long length = clob.length();
int lengthInt = Math.toIntExact(length);
return lengthInt;
}
}
{code}
> Information about support for Hibernate-Spatial
> -----------------------------------------------
>
> Key: TEIIDSB-227
> URL: https://issues.redhat.com/browse/TEIIDSB-227
> Project: Teiid Spring Boot
> Issue Type: Task
> Components: datasource
> Affects Versions: 1.6.0
> Reporter: Fabian Knoll
> Priority: Major
> Labels: hibernate, spatial, types
> Fix For: 1.7.0
>
>
> Hi,
> in our project we tried to use Teiid-Spring-Boot to connect to a PostGIS database. We want to use the so called [VDB-less Development|https://github.com/teiid/teiid-spring-boot/blob/master/docs/U...]. Therefore the hibernate spatial mapping for geometry-Types is needed. We tried different (datasource) configurations, but we couldn't get a running example.
> Is the hibernate-spatial type mapping supported in Teiid-Spring-Boot and if so, can you provide us an example?
> Hint: In our entities we use org.locationtech.jts.geom.Geometry (and subtypes) for the mapped fields.
>
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years
[teiid-issues] [JBoss JIRA] (TEIIDSB-227) Information about support for Hibernate-Spatial
by Fabian Knoll (Jira)
[ https://issues.redhat.com/browse/TEIIDSB-227?page=com.atlassian.jira.plug... ]
Fabian Knoll commented on TEIIDSB-227:
--------------------------------------
This is an example for the workaround. The geom attribute must be of type Clob, not String:
{code:java}
package com.example.teidvdbless.teidvdblessapp;
import org.locationtech.jts.geom.Geometry;
import org.locationtech.jts.geom.MultiLineString;
import org.locationtech.jts.io.ParseException;
import org.locationtech.jts.io.WKTReader;
import org.teiid.spring.annotations.SelectQuery;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Lob;
import java.io.IOException;
import java.sql.Clob;
import java.sql.SQLException;
@Entity
@SelectQuery("SELECT gid, ST_AsText(geom), name FROM nyc.nyc_streets")
public class Street {
@Id
int gid;
@Column
@Lob
Clob geom;
@Column
String name;
public MultiLineString getMultiLineString() throws ParseException, SQLException, IOException {
String wktString = getWktFromClob(this.geom);
WKTReader wktReader = new WKTReader();
Geometry geometry = wktReader.read(wktString);
return (MultiLineString) geometry;
}
private String getWktFromClob(Clob clob) throws SQLException, IOException {
int lengthInt = calculateLengthOfClob(clob);
char[] chars = new char[lengthInt];
this.geom.getCharacterStream().read(chars);
String wktString = String.copyValueOf(chars);
return wktString;
}
private int calculateLengthOfClob(Clob clob) throws SQLException {
long length = clob.length();
int lengthInt = Math.toIntExact(length);
return lengthInt;
}
}
{code}
> Information about support for Hibernate-Spatial
> -----------------------------------------------
>
> Key: TEIIDSB-227
> URL: https://issues.redhat.com/browse/TEIIDSB-227
> Project: Teiid Spring Boot
> Issue Type: Task
> Components: datasource
> Affects Versions: 1.6.0
> Reporter: Fabian Knoll
> Priority: Major
> Labels: hibernate, spatial, types
> Fix For: 1.7.0
>
>
> Hi,
> in our project we tried to use Teiid-Spring-Boot to connect to a PostGIS database. We want to use the so called [VDB-less Development|https://github.com/teiid/teiid-spring-boot/blob/master/docs/U...]. Therefore the hibernate spatial mapping for geometry-Types is needed. We tried different (datasource) configurations, but we couldn't get a running example.
> Is the hibernate-spatial type mapping supported in Teiid-Spring-Boot and if so, can you provide us an example?
> Hint: In our entities we use org.locationtech.jts.geom.Geometry (and subtypes) for the mapped fields.
>
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years
[teiid-issues] [JBoss JIRA] (TEIID-5362) Odata4 outputs in wrong timezone
by Oscar Arribas Arribas (Jira)
[ https://issues.redhat.com/browse/TEIID-5362?page=com.atlassian.jira.plugi... ]
Oscar Arribas Arribas reassigned TEIID-5362:
--------------------------------------------
Assignee: Oscar Arribas Arribas (was: Steven Hawkins)
> Odata4 outputs in wrong timezone
> --------------------------------
>
> Key: TEIID-5362
> URL: https://issues.redhat.com/browse/TEIID-5362
> Project: Teiid
> Issue Type: Bug
> Components: OData
> Affects Versions: 8.12.13.6_4
> Reporter: Deborah Steigner
> Assignee: Oscar Arribas Arribas
> Priority: Major
>
> The incoming odata4 request is requesting the records at 08:52Z (specifying UTC time). The DataVirt server (running in US/Chicago time) converts that into SQL to ask the database for records at 03:52 (with no timezone specifier... should be in local time, or US/Chicago). The database should recognize that the 03:52 Local time should be converted back to 08:52Z to match the DB records, however, it is not. This (and other tests), leads us to the conclusion that the database session/connection is actually not using US/Chicago (-5:00) timezone, but is instead using the UTC timezone. Unfortunately, we were not able to confirm either in the logs or in the configuration, where the connection was being set up in UTC timezone.
> .
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years
[teiid-issues] [JBoss JIRA] (TEIID-6038) Can't set connection pool attributes
by Renat Eskenin (Jira)
Renat Eskenin created TEIID-6038:
------------------------------------
Summary: Can't set connection pool attributes
Key: TEIID-6038
URL: https://issues.redhat.com/browse/TEIID-6038
Project: Teiid
Issue Type: Bug
Components: Salesforce Connector
Reporter: Renat Eskenin
Assignee: Steven Hawkins
Hi! I tried to make VDB to salesforce with wildfly-teiid-server. Bit when I set connection pool attributes i get error
{code}
Failed to modify resource [ ("subsystem" => "resource-adapters"), ("resource-adapter" => "salesforcefour"), ("connection-definitions" => "sfDS41") ]
Request
{
"operation" => "composite",
"address" => [],
"steps" => [{
"address" => [
("subsystem" => "resource-adapters"),
("resource-adapter" => "salesforcefour"),
("connection-definitions" => "sfDS41")
],
"operation" => "write-attribute",
"name" => "min-pool-size",
"value" => 1
}]
}
Response
Internal Server Error
{
"outcome" => "failed",
"result" => {"step-1" => {
"outcome" => "failed",
"failure-description" => "WFLYJCA0045: failed to set attribute: Index 0 out of bounds for length 0",
"rolled-back" => true
}},
"failure-description" => {"WFLYCTL0062: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-1" => "WFLYJCA0045: failed to set attribute: Index 0 out of bounds for length 0"}},
"rolled-back" => true
}
{code}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years
[teiid-issues] [JBoss JIRA] (TEIIDSB-227) Information about support for Hibernate-Spatial
by Fabian Knoll (Jira)
[ https://issues.redhat.com/browse/TEIIDSB-227?page=com.atlassian.jira.plug... ]
Fabian Knoll commented on TEIIDSB-227:
--------------------------------------
[~shawkins], [~rareddy]: Many thanks for your support !!!
To conclude: The extension of the org.teiid.dialect.TeiidDialect for knowing spatial types is the core problem. I am not sure if I (or my current project/customer) is able to provide that feature. But we will talk about that.
If you will investigate here, please let me know.
Regards,
Fabian
> Information about support for Hibernate-Spatial
> -----------------------------------------------
>
> Key: TEIIDSB-227
> URL: https://issues.redhat.com/browse/TEIIDSB-227
> Project: Teiid Spring Boot
> Issue Type: Task
> Components: datasource
> Affects Versions: 1.6.0
> Reporter: Fabian Knoll
> Priority: Major
> Labels: hibernate, spatial, types
> Fix For: 1.7.0
>
>
> Hi,
> in our project we tried to use Teiid-Spring-Boot to connect to a PostGIS database. We want to use the so called [VDB-less Development|https://github.com/teiid/teiid-spring-boot/blob/master/docs/U...]. Therefore the hibernate spatial mapping for geometry-Types is needed. We tried different (datasource) configurations, but we couldn't get a running example.
> Is the hibernate-spatial type mapping supported in Teiid-Spring-Boot and if so, can you provide us an example?
> Hint: In our entities we use org.locationtech.jts.geom.Geometry (and subtypes) for the mapped fields.
>
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years
[teiid-issues] [JBoss JIRA] (TEIID-6037) Cannot start translator salesforce-41
by Renat Eskenin (Jira)
[ https://issues.redhat.com/browse/TEIID-6037?page=com.atlassian.jira.plugi... ]
Renat Eskenin closed TEIID-6037.
--------------------------------
Resolution: Not a Bug
> Cannot start translator salesforce-41
> -------------------------------------
>
> Key: TEIID-6037
> URL: https://issues.redhat.com/browse/TEIID-6037
> Project: Teiid
> Issue Type: Bug
> Components: Salesforce Connector
> Affects Versions: 15.0
> Reporter: Renat Eskenin
> Assignee: Steven Hawkins
> Priority: Major
>
> 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
> {code}
> <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>
> {code}
> 3. Start the server by command ./bin/standalone.sh -c=standalone-teiid.xml
> 4. Try to deploy ddl
> {code}
> 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');
> {code}
> I tried use some other wrapper names in DDL, as salesforce-41, salesforce-34, but get the error of parsing DDL
> {code}
> {"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\" | \";\""}}
> {code}
> 5. Got the exception
> {code}
> 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(a)15.0.0' @4fc75d56; org.teiid.translator.salesforce.SalesforceConnection is in unnamed module of loader 'org.jboss.teiid.translator.salesforce(a)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)
> {code}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years