-
15. Re: Re: Re: error with jdbc
rareddy Oct 21, 2014 10:58 AM (in response to afrieden)Unfortunately there is no new information in the log. Restart your server and capture the whole log and show that. There can be only three reasons for connection rejection
1) The binding is not on right address
2) port 31000 is already being used in other application
3) User name/password are wrong
Check those closely you will be able to make the connection.
-
16. Re: error with jdbc
afrieden Oct 21, 2014 2:16 PM (in response to rareddy)Okay, the binding was in fact wrong. I had to use the url of the server and not localhost.
I am now getting the following error:
org.teiid.jdbc.TeiidSQLException: TEIID50072 The username "username" and/or password and/or payload token could not be authenticated by any membership domain.
However, I am able to connect to the admin console
$ bash /opt/jboss/bin/jboss-cli.sh --controller=ipaddress:9999
[disconnected /] connect
Authenticating against security realm: ManagementRealm
Username: username
Password: password
[standalone@ipaddress:9999 /]
Is there any reason that my username isn't authenticating against the ManagementRealm when connecting using JDBC? Thanks!
-
17. Re: error with jdbc
rareddy Oct 21, 2014 2:38 PM (in response to afrieden)Teiid JDBC user is not same as Management user. Use "add-user.sh" to create a management user to be used with CLI/web-console. Create an application user to be used with JDBC
-
18. Re: Re: error with jdbc
afrieden Oct 21, 2014 3:17 PM (in response to rareddy)Added and fixed that problem now I am getting an issue with my implementation I think:
$ /tools/groovy/groovy-1.8.5/bin/groovy -classpath teiid-8.8.1-jdbc.jar connect.groovy
Oct 21, 2014 2:49:02 PM groovy.sql.Sql$AbstractQueryCommand execute
WARNING: Failed to execute: SELECT * FROM Record LIMIT 5 because: TEIID30504 Remote org.teiid.core.TeiidProcessingException: TEIID30504 vcf: org.jboss.jca.adapters.jdbc.WrapperDataSource is was not a ConnectionFactory implementation
Caught: org.teiid.jdbc.TeiidSQLException: TEIID30504 Remote org.teiid.core.TeiidProcessingException: TEIID30504 vcf: org.jboss.jca.adapters.jdbc.WrapperDataSource is was not a ConnectionFactory implementation
org.teiid.jdbc.TeiidSQLException: TEIID30504 Remote org.teiid.core.TeiidProcessingException: TEIID30504 vcf: org.jboss.jca.adapters.jdbc.WrapperDataSource is was not a ConnectionFactory implementation
I have attached my code. Is there an example of a ConnectionFactory implementation? I also found this
https://issues.jboss.org/browse/TEIIDDES-2024
which looks to be a similar problem but is not closed. Let me know how to proceed. Thanks!
-
connect.groovy.zip 314 bytes
-
-
19. Re: error with jdbc
shawkins Oct 22, 2014 1:39 PM (in response to afrieden)Alexander,
This would be an issue with the VDB configuration. What source are you trying to access and does it have the correct JNDI name assigned in the VDB.xml?
Steve
-
20. Re: error with jdbc
afrieden Oct 22, 2014 1:46 PM (in response to shawkins)Trying to access my mongodb source. The vdb is called vcf. JNDI is all set to the default (ExampleDS I believe). It didn't error out in the log after I changed it to the default. It just looks like my implementation is off since I am not using a ConnectionFactory. Let me know what the proper implementation is.
-
21. Re: error with jdbc
shawkins Oct 22, 2014 1:55 PM (in response to afrieden)You should have a mongodb data source created from the mongodb resource adapter. That JNDI name should be reference in the vdb.xml.
-
22. Re: error with jdbc
rareddy Oct 22, 2014 3:28 PM (in response to afrieden)I have provided with an example configuration you need to add to standalone-teiid.xml in this comment Re: Re: error with jdbc follow that to create the resource-adpater/connection factory for MongoDB. Make sure the JNDI name in this configuration matches to that of one in your VDB
Ramesh.. -
23. Re: Re: Re: error with jdbc
shawkins Oct 23, 2014 11:04 AM (in response to afrieden)Connection refused should mean that there is nothing accessible at that host/port. The server log looks clean (but does not show the initial logs related to sockets as Ramesh has pointed out) and doesn't show any connection/query activity - which would be expected. So you need to go back to understanding how the server is bound, and if your networking configuration is appropriate between the client and server. Early on in the server log you should see lines like:
10:59:11,162 INFO [org.teiid.RUNTIME] (MSC service thread 1-3) TEIID50037 Teiid ODBC - Name = odbc, Host = localhost, Port = 35432, SSL = OFF, security-domains = teiid-security
10:59:11,162 INFO [org.teiid.RUNTIME] (MSC service thread 1-16) TEIID50012 Teiid JDBC - Name = jdbc, Host = localhost, Port = 31000, SSL = OFF, security-domains = teiid-security