-
1. Re: PostgreSQL Configuration Under Cygwin
jonlee Aug 9, 2003 3:35 AM (in response to ferakiii)What is your version of JBoss? And if you could post your datasource configuration that would help. If you are using a 3.2.x release, you'll want the postgres-ds.xml template from docs/examples/jca.
-
2. Re: PostgreSQL Configuration Under Cygwin
ferakiii Aug 9, 2003 11:52 AM (in response to ferakiii)I am using JBoss 3.0.0 with Tomcat intergration.
Attached should be the data source config files.
Thanks for your interest.
Cheers
Paul -
3. Re: PostgreSQL Configuration Under Cygwin
jonlee Aug 10, 2003 2:56 AM (in response to ferakiii)OK. 3.0.x is a fair time ago but here is a working configuration from 3.0.6. I've set the security realm in login-config.xml and this ties to the postgres-service.xml. Note the match-up of the username/password.
The following server log shows a successful binding of the connection pool/DataSource.
2003-06-20 21:13:28,716 INFO [org.jboss.security.plugins.JaasSecurityManagerService] Added PostgresDbRealm, org.jboss.security.plugins.SecurityDomainContext@10d9151 to map
2003-06-20 21:13:28,726 INFO [org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.AmityPool] Bound connection factory for resource adapter 'JBoss LocalTransaction JDBC Wrapper' to JNDI name 'java:/AmityPool'
2003-06-20 21:13:28,726 INFO [org.jboss.resource.connectionmanager.LocalTxConnectionManager] Started
2003-06-20 21:13:28,726 INFO [org.jboss.deployment.MainDeployer] Deployed package: file:/C:/Java/jboss-3.0.6/server/default/deploy/jboss-local-jdbc.rar
2003-06-20 21:13:28,746 INFO [org.jboss.deployment.MainDeployer] Starting deployment of package: file:/C:/Java/jboss-3.0.6/server/default/deploy/jboss-xa.rar
2003-06-20 21:13:28,807 INFO [org.jboss.resource.RARMetaData] Loading Minerva Resource Adapter for JDBC 2 XA drivers
2003-06-20 21:13:28,807 INFO [org.jboss.resource.RARMetaData] Required license terms present. See deployment descriptor.
I was actually using this against a Cygwin-based Postgres installation.
Make sure that your JDBC driver is in server/instance/lib. Normally, it is called pg73jdbc3.jar for the Postgresql 2.3.x series. -
4. Re: PostgreSQL Configuration Under Cygwin
ferakiii Aug 10, 2003 10:11 AM (in response to ferakiii)Thanks for the sample files, I can't imediately spot anything different in them from mine, but I've only had a 5 second look, and it is 4 in the morning.
I'll try upgrading to JBoss 3.0.8 and see if that helps.
I noticed that your output has Bound connection factory for your datasource, I searched my log files for this and only found the default datasource binding. My configured datasource, only gave this output:
2003-08-08 17:57:57,336 DEBUG [org.jboss.system.ServiceCreator] About to create bean: jboss.jca:service=LocalTxCM,name=SafetyDS
2003-08-08 17:57:57,336 DEBUG [org.jboss.system.ServiceCreator] code: org.jboss.resource.connectionmanager.LocalTxConnectionManager
2003-08-08 17:57:57,346 DEBUG [org.jboss.system.ServiceCreator] Created bean: jboss.jca:service=LocalTxCM,name=SafetyDS
2003-08-08 17:57:57,396 DEBUG [org.jboss.system.ServiceConfigurator] SecurityDomainJndiName set to DSSafetySecurity in jboss.jca:service=LocalTxCM,name=SafetyDS
2003-08-08 17:57:57,396 DEBUG [org.jboss.system.ServiceCreator] About to create bean: jboss.jca:service=LocalTxDS,name=SafetyDS
2003-08-08 17:57:57,396 DEBUG [org.jboss.system.ServiceCreator] code: org.jboss.resource.connectionmanager.RARDeployment
2003-08-08 17:57:57,396 DEBUG [org.jboss.system.ServiceCreator] Created bean: jboss.jca:service=LocalTxDS,name=SafetyDS
2003-08-08 17:57:57,436 DEBUG [org.jboss.system.ServiceConfigurator] JndiName set to SafetyDS in jboss.jca:service=LocalTxDS,name=SafetyDS
2003-08-08 17:57:57,436 DEBUG [org.jboss.system.ServiceConfigurator] ManagedConnectionFactoryProperties set to
<config-property name="ConnectionURL" type="java.lang.String">jdbc:postgresql://localhost:5432/Safety01</config-property>
<config-property name="DriverClass" type="java.lang.String">org.postgresql.Driver</config-property>
<!--set these only if you want only default logins, not through JAAS -->
<config-property name="UserName" type="java.lang.String">Paul</config-property>
<config-property name="Password" type="java.lang.String" />
in jboss.jca:service=LocalTxDS,name=SafetyDS
2003-08-08 17:57:57,436 DEBUG [org.jboss.system.ServiceController] recording that jboss.jca:service=LocalTxDS,name=SafetyDS depends on jboss.jca:service=RARDeployment,name=JBoss LocalTransaction JDBC Wrapper
2003-08-08 17:57:57,436 DEBUG [org.jboss.system.ServiceConfigurator] considering OldRarDeployment with object name jboss.jca:service=RARDeployment,name=JBoss LocalTransaction JDBC Wrapper
2003-08-08 17:57:57,436 DEBUG [org.jboss.system.ServiceController] recording that jboss.jca:service=LocalTxCM,name=SafetyDS depends on jboss.jca:service=LocalTxDS,name=SafetyDS
2003-08-08 17:57:57,436 DEBUG [org.jboss.system.ServiceConfigurator] considering ManagedConnectionFactoryName with object name jboss.jca:service=LocalTxDS,name=SafetyDS
Thanks heaps for the help
Cheers
Paul -
5. Re: PostgreSQL Configuration Under Cygwin
jonlee Aug 10, 2003 5:38 PM (in response to ferakiii)I don't think you have defined the default connection password. That is the only major difference I've spotted from your log. It may be possible for your error to occur if you are not passing an explicit username/password when requesting a datasource connection in your code.
-
6. Re: PostgreSQL Configuration Under Cygwin
ferakiii Aug 12, 2003 9:36 AM (in response to ferakiii)Thanks heaps. I think I have found it.
It is either the default password thingy (I was using a user that had no password, but this may have been the problem). I also upgraded to JBoss 3.0.8 at the same time, so this may have also helped things, but I no longer get any datasource related errors. I have other problems now, but that one seems to be fixed.
Thanks heaps for the help
Cheers
Paul