安装功能pax-jdbc-pool-aries

时间:2018-03-09 09:43:26

标签: java karaf pax aries

我正在为PostgreSQL连接使用简单的pax-jdbc配置:

osgi.jdbc.driver.class=org.postgresql.Driver
url=jdbc:postgresql://localhost:5432/db
dataSourceName=db-pg
user=dbuser
password=dbpasswd

然而,在我安装了功能pax-jdbc-pool-aries之后,出现了问题并且我遇到了错误,就好像密码参数会突然被忽略一样:

  

引起:org.postgresql.util.PSQLException:致命:Rolle   ?mywindowsuser?现实主义者   org.postgresql.core.v3.ConnectionFactoryImpl.readStartupMessages(ConnectionFactoryImpl.java:691)   〜[?:?] at   org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:207)   〜[?:?] at   org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:65)   〜[?:?] at   org.postgresql.jdbc2.AbstractJdbc2Connection。(AbstractJdbc2Connection.java:146)   〜[?:?] at   org.postgresql.jdbc3.AbstractJdbc3Connection。(AbstractJdbc3Connection.java:35)   〜[?:?] at   org.postgresql.jdbc3g.AbstractJdbc3gConnection。(AbstractJdbc3gConnection.java:22)   〜[?:?] at   org.postgresql.jdbc4.AbstractJdbc4Connection。(AbstractJdbc4Connection.java:47)   〜[?:?] at   org.postgresql.jdbc4.Jdbc4Connection。(Jdbc4Connection.java:30)   org.postgresql.Driver.makeConnection上的〜[?:?](Driver.java:414)   〜[?:?] org.postgresql.Driver.connect(Driver.java:282)〜[?:?] at   java.sql.DriverManager.getConnection(DriverManager.java:664)〜[?:?]     在java.sql.DriverManager.getConnection(DriverManager.java:247)   〜[?:?] at   org.postgresql.ds.common.BaseDataSource.getConnection(BaseDataSource.java:88)   〜[?:?] at   org.tranql.connector.jdbc.AbstractLocalDataSourceMCF.getPhysicalConnection(AbstractLocalDataSourceMCF.java:72)   〜[180:org.apache.aries.transaction.jdbc:2.1.2]

文档(例如这里https://ops4j1.jira.com/wiki/spaces/PAXJDBC/pages/61767716/Pooling+and+XA+support+for+DataSourceFactory)没有提到使用aries池时的任何陷阱,似乎仅通过安装aries pool功能就打破了工作配置。

发生了什么,以及如何将PostgreSQL与pax-jdbc和aries-pool一起使用?

我在Windows 10上使用了Karaf 4.1.x.

0 个答案:

没有答案