Menu

installation problem on linux

Marko
2012-04-02
2012-11-26
  • Marko

    Marko - 2012-04-02

    Hello,
    I'm trying to run libreplan_1.2.2. As per install instructions I configured the database and the following:

    /etc/tomcat-7/Catalina/localhost/libreplan.xml

    <?xml version="1.0" encoding="UTF-8"?>

        <Context antiJARLocking="true" path="">
            <Resource name="jdbc/libreplan-ds" auth="Container"
                type="javax.sql.DataSource"
                maxActive="100" maxIdle="30" maxWait="10000"
                username="libreplan" password="libreplan"
                driverClassName="org.postgresql.Driver"
                url="jdbc:postgresql://localhost/libreplan" />
        </Context>

    copied libreplan.war to /var/lib/tomcat-7/webapps/

    symlinked:

    ln -s /usr/share/jdbc-postgresql/lib/jdbc-postgresql.jar /usr/share/tomcat-7/lib/

    But when I start Tomcat I get:
    ERROR   org.springframework.web.context.ContextLoader  - Context initialization failed
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor#0' defined in URL : Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in URL : Cannot resolve reference to bean 'dataSource' while setting bean property 'dataSource'; nested exception is 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

    Please help

     
  • Manuel Rego Casasnovas

    Hi mkauzlaric,

    I've been testing LibrePlan with Tomcat 7 (I have never tested it before) in Ubuntu 12.04 (Precise Pangolin).

    I've followed the instructions in INSTALL file:
    * Install dependencies with apt-get
    * Create PostgreSQL database
    * Create database scrtructure using install_1.2.2.sql file
    * Add libreplan.xml file
    * Link Java JDBC driver for PostgreSQL
    * Download .war and put it in /var/lib/tomcat7/webapps/
    * Restart Tomcat 7

    I get some warnings as I've skipped the part to configure Tomcat 7 permissions, however LibrePlan 1.2.2 started properly.

    Reading your error it seems that there's some problem with the connection to database. I can think in 2 possible issues:

    * The link to JDBC driver has some problem. I'm not sure but I've created it with the following line:

    # ln -s /usr/share/java/postgresql-jdbc3.jar /usr/share/tomcat7/lib/
    

    * Your PostgreSQL permissions are not properly configured and you're not able to connect with libreplan user. You can test the following line (using password "libreplan"):

    $ psql -h localhost -U libreplan -W libreplan
    

    I guess this should work as you should have created the database structure before with the line:

    $ psql -h localhost -U libreplan -W libreplan < install.sql
    

    I can't think in anything else right now, I hope this helps.

    Bye,
       Rego

     
  • Marko

    Marko - 2012-04-03

    Rego, thanks for answering.

    I installed the database with the install.sql file.

    I don't think there are password restrictions on my box for postgres users:

    psql84 -h localhost -U libreplan -W libreplan
    Password for user libreplan:
    psql84 (8.4.10)
    Type "help" for help.

    libreplan=> \q

    Wether I put a password or not I can login.

    ls -l /usr/share/tomcat-7/lib/
    lrwxrwxrwx 1 root root      50 Apr  2 08:46 jdbc-postgresql.jar -> /usr/share/jdbc-postgresql/lib/jdbc-postgresql.jar

    Is there a way to verify whether is a username/password issue or a setup problem?

     
  • Marko

    Marko - 2012-04-03

    Solved: tomcat-dbcp.jar was missing in the tomcat installation for some reson

     
  • Manuel Rego Casasnovas

    Good to see that you have fixed it, I didn't know about "tomcat-dbcp.jar" (I don't see it in my Ubuntu installation).

    I thought that your problem could be related with PostgreSQL configuration and usually you have to configure with "md5" instead of "ident" in the file "pg_hba.conf".

    Anyway, it's great that you've fixed the issue.

    Bye,
       Rego

     
  • Nobody/Anonymous

    When i was deploying Libreplan. it gives follwoing error….

    ERROR   org.hibernate.tool.hbm2ddl.SchemaValidator  - could not get database metadata
    com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'libreplan.pg_class' doesn't exist

     

Log in to post a comment.