title: Seam 2.2GA + JBoss AS 5.1GA + Postgres 8.4
body: <p><strong>Sorry for the big wall of text, but its mostly logs</strong></p>
  
  <p><strong>Thx for any help in any of my problems</strong></p>
  
  <p>I've been trying to get help from Seam forums, but in vain.</p>
  
  <p>I'm trying this Setup mentioned in the title, but unsuccessfully.</p>
  
  <p>I have it all installed correctly and the problems start with the seam-gen.</p>
  
  <p><strong>This is my build.properties</strong></p>
  
  <pre><code>#Generated by seam setup
  #Sat Aug 29 19:12:18 BRT 2009
  hibernate.connection.password=abc123
  workspace.home=/home/rgoytacaz/workspace
  hibernate.connection.dataSource_class=org.postgresql.ds.PGConnectionPoolDataSource
  model.package=com.atom.Commerce.model
  hibernate.default_catalog=PostgreSQL
  driver.jar=/home/rgoytacaz/postgresql-8.4-701.jdbc4.jar
  action.package=com.atom.Commerce.action
  test.package=com.atom.Commerce.test
  database.type=postgres
  richfaces.skin=glassX
  glassfish.domain=domain1
  hibernate.default_schema=Core
  database.drop=n
  project.name=Commerce
  hibernate.connection.username=postgres
  glassfish.home=C\:/Program Files/glassfish-v2.1
  hibernate.connection.driver_class=org.postgresql.Driver
  hibernate.cache.provider_class=org.hibernate.cache.HashtableCacheProvider
  jboss.domain=default
  project.type=ear
  icefaces.home=
  database.exists=y
  jboss.home=/srv/jboss-5.1.0.GA
  driver.license.jar=
  hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
  hibernate.connection.url=jdbc\:postgresql\:Atom
  icefaces=n
  </code></pre>
  
  <p><strong>./seam create-project works okay, but when I try generate-entities, I get the following...</strong></p>
  
  <pre><code>generate-model:
       [echo] Reverse engineering database using JDBC driver /home/rgoytacaz/postgresql-8.4-701.jdbc4.jar
       [echo] project=/home/rgoytacaz/workspace/Commerce
       [echo] model=com.atom.Commerce.model
  [hibernate] Executing Hibernate Tool with a JDBC Configuration (for reverse engineering)
  [hibernate] 1. task: hbm2java (Generates a set of .java files)
  [hibernate] log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).
  [hibernate] log4j:WARN Please initialize the log4j system properly.
  [javaformatter] Java formatting of 4 files completed. Skipped 0 file(s).
  </code></pre>
  
  <p><strong>this is problem no.1. How do I fix this? What is this? I had to do this in eclipse. It worked.</strong></p>
  
  <p>Then I import the seam-gen created project into eclipse, and deploy to JBoss 5.1. While my servers start I've noticed the following..</p>
  
  <pre><code>03:18:56,405 ERROR [SchemaUpdate] Unsuccessful: alter table PostgreSQL.atom.productsculturedetail add constraint FKBD5D849BC0A26E19 foreign key (culture_Id) references PostgreSQL.atom.cultures
  03:18:56,406 ERROR [SchemaUpdate] ERROR: cross-database references are not implemented: "postgresql.atom.productsculturedetail"
  03:18:56,407 ERROR [SchemaUpdate] Unsuccessful: alter table PostgreSQL.atom.productsculturedetail add constraint FKBD5D849BFFFC9417 foreign key (product_Id) references PostgreSQL.atom.products
  03:18:56,408 ERROR [SchemaUpdate] ERROR: cross-database references are not implemented: "postgresql.atom.productsculturedetail"*
  03:18:56,408 INFO  [SchemaUpdate] schema update complete
  </code></pre>
  
  <p><strong>Problem no.2. What is this cross-database references?</strong></p>
  
  <p>What about this..</p>
  
  <pre><code>03:18:55,089 INFO  [SettingsFactory] JDBC driver: PostgreSQL Native Driver, version: PostgreSQL 8.4 JDBC3 (build 701)
  </code></pre>
  
  <p><strong>Problem no.3 I've said in the build.properties to use JDBC4 driver, I don't know why seam insists to use JDBC3 driver. Where do I change this?</strong></p>
  
  <p>When I go into <a href="http://localhost:5443/Commerce" rel="nofollow noreferrer">http://localhost:5443/Commerce</a> and try to browse the auto-generated CRUD UI.</p>
  
  <p>I get this error.. <strong>Error reading 'resultList' on type com.atom.Commerce.action.ProductsList_$$_javassist_seam_2</strong></p>
  
  <p>And this is what is showing in my server logs...</p>
  
  <pre><code>03:34:00,828 INFO  [STDOUT] Hibernate: 
      select
          products0_.product_Id as product1_0_,
          products0_.active as active0_ 
      from
          PostgreSQL.atom.products products0_ limit ?
  03:34:00,848 WARN  [JDBCExceptionReporter] SQL Error: 0, SQLState: 0A000
  03:34:00,849 ERROR [JDBCExceptionReporter] ERROR: cross-database references are not implemented: "postgresql.atom.products"
    Position: 81
  03:34:00,871 SEVERE [viewhandler] Error Rendering View[/ProductsList.xhtml]
  javax.el.ELException: /ProductsList.xhtml: Error reading 'resultList' on type com.atom.Commerce.action.ProductsList_$$_javassist_seam_2
  Caused by: javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: could not execute query
  </code></pre>
  
  <p><strong>Problem no.4 What is going on here? Cross-database references?</strong></p>
  
  <p>Thx for any help in any of my problems.</p>