Hi - I'm experiencing a similar error as rjbica posted. What was the solution? Any ideas to try?
FYI: I am using Jboss Seam 1.2.1's seam-gen command which calls the Hibernate tool for reverse engineering.
Here is the output from the build:
Code:
Buildfile: C:\data\workspace\dev10\jboss-seam\seam-gen\build.xml
validate-workspace:
validate-project:
generate-entities:
[hibernate] Executing Hibernate Tool with a JDBC Configuration (for reverse engineering)
[hibernate] 1. task: hbm2java (Generates a set of .java files)
[hibernate] Jun 6, 2007 11:14:04 AM org.hibernate.cfg.Environment <clinit>
[hibernate] INFO: Hibernate 3.2.0.cr5
[hibernate] Jun 6, 2007 11:14:04 AM org.hibernate.cfg.Environment <clinit>
[hibernate] INFO: hibernate.properties not found
[hibernate] Jun 6, 2007 11:14:04 AM org.hibernate.cfg.Environment buildBytecodeProvider
[hibernate] INFO: Bytecode provider name : cglib
[hibernate] Jun 6, 2007 11:14:04 AM org.hibernate.cfg.Environment <clinit>
[hibernate] INFO: using JDK 1.4 java.sql.Timestamp handling
[hibernate] Jun 6, 2007 11:14:05 AM org.hibernate.connection.DriverManagerConnectionProvider configure
[hibernate] INFO: Using Hibernate built-in connection pool (not for production use!)
[hibernate] Jun 6, 2007 11:14:05 AM org.hibernate.connection.DriverManagerConnectionProvider configure
[hibernate] INFO: Hibernate connection pool size: 20
[hibernate] Jun 6, 2007 11:14:05 AM org.hibernate.connection.DriverManagerConnectionProvider configure
[hibernate] INFO: autocommit mode: false
[hibernate] Jun 6, 2007 11:14:05 AM org.hibernate.connection.DriverManagerConnectionProvider configure
[hibernate] INFO: using driver: com.microsoft.sqlserver.jdbc.SQLServerDriver at URL: jdbc:sqlserver://sqld-xxx.COM:<port>
[hibernate] Jun 6, 2007 11:14:05 AM org.hibernate.connection.DriverManagerConnectionProvider configure
[hibernate] INFO: connection properties: {user=appuser, password=****}
[hibernate] Jun 6, 2007 11:14:05 AM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: RDBMS: Microsoft SQL Server, version: 8.00.2039
[hibernate] Jun 6, 2007 11:14:05 AM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: JDBC driver: Microsoft SQL Server 2005 JDBC Driver, version: 1.1.1501.101
[hibernate] Jun 6, 2007 11:14:05 AM org.hibernate.dialect.Dialect <init>
[hibernate] INFO: Using dialect: org.hibernate.dialect.SQLServerDialect
[hibernate] Jun 6, 2007 11:14:05 AM org.hibernate.transaction.TransactionFactoryFactory buildTransactionFactory
[hibernate] INFO: Using default transaction strategy (direct JDBC transactions)
[hibernate] Jun 6, 2007 11:14:05 AM 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 6, 2007 11:14:05 AM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: Automatic flush during beforeCompletion(): disabled
[hibernate] Jun 6, 2007 11:14:05 AM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: Automatic session close at end of transaction: disabled
[hibernate] Jun 6, 2007 11:14:05 AM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: Scrollable result sets: enabled
[hibernate] Jun 6, 2007 11:14:05 AM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: JDBC3 getGeneratedKeys(): enabled
[hibernate] Jun 6, 2007 11:14:05 AM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: Connection release mode: auto
[hibernate] Jun 6, 2007 11:14:05 AM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: Default schema: dbo
[hibernate] Jun 6, 2007 11:14:05 AM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: Default catalog: Treasury
[hibernate] Jun 6, 2007 11:14:05 AM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: Default batch fetch size: 1
[hibernate] Jun 6, 2007 11:14:05 AM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: Generate SQL with comments: disabled
[hibernate] Jun 6, 2007 11:14:05 AM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: Order SQL updates by primary key: disabled
[hibernate] Jun 6, 2007 11:14:05 AM org.hibernate.cfg.SettingsFactory createQueryTranslatorFactory
[hibernate] INFO: Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
[hibernate] Jun 6, 2007 11:14:05 AM org.hibernate.hql.ast.ASTQueryTranslatorFactory <init>
[hibernate] INFO: Using ASTQueryTranslatorFactory
[hibernate] Jun 6, 2007 11:14:05 AM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: Query language substitutions: {}
[hibernate] Jun 6, 2007 11:14:05 AM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: JPA-QL strict compliance: disabled
[hibernate] Jun 6, 2007 11:14:05 AM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: Second-level cache: enabled
[hibernate] Jun 6, 2007 11:14:05 AM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: Query cache: disabled
[hibernate] Jun 6, 2007 11:14:05 AM org.hibernate.cfg.SettingsFactory createCacheProvider
[hibernate] INFO: Cache provider: org.hibernate.cache.NoCacheProvider
[hibernate] Jun 6, 2007 11:14:05 AM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: Optimize cache for minimal puts: disabled
[hibernate] Jun 6, 2007 11:14:05 AM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: Structured second-level cache entries: disabled
[hibernate] Jun 6, 2007 11:14:05 AM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: Statistics: disabled
[hibernate] Jun 6, 2007 11:14:05 AM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: Deleted entity synthetic identifier rollback: disabled
[hibernate] Jun 6, 2007 11:14:05 AM org.hibernate.cfg.SettingsFactory buildSettings
[hibernate] INFO: Default entity-mode: pojo
[hibernate] Jun 6, 2007 11:14:07 AM org.hibernate.cfg.reveng.JDBCReader processPrimaryKey
[hibernate] WARNING: The JDBC driver didn't report any primary key columns in sysconstraints. Asking rev.eng. strategy
[hibernate] Jun 6, 2007 11:14:07 AM org.hibernate.cfg.reveng.JDBCReader processPrimaryKey
[hibernate] WARNING: Rev.eng. strategy did not report any primary key columns for sysconstraints
[hibernate] Jun 6, 2007 11:14:07 AM org.hibernate.cfg.reveng.JDBCReader processPrimaryKey
[hibernate] WARNING: The JDBC driver didn't report any primary key columns in syssegments. Asking rev.eng. strategy
[hibernate] Jun 6, 2007 11:14:07 AM org.hibernate.cfg.reveng.JDBCReader processPrimaryKey
[hibernate] WARNING: Rev.eng. strategy did not report any primary key columns for syssegments
[hibernate] Jun 6, 2007 11:14:08 AM org.hibernate.connection.DriverManagerConnectionProvider close
[hibernate] INFO: cleaning up connection pool: jdbc:sqlserver://sqld-xxx.COM:<port>
[hibernate] Jun 6, 2007 11:14:08 AM org.hibernate.tool.Version <clinit>
[hibernate] INFO: Hibernate Tools 3.2.0.b9
Jun 6, 2007 11:14:08 AM org.hibernate.connection.DriverManagerConnectionProvider close
INFO: cleaning up connection pool: jdbc:sqlserver://sqld-xxx.COM:<port>
[hibernate] Jun 6, 2007 11:14:09 AM freemarker.log.JDK14LoggerFactory$JDK14Logger error
[hibernate] SEVERE:
[hibernate] Method public java.lang.String org.hibernate.tool.hbm2x.pojo.EntityPOJOClass.generateCollectionAnnotation(org.hibernate.mapping.Property,org.hibernate.cfg.Configuration) threw an exception when invoked on org.hibernate.tool.hbm2x.pojo.EntityPOJOClass(com.company.model.PricingSegment)
[hibernate] The problematic instruction:
[hibernate] ----------
[hibernate] ==> ${pojo.generateCollectionAnnotation(property, cfg)} [on line 15, column 1 in pojo/Ejb3PropertyGetAnnotation.ftl]
[hibernate] in include "Ejb3PropertyGetAnnotation.ftl" [on line 1, column 1 in pojo/GetPropertyAnnotation.ftl]
[hibernate] in include "GetPropertyAnnotation.ftl" [on line 9, column 5 in pojo/PojoPropertyAccessors.ftl]
[hibernate] in include "PojoPropertyAccessors.ftl" [on line 12, column 1 in pojo/Pojo.ftl]
[hibernate] ----------
[hibernate] Java backtrace for programmers:
[hibernate] ----------
[hibernate] freemarker.template.TemplateModelException: Method public java.lang.String org.hibernate.tool.hbm2x.pojo.EntityPOJOClass.generateCollectionAnnotation(org.hibernate.mapping.Property,org.hibernate.cfg.Configuration) threw an exception when invoked on org.hibernate.tool.hbm2x.pojo.EntityPOJOClass(com.company.model.PricingSegment)
[hibernate] at freemarker.ext.beans.SimpleMethodModel.exec(SimpleMethodModel.java:136)
[hibernate] at freemarker.core.MethodCall._getAsTemplateModel(MethodCall.java:93)
[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.IfBlock.accept(IfBlock.java:82)
[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.ConditionalBlock.accept(ConditionalBlock.java:79)
[hibernate] at freemarker.core.Environment.visit(Environment.java:196)
[hibernate] at freemarker.core.Environment.include(Environment.java:1375)
[hibernate] at freemarker.core.Include.accept(Include.java:155)
[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.include(Environment.java:1375)
[hibernate] at freemarker.core.Include.accept(Include.java:155)
[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.ConditionalBlock.accept(ConditionalBlock.java:79)
[hibernate] at freemarker.core.Environment.visit(Environment.java:196)
[hibernate] at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:160)
[hibernate] at freemarker.core.Environment.visit(Environment.java:351)
[hibernate] at freemarker.core.IteratorBlock.accept(IteratorBlock.java:95)
[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.include(Environment.java:1375)
[hibernate] at freemarker.core.Include.accept(Include.java:155)
[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.IfBlock.accept(IfBlock.java:82)
[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.visit(Environment.java:233)
[hibernate] at freemarker.core.BlockAssignment.accept(BlockAssignment.java:83)
[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(TemplateHelper.java:247)
[hibernate] at org.hibernate.tool.hbm2x.TemplateProducer.produceToString(TemplateProducer.java:67)
[hibernate] at org.hibernate.tool.hbm2x.TemplateProducer.produce(TemplateProducer.java:28)
[hibernate] at org.hibernate.tool.hbm2x.TemplateProducer.produce(TemplateProducer.java:97)
[hibernate] at org.hibernate.tool.hbm2x.GenericExporter.exportPOJO(GenericExporter.java:146)
[hibernate] at org.hibernate.tool.hbm2x.GenericExporter.exportPersistentClass(GenericExporter.java:135)
[hibernate] at org.hibernate.tool.hbm2x.GenericExporter$2.process(GenericExporter.java:41)
[hibernate] at org.hibernate.tool.hbm2x.GenericExporter.doStart(GenericExporter.java:126)
[hibernate] at org.hibernate.tool.hbm2x.AbstractExporter.start(AbstractExporter.java:95)
[hibernate] at org.hibernate.tool.ant.ExporterTask.execute(ExporterTask.java:40)
[hibernate] at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:183)
[hibernate] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java: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.java:1216)
[hibernate] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
[hibernate] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
[hibernate] at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
[hibernate] at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
[hibernate] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
[hibernate] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)
[hibernate] Caused by: java.lang.NullPointerException
[hibernate] at org.hibernate.tool.hbm2x.pojo.EntityPOJOClass.getManyToManyMappedBy(EntityPOJOClass.java:561)
[hibernate] at org.hibernate.tool.hbm2x.pojo.EntityPOJOClass.generateCollectionAnnotation(EntityPOJOClass.java:505)
[hibernate] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[hibernate] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[hibernate] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[hibernate] at java.lang.reflect.Method.invoke(Method.java:585)
[hibernate] at freemarker.ext.beans.BeansWrapper.invokeMethod(BeansWrapper.java:583)
[hibernate] at freemarker.ext.beans.SimpleMethodModel.exec(SimpleMethodModel.java:113)
[hibernate] ... 69 more
[hibernate] An exception occurred while running exporter #2:hbm2java (Generates a set of .java files)
[hibernate] To get the full stack trace run ant with -verbose
[hibernate] org.hibernate.tool.hbm2x.ExporterException: Error while processing template pojo/Pojo.ftl
[hibernate] freemarker.template.TemplateModelException: Method public java.lang.String org.hibernate.tool.hbm2x.pojo.EntityPOJOClass.generateCollectionAnnotation(org.hibernate.mapping.Property,org.hibernate.cfg.Configuration) threw an exception when invoked on org.hibernate.tool.hbm2x.pojo.EntityPOJOClass(com.company.model.PricingSegment)
[hibernate] java.lang.NullPointerException
BUILD FAILED
C:\data\workspace\dev10\jboss-seam\seam-gen\build.xml:805: org.hibernate.tool.hbm2x.ExporterException: Error while processing template pojo/Pojo.ftl
Total time: 5 seconds