Menu

Instalation problem - gentoo/tomcat7

2011-08-18
2012-11-26
  • Nobody/Anonymous

    Hello guys,

    I want to deploy Navalplan 1.1.3 on Gentoo with Tomcat-7. Because i'm not experienced with Tomcat, i can't figure out why my instalation doesn't work. I guess application or Tomcat coudn't find database definition… Part of log:

    Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in URL : Invocation of init method failed; nested exception is javax.naming.NameNotFoundException: Name jdbc is not bound in this Context

    I have /etc/tomcat-7/Catalina/localhost/navalplan_1.1.3.xml with content like in install guide. What's wrong?

     
  • Nacho Barrientos Arias

    Hello there,

    It's very likely your context is misconfigured. Try this:

    nacho@lrrr:~$ cat /etc/tomcat7/Catalina/localhost/navalplanner-webapp.xml
    <?xml version="1.0" encoding="UTF-8"?>                                                                 
                                                                                                           
    <Context antiJARLocking="true" path="">                                                                
        <Resource name="jdbc/navalplanner-ds" auth="Container"                                             
            type="javax.sql.DataSource"                                                                    
            maxActive="100" maxIdle="30" maxWait="10000"
            username="navalplan" password="navalplan"
            driverClassName="org.postgresql.Driver"
            url="jdbc:postgresql://localhost/navalplan" />
    </Context>

    Also, make sure your context is named after your application (in my example, /etc/tomcat7/Catalina/localhost/navalplanner-webapp.xml matches_ /var/lib/tomcat7/webapps/navalplanner-webapp.war_)

    Finally, please check JDBC driver is also properly linked in _/usr/share/tomcat7/lib/ _ as the installation manual indicates.

    Hope that helps.

    Nacho

     
  • Nobody/Anonymous

    Hello Nacho,

    Thanks for your suggestions, but the problem was in tomcat-dbcp.jar - there was no such thing after installation from sources. Now it forks fine. :)

    Best Regards,
    Av

     

Log in to post a comment.