You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@roller.apache.org by To...@persgroep.be on 2006/03/14 11:16:58 UTC

DB connection ?

Hi all ...

I'm trying to install the roller application on a Oracle 10g application 
server.
So far I have solved some minor problems.

But the big problem remains: I cannot connect to my oracle database.

In the installation guide the database is called rollerdb, but off course 
my database has a different name.

For OC4J I have specified the needed information in the datasources.xml 
file.
And I have also configured some things in the web.xml file.

But what I don't understand is how roller makes the link with the rollerdb 
and my physical db ...

Datasources.xml

        <data-source
                class="com.evermind.sql.DriverManagerDataSource"
                name="myDbName"
                location="jdbc/roller_DS"
                connection-driver="oracle.jdbc.driver.OracleDriver"
                username="username"
                password="myPassword"
                url="myUrl"
                inactivity-timeout="30"
                min-connections="2"
                max-connections="5"
        />
</data-sources>

web.xml:

    <resource-ref>
            <res-ref-name>jdbc/roller_DS</res-ref-name>
            <res-type>javax.sql.DataSource</res-type>
            <res-auth>Container</res-auth>
    </resource-ref>


When I leave my configuration like this: I get the following errors:

 Error instantiating application resource-ref 'jdbc/rollerdb' referenced 
from resource-ref-mapping not found




Re: DB connection ?

Posted by Dave Johnson <da...@rollerweblogger.org>.
That is wrong, you should not change the resource-ref in web.xml. The  
JNDI lookup name for the datasource must be jdbc/rollerdb, but when  
you set up that datasource you should be able to configure it to any  
database you want (with whatever name you want).


On Mar 14, 2006, at 5:16 AM, Tom.Stroobants@persgroep.be wrote:
> Datasources.xml
>
>         <data-source
>                 class="com.evermind.sql.DriverManagerDataSource"
>                 name="myDbName"
>                 location="jdbc/roller_DS"
>                 connection-driver="oracle.jdbc.driver.OracleDriver"
>                 username="username"
>                 password="myPassword"
>                 url="myUrl"
>                 inactivity-timeout="30"
>                 min-connections="2"
>                 max-connections="5"
>         />
> </data-sources>

I'm not that familiar with OC4J, but it appears that here you need to  
use location="jdbc/rollerdb" and name="your-database-name"


> web.xml:
>
>     <resource-ref>
>             <res-ref-name>jdbc/roller_DS</res-ref-name>
>             <res-type>javax.sql.DataSource</res-type>
>             <res-auth>Container</res-auth>
>     </resource-ref>

Don't change that or Roller won't be able to find your datasource.

- Dave