Hello folks,
I try generate database with example Application Caveat Emptor but I got one Exception:
Code:
00:19:56,190 INFO HbmBinder:2382 - Mapping collection: auction.model.User.billingDetails -> BILLING_DETAILS
Exception in thread "main" java.lang.ExceptionInInitializerError
at auction.persistence.HibernateUtil.<clinit>(HibernateUtil.java:22)
at auction.persistence.Database.generateDatabase(Database.java:23)
at auction.persistence.Database.main(Database.java:31)
Caused by: org.hibernate.MappingException: Could not determine type for: monetary_amount_usd, at table: BID, for columns: [org.hibernate.mapping.Column(BID_AMOUNT), org.hibernate.mapping.Column(BID_AMOUNT_CURRENCY)]
at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:269)
at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:253)
at org.hibernate.mapping.Property.isValid(Property.java:185)
at org.hibernate.mapping.PersistentClass.validate(PersistentClass.java:440)
at org.hibernate.mapping.RootClass.validate(RootClass.java:192)
at org.hibernate.cfg.Configuration.validate(Configuration.java:1108)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1293)
at auction.persistence.HibernateUtil.<clinit>(HibernateUtil.java:19)
... 2 more
This Exception about type of columns BID`S table: money_amount_usd , I think this type is not supported database postgresql 8.1.3 then I changed type for money but continues the same error.
Look type money is supported for postgresql :
http://www.postgresql.com.cn/docs/8.3/static/datatype-money.html