[jboss-user] [JBoss Seam] - Seam generate-entities failing

Azavia do-not-reply at jboss.com
Wed Nov 29 20:26:53 EST 2006


Hi,

I'm trying to use the seam-gen tool, but am getting some errors.

When I go to generate entities from the database, i get the following:

C:\jboss-seam>seam generate-entities
  | Buildfile: C:\jboss-seam\seam-gen\build.xml
  | 
  | validate-workspace:
  | 
  | validate-project:
  | 
  | generate-entities:
  | [hibernate] Executing Hibernate Tool with a JDBC Configuration (for reverse engi
  | neering)
  | [hibernate] 1. task: hbm2java (Generates a set of .java files)
  | [hibernate] Nov 29, 2006 8:18:27 PM org.hibernate.cfg.Environment <clinit>
  | [hibernate] INFO: Hibernate 3.2 cr4
  | [hibernate] Nov 29, 2006 8:18:28 PM org.hibernate.cfg.Environment <clinit>
  | [hibernate] INFO: hibernate.properties not found
  | [hibernate] Nov 29, 2006 8:18:28 PM org.hibernate.cfg.Environment buildBytecodeP
  | rovider
  | [hibernate] INFO: Bytecode provider name : cglib
  | [hibernate] Nov 29, 2006 8:18:28 PM org.hibernate.cfg.Environment <clinit>
  | [hibernate] INFO: using JDK 1.4 java.sql.Timestamp handling
  | [hibernate] Nov 29, 2006 8:18:28 PM org.hibernate.connection.DriverManagerConnec
  | tionProvider configure
  | [hibernate] INFO: Using Hibernate built-in connection pool (not for production u
  | se!)
  | [hibernate] Nov 29, 2006 8:18:28 PM org.hibernate.connection.DriverManagerConnec
  | tionProvider configure
  | [hibernate] INFO: Hibernate connection pool size: 20
  | [hibernate] Nov 29, 2006 8:18:28 PM org.hibernate.connection.DriverManagerConnec
  | tionProvider configure
  | [hibernate] INFO: autocommit mode: false
  | [hibernate] Nov 29, 2006 8:18:28 PM org.hibernate.connection.DriverManagerConnec
  | tionProvider configure
  | [hibernate] INFO: using driver: org.postgresql.Driver at URL: jdbc:postgresql://
  | localhost:5432/seam_test
  | [hibernate] Nov 29, 2006 8:18:28 PM org.hibernate.connection.DriverManagerConnec
  | tionProvider configure
  | [hibernate] INFO: connection properties: {user=Brandon, password=****}
  | [hibernate] Nov 29, 2006 8:18:28 PM org.hibernate.cfg.SettingsFactory buildSetti
  | ngs
  | [hibernate] INFO: RDBMS: PostgreSQL, version: 8.2beta3
  | [hibernate] Nov 29, 2006 8:18:28 PM org.hibernate.cfg.SettingsFactory buildSetti
  | ngs
  | [hibernate] INFO: JDBC driver: PostgreSQL Native Driver, version: PostgreSQL 8.2
  | devel JDBC3 with SSL (build 503)
  | [hibernate] Nov 29, 2006 8:18:28 PM org.hibernate.dialect.Dialect <init>
  | [hibernate] INFO: Using dialect: org.hibernate.dialect.PostgreSQLDialect
  | [hibernate] Nov 29, 2006 8:18:28 PM org.hibernate.transaction.TransactionFactory
  | Factory buildTransactionFactory
  | [hibernate] INFO: Using default transaction strategy (direct JDBC transactions)
  | [hibernate] Nov 29, 2006 8:18:28 PM org.hibernate.transaction.TransactionManager
  | LookupFactory getTransactionManagerLookup
  | [hibernate] INFO: No TransactionManagerLookup configured (in JTA environment, us
  | e of read-write or transactional second-level cache is not recommended)
  | [hibernate] Nov 29, 2006 8:18:28 PM org.hibernate.cfg.SettingsFactory buildSetti
  | ngs
  | [hibernate] INFO: Automatic flush during beforeCompletion(): disabled
  | [hibernate] Nov 29, 2006 8:18:28 PM org.hibernate.cfg.SettingsFactory buildSetti
  | ngs
  | [hibernate] INFO: Automatic session close at end of transaction: disabled
  | [hibernate] Nov 29, 2006 8:18:28 PM org.hibernate.cfg.SettingsFactory buildSetti
  | ngs
  | [hibernate] INFO: JDBC batch size: 15
  | [hibernate] Nov 29, 2006 8:18:28 PM org.hibernate.cfg.SettingsFactory buildSetti
  | ngs
  | [hibernate] INFO: JDBC batch updates for versioned data: disabled
  | [hibernate] Nov 29, 2006 8:18:28 PM org.hibernate.cfg.SettingsFactory buildSetti
  | ngs
  | [hibernate] INFO: Scrollable result sets: enabled
  | [hibernate] Nov 29, 2006 8:18:28 PM org.hibernate.cfg.SettingsFactory buildSetti
  | ngs
  | [hibernate] INFO: JDBC3 getGeneratedKeys(): disabled
  | [hibernate] Nov 29, 2006 8:18:28 PM org.hibernate.cfg.SettingsFactory buildSetti
  | ngs
  | [hibernate] INFO: Connection release mode: auto
  | [hibernate] Nov 29, 2006 8:18:28 PM org.hibernate.cfg.SettingsFactory buildSetti
  | ngs
  | [hibernate] INFO: Default batch fetch size: 1
  | [hibernate] Nov 29, 2006 8:18:28 PM org.hibernate.cfg.SettingsFactory buildSetti
  | ngs
  | [hibernate] INFO: Generate SQL with comments: disabled
  | [hibernate] Nov 29, 2006 8:18:28 PM org.hibernate.cfg.SettingsFactory buildSetti
  | ngs
  | [hibernate] INFO: Order SQL updates by primary key: disabled
  | [hibernate] Nov 29, 2006 8:18:28 PM org.hibernate.cfg.SettingsFactory createQuer
  | yTranslatorFactory
  | [hibernate] INFO: Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFact
  | ory
  | [hibernate] Nov 29, 2006 8:18:28 PM org.hibernate.hql.ast.ASTQueryTranslatorFact
  | ory <init>
  | [hibernate] INFO: Using ASTQueryTranslatorFactory
  | [hibernate] Nov 29, 2006 8:18:28 PM org.hibernate.cfg.SettingsFactory buildSetti
  | ngs
  | [hibernate] INFO: Query language substitutions: {}
  | [hibernate] Nov 29, 2006 8:18:28 PM org.hibernate.cfg.SettingsFactory buildSetti
  | ngs
  | [hibernate] INFO: JPA-QL strict compliance: disabled
  | [hibernate] Nov 29, 2006 8:18:28 PM org.hibernate.cfg.SettingsFactory buildSetti
  | ngs
  | [hibernate] INFO: Second-level cache: enabled
  | [hibernate] Nov 29, 2006 8:18:28 PM org.hibernate.cfg.SettingsFactory buildSetti
  | ngs
  | [hibernate] INFO: Query cache: disabled
  | [hibernate] Nov 29, 2006 8:18:28 PM org.hibernate.cfg.SettingsFactory createCach
  | eProvider
  | [hibernate] INFO: Cache provider: org.hibernate.cache.NoCacheProvider
  | [hibernate] Nov 29, 2006 8:18:28 PM org.hibernate.cfg.SettingsFactory buildSetti
  | ngs
  | [hibernate] INFO: Optimize cache for minimal puts: disabled
  | [hibernate] Nov 29, 2006 8:18:28 PM org.hibernate.cfg.SettingsFactory buildSetti
  | ngs
  | [hibernate] INFO: Structured second-level cache entries: disabled
  | [hibernate] Nov 29, 2006 8:18:28 PM org.hibernate.cfg.SettingsFactory buildSetti
  | ngs
  | [hibernate] INFO: Statistics: disabled
  | [hibernate] Nov 29, 2006 8:18:28 PM org.hibernate.cfg.SettingsFactory buildSetti
  | ngs
  | [hibernate] INFO: Deleted entity synthetic identifier rollback: disabled
  | [hibernate] Nov 29, 2006 8:18:28 PM org.hibernate.cfg.SettingsFactory buildSetti
  | ngs
  | [hibernate] INFO: Default entity-mode: pojo
  | [hibernate] Nov 29, 2006 8:18:28 PM org.hibernate.cfg.reveng.JDBCReader processP
  | rimaryKey
  | [hibernate] WARNING: The JDBC driver didn't report any primary key columns in pg
  | _buffercache. Asking rev.eng. strategy
  | [hibernate] Nov 29, 2006 8:18:28 PM org.hibernate.cfg.reveng.JDBCReader processP
  | rimaryKey
  | [hibernate] WARNING: Rev.eng. strategy did not report any primary key columns fo
  | r pg_buffercache
  | [hibernate] Nov 29, 2006 8:18:28 PM org.hibernate.cfg.reveng.JDBCReader processP
  | rimaryKey
  | [hibernate] WARNING: The JDBC driver didn't report any primary key columns in pg
  | _freespacemap_pages. Asking rev.eng. strategy
  | [hibernate] Nov 29, 2006 8:18:28 PM org.hibernate.cfg.reveng.JDBCReader processP
  | rimaryKey
  | [hibernate] WARNING: Rev.eng. strategy did not report any primary key columns fo
  | r pg_freespacemap_pages
  | [hibernate] Nov 29, 2006 8:18:28 PM org.hibernate.cfg.reveng.JDBCReader processP
  | rimaryKey
  | [hibernate] WARNING: The JDBC driver didn't report any primary key columns in pg
  | _freespacemap_relations. Asking rev.eng. strategy
  | [hibernate] Nov 29, 2006 8:18:28 PM org.hibernate.cfg.reveng.JDBCReader processP
  | rimaryKey
  | [hibernate] WARNING: Rev.eng. strategy did not report any primary key columns fo
  | r pg_freespacemap_relations
  | [hibernate] Nov 29, 2006 8:18:28 PM org.hibernate.connection.DriverManagerConnec
  | tionProvider close
  | [hibernate] INFO: cleaning up connection pool: jdbc:postgresql://localhost:5432/
  | seam_test
  | [hibernate] Nov 29, 2006 8:18:28 PM org.hibernate.tool.Version <clinit>
  | [hibernate] INFO: Hibernate Tools 3.2.0.snapshotb9
  | [hibernate] 2. task: generic exportertemplate: view/list.xhtml.ftl
  | [hibernate] Nov 29, 2006 8:18:29 PM freemarker.log.JDK14LoggerFactory$JDK14Logge
  | r error
  | [hibernate] SEVERE:
  | 
  | [hibernate] Expression pojo.identifierProperty is undefined on line 47, column 8
  | 5 in view/list.xhtml.ftl.
  | [hibernate] The problematic instruction:
  | [hibernate] ----------
  | [hibernate] ==> ${pojo.identifierProperty.name} [on line 47, column 83 in view/l
  | ist.xhtml.ftl]
  | [hibernate] ----------
  | 
  | [hibernate] Java backtrace for programmers:
  | [hibernate] ----------
  | [hibernate] freemarker.core.InvalidReferenceException: Expression pojo.identifie
  | rProperty is undefined on line 47, column 85 in view/list.xhtml.ftl.
  | [hibernate]     at freemarker.core.TemplateObject.assertNonNull(TemplateObject.j
  | ava:124)
  | [hibernate]     at freemarker.core.TemplateObject.invalidTypeException(TemplateO
  | bject.java:134)
  | [hibernate]     at freemarker.core.Dot._getAsTemplateModel(Dot.java:78)
  | [hibernate]     at freemarker.core.Expression.getAsTemplateModel(Expression.java
  | :89)
  | [hibernate]     at freemarker.core.Expression.getStringValue(Expression.java:93)
  | 
  | [hibernate]     at freemarker.core.DollarVariable.accept(DollarVariable.java:76)
  | 
  | [hibernate]     at freemarker.core.Environment.visit(Environment.java:196)
  | [hibernate]     at freemarker.core.MixedContent.accept(MixedContent.java:92)
  | [hibernate]     at freemarker.core.Environment.visit(Environment.java:196)
  | [hibernate]     at freemarker.core.Environment.process(Environment.java:176)
  | [hibernate]     at freemarker.template.Template.process(Template.java:231)
  | [hibernate]     at org.hibernate.tool.hbm2x.TemplateHelper.processTemplate(Templ
  | ateHelper.java:245)
  | [hibernate]     at org.hibernate.tool.hbm2x.TemplateProducer.produceToString(Tem
  | plateProducer.java:67)
  | [hibernate]     at org.hibernate.tool.hbm2x.TemplateProducer.produce(TemplatePro
  | ducer.java:28)
  | [hibernate]     at org.hibernate.tool.hbm2x.TemplateProducer.produce(TemplatePro
  | ducer.java:97)
  | [hibernate]     at org.hibernate.tool.hbm2x.GenericExporter.exportPOJO(GenericEx
  | porter.java:84)
  | [hibernate]     at org.hibernate.tool.hbm2x.GenericExporter.exportComponent(Gene
  | ricExporter.java:69)
  | [hibernate]     at org.hibernate.tool.hbm2x.GenericExporter.exportClasses(Generi
  | cExporter.java:63)
  | [hibernate]     at org.hibernate.tool.hbm2x.GenericExporter.doStart(GenericExpor
  | ter.java:41)
  | [hibernate]     at org.hibernate.tool.hbm2x.AbstractExporter.start(AbstractExpor
  | ter.java:95)
  | [hibernate]     at org.hibernate.tool.ant.ExporterTask.execute(ExporterTask.java
  | :40)
  | [hibernate]     at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToo
  | lTask.java:182)
  | [hibernate]     at org.apache.tools.ant.UnknownElement.execute(UnknownElement.ja
  | va:275)
  | [hibernate]     at org.apache.tools.ant.Task.perform(Task.java:364)
  | [hibernate]     at org.apache.tools.ant.Target.execute(Target.java:341)
  | [hibernate]     at org.apache.tools.ant.Target.performTasks(Target.java:369)
  | [hibernate]     at org.apache.tools.ant.Project.executeSortedTargets(Project.jav
  | a:1216)
  | [hibernate]     at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
  | 
  | [hibernate]     at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(De
  | faultExecutor.java:40)
  | [hibernate]     at org.apache.tools.ant.Project.executeTargets(Project.java:1068
  | )
  | [hibernate]     at org.apache.tools.ant.Main.runBuild(Main.java:668)
  | [hibernate]     at org.apache.tools.ant.Main.startAnt(Main.java:187)
  | [hibernate]     at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
  | [hibernate]     at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
  | [hibernate] An exception occurred while running exporter #3:generic exportertemp
  | late: view/list.xhtml.ftl
  | [hibernate] To get the full stack trace run ant with -verbose
  | [hibernate] org.hibernate.tool.hbm2x.ExporterException: Error while processing t
  | emplate view/list.xhtml.ftl
  | [hibernate] freemarker.core.InvalidReferenceException: Expression pojo.identifie
  | rProperty is undefined on line 47, column 85 in view/list.xhtml.ftl.
  | 
  | BUILD FAILED
  | C:\jboss-seam\seam-gen\build.xml:639: org.hibernate.tool.hbm2x.ExporterException
  | : Error while processing template view/list.xhtml.ftl
  | 
  | Total time: 2 seconds
  | 
  | C:\jboss-seam>

JBoss version is 4.0.5, Seam is whatever is the latest download.

Everything else has worked, like new-form, new-action, etc. I just am trying to get this to work.

Database is postgresql. I specified the jdbc url first as jdbc:postgresql:seam_test, then as jdbc:postgresql://localhost:5432/seam_test

Thanks,
Brandon

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3989888#3989888

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3989888



More information about the jboss-user mailing list