0 Replies Latest reply on Jul 11, 2013 4:50 PM by Guillermo L

    jadira.usertype.autoRegisterUserTypes property not working when loading entities as a module

    Guillermo L Newbie

      Hi,

      I have a library containing my JPA entites. I placed the persistence.xml within the ejb.jar containing the following properties:

       

          <property name="jadira.usertype.autoRegisterUserTypes" value="true"/>

       

      The problem is that it appears that this property is not being picked since whenever I load an entity that has a joda time mapping I get the following exception:

       

      java.lang.RuntimeException: javax.persistence.PersistenceException: org.hibernate.type.SerializationException: could not deserialize

       

      Caused by: java.io.StreamCorruptedException: invalid stream header: 0000A1F2

       

      This is (at least from my opinion) caused by the data type not being properly mapped as expected however I did configured the auto registration as mentioned above.

       

      I tried doing the same with my entities placed within the ejb.jar and it worked so I guess it might be related to the jboss module definition and/or the order in which dependencies are loaded however I cannot get to a theory that leads me to a solution.

       

      I also tried to load jadira as module and set it up as an hibernate dependency but nothing changed...

       

      Any idea about what could be causing this issue and how it may be resolved?

       

      Thanks for your help!