-
1. Re: Problem Using a Custom Connector from TEIID Designer
rareddy Sep 29, 2014 1:15 PM (in response to lautar.molinero)If you use "jboss-cli.sh" program and issue a command like
/subsystem=teiid:read-rar-description(rar-name=file)
do see a property like
{"managedconnectionfactory-class" => {
"type" => STRING,
"display" => "managedconnectionfactory-class",
"read-only" => "true",
"advanced" => "true",
"default" => "org.teiid.resource.adapter.file.FileManagedConnectionFactory"
}},
If yes, then the issue is in the Designer side. Designer tooling supposed to be written such that it can take the value of this property and supply in the "class-name" property. Often times we find Designer may have hard-coded values, which can be problematic in situations as you are seeing. Once you verify, you can log an issue here Teiid Designer - JBoss Issue Tracker
Ramesh..
-
2. Re: Problem Using a Custom Connector from TEIID Designer
lautar.molinero Sep 29, 2014 2:03 PM (in response to rareddy)Thank you for the answer.
here is the command output.
[standalone@localhost:9999 /] /subsystem=teiid:read-rar-description(rar-name=MarketoAdapter-0.0.1-SNAPSHOT.rar)
{
"outcome" => "success",
"result" => [
{"resourceadapter-class" => {
"type" => STRING,
"display" => "resourceadapter-class",
"read-only" => "true",
"advanced" => "true",
"default" => "com.citrix.cdm.connector.adapter.marketo.MarketoResourceAdapter"
}},
{"managedconnectionfactory-class" => {
"type" => STRING,
"display" => "managedconnectionfactory-class",
"read-only" => "true",
"advanced" => "true",
"default" => "com.citrix.cdm.connector.adapter.marketo.MarketoManagedConnectionFactory"
}},
{"username" => {
"type" => STRING,
"required" => false,
"description" => "this is the username",
"display" => "usernameRA",
"read-only" => false,
"advanced" => false,
"masked" => false
}},
{"class-type" => {
"type" => STRING,
"required" => false,
"description" => "this is the class type",
"display" => "class-name",
"read-only" => false,
"advanced" => false,
"masked" => false
}}
]
}
the class-name parameter in BOLD is me trying to fool the designer. ( I was trying to "override" the property)
actually the managed connection factory class is looking OK in the designer.
-
3. Re: Problem Using a Custom Connector from TEIID Designer
rareddy Sep 29, 2014 2:39 PM (in response to lautar.molinero)You provided the "class-type" not "class-name". display is just that, only for UI, underlying property name will be class-type. Also, did you define this property in ra.xml? All the ra.xml properties are showed here.
BTW, I not sure if overriding the "class-name" property in ra.xml works with Designer, you certainly give it a try.
Ramesh..
-
4. Re: Problem Using a Custom Connector from TEIID Designer
lautar.molinero Oct 27, 2014 3:52 PM (in response to lautar.molinero)Hi Ramesh, again thanks for the help.
Overriding de class-name property didn't work unfortunatelly.
I'll go a step backwards.
this is what I'm seeing, but im not sure if i'm using the designer in the right way.
by the way, is there anywhere I can get the designer code to check if this is an issue. or if a I need to define something in my connector to make it work?
Thanks
-
5. Re: Problem Using a Custom Connector from TEIID Designer
rareddy Oct 27, 2014 4:17 PM (in response to lautar.molinero)Teiid Designer source code is at Teiid-Designer/teiid-designer · GitHub they have WIKI pages how to setup the environment etc.
Also what version of the Designer you are working with? Is to possible to share your resource-adapter for me to test?
Ramesh..
-
6. Re: Problem Using a Custom Connector from TEIID Designer
lautar.molinero Oct 27, 2014 5:14 PM (in response to rareddy)I'm sorry I cannot give you my resource adapter. If I have some time I might be able to create a dummy one that has the same issue for you.
Looking at the designer code i found this:
String rarConnFactoryValue = null;
if(isRarDriver(driverName,teiidVersion)) {
rarConnFactoryValue = getManagedConnectionFactoryClassDefault(propDefns);
}
private boolean isRarDriver(String driverName, ITeiidServerVersion teiidVersion) {
boolean isRarDriver = false;
if(!CoreStringUtil.isEmpty(driverName)) {
// Teiid 8.3 and before
if(!TranslatorHelper.isTeiid84OrHigher(teiidVersion)) {
if (driverName.endsWith(DOT_RAR)) {
isRarDriver = true;
}
// Teiid 8.4 and later
} else {
if( driverName.equals(TranslatorHelper.TEIID_FILE_DRIVER_84UP) || driverName.equals(TranslatorHelper.TEIID_GOOGLE_DRIVER_84UP)
|| driverName.equals(TranslatorHelper.TEIID_INFINISPAN_DRIVER_84UP) || driverName.equals(TranslatorHelper.TEIID_LDAP_DRIVER_84UP)
|| driverName.equals(TranslatorHelper.TEIID_SALESORCE_DRIVER_84UP) || driverName.equals(TranslatorHelper.TEIID_WEBSERVICE_DRIVER_84UP)
|| driverName.equals(TranslatorHelper.TEIID_MONGODB_DRIVER_84UP)) {
isRarDriver = true;
}
}
}
return isRarDriver;
}
I'm using TEIID 8.4.1-redhat-7
so I think thats the issue. in versions equals or higher than 8.4 the class-name property will be set to null.
I think maybe I wrote the connector using 8.3 standards and that doesn't work on 8.4 teiid.
Am I right?
-
7. Re: Problem Using a Custom Connector from TEIID Designer
rareddy Oct 27, 2014 8:00 PM (in response to lautar.molinero)There is no 8.3 standards Vs 8.4. This is JEE specification, for implementing a resource adapter, happen to use some base classes we wrote to make ease of development by folks like you. Now the error is in Designer, so you can upgrade the Designer version and see if that fixes your issue.