@Embedded annotation in hibernate not working for me
<p>Hello Friends I am working on Hibernate Framework.I am trying to use @Embedded Annotation in my application but I don't why its not showing up for me.
This is my code </p>

<p>UserDetails.java</p>

<pre><code>import java.util.Date;

 import javax.persistence.Column;
 import javax.persistence.Embedded;
 import javax.persistence.Entity;
 import javax.persistence.Id;
 import javax.persistence.Temporal; 
 import javax.persistence.TemporalType;

 @Entity(name= "USER_DETAILS")
 public class UserDetails {
  @Id
  @Column(name = "USER_NAME")
  private String UserName ;
  @Column(name = "USER_F_NAME")
  private String UserFName ;
  @Column(name = "USER_L_NAME")
  private String UserLName ;
  @Column(name = "USER_CONT_NUMBER")
  private String UserContactNumber ;
  @Column(name = "USER_AGE")
  private int    UserAge ;
  @Column(name = "JOIN_DATE")
  @Temporal(TemporalType.DATE)
  private Date joinDate ;
  @Embedded
  private UserAddress addr ;

  public UserAddress getAddr() {
    return addr;
}
public void setAddr(UserAddress addr) {
    this.addr = addr;
}
public Date getJoinDate() {
    return joinDate;
}
public void setJoinDate(Date joinDate) {
    this.joinDate = joinDate;
}
public String getUserName() {
    return UserName;
}
public void setUserName(String userName) {
    UserName = userName;
}
public String getUserFName() {
    return UserFName;
}
public void setUserFName(String userFName) {
    UserFName = userFName;
}
public String getUserLName() {
    return UserLName;
}
public void setUserLName(String userLName) {
    UserLName = userLName;
}
public String getUserContactNumber() {
    return UserContactNumber;
}
public void setUserContactNumber(String userContactNumber) {
    UserContactNumber = userContactNumber;
}
public int getUserAge() {
    return UserAge;
}
public void setUserAge(int userAge) {
    UserAge = userAge;
}

}
</code></pre>

<p>UserAddress.java</p>

<pre><code>    package org.hibernate.model;

import javax.persistence.Embeddable;

@Embeddable
public class UserAddress {
    private String Street ;
    private String City ;
    private String State ;
    private String Country ;
    private String Pincode ;
    public String getStreet() {
        return Street;
    }
    public void setStreet(String street) {
        Street = street;
    }
    public String getCity() {
        return City;
    }
    public void setCity(String city) {
        City = city;
    }
    public String getState() {
        return State;
    }
    public void setState(String state) {
        State = state;
    }
    public String getCountry() {
        return Country;
    }
    public void setCountry(String country) {
        Country = country;
    }
    public String getPincode() {
        return Pincode;
    }
    public void setPincode(String pincode) {
        Pincode = pincode;
    }

}
</code></pre>

<p>UserController.java</p>

<pre><code>package org.hibernate.controller;

import java.util.Date;

import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;
import org.hibernate.model.UserAddress;
import org.hibernate.model.UserDetails;

public class UserController {

    public static void main(String[] args) {
        UserDetails ud = new UserDetails();
        ud.setUserFName("Pritesh");
        ud.setUserLName("Patel");
        ud.setUserName("ppatel123");
        ud.setUserAge(26);
        ud.setUserContactNumber("6479644065");
        ud.setJoinDate(new Date());

        UserAddress addr = new UserAddress();
        addr.setStreet("Stella Drive");
        addr.setCity("Markham");
        addr.setState("Ontario");
        addr.setCountry("Canada");
        addr.setPincode("L6X 5L7");

        ud.setAddr(addr);

        SessionFactory sf = new Configuration().configure().buildSessionFactory();
        System.out.println("Loading done");
        Session session = sf.openSession();
        System.out.println("ransaction begin");
        session.beginTransaction();
        session.save(ud);
        session.getTransaction().commit();
        session.close();

        ud = null ;
        session = sf.openSession();
        session.beginTransaction();
        ud = (UserDetails)session.get(UserDetails.class, "ppatel123");
        System.out.println("User Id " + ud.getUserName());
        System.out.println("User Name " + ud.getUserFName()+ " " + ud.getUserLName() );
        System.out.println("User Age " + ud.getUserAge());
        System.out.println("User Contact Number " + ud.getUserContactNumber());
        System.out.println("User Joining Date " + ud.getJoinDate());
    }

}
</code></pre>

<p>Hibernate.cfg.xml</p>

<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!DOCTYPE hibernate-configuration PUBLIC
        "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
        "http://www.org/dtd/hibernate-configuration-3.0.dtd"&gt;
&lt;hibernate-configuration&gt;
    &lt;session-factory&gt;
        &lt;property name="connection.driver_class"&gt;com.mysql.jdbc.Driver&lt;/property&gt;
        &lt;property name="connection.url"&gt;jdbc:mysql://localhost:3306/online_store&lt;/property&gt;
        &lt;property name="connection.username"&gt;root&lt;/property&gt;
        &lt;property name="connection.password"&gt;root123&lt;/property&gt;
         &lt;!-- SQL dialect --&gt;
        &lt;property name="dialect"&gt;org.hibernate.dialect.MySQL5Dialect&lt;/property&gt;
         &lt;!-- Echo all executed SQL to stdout --&gt;
        &lt;property name="hbm2ddl.auto"&gt;create&lt;/property&gt;
        &lt;!-- JDBC connection pool (use the built-in) --&gt;
        &lt;property name="connection.pool_size"&gt;1&lt;/property&gt;
        &lt;!-- Echo all executed SQL to stdout --&gt;
        &lt;property name="show_sql"&gt;true&lt;/property&gt;

        &lt;!-- Mapping files --&gt;
        &lt;mapping class="org.hibernate.model.UserDetails" /&gt;

    &lt;/session-factory&gt;
&lt;/hibernate-configuration&gt;
</code></pre>

<p>output Console</p>

<pre><code>Oct 19, 2016 2:13:41 PM org.hibernate.Version logVersion
INFO: HHH000412: Hibernate Core {5.2.3.Final}
Oct 19, 2016 2:13:41 PM org.hibernate.cfg.Environment &lt;clinit&gt;
INFO: HHH000206: hibernate.properties not found
Oct 19, 2016 2:13:41 PM org.hibernate.cfg.Environment buildBytecodeProvider
INFO: HHH000021: Bytecode provider name : javassist
Oct 19, 2016 2:13:43 PM org.hibernate.annotations.common.reflection.java.JavaReflectionManager &lt;clinit&gt;
INFO: HCANN000001: Hibernate Commons Annotations {5.0.1.Final}
Oct 19, 2016 2:13:43 PM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
WARN: HHH10001002: Using Hibernate built-in connection pool (not for production use!)
Oct 19, 2016 2:13:43 PM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator
INFO: HHH10001005: using driver [com.mysql.jdbc.Driver] at URL [jdbc:mysql://localhost:3306/online_store]
Oct 19, 2016 2:13:43 PM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator
INFO: HHH10001001: Connection properties: {user=root, password=****}
Oct 19, 2016 2:13:43 PM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator
INFO: HHH10001003: Autocommit mode: false
Oct 19, 2016 2:13:43 PM org.hibernate.engine.jdbc.connections.internal.PooledConnections &lt;init&gt;
INFO: HHH000115: Hibernate connection pool size: 1 (min=1)
Wed Oct 19 14:13:43 EDT 2016 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
Oct 19, 2016 2:13:44 PM org.hibernate.dialect.Dialect &lt;init&gt;
INFO: HHH000400: Using dialect: org.hibernate.dialect.MySQL5Dialect
Hibernate: drop table if exists USER_DETAILS
Oct 19, 2016 2:13:46 PM org.hibernate.resource.transaction.backend.jdbc.internal.DdlTransactionIsolatorNonJtaImpl getIsolatedConnection
INFO: HHH10001501: Connection obtained from JdbcConnectionAccess [org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess@517566b] for (non-JTA) DDL execution was not in auto-commit mode; the Connection 'local transaction' will be committed and the Connection will be set into auto-commit mode.
</code></pre>

<p>Before It was working fine,but when I start using @Embedded Annotation my out put console only showing this.
Thanks in Advance  </p>