Re: [Coursework-help] Database Access Error
Brought to you by:
ianeboston,
john765367
|
From: Ian B. <ie...@tf...> - 2003-10-22 20:42:49
|
The only reason I can think of why a name change should make any
difference in the common/lib directory is the load order. The fact that
it worked before you copied the jar into common/lib implies that there
might be a jar in comon/lib already containing the driver class, it
might be worth a check to see if there are any other jars containing the
postgres driver in the common/lib or other directories.
find . -name '*.jar' -exec jar tvf {} \; | grep "org.postgresql.Driver"
might find it on a unix box.
Ian
Leonardo Hernandez wrote:
> 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
>>>
>>
>>
>
>
>
>
> -------------------------------------------------------
> 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
>
|