Re: [Coursework-help] Database Access Error
Brought to you by:
ianeboston,
john765367
From: Leonardo H. <her...@or...> - 2003-10-23 08:58:48
|
Hi, I've tryed both suggestions but I'm stil getting "connection was null" error... Here's part of my log... 22 Oct 2003 10:29:23,992 -- DEBUG [main] (CoreDTLObject.java) - DTLPATH: /usr/local/tomcat/webapps/coursework/WEB-INF/dtl 22 Oct 2003 10:29:24,017 -- DEBUG [main] (CoreDTLObject.java) - SITEPATH: /home/opensource/data/coursework-v2.5/site 22 Oct 2003 10:29:24,130 -- DEBUG [main] (CoreDTLObject.java) - COURSESPATH: /home/opensource/data/coursework-v2.5/courses 22 Oct 2003 10:29:24,321 -- DEBUG [main] (CoreDTLObject.java) - GLOBALINCLUDE: /usr/local/tomcat/webapps/coursework/WEB-INF/dtl/globalinclude.dtl 22 Oct 2003 10:29:24,569 -- DEBUG [main] (DbConnectionManager.java) - Registering JDBC Driver org.postgresql.Driver 22 Oct 2003 10:29:24,776 -- DEBUG [main] (DbConnectionManager.java) - Creating connectionPool 22 Oct 2003 10:29:24,788 -- DEBUG [main] (DbConnectionManager.java) - done..... more to come 22 Oct 2003 10:29:24,984 -- DEBUG [main] (DbConnectionManager.java) - Creating connectionFactory 22 Oct 2003 10:29:24,990 -- DEBUG [main] (DbConnectionManager.java) - Creating PoolableConnectionFactory 22 Oct 2003 10:29:25,190 -- DEBUG [main] (DbConnectionManager.java) - Creating PoolingDataSource 22 Oct 2003 10:29:25,195 -- DEBUG [main] (DbConnectionManager.java) - All Done 22 Oct 2003 10:29:25,405 -- DEBUG [main] (DbConnectionManager.java) - Pool finished Creation 22 Oct 2003 10:29:49,350 -- DEBUG [Thread-9] (CoreDTLObject.java) - ***** student_error = /usr/local/tomcat/webapps/coursework/WEB-INF/dtl/error.dtl 22 Oct 2003 10:29:49,356 -- DEBUG [Thread-9] (CoreDTLObject.java) - ***** dtl_userlogin = /usr/local/tomcat/webapps/coursework/WEB-INF/dtl/userlogin.dtl 22 Oct 2003 10:29:49,948 -- DEBUG [Thread-9] (AuthFactory.java) - AUTHCLASSNAME=edu.stanford.coursework.passwordauth.PasswordAuthImpl 22 Oct 2003 10:29:49,968 -- DEBUG [Thread-9] (AuthFactory.java) - AUTHCLASS=class edu.stanford.coursework.passwordauth.PasswordAuthImpl 22 Oct 2003 10:29:55,442 -- DEBUG [Thread-8] (CoreDTLObject.java) - ***** student_error = /usr/local/tomcat/webapps/coursework/WEB-INF/dtl/error.dtl 22 Oct 2003 10:29:55,450 -- DEBUG [Thread-8] (CoreDTLObject.java) - ***** dtl_userreg = /usr/local/tomcat/webapps/coursework/WEB-INF/dtl/userreg.dtl 22 Oct 2003 10:29:55,527 -- WARN [Thread-8] (UserRegistration.java) - DB Error: connection was null Thanks for the help... -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 >> > > |