External DB connection to Redshift via Database Connector App?

0
Hello, I have been working with the Database Connector to connect to Mysql successfully, however most data I need is up in a Redshift instance. I have tried several different variants of the jdbcUrl string and added several drivers to the userlib folder (both redshift and postgres), but cannot get it to work. i.e. 'jdbc:redshift://my-instance:5439/my_db'   Drivers: RedshiftJDBC4-no-awssdk-1.2.7.1003.jar RedshiftJDBC42-no-awssdk-1.2.7.1003.jar RedshiftJDBC42-1.2.7.1003.jar   Any (or all) of the drivers used with the jdbc:redshift return this Error: com.mendix.modules.microflowengine.MicroflowException: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: java.lang.RuntimeException: Failed to get driver instance for jdbcUrl=jdbc:redshift://my-instance.redshift.amazonaws.com:5439/mydb     at MyFirstModule.MF_GetDBdata_Redshift (JavaAction : 'Execute query') Advanced stacktrace:     at com.mendix.modules.microflowengine.MicroflowUtil.processException(MicroflowUtil.java:144)       Also, since Redshift is a fork of Postgres, I tried to trick the system by using the jdbc:postgresql prefix to call the instance. As suggested in the Amazon docs here http://docs.aws.amazon.com/redshift/latest/mgmt/configure-jdbc-connection.html Used driver: postgresql-42.1.4.jar 'jdbc:postgresql://my-instance:5439/my_db' com.mendix.modules.microflowengine.MicroflowException: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: org.postgresql.util.PSQLException: Your security policy has prevented the connection from being attempted.  You probably need to grant the connect java.net.SocketPermission to the database server host and port that you wish to connect to.     at MyFirstModule.MF_GetDBdata_Redshift (JavaAction : 'Execute query') Advanced stacktrace:     at com.mendix.modules.microflowengine.MicroflowUtil.processException(MicroflowUtil.java:144) Caused by: com.mendix.core.CoreException: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: org.postgresql.util.PSQLException: Your security policy has prevented the connection from being attempted.  You probably need to grant the connect java.net.SocketPermission to the database server host and port that you wish to connect to.     at com.mendix.basis.component.InternalCore.execute(InternalCore.java:581)   Any suggestions how to make this work?
asked
1 answers
-1

Thanks to Marshall and Jasper to help find a solution to my issue.

Below are the steps to clean things up and choose the correct driver:

1) Remove any RedShift .jar files from the /userlib folder
2) Clean Deployment Directory through Modeler (Project->Clean Deployment Directory)
3) Add in this version of the .jar JDBC driver to the /userlib folder:
https://s3.amazonaws.com/redshift-downloads/drivers/RedshiftJDBC42-1.2.1.1001.jar
4) Run app

Cheers

 

 

 

 

 

answered