Menu

Errors trying to obtain data list

Mivi
2013-07-28
2013-08-05
  • Mivi

    Mivi - 2013-07-28

    Hi,

    Below is my working environment:
    Windows 7 - 64 bit; Eclipse Kepler 4.3; OX 4.8 (with Apache Tomcat v6.0 Server); JDK 1.7, PostgreSQL 9.2

    Trying to go through the tutorial in CH4 from "Learn OpenXava by Example". Everything configured and build successful. When I run http://localhost:8080/Invoicing/modules/Customer, I get the error on the application site as described in the above subject and Tomcat server crashes with the following StackTrace:

    WARNING: Could not obtain connection to query metadata
    org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot load JDBC driver class 'org.postgresql.Driver'
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1136)
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
    at org.hibernate.connection.DatasourceConnectionProvider.getConnection(
    DatasourceConnectionProvider.java:92)
    at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:113)
    at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2863)
    at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2859)
    at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1870)

    What am I missing?

    Regards
    Mi

     

    Last edit: Mivi 2013-07-28
  • Javier Paniza

    Javier Paniza - 2013-07-30

    Hi Mi,

    org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot load JDBC driver class

    Surely you have not copied the driver jar into the lib folder of your Tomcat. Revise it.


    Help others in this forum as I help you.
    Need more help? Get OpenXava professional support.

     
    • Mivi

      Mivi - 2013-08-01

      Hi Javier,
      "Everything configured" I said above means copied this postgresql-9.2-1003.jdbc4 which I downloaded from postgresql.org; otherwise 'schema.path' will have been invalid and Ant Build will have failed. I even deleted the first jdbc jar file thinking it might have been corrupted; downloaded a fresh copy and copy to tomcat\bin, I keep on getting the same error.
      Is there any problem of compatibility of tomcat v6.0 with postgresql jdbc file based on version, can't tell!!!

      Regards
      Mi

       
  • Javier Paniza

    Javier Paniza - 2013-08-05

    Hi Mi,

    Is there any problem of compatibility of tomcat v6.0 with postgresql jdbc file based on version

    I don't think so. Tomcat and Postgres are not related at all, as I know.

    Try to create a simple web application with just a JSP that connect to the Postgres database. Does it work?

    Try the above simple application in other Tomcat.
    Try the above simple application against other database.

    Well. You have to try things until you find the cause. The error in the trace is the typical when jar is not present.


    Help others in this forum as I help you.
    Need more help? Get OpenXava professional support.

     

Log in to post a comment.