Are you using a dynamic vdb or Teiid Designer? If it's Teiid Designer, I believe this is a know issue with their import logic that is inappropriately mapping the char type, it should map to string instead. See [TEIIDDES-2061] char[n+] field is truncated by importer - JBoss Issue Tracker
In Teiid, it does not have fixed CHAR type. When somebody designs CHAR(4), it is effectively treated as CHAR(1). You can use varchar(4) or string(4) type to work around the limitation.
I tried to manually change the type to string(4) in teiid metadata but still didnt work..Based on Steven reply it looks like it is fixed in 8.4 version..
So i tried EAP6.1 and Teiid 8.6 version.. Now i am facing new issues..Below is the log..
Basically it is unable to find the database info i think..
OneViewVDB.1 model "RRDS_Stage" metadata failed to load. Reason:TEIID80002 null does not exist.
FYI..when i try the connectivity in JBOSS admin console i am able to do the test connection. But why it is unable to find in VDB??
16:18:58,108 INFO [org.teiid.RUNTIME] (MSC service thread 1-3) TEIID50029 VDB OneViewVDB.1 model "OneViewModel" metadata is currently being loaded. Start Time: 4/8/14 4:18 PM
16:18:58,134 INFO [org.teiid.RUNTIME] (MSC service thread 1-3) TEIID50029 VDB OneViewVDB.1 model "IDR_Stage" metadata is currently being loaded. Start Time: 4/8/14 4:18 PM
16:18:58,167 INFO [org.hibernate.validator.internal.util.Version] (ServerService Thread Pool -- 51) HV000001: Hibernate Validator 4.3.1.Final
16:18:58,167 INFO [org.teiid.RUNTIME] (MSC service thread 1-3) TEIID50029 VDB OneViewVDB.1 model "RRDS_Stage" metadata is currently being loaded. Start Time: 4/8/14 4:18 PM
16:18:58,412 WARN [org.teiid.RUNTIME] (teiid-async-threads - 3) TEIID50036 VDB OneViewVDB.1 model "RRDS_Stage" metadata failed to load. Reason:TEIID80002 null does not exist.
Looks like there is something wrong with VDB, can you recreate the VDB and re-deploy?
Thank you for your reply. After creating new vdb it worked fine...
But my original problem with CHAR(4) is still not resolved with teiid 8.6 and eap6.1
As per your suggestion I tried to keep native type as CHAR only but dataType attribute to String in teiid designer..still didnt work.
Could you please provide more details on workaround..
Did you change that on source model for your Oracle?
Do you mean in the actual oracle database? If so changing source is not possible option..It is legacy investment data repository which used by many systems..so we can not impact and change source.
But in my teiid relational source model i set datatype to string and also in view model it is string.
I was NOT suggesting to change in the physical source, only in VDB's model. With the changes you made it should have worked correctly.
See what is set on the native type on the column, see if changing that or removing it have any effect. You are working with 8.6 right? Also is it possible for you to share your VDB (only if there no sensitive information)?
Thank you..i thought i need to update teiid runtime to fix it.
Now updated the teiid designer to 8.3.2 and it fixed the issue..
Last question..I am trying to use the odata url and it gives me entity not found..Please note that i have created the primary key in my view model..
OneViewTest is my VDB
OneViewTest is my relational view schema, in which i have VM_ACCOUNT_ATTRIBUTES
But this $metadata url works fine..
Do i need to do something extra to enable odata?
NotFoundException with message TEIID16011 EntitySet "OneViewTest.VM_ACCOUNT_ATTRIBUTES" is not found; Check the spelling, use modelName.tableName; The table that representing the Entity type must either have a PRIMARY KEY or UNIQUE key(s).
As the error message says, your view must have primary key for the Odata to work.
How does your URL look like? make sure you letter case matches and use "modelname.viewname".
my odata url is
Below sql gives me data in squirrel
select * from OneViewTest.VM_ACCOUNT_ATTRIBUTES
and my squirrel url is
So my VDB name is : OneViewTest
my schema name: OneViewTest
table name: VM_ACCOUNT_ATTRIBUTES
I have attached screenshot which shows both schema and table name
teiid.png 8.0 KB