Hello, Turns out it was a RedHat issue, that explains why none of the other machines had problems with it.
In /etc/hosts RedHat apparently shipped with: 127.0.0.1 localhost.localdomain localhost should be: 127.0.0.1 localhost localhost.localdomain This problem was outlined in the MySQL Connector/J Readme Excerpt: ++++++++++++++++++++++++++++++++++++++++++++ "When I try to connect to the database with MySQL Connector/J , I get the following exception: SQLException: Server configuration denies access to data source SQLState: 08001 VendorError: 0 What's going on? I can connect with the MySQL client." Resolution: MySQL Connector/J must use TCP/IP sockets to connect to MySQL, as Java does not support Unix Domain Sockets. Therefore, when MySQL Connector/J connects to MySQL, the security manager in MySQL server will use the HOSTS table to determine whether or not the connection should be allowed. You must add grants to allow this to happen. The following is an example of how to do this (but not the most secure). >From the mysql command-line client, issue the following command "GRANT ALL PRIVILEGES ON [dbname].* to '[user]'@'[hostname]' identified by '[password]'" replacing [dbname] with the name of your database, [user] with the username, [hostname] with the host that MySQL Connector/J will be connecting from, and [password] with the password you want to use. Be aware that RedHat linux is broken with respect to the hostname portion for the case when you are connecting from localhost. You need to use "localhost.localdomain" for the [hostname] value in this case. Follow this by issuing the "FLUSH PRIVILEGES" command. I suggest you read the permissions/security section of your MySQL server manual for a much more detailed explanation of how this works. Derick ----- Original Message ----- From: "Prescott Balch" <[EMAIL PROTECTED]> To: "Turbine Torque Users List" <[EMAIL PROTECTED]> Sent: Saturday, January 25, 2003 5:10 AM Subject: Re: Null Connection Object > I had the same problem and finally determined, with help from this fine > list, that I needed to specify the name of the database in my > schema.xml, e.g.: > > <database name="mydatabasename"> > > where "mydatabasename" equals the value of torque.database.default in > the Torque.properties file. > > I had simply coded: > > <database> > > On Thursday, January 23, 2003, at 08:32 PM, Derick Fernando wrote: > > > Hello, > > > > I keep getting: > > > > java.lang.NullPointerException: Connection object was null. This could > > be > > due to a misconfiguration of the DataSourceFactory. Check the logs and > > Torque.properties to better determine the cause. > > at org.apache.torque.util.Transaction.rollback(Transaction.java:179) > > at org.apache.torque.util.BasePeer.doSelect(BasePeer.java:1333) > > at > > com.aurajen46.web.om.BaseProductsPeer.doSelectVillageRecords(BaseProduc > > tsPee > > r.java:515) > > at > > com.aurajen46.web.om.BaseProductsPeer.doSelectVillageRecords(BaseProduc > > tsPee > > r.java:435) > > at > > com.aurajen46.web.om.BaseProductsPeer.doSelect(BaseProductsPeer.java:40 > > 3) > > at com.aurajen46.web.modules.screens.Man.getDefaultShirt(Man.java:111) > > at com.aurajen46.web.modules.screens.Man.getcurrentItem(Man.java:165) > > at com.aurajen46.web.modules.screens.Man.doBuildTemplate(Man.java:63) > > at > > org.apache.turbine.modules.screens.VelocityScreen.doBuildTemplate(Veloc > > itySc > > reen.java:111) > > at > > org.apache.turbine.modules.screens.TemplateScreen.doBuild(TemplateScree > > n.jav > > a:129) > > at org.apache.turbine.modules.Screen.build(Screen.java:99) > > at org.apache.turbine.modules.ScreenLoader.eval(ScreenLoader.java:129) > > ####################### > > > > But the same webapp, with the same databse name and same username etc > > works > > perfectly on two development stations. When I upload it to the host > > however, > > I keep getting this error. I've checked Torque.properties over and > > over, and > > can't find anything wrong with it: > > > > torque.database.default=web > > torque.database.web.adapter=mysql > > ## Using torque's old pool > > torque.dsfactory.web.factory=org.apache.torque.dsfactory.TorqueDataSour > > ceFac > > tory > > torque.dsfactory.web.pool.defaultMaxConnections=10 > > torque.dsfactory.web.pool.maxExpiryTime=3600 > > torque.dsfactory.web.pool.connectionWaitTimeout=10 > > torque.dsfactory.web.connection.driver = org.gjt.mm.mysql.Driver > > torque.dsfactory.web.connection.url = jdbc:mysql://localhost/aura > > torque.dsfactory.web.connection.user = aurauser > > torque.dsfactory.web.connection.password = password > > > > > > Any Ideas? > > Thanks, > > Derick > > > > > > -- > > To unsubscribe, e-mail: > > <mailto:[EMAIL PROTECTED]> > > For additional commands, e-mail: > > <mailto:[EMAIL PROTECTED]> > > > > > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
