2 Replies Latest reply on Oct 29, 2010 3:32 PM by darko1002001

    problem with deploying  application using JDBC postgreSQL driver

    darko1002001

      hi. i am trying to deploy this webservice on a local jboss server running windows xp.

       

      http://code.google.com/p/transitdatafeeder/w/list

       

      i have jboss-5.1.0.GA unpacked and able to run before i deploy the app with all the default configuration.

       

      i have the postgreSQL version 8.3 installed with the JDBC driver and
      the driver jar set in the CLASSPATH in the env variables and also the
      postgresql-8.4-701.jdbc3.jar copied into the lib folders of jboss. i
      have made a database called feedbase in postgreSQL which is needed for the project to deploy.

      the database tables and everything else should be done by the app on the first run but it seems there is a problem creating the initial tables.

      i wonder if it is any additional setup i need to do for postgreSQL driver to work with JBoss and also if there is something i need to do to configure hibernate.

       

       

      there are a couple of errors in the log files that prevent the
      successful startup of the service. this is where they start:

      java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
      2010-10-28 17:50:04,656 INFO
      [org.hibernate.impl.SessionFactoryObjectFactory] (main) Bound factory
      to JNDI name: persistence.unit:unitName=#datafeeder
      2010-10-28 17:50:04,656 WARN
      [org.hibernate.impl.SessionFactoryObjectFactory] (main) InitialContext
      did not implement EventContext
      2010-10-28 17:50:04,671 INFO
      [org.hibernate.tool.hbm2ddl.SchemaValidator] (main) Running schema
      validator
      2010-10-28 17:50:04,671 INFO
      [org.hibernate.tool.hbm2ddl.SchemaValidator] (main) fetching database
      metadata
      2010-10-28 17:50:04,906 INFO
      [org.hibernate.tool.hbm2ddl.DatabaseMetadata] (main) table not found:
      address
      2010-10-28 17:50:04,921 ERROR
      [org.jboss.kernel.plugins.dependency.AbstractKernelController] (main)
      Error installing to Start: name=persistence.unit:unitName=#datafeeder
      state=Create
      javax.persistence.PersistenceException: [PersistenceUnit: datafeeder]
      Unable to build EntityManagerFactory
               at
      org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:
      677)
               at
      org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:
      132)
               at
      org.jboss.jpa.deployment.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:
      301)

      here are both of the logs

      appreciate any help you can give me.
      tnx.

        • 1. Re: problem with deploying  application using JDBC postgreSQL driver
          wdfink

          If I look to your server.log it looks like that you start two jboss instances or the ports are in used by other programm:

          ==> Address already in use: JVM_Bind /127.0.0.1:8009

           

          The persistence failue

          Caused by: org.hibernate.HibernateException: Missing table: address

           

          might be cause by an empty DB, do you deploy a new appliaction?

          Set create table to 'false' (or it might be the default)?

          1 of 1 people found this helpful
          • 2. Re: problem with deploying  application using JDBC postgreSQL driver
            darko1002001

            ok about that. i only start the default installed apps that came with the server package. the concern here is the hibernate exception. i have made the empty database but the app should populate it with the required tables,etc... i wonder if i am doing something wrong with the jdbc driver .jar location or if i need any further setup inside jboss to make it work with postgreSQL.