Re: [Coursework-help] Database Access Error
Brought to you by:
ianeboston,
john765367
From: Leonardo H. <her...@or...> - 2003-10-22 17:43:29
|
Good... here's the solution I found: 1) I copy postgresql driver to $tomcat_home/common/lib and restarted coursework webapp, but, in my case, driver was in a file named pgsql73.jar, I renamed it to postgresql.jar and then restarted webapp. Some notes: In my case, I don't require a password to access the remote database. Even though, I try setting a password in oracle.properties, any password. Coursework Run. Then I erased password and Coursework still run. So, in conclusion, I think the problem was the driver, not only the driver but also the name of .jar file. Thanks a lot, I'm evaluating coursework from this moment on, and maybe we will be using it at my university. -Leonardo Ian Boston wrote: > connection was null is definitely caused by the connection being unable > to open. Usually cause by one of 2 things. > > 1. It couldn't find the JDBC driver, you should get a full trace back > with a ClassNotFound Exception in catalina.out if this is the case. > Normally fixed by putting the PostgresQL driver jar in > $tomcat_home/common/lib and restarting the coursework webapp. > > 2. Postgres JDBC considers a login that does not require a password to > be different from one that requires a password but where the password is > blank. The oracle.properties file, below, specifies a required, blank > password. Try a real password. > > If either of these work, could you confirm which to the list for future > users. > > Thanks (and thanks for trying Coursework) > Ian > > Leonardo Hernandez wrote: > >> Hello, >> >> I'm getting an error when trying to connect to database. For example, >> when I try to access "User Registration" or "User Login" I get this >> error: >> >> -- WARN [Thread 9] (UserRegistration.java) - DB Error: connection was >> null >> >> I can't find any other log to help me solve this problem. Any ideas? >> Here is my oracle.properties: >> >> --------------------------------- >> dbDriver=org.postgresql.Driver >> minConns=5 >> maxConns=25 >> maxConnTime=1.0 >> >> >> # mode can be FAILOVER or ORACLE_CONNECTION_POOL(default) >> #mode=FAILOVER >> dbDriver=org.postgresql.Driver >> dbServer=jdbc\:postgresql\://archie/cw >> dbLogin=hernandez >> dbPassword= >> >> >> # add the following properties for DUAL (FAILOVER) mode >> dbServer_failover=jdbc\:postgresql\://archie/cw >> dbLogin_failover=hernandez >> dbPassword_failover= >> ---------------------------------- >> >> I access a remote database without password, maybe this is the problem. >> >> Any Ideas? >> >> -Leonardo >> >> >> >> ------------------------------------------------------- >> This SF.net email is sponsored by OSDN developer relations >> Here's your chance to show off your extensive product knowledge >> We want to know what you know. Tell us and you have a chance to win $100 >> http://www.zoomerang.com/survey.zgi?HRPT1X3RYQNC5V4MLNSV3E54 >> _______________________________________________ >> Coursework-help mailing list >> Cou...@li... >> https://lists.sourceforge.net/lists/listinfo/coursework-help >> > > |