Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8609451
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T03:52:57+00:00 2026-06-12T03:52:57+00:00

I am currently trying to persist Joda Time in Hibernate using usertype , but

  • 0

I am currently trying to persist Joda Time in Hibernate using usertype, but I keep on getting the following error in eclipse.

Error Message

(failed.org.hibernate.MappingException: Could not determine type for: org.jadira.usertype.dateandtime.jsr310.PersistentLocalDateTime, at table: MODEL_OBJECT, for columns: [org.hibernate.mapping.Column(MODIFIED_DATE_TIME)])

my xml file looks like this

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ibernate-mapping PUBLIC 
"-//Hibernate/Hibernate Mapping DTD 3.0//EN" 
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
<hibernate-mapping package="model" >
    <class name="ModelObject" table="MODEL_OBJECT">
        <id name="id" column="MODEL_ID" >
            <generator class="native"></generator>
    </id>
    <property name="modifiedDateTime"             
            type="org.jadira.usertype.dateandtime.jsr310.PersistentLocalDateTime"
            column="MODIFIED_DATE_TIME"/>
        <property name="creationDateTime"
            type="org.jadira.usertype.dateandtime.jsr310.PersistentLocalDateTime"
            column="CREATION_DATE_TIME"/>
    </class>
</hibernate-mapping>`

and my java file looks like this

package model;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import org.joda.time.LocalDateTime;

public abstract class ModelObject  {

private PropertyChangeSupport changeSupport = new PropertyChangeSupport(this);

private long id;
private LocalDateTime  modifiedDateTime = new LocalDateTime ();
private LocalDateTime  creationDateTime = new LocalDateTime ();

public Long getId(){
    return id;
}

public void setId(Long id){
    firePropertyChange("id", this.id, this.id = id);
}

public LocalDateTime  getModifiedDateTime(){
    return modifiedDateTime;
}

public void setModifiedDateTime(LocalDateTime  modifiedDateTime) {
    firePropertyChange("modifiedDateTime", 
                this.modifiedDateTime, 
                this.modifiedDateTime = modifiedDateTime);
}

public LocalDateTime  getCreationDateTime(){
    return creationDateTime;
}

public void setCreationDateTime(LocalDateTime  creationDateTime){
    firePropertyChange("creationDateTime", 
                this.creationDateTime, 
                this.creationDateTime = creationDateTime);
}

public void addPropertyChangeSupportListener(PropertyChangeListener listener){
    changeSupport.addPropertyChangeListener(listener);
}

public void removePropertyChangeListener(PropertyChangeListener listener){
    changeSupport.removePropertyChangeListener(listener);
}

public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener){
    changeSupport.addPropertyChangeListener(propertyName, listener);
}

public void removePropertyChangeListener(String propertyName, 
                                             PropertyChangeListener listener){
    changeSupport.addPropertyChangeListener(propertyName, listener);
}

protected void firePropertyChange(String propertyName, Object oldValue, Object newValue){
    changeSupport.firePropertyChange(propertyName, oldValue, newValue);
}

}

I have added usertype.spi-3.0.0.jar and usertype.core.3.0.0.CR3.jar to my class path.

I have no idea what is going on here so help would be greatly appreciated

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T03:52:58+00:00Added an answer on June 12, 2026 at 3:52 am

    Add separate file with HBM custom types
    CustomTypes.hbm.xml

    <!DOCTYPE hibernate-mapping PUBLIC
        "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
        "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
    
    <hibernate-mapping package="com.softcomputer.softlab.business.core">
       <typedef name="localJodaDate"
          class="org.jadira.usertype.dateandtime.jsr310.PersistentLocalDateTime" />
    </hibernate-mapping>  
    

    include this file to your mapping

      <mapping resource="CustomTypes.hbm.xml" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently trying this: using DocumentFormat.OpenXml.Packaging; using (WordprocessingDocument wordDoc = WordprocessingDocument.Open(fileNameDocx as string, true))
I am trying to use NHibernate to persist objects using Guids for their Ids
Currently trying to create an XML system using Ogre and the STL. As a
Currently trying to find a way to do the following inside some form of
I am currently trying to graph a time series of a price spread and
I'm currently trying to persist a canvas to a bitmap, and I've run into
I'm currently tearing my hair out trying to persist authentication via a database bases
I am trying to update a nested has_one model using mongoid but it will
I'm currently trying to map music related data using Doctrine2's POPO Annotations. I haven't
I am trying to persist settings on a page through browser close/re-open. Currently the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.