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)
Asked
Active
Viewed 301 times
0

Bacteria
- 8,406
- 10
- 50
- 67

Shaikh Hussain
- 11
- 5
-
What you doing? How you get this exception? No details .This is not the way to ask question – Subodh Joshi Aug 11 '15 at 17:40
-
possible duplicate of [Why am I getting this NullPointer exception?](http://stackoverflow.com/questions/681979/why-am-i-getting-this-nullpointer-exception) – seenukarthi Aug 11 '15 at 17:41
-
Shaikh paste your code here from where you are getting this error. – Kulbhushan Singh Aug 11 '15 at 17:43
-
`SessionFactory` returns `null` for some unclear reasons. – Tiny Aug 11 '15 at 18:35