-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Hibernate Error processing mapping file
PostPosted: Wed Jun 23, 2010 3:30 pm 
Newbie

Joined: Tue Jun 22, 2010 12:52 pm
Posts: 2
Hi everyone.
I have a configuration file with two entities listed:

Code:
<persistence-unit-metadata>
      <xml-mapping-metadata-complete />
      <persistence-unit-defaults>
         <access>PROPERTY</access>
      </persistence-unit-defaults>
   </persistence-unit-metadata>
   
   <mapped-superclass class="com.demo.domain.impl.TransactionOrSubjectData" metadata-complete="true">
      <attributes>
         <id name="id">
            <column name="TRANSACTIONID"/>
         </id>
         <basic name="customerReferenceIdentifier">
            <column name="CUSTOMERREFERENCEIDENTIFIER"/>
         </basic>
      </attributes>
   </mapped-superclass>
   
   <entity class="com.demo.domain.impl.TransactionData" metadata-complete="true">
      <table name="TRANSACTION" />
      <attributes>
         <basic name="createdDate">
            <column name="datecreated"/>
            <temporal>TIMESTAMP</temporal>
         </basic>
      </attributes>
   </entity>


The thing is I'm getting the following exception:

Caused by: org.hibernate.MappingException: Could not determine type for: java.util.Map, at table: TRANSACTION, for columns: [org.hibernate.mapping.Column(additionalAttributes)]

at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:291)
at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:275)
at org.hibernate.mapping.Property.isValid(Property.java:217)
at org.hibernate.mapping.PersistentClass.validate(PersistentClass.java:464)
at org.hibernate.mapping.RootClass.validate(RootClass.java:236)
at org.hibernate.cfg.Configuration.validate(Configuration.java:1193)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1378)
at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:954)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:891)
... 66 more

The problem is because there is additional properties in that classes that are being mapped automatically (I don't want that).
I tried a lot of options to disable that behavior like: put metadata complete etc. but still I'm getting the same exception.
The only way it works it is when I list every field I don't want mapped to db as transient in the configuration file.

I'm using config file because it is a legacy project I can't add annotations to.
Hibernate version: 3.5.3

Thanks in advance for the help.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.