4 Replies Latest reply on Jan 28, 2010 10:47 AM by Chris Eska

    getting up and running with Eclipse Galileo + JBoss Tool for seam project

    Chris Eska Newbie
      Hi, after searching everywhere on how to get everything (my development environment up and running ), came here looking for some light
      I've been looking for over a week, i have read Manning's Seam in action, witch is a really good book by the way, and i have manage to get seam examples to work, and how mostly it works.
      I do not have everything clear yet. I did mimic the examples(without access to Data Base or entities based on database tables), but i did mostly with the "ant deploy" feature that Seam's tutorial suggest, witch is good if you want to get how everything works. Fine There, but i have to get to work, and i feel i have done nothing.
      Im using this formula:
      eclipse Galileo + Seam 2.2.0GA + JBoss AS 5.1GA + Postgres 8.4

      i thought every was going to be fine since i have no problems configuring the JBoos tools in eclipse. but when i made a simple entity bean and made the server up, i thought it was good and that i could continue, but after the server its up, i guess eclipse uploads the .ear file after the server its up in i get this error

      11:54:12,209 INFO  [SchemaUpdate] Running hbm2ddl schema update
      11:54:12,209 INFO  [SchemaUpdate] fetching database metadata
      11:54:12,283 ERROR [SchemaUpdate] could not get database metadata
      org.postgresql.util.PSQLException: ERROR: relation "information_schema.system_sequences" does not exist
              at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1591)
              at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1340)
              at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:192)
              at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:452)
              at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:340)
              at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:239)
              at org.jboss.resource.adapter.jdbc.WrappedStatement.executeQuery(WrappedStatement.java:226)
              at org.hibernate.tool.hbm2ddl.DatabaseMetadata.initSequences(DatabaseMetadata.java:151)
              at org.hibernate.tool.hbm2ddl.DatabaseMetadata.<init>(DatabaseMetadata.java:69)
              at org.hibernate.tool.hbm2ddl.DatabaseMetadata.<init>(DatabaseMetadata.java:62)
              at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:170)
              at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:346)
              at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1327)
              at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867)
              at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:669)
              at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:132)
              at org.jboss.jpa.deployment.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:301)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:59)
              at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:150)



      its just a part of the log,
      i have check the data source file, the entity and the database, but im still lost on this.
      and i am kind of stuck in the whole thing.
      Please
      just a little light on this.
        • 1. Re: getting up and running with Eclipse Galileo + JBoss Tool for seam project
          Maxim Areshkau Apprentice
          Looks like "information_schema.system_sequences" not exists in your database or not acceseble due some restrictions.
          • 2. Re: getting up and running with Eclipse Galileo + JBoss Tool for seam project
            Chris Eska Newbie

            Thanks

            but i was looking for that too, i just have no idea were this "information_schema.system_sequences" is and where it goes or how to configure it/make one

            • 3. Re: getting up and running with Eclipse Galileo + JBoss Tool for seam project
              Snjezana Peco Master
              The "information_schema.system_sequences" table/view doesn't exist in PostgreSQL.
              Check if your hibernate dialect is org.hibernate.dialect.PostgreSQLDialect (review your persistence.xml).
              Another problem could be caused by using the SEQUENCE generator in which case you need to create your SEQUENCE table.
              • 4. Re: getting up and running with Eclipse Galileo + JBoss Tool for seam project
                Chris Eska Newbie

                snjeza wrote:

                 

                The "information_schema.system_sequences" table/view doesn't exist in PostgreSQL.
                Check if your hibernate dialect is org.hibernate.dialect.PostgreSQLDialect (review your persistence.xml).
                Another problem could be caused by using the SEQUENCE generator in which case you need to create your SEQUENCE table.

                Hey Thanks for sending me on the right path, just had to do a little more research and learned a bit more of how everything its connected on the back

                Indeed it was the org.hibernate.dialect.PostgreSQLDialect I was using the default, but even modifying, the property I was getting the exception

                after reading a bit more i decided to mod the whole persistence.xml file and looked for some examples at google and founded this

                http://stackoverflow.com/questions/1061091/persistence-xml-and-osgi-equinox

                i know its not for jboss seam but it does contain info of how the persistence.xml should be

                 

                here is the result:

                 

                 

                ( ! this is with in the persistence.xml file)

                <properties>

                  <property name="hibernate.hbm2ddl.auto" value="create-drop" /> <!-- drop/create tables @startup, drop tables @shutdown -->


                                <!-- Database Connection Settings -->
                     
                                <property name="hibernate.connection.driver_class" value="org.postgresql.Driver" />
                                <property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect" />
                                <property name="hibernate.show_sql" value="true"/>
                                <property name="hibernate.format_sql" value="true"/>
                                <property name="jboss.entity.manager.factory.jndi.name" value="java:/-name of your proyect-EntityManagerFactory"/>
                                <property name="hibernate.connection.username" value="AnyUserName" />
                                <property name="hibernate.connection.password" value="YourPassWord" />
                                <property name="hibernate.connection.url" value="jdbc:postgresql://-your psql server address -/-name of database-" />

                </properties>

                 

                 

                Thanks to all

                ill report any other inconvenience