Results 1 to 4 of 4
  1. #1
    Nick15 is offline Member
    Join Date
    May 2007
    Posts
    38
    Rep Power
    0

    Default error in JBoss with hibernate, EJB3 and postgres

    Hello
    I am new in JBoss and appeared this error when I executed the application(EJB3) in JBoss (jboss-4.0.5.GA)



    17:33:41,593 INFO [DriverManagerConnectionProvider] Using Hibernate built-in connection pool (not for production use!)

    17:33:41,609 INFO [DriverManagerConnectionProvider] Hibernate connection pool size: 20

    17:33:41,609 INFO [DriverManagerConnectionProvider] autocommit mode: true

    17:33:41,625 INFO [DriverManagerConnectionProvider] using driver: org.postgresql.Driver at URL: jdbc:postgresql://xxxxxx/xxxxxx

    17:33:41,625 INFO [DriverManagerConnectionProvider] connection properties: {user=xxxx password=xxxx, autocommit=true, release_mode=auto}

    17:33:41,640 WARN [SettingsFactory] Could not obtain connection metadata

    java.sql.SQLException: No suitable driver

    at java.sql.DriverManager.getConnection(DriverManager .java:545)

    at java.sql.DriverManager.getConnection(DriverManager .java:140)

    at org.hibernate.connection.DriverManagerConnectionPr ovider.getConnection(DriverManagerConnectionProvid er.java:110)

    at org.hibernate.cfg.SettingsFactory.buildSettings(Se ttingsFactory.java:76)

    at org.hibernate.cfg.Configuration.buildSettings(Conf iguration.java:1933)


    any ideas?



    Nick

  2. #2
    sandor is offline Member
    Join Date
    Apr 2007
    Location
    Pennsylvania,USA
    Posts
    45
    Rep Power
    0

    Default

    Well I am not a jBoss expert but in Tomcat you need to have the database driver in a certain folder under tomcat. Perhaps jBoss needs a database driver located someplace?
    I have an instance of jboss up and running and it has my drivers in a lib folder under jboss/server/default/lib but if you gave the server a name then it would be
    jboss/server/serverNameYouGaveIt/lib.
    Check there and see if there is a driver in there.

  3. #3
    Marty is offline Member
    Join Date
    May 2007
    Posts
    38
    Rep Power
    0

    Default

    you don´t load the driver

    Check this things:
    Have the jar with driver that you want to use IN the classpath
    In the hibernate config has the driver property with the complete name of the driver´s class.
    In PostgreSQL web site you can download the jar and its driver.

    good luck

  4. #4
    sandor is offline Member
    Join Date
    Apr 2007
    Location
    Pennsylvania,USA
    Posts
    45
    Rep Power
    0

    Default

    I am pretty sure you need the driver in the jboss lib directory as well as in the classpath. Tomcat is the same way. No driver there, no connection.

Similar Threads

  1. Hibernate error
    By Marty in forum JDBC
    Replies: 4
    Last Post: 06-04-2008, 05:03 AM
  2. Postgres and j2ee problem
    By bbq in forum JDBC
    Replies: 1
    Last Post: 07-05-2007, 04:30 AM
  3. EJB3 question
    By bbq in forum Enterprise JavaBeans (EJB)
    Replies: 2
    Last Post: 07-04-2007, 08:58 AM
  4. Hibernate Error
    By yuchuang in forum JDBC
    Replies: 2
    Last Post: 05-15-2007, 10:24 AM
  5. Tables In Ejb3
    By Alan in forum Enterprise JavaBeans (EJB)
    Replies: 1
    Last Post: 05-10-2007, 04:36 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •