线程" main"中的例外情况显示java.lang.NullPointerException。而在Hibernet的OneToOne协会

时间:2015-08-11 17:38:55

标签: java hibernate

21:20:26,958  INFO Version:15 - Hibernate Annotations 3.2.0.GA
21:20:26,976  INFO Environment:500 - Hibernate 3.2.1
21:20:26,981  INFO Environment:533 - hibernate.properties not found
21:20:26,983  INFO Environment:667 - Bytecode provider name : cglib
21:20:26,987  INFO Environment:584 - using JDK 1.4 java.sql.Timestamp handling
21:20:27,065  INFO Configuration:1423 - configuring from resource: hibernate.cfg.xml
21:20:27,066  INFO Configuration:1400 - Configuration resource: hibernate.cfg.xml
21:20:27,229  INFO Configuration:1538 - Configured SessionFactory: null
21:20:27,247  INFO Dialect:151 - Using dialect: org.hibernate.dialect.MySQLDialect
21:20:27,318  INFO AnnotationBinder:387 - Binding entity from annotated class: com.project1.model.CompanyDetails
21:20:27,343  INFO EntityBinder:340 - Bind entity com.project1.model.CompanyDetails on table TAB_COMPANY_DETAILS
21:20:27,413  INFO AnnotationBinder:387 - Binding entity from annotated class: com.project1.model.CompanyCategory
21:20:27,416  INFO EntityBinder:340 - Bind entity com.project1.model.CompanyCategory on table TAB_COMPANY_CATEGORY
21:20:27,419  INFO AnnotationBinder:387 - Binding entity from annotated class: com.project1.model.CompanySector
21:20:27,420  INFO EntityBinder:340 - Bind entity com.project1.model.CompanySector on table TAB_COMPANY_SECTOR
21:20:27,426  INFO AnnotationBinder:387 - Binding entity from annotated class: com.project1.model.CompanyType
21:20:27,427  INFO EntityBinder:340 - Bind entity com.project1.model.CompanyType on table TAB_COMPANY_TYPE
21:20:27,430  INFO AnnotationBinder:387 - Binding entity from annotated class: com.project1.model.Country
21:20:27,430  INFO EntityBinder:340 - Bind entity com.project1.model.Country on table TAB_COUNTRY
Exception in thread "main" java.lang.NullPointerException
    at org.hibernate.cfg.OneToOneSecondPass.doSecondPass(OneToOneSecondPass.java:135)
    at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1127)
    at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:296)
    at org.hibernate.cfg.Configuration.generateDropSchemaScript(Configuration.java:756)
    at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:93)
    at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:61)
    at com.project1.model.TestCompanyDetails.main(TestCompanyDetails.java:32)

0 个答案:

没有答案