0

Sorry, I'm no Java person. Currently I'm playing with JBoss Teiid hoping that the tool can provide us a data virtualization layer among multiple data sources. I managed to install Teiid 10.2.1 on Wildfly 11. I started to set up various source models from multiple flavor of data sources.

First I created a flat file source model. I can preview the table fine. Next I created a MySQL source model. When I tried to preview the table, it gave me

Error deploying "PREVIEW-9b7b127a-cc80-4751-be77-2053c495daa8" - please check the server log for more details

By looking into the log, the problem seems to be

2018-08-19 19:38:53,878 WARN [org.teiid.RUNTIME] (Worker1_async-teiid-threads2) TEIID50036 VDB PREVIEW-9b7b127a-cc80-4751-be77-2053c495daa8.1.0.0 model "MySQLSourceModel" metadata failed to load. Reason:TEIID31259 In the statement ending with token teiid_mysql5 on line 2 column 61 the ddl is not valid: TEIID60017 Invalid prefix teiid_mysql5, teiid_ is reserved for Teiid use.: org.teiid.metadata.ParseException: TEIID31259 In the statement ending with token teiid_mysql5 on line 2 column 61 the ddl is not valid: TEIID60017 Invalid prefix teiid_mysql5, teiid_ is reserved for Teiid use.

I exported the model into Teiid DDL, it appears containing the fol,lowing

SET NAMESPACE 'http://www.teiid.org/ext/relational/2012' AS teiid_mysql5

But I can't find anywhere that allows me to change the namespace setting. Then I create an VDB from the model hoping that I can preview the table by executing the VDB. But I still got an error stating

19:53:09,906 WARN [org.teiid.SECURITY] (NIO3) TEIID40011 Processing exception 'TEIID50072 The username "user" and/or password and/or payload token could not be authenticated by security domain teiid-security.' for session null. Exception type org.teiid.client.security.LogonException thrown from org.teiid.jboss.JBossSecurityHelper.authenticate(JBossSecurityHelper.java:152). Enable more detailed logging to see the entire stacktrace. 19:53:09,945 WARN [org.teiid.SECURITY] (NIO0) TEIID40011 Processing exception 'TEIID50072 The username "user" and/or password and/or payload token could not be authenticated by security domain teiid-security.' for session null. Exception type org.teiid.client.security.LogonException thrown from org.teiid.jboss.JBossSecurityHelper.authenticate(JBossSecurityHelper.java:152). Enable more detailed logging to see the entire stacktrace.

How can I add org.teiid.jboss.JBossSecurityHelper.java into eclipse? Thank you very much in advance for any help.

dinky
  • 1
  • 1
  • Looks like when you are also working with Teiid Designer, in there somehow you copied ddl for building a model? Delete that model, try to use import->jdbc import and follow the wizard to create model. see http://docs.jboss.org/teiid/designer/11.1.2/user-guide/html_single/#guide-example-model-jdbc-section – Ramesh Reddy Aug 20 '18 at 22:38
  • Thanks, Ramesh, but that's not the case. I finally managed to fix the problem by importing MySQL and Postgres source model through JDBC connections. I used to import them through Teiid connection profiles which gave me the problem. Now the problem is mongodb because Teiid does not support mongodb jdbc driver. Instead, it uses the mongo java client internally, so I have to import the data source through Teiid connection, so the problem persists on that source model. The VDB security issue is caused by the same reason. As long as I import through jdbc connection, there's no problem. – dinky Aug 21 '18 at 23:15
  • Before you connect the Designer to server, you need to create a user account and admin account in the server using add-user.sh script, then use those credentials in Designer to connect to Server. – Ramesh Reddy Aug 23 '18 at 16:03
  • Did all those. Since I'm not a Java person, I've played with it for couple of months now. Right now it looks like the problem is setting up mongodb source model. If I exclude the mongodb model from the VDB, ir works fine. – dinky Aug 23 '18 at 17:21
  • You don't really require Java knowledge to use Teiid, mostly SQL required. When you use Teiid connection to add the Mongo model what is the error you see in the server side. Also note Teiid so far only tested with up to 3.x version. – Ramesh Reddy Aug 23 '18 at 21:09
  • Adding the model is fine, but I can't preview data. It complained about the namespace of the model is invalid because it has a "teiid_" prefix, and teiid_ is a reserved word. If I create a VDB from the model and try to test the VDB, it complained the username/password doesn't work. When I said that Java knowledge is required is because you will need that to understand what the error is complaining about... – dinky Aug 24 '18 at 23:12
  • I take it back, using Wildfly does need some knowledge. What version of JBDS are you using. There seems to be some mismatch – Ramesh Reddy Aug 24 '18 at 23:37
  • I'm sorry, what do you mean by JBDS? Data Source? or JBAS? – dinky Aug 26 '18 at 02:00
  • Teiid Designer version. It comes in package called JBoss developer studio. – Ramesh Reddy Aug 26 '18 at 04:09
  • 11.1.2.FINAL. Teiid runtime is 10.2.1. – dinky Aug 27 '18 at 12:24
  • OK, I manually created the Mongo source model by adding Teiid Metadata Model method, created a child table, and manually added the columns to the table. That works. I can preview the data. Then I went ahead creating a View Model to inner join multiple source models. The View Model is fine and data preview is fine. Then I created an VDB from the View Mode. The VDB got an error symbol on it and there's no error in the error log. When I tried to execute the VDB, it gave me that username/password as shown in the original post. – dinky Aug 27 '18 at 14:19
  • When I tried to connect to the VDB through Teiid JDBC driver from OpenOffice Base, it connected fine. But when I tried to double-click on any of the tables/views. it gave me the following error: The data content could not be loaded. Scrollable type Resultset.TYPE_SCROLL_SENSITIVE is not supported. When I used Excel to connect the the VDB through pg ODBC driver, it shows all the model resources. But when I double-click on a table, it shows DataSource.Error: ODBC: ERROR [HY000] Error while executing the query Details: DataSourceKind=Odbc DataSourcePath=dsn=Teiid OdbcErrors=Table – dinky Aug 27 '18 at 14:22
  • Ignoring your last two comments, the exception means only either you are not using the correct credentials (in which case the preview also will not work) or your VDB has errors. You may want post this back in Teiid forums with your VDB as an attachment, then may be I can tell you what is wrong the vdb. – Ramesh Reddy Aug 27 '18 at 19:14
  • OK, I think I found what are the problems of my vdb. I have one flat file source model. In the vdb, there's a problem listed under that model Possible cross-join: Group/s '[t, f]' are not either joined directly or transitively with other groups through a join criteria. I think the problem is on the transformation query. The other problem is on my Mongo source model. It states Relational table xxxxx does not have a Name in Source (see validation Preferences). – dinky Aug 27 '18 at 20:15

0 Answers0