seam generate-entities with Postgres 8.3
joconnor22 Jun 24, 2008 8:36 PMHi,
Basically, when running generate-entities, all the connections seem to be made, and seam-gen does seem to gain a knowledge of the various tables, but it doesn't generate any classes, with warnings of 'no primary keys' and 'no columns found'.
I saw some others have had similar problems, but none of the solutions seemed to work for me...i've tried changing to uppercase for the default_schema as was the solution for some oracle users, and I've tried all manner of default_catalog/default_schema/hibernateconnectionURL combinations to no avail. It doesn't seem to be a problem with permissions although this app runs agaisnt postgres 8.3.1, which I am wholly unfamiliar with...is it possible that this is a metadata-permissions retrieval problem? I've gone so far as granting the public user all rights, but there was no change in the result for seam-gen
I've posted my build.properties and seam-gen output below, if anyone can help I'd appreciate it immensely!
----------------------
build.properties
----------------------
hibernate.connection.password=password
workspace.home=c\:/java/workspace
model.package=com.mycompany.myapp.beans
driver.jar=c\:\\java\\postgresql-8.3-603.jdbc4.jar
action.package=com.mycompany.myapp.beans
test.package=com.mycompany.myapp.test
database.type=postgres
richfaces.skin=ruby
hibernate.default_catalog=
hibernate.default_schema=
database.drop=n
project.name=MyApp
hibernate.connection.username=postgres
hibernate.connection.driver_class=org.postgresql.Driver
hibernate.cache.provider_class=org.hibernate.cache.HashtableCacheProvider
project.type=ear
icefaces.home=
database.exists=y
jboss.home=C\:/Program Files/jboss-4.2.2.GA
hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
hibernate.connection.url=jdbc\:postgresql\:MyAppDB
icefaces=n
----------------------------------
seam generate-entities output:
----------------------------------
Buildfile: C:\java\jboss-seam-2.0.2.SP1\seam-gen\build.xml
init:
init-properties:
[echo] C:/Program Files/jboss-4.2.2.GA
validate-workspace:
validate-project:
init-generate:
generate-model:
[echo] Reverse engineering database using JDBC driver c:\java\postgresql-8.3-603.jdbc4.jar
[echo] project=c:/java/workspace/MyApp
[echo] model=com.mycompany.myapp.beans
[hibernate] Executing Hibernate Tool with a JDBC Configuration (for reverse engineering)
[hibernate] 1. task: hbm2java (Generates a set of .java files)
[hibernate] Jun 24, 2008 2:12:59 PM org.hibernate.cfg.Environment <clinit>
[hibernate] INFO: Hibernate 3.2.4.sp1
[hibernate] Jun 24, 2008 2:12:59 PM org.hibernate.cfg.Environment <clinit>
[hibernate] INFO: hibernate.properties not found
[hibernate] Jun 24, 2008 2:12:59 PM org.hibernate.cfg.Environment buildBytecodeProvider
[hibernate] INFO: Bytecode provider name : cglib
[hibernate] Jun 24, 2008 2:12:59 PM org.hibernate.cfg.Environment <clinit>
[hibernate] INFO: using JDK 1.4 java.sql.Timestamp handling
[hibernate] Jun 24, 2008 2:13:00 PM org.hibernate.cfg.reveng.OverrideRepository addFile
[hibernate] INFO: Override file: c:\java\workspace\MyApp\resources\seam-gen.reveng.xml
[hibernate] Jun 24, 2008 2:13:00 PM org.hibernate.connection.DriverManagerConnectionProvider configure
[hibernate] INFO: Using Hibernate built-in connection pool (not for production use!)
[hibernate] Jun 24, 2008 2:13:00 PM org.hibernate.connection.DriverManagerConnectionProvider configure
[hibernate] INFO: Hibernate connection pool size: 20
[hibernate] Jun 24, 2008 2:13:00 PM org.hibernate.connection.DriverManagerConnectionProvider configure
[hibernate] INFO: autocommit mode: false
[hibernate] Jun 24, 2008 2:13:00 PM org.hibernate.connection.DriverManagerConnectionProvider configure
[hibernate] INFO: using driver: org.postgresql.Driver at URL: jdbc:postgresql:MyAppDB
[hibernate] Jun 24, 2008 2:13:00 PM org.hibernate.connection.DriverManagerConnectionProvider configure
[hibernate] INFO: connection properties: {user=postgres, password=****}
[hibernate] Jun 24, 2008 2:13:00 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: RDBMS: PostgreSQL, version: 8.3.1
[hibernate] Jun 24, 2008 2:13:00 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: JDBC driver: PostgreSQL Native Driver, version: PostgreSQL 8.3 JDBC4 with SSL (build 603)
[hibernate] Jun 24, 2008 2:13:00 PM org.hibernate.dialect.Dialect <init>
[hibernate] INFO: Using dialect: org.hibernate.dialect.PostgreSQLDialect
[hibernate] Jun 24, 2008 2:13:00 PM org.hibernate.transaction.TransactionFactoryFactory buildTransactionFactory
[hibernate] INFO: Using default transaction strategy (direct JDBC transactions)
[hibernate] Jun 24, 2008 2:13:00 PM org.hibernate.transaction.TransactionManagerLookupFactory getTransactionManagerLookup
[hibernate] INFO: No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
[hibernate] Jun 24, 2008 2:13:00 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: Automatic flush during beforeCompletion(): disabled
[hibernate] Jun 24, 2008 2:13:00 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: Automatic session close at end of transaction: disabled
[hibernate] Jun 24, 2008 2:13:00 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: JDBC batch size: 15
[hibernate] Jun 24, 2008 2:13:00 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: JDBC batch updates for versioned data: disabled
[hibernate] Jun 24, 2008 2:13:00 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: Scrollable result sets: enabled
[hibernate] Jun 24, 2008 2:13:00 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: JDBC3 getGeneratedKeys(): disabled
[hibernate] Jun 24, 2008 2:13:00 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: Connection release mode: auto
[hibernate] Jun 24, 2008 2:13:00 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: Default schema:
[hibernate] Jun 24, 2008 2:13:00 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: Default catalog:
[hibernate] Jun 24, 2008 2:13:00 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: Default batch fetch size: 1
[hibernate] Jun 24, 2008 2:13:00 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: Generate SQL with comments: disabled
[hibernate] Jun 24, 2008 2:13:00 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: Order SQL updates by primary key: disabled
[hibernate] Jun 24, 2008 2:13:00 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: Order SQL inserts for batching: disabled
[hibernate] Jun 24, 2008 2:13:00 PM org.hibernate.cfg.SettingsFactory createQueryTranslatorFactory
[hibernate] INFO: Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
[hibernate] Jun 24, 2008 2:13:00 PM org.hibernate.hql.ast.ASTQueryTranslatorFactory <init>
[hibernate] INFO: Using ASTQueryTranslatorFactory
[hibernate] Jun 24, 2008 2:13:00 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: Query language substitutions: {}
[hibernate] Jun 24, 2008 2:13:00 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: JPA-QL strict compliance: disabled
[hibernate] Jun 24, 2008 2:13:00 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: Second-level cache: enabled
[hibernate] Jun 24, 2008 2:13:00 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: Query cache: disabled
[hibernate] Jun 24, 2008 2:13:00 PM org.hibernate.cfg.SettingsFactory createCacheProvider
[hibernate] INFO: Cache provider: org.hibernate.cache.HashtableCacheProvider
[hibernate] Jun 24, 2008 2:13:00 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: Optimize cache for minimal puts: disabled
[hibernate] Jun 24, 2008 2:13:00 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: Structured second-level cache entries: disabled
[hibernate] Jun 24, 2008 2:13:00 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: Statistics: disabled
[hibernate] Jun 24, 2008 2:13:00 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: Deleted entity synthetic identifier rollback: disabled
[hibernate] Jun 24, 2008 2:13:00 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: Default entity-mode: pojo
[hibernate] Jun 24, 2008 2:13:00 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: Named query checking : enabled
[hibernate] Jun 24, 2008 2:13:00 PM org.hibernate.cfg.reveng.JDBCReader processPrimaryKey
[hibernate] WARNING: The JDBC driver didn't report any primary key columns in Container. Asking rev.eng. strategy
[hibernate] Jun 24, 2008 2:13:00 PM org.hibernate.cfg.reveng.JDBCReader processPrimaryKey
[hibernate] WARNING: Rev.eng. strategy did not report any primary key columns for Container
[hibernate] Jun 24, 2008 2:13:00 PM org.hibernate.cfg.reveng.JDBCReader processPrimaryKey
[hibernate] WARNING: The JDBC driver didn't report any primary key columns in InfoTag. Asking rev.eng. strategy
[hibernate] Jun 24, 2008 2:13:00 PM org.hibernate.cfg.reveng.JDBCReader processPrimaryKey
[hibernate] WARNING: Rev.eng. strategy did not report any primary key columns for InfoTag
[hibernate] Jun 24, 2008 2:13:00 PM org.hibernate.cfg.reveng.JDBCReader processPrimaryKey
[hibernate] WARNING: The JDBC driver didn't report any primary key columns in Interaction. Asking rev.eng. strategy
[hibernate] Jun 24, 2008 2:13:00 PM org.hibernate.cfg.reveng.JDBCReader processPrimaryKey
[hibernate] WARNING: Rev.eng. strategy did not report any primary key columns for Interaction
[hibernate] Jun 24, 2008 2:13:00 PM org.hibernate.cfg.reveng.JDBCReader processPrimaryKey
[hibernate] WARNING: The JDBC driver didn't report any primary key columns in Media. Asking rev.eng. strategy
[hibernate] Jun 24, 2008 2:13:00 PM org.hibernate.cfg.reveng.JDBCReader processPrimaryKey
[hibernate] WARNING: Rev.eng. strategy did not report any primary key columns for Media
[hibernate] Jun 24, 2008 2:13:00 PM org.hibernate.cfg.reveng.JDBCReader processPrimaryKey
[hibernate] WARNING: The JDBC driver didn't report any primary key columns in User. Asking rev.eng. strategy
[hibernate] Jun 24, 2008 2:13:00 PM org.hibernate.cfg.reveng.JDBCReader processPrimaryKey
[hibernate] WARNING: Rev.eng. strategy did not report any primary key columns for User
[hibernate] Jun 24, 2008 2:13:00 PM org.hibernate.cfg.reveng.JDBCReader processPrimaryKey
[hibernate] WARNING: The JDBC driver didn't report any primary key columns in WorkItem. Asking rev.eng. strategy
[hibernate] Jun 24, 2008 2:13:00 PM org.hibernate.cfg.reveng.JDBCReader processPrimaryKey
[hibernate] WARNING: Rev.eng. strategy did not report any primary key columns for WorkItem
[hibernate] Jun 24, 2008 2:13:00 PM org.hibernate.cfg.JDBCBinder createPersistentClasses
[hibernate] WARNING: Cannot create persistent class for org.hibernate.mapping.Table(MyAppDB.Container) as no columns were found.
[hibernate] Jun 24, 2008 2:13:00 PM org.hibernate.cfg.JDBCBinder createPersistentClasses
[hibernate] WARNING: Cannot create persistent class for org.hibernate.mapping.Table(MyAppDB.InfoTag) as no columns were found.
[hibernate] Jun 24, 2008 2:13:00 PM org.hibernate.cfg.JDBCBinder createPersistentClasses
[hibernate] WARNING: Cannot create persistent class for org.hibernate.mapping.Table(MyAppDB.Interaction) as no columns were found.
[hibernate] Jun 24, 2008 2:13:00 PM org.hibernate.cfg.JDBCBinder createPersistentClasses
[hibernate] WARNING: Cannot create persistent class for org.hibernate.mapping.Table(MyAppDB.Media) as no columns were found.
[hibernate] Jun 24, 2008 2:13:00 PM org.hibernate.cfg.JDBCBinder createPersistentClasses
[hibernate] WARNING: Cannot create persistent class for org.hibernate.mapping.Table(MyAppDB.User) as no columns were found.
[hibernate] Jun 24, 2008 2:13:00 PM org.hibernate.cfg.JDBCBinder createPersistentClasses
[hibernate] WARNING: Cannot create persistent class for org.hibernate.mapping.Table(MyAppDB.WorkItem) as no columns were found.
[hibernate] Jun 24, 2008 2:13:00 PM org.hibernate.connection.DriverManagerConnectionProvider close
[hibernate] INFO: cleaning up connection pool: jdbc:postgresql:MyAppDB
[hibernate] Jun 24, 2008 2:13:00 PM org.hibernate.tool.Version <clinit>
[hibernate] INFO: Hibernate Tools 3.2.0.CR1
[javaformatter] Java formatting of 0 files completed. Skipped 0 file(s).
generate-ui:
[echo] Building project 'MyApp' to generate views and controllers
init:
compile:
[javac] Compiling 1 source file to c:\java\workspace\MyApp\exploded-archives\MyApp.jar
copyclasses:
jar:
[copy] Copying 1 file to c:\java\workspace\MyApp\exploded-archives\MyApp.jar\META-INF
[copy] Copying 1 file to c:\java\workspace\MyApp\exploded-archives\MyApp.jar
[hibernate] Executing Hibernate Tool with a JPA Configuration
[hibernate] 1. task: generic exportertemplate: view/list.xhtml.ftl
[hibernate] Jun 24, 2008 2:13:02 PM org.hibernate.cfg.annotations.Version <clinit>
[hibernate] INFO: Hibernate Annotations 3.3.0.GA
[hibernate] Jun 24, 2008 2:13:02 PM org.hibernate.ejb.Version <clinit>
[hibernate] INFO: Hibernate EntityManager 3.3.1.GA
[hibernate] 2. task: generic exportertemplate: view/view.xhtml.ftl
[hibernate] 3. task: generic exportertemplate: view/view.page.xml.ftl
[hibernate] 4. task: generic exportertemplate: view/edit.xhtml.ftl
[hibernate] 5. task: generic exportertemplate: view/edit.page.xml.ftl
[hibernate] 6. task: generic exportertemplate: src/EntityList.java.ftl
[hibernate] 7. task: generic exportertemplate: view/list.page.xml.ftl
[hibernate] 8. task: generic exportertemplate: src/EntityHome.java.ftl
[hibernate] 9. task: generic exportertemplate: view/layout/menu.xhtml.ftl
[javaformatter] Java formatting of 1 files completed. Skipped 0 file(s).
[echo] Type 'seam restart' and go to http://localhost:8080/MyApp
generate:
generate-entities:
BUILD SUCCESSFUL
Total time: 3 seconds
Thanks to anyone who can point me in the right direction.