Hi
I want to connect to postgres in my stateless session, I have put
postgres-ds.xml in deploy directory already, and I have following problem. I
have username and password "root" in my postgres-ds.xml, and application is
trying to connect with username "postgres" and no password and I get the error
(from server log):
[...]
2005-12-13 00:52:32,531 DEBUG
[org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory] Using
properties: {user=postgres, password=--hidden--}
2005-12-13 00:52:32,546 WARN
[org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Throwable
while attempting to get a new connection: null
org.jboss.resource.JBossResourceException: Could not create connection; -
nested throwable: (org.postgresql.util.PSQLException: Connection refused:
FATAL: password authentication failed for user "postgres".)
[...]
This error occurs in following line:
final String dbName = "java:/PostgresDS";
try {
InitialContext ic = new InitialContext();
DataSource ds = (DataSource) ic.lookup(dbName);
Connection conn = ds.getConnection("root","root");
}
and that's my postgres-ds.xml file (in server/default/deploy directory):
<local-tx-datasource>
<!-- jboss:service=Postgres -->
<jndi-name>PostgresDS</jndi-name>
<connection-url>jdbc:postgresql://localhost:5432/my_db</connection-url>
<!-- driver-class>org.postgresql.Driver</driver-class -->
<driver-class>org.postgresql.jdbc3.Jdbc3PoolingDataSource</driver-class>
<user-name>root</user-name>
root
<security-domain>PostgresDbRealm</security-domain>
<type-mapping>PostgreSQL 8.0</type-mapping>
</local-tx-datasource>
So I user-name from this file is not used, why?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3912621#3912621
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3912621
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user