相关疑难解决方法(0)

使用SSL将Pentaho Kettle/Spoon连接到Heroku PostgreSQL的问题

我正在尝试使用Spoon附带的JDBC驱动程序将勺子连接到Heroku PostgreSQL实例.Heroku需要SSL,因为它是独立的PostgreSQL实例,我已启用它.

我可以使用其他使用SSL的客户端软件连接到数据库,因此这似乎特定于Java/JDBC.我不太了解Java对此进行故障排除所以希望有人在此之前已经有过这样的事情.

我得到以下和相当详细的错误消息提到SSLHandshakeException,但我不确定这是否是其他原因或症状?也许我需要在Java中指定SSL证书?

Error connecting to database [XXXX.com] : org.pentaho.di.core.exception.KettleDatabaseException: 
Error occured while trying to connect to the database

Error connecting to database: (using class org.postgresql.Driver)
The connection attempt failed.


org.pentaho.di.core.exception.KettleDatabaseException: 
Error occured while trying to connect to the database

Error connecting to database: (using class org.postgresql.Driver)
The connection attempt failed.


at org.pentaho.di.core.database.Database.normalConnect(Database.java:374)
at org.pentaho.di.core.database.Database.connect(Database.java:323)
at org.pentaho.di.core.database.Database.connect(Database.java:285)
at org.pentaho.di.core.database.Database.connect(Database.java:275)
at org.pentaho.di.core.database.DatabaseFactory.getConnectionTestReport(DatabaseFactory.java:76)
at org.pentaho.di.core.database.DatabaseMeta.testConnection(DatabaseMeta.java:2455)
at org.pentaho.ui.database.event.DataHandler.testDatabaseConnection(DataHandler.java:511)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.pentaho.ui.xul.impl.AbstractXulDomContainer.invoke(AbstractXulDomContainer.java:329) …
Run Code Online (Sandbox Code Playgroud)

postgresql ssl pentaho jdbc kettle

6
推荐指数
1
解决办法
8567
查看次数

如何在heroku上配置hibernate ORM?

这是我在hibernate.cfg.xml中的内容

<hibernate-configuration>
    <session-factory>
        <property name="hibernate.hbm2ddl.auto">update</property>
        <property name="hibernate.ejb.naming_strategy">org.hibernate.cfg.ImprovedNamingStrategy</property>
        <property name="hibernate.connection.charSet">UTF-8</property> 
        <property name="hibernate.connection.driver_class">org.postgresql.Driver</property>
        <property name="connection.driver_class">org.postgresql.Driver</property>
        <property name="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</property>
        <property name="connection.pool_size">1</property>
        <property name="show_sql">true</property>
        <property name="hibernate.use_outer_join">true</property>
        <property name="current_session_context_class">thread</property>
    </session-factory>
</hibernate-configuration>
Run Code Online (Sandbox Code Playgroud)

另外,我动态地覆盖了一些属性......

 Configuration config = new Configuration().configure("path_to_hibernate.cfg.xml");
 config.setProperty("hibernate.connection.url", System.getenv("HEROKU_POSTGRESQL_MYCOLOR_URL"));
 config.setProperty("hibernate.connection.username", "***");
 config.setProperty("hibernate.connection.password", "***");
Run Code Online (Sandbox Code Playgroud)

但是,当我运行它时,我收到此错误...

ERROR: No suitable driver found for postgres://*******:*********@ec2-23-21-85-197.compute-1.amazonaws.com:5432/d9i5vp******o7te
Run Code Online (Sandbox Code Playgroud)

如何配置我的属性以便heroku找到postgres驱动程序?

(我是hibernate和heroku的新手,所以任何帮助都非常感谢:)

configuration hibernate heroku

6
推荐指数
1
解决办法
5276
查看次数

标签 统计

configuration ×1

heroku ×1

hibernate ×1

jdbc ×1

kettle ×1

pentaho ×1

postgresql ×1

ssl ×1