title: Hibernate don't create table
body: <p>Hibernate don't create table at MySql. There isn't any errors. </p>
  
  <p>my spring-hibernate.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;beans xmlns="http://www.springframework.org/schema/beans"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tx="http://www.springframework.org/schema/tx"
  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.2.xsd
      http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.2.xsd"&gt;
  
  &lt;tx:annotation-driven transaction-manager="transactionManager" /&gt;
  
  &lt;bean id="transactionManager"
      class="org.springframework.orm.hibernate4.HibernateTransactionManager"&gt;
      &lt;property name="sessionFactory" ref="sessionFactoryBean" /&gt;
  &lt;/bean&gt;
  
  &lt;bean id="sessionFactoryBean"
      class="org.springframework.orm.hibernate4.LocalSessionFactoryBean"&gt;
      &lt;property name="dataSource" ref="dataSource" /&gt;
      &lt;property name="hibernateProperties"&gt;
          &lt;props&gt;
              &lt;prop key="hibernate.hbm2ddl.auto"&gt;create&lt;/prop&gt;
              &lt;prop key="hibernate.show_sql"&gt;true&lt;/prop&gt;
              &lt;prop key="hibernate.charSet"&gt;UTF-8&lt;/prop&gt;
          &lt;/props&gt;
      &lt;/property&gt;
      &lt;property name="packagesToScan"&gt;
          &lt;list&gt;
              &lt;value&gt;az.inventar.model&lt;/value&gt;
          &lt;/list&gt;
      &lt;/property&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p></p>
  
  <p>my spring-database.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;beans xmlns="http://www.springframework.org/schema/beans"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.2.xsd"&gt;
  
  &lt;bean id="dataSource"
      class="org.springframework.jdbc.datasource.DriverManagerDataSource"&gt;
      &lt;property name="url" value="jdbc:mysql://localhost:3306/inventardb" /&gt;
      &lt;property name="username" value="root" /&gt;
      &lt;property name="password" value="123456" /&gt;
      &lt;property name="driverClassName" value="com.mysql.jdbc.Driver" /&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p></p>
  
  <p>my dispatcher-servlet.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;beans xmlns="http://www.springframework.org/schema/beans"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"   xmlns:context="http://www.springframework.org/schema/context"
  xmlns:mvc="http://www.springframework.org/schema/mvc"
  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.2.xsd
      http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.2.xsd
      http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.2.xsd"&gt;
  
  &lt;context:annotation-config /&gt;
  &lt;context:component-scan base-package="az.inventar.*" /&gt;
  &lt;mvc:annotation-driven /&gt;
  
  &lt;import resource="spring-database.xml" /&gt;
  &lt;import resource="spring-hibernate.xml" /&gt;
  
  &lt;bean
      class="org.springframework.web.servlet.view.InternalResourceViewResolver"&gt;
      &lt;property name="prefix" value="/WEB-INF/views/" /&gt;
      &lt;property name="suffix" value=".jsp" /&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p></p>
  
  <p>And I have 2 Entity. This is my entities </p>
  
  <pre><code>@Entity
  public class Filials {
  @Id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  private int id;
  private String name;
  private String adress;
  @OneToMany(mappedBy = "filials")
  private List&lt;Opers&gt; opers;
  
  public Filials() {
      super();
      // TODO Auto-generated constructor stub
  }
  
  public Filials(int id, String name, String adress) {
      super();
      this.id = id;
      this.name = name;
      this.adress = adress;
  }
  
  public int getId() {
      return id;
  }
  
  public void setId(int id) {
      this.id = id;
  }
  
  public String getName() {
      return name;
  }
  
  public void setName(String name) {
      this.name = name;
  }
  
  public String getAdress() {
      return adress;
  }
  
  public void setAdress(String adress) {
      this.adress = adress;
  }
  </code></pre>
  
  <p>and second entity</p>
  
  <pre><code>@Entity
  public class Opers {
  @Id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  private int id;
  private String name;
  private String surname;
  @ManyToOne
  @JoinColumn(name="filial_id")
  private Filials filials;
  
  public Opers() {
      super();
      // TODO Auto-generated constructor stub
  }
  
  public Opers(int id, String name, String surname, Filials filials) {
      super();
      this.id = id;
      this.name = name;
      this.surname = surname;
      this.filials = filials;
  }
  
  public int getId() {
      return id;
  }
  
  public void setId(int id) {
      this.id = id;
  }
  
  public String getName() {
      return name;
  }
  
  public void setName(String name) {
      this.name = name;
  }
  
  public String getSurname() {
      return surname;
  }
  
  public void setSurname(String surname) {
      this.surname = surname;
  }
  
  public Filials getFilials() {
      return filials;
  }
  
  public void setFilials(Filials filials) {
      this.filials = filials;
  }
  </code></pre>
  
  <p>}</p>
  
  <p>Hibernate logs</p>
  
  <blockquote>
    <p>10:54:58,515  INFO DispatcherServlet:489 - FrameworkServlet
    'dispatcher': initialization started 10:54:58,546  INFO
    XmlWebApplicationContext:578 - Refreshing WebApplicationContext for
    namespace 'dispatcher-servlet': startup date [Mon Apr 04 10:54:58 AZST
    2016]; root of context hierarchy 10:54:58,612  INFO
    XmlBeanDefinitionReader:317 - Loading XML bean definitions from
    ServletContext resource [/WEB-INF/dispatcher-servlet.xml] 10:54:59,203
    INFO XmlBeanDefinitionReader:317 - Loading XML bean definitions from
    ServletContext resource [/WEB-INF/spring-database.xml] 10:54:59,241 
    INFO XmlBeanDefinitionReader:317 - Loading XML bean definitions from
    ServletContext resource [/WEB-INF/spring-hibernate.xml] 10:54:59,952 
    INFO RequestMappingHandlerAdapter:532 - Looking for @ControllerAdvice:
    WebApplicationContext for namespace 'dispatcher-servlet': startup date
    [Mon Apr 04 10:54:58 AZST 2016]; root of context hierarchy
    10:55:00,079  INFO RequestMappingHandlerAdapter:532 - Looking for
    @ControllerAdvice: WebApplicationContext for namespace
    'dispatcher-servlet': startup date [Mon Apr 04 10:54:58 AZST 2016];
    root of context hierarchy 10:55:00,245  INFO
    DriverManagerDataSource:133 - Loaded JDBC driver:
    com.mysql.jdbc.Driver 10:55:00,679 DEBUG BasicTypeRegistry:146 -
    Adding type registration boolean ->
    org.hibernate.type.BooleanType@3f224eff 10:55:00,680 DEBUG
    BasicTypeRegistry:146 - Adding type registration boolean ->
    org.hibernate.type.BooleanType@3f224eff 10:55:00,680 DEBUG
    BasicTypeRegistry:146 - Adding type registration java.lang.Boolean ->
    org.hibernate.type.BooleanType@3f224eff 10:55:00,684 DEBUG
    BasicTypeRegistry:146 - Adding type registration numeric_boolean ->
    org.hibernate.type.NumericBooleanType@6d6a72f2 10:55:00,694 DEBUG
    BasicTypeRegistry:146 - Adding type registration true_false ->
    org.hibernate.type.TrueFalseType@7250b542 10:55:00,698 DEBUG
    BasicTypeRegistry:146 - Adding type registration yes_no ->
    org.hibernate.type.YesNoType@19fb9663 10:55:00,706 DEBUG
    BasicTypeRegistry:146 - Adding type registration byte ->
    org.hibernate.type.ByteType@4cbbf7f4 10:55:00,707 DEBUG
    BasicTypeRegistry:146 - Adding type registration byte ->
    org.hibernate.type.ByteType@4cbbf7f4 10:55:00,708 DEBUG
    BasicTypeRegistry:146 - Adding type registration java.lang.Byte ->
    org.hibernate.type.ByteType@4cbbf7f4 10:55:00,712 DEBUG
    BasicTypeRegistry:146 - Adding type registration character ->
    org.hibernate.type.CharacterType@19fb7a3c 10:55:00,712 DEBUG
    BasicTypeRegistry:146 - Adding type registration char ->
    org.hibernate.type.CharacterType@19fb7a3c 10:55:00,713 DEBUG
    BasicTypeRegistry:146 - Adding type registration java.lang.Character
    -> org.hibernate.type.CharacterType@19fb7a3c 10:55:00,724 DEBUG BasicTypeRegistry:146 - Adding type registration short ->
    org.hibernate.type.ShortType@3efdd686 10:55:00,724 DEBUG
    BasicTypeRegistry:146 - Adding type registration short ->
    org.hibernate.type.ShortType@3efdd686 10:55:00,725 DEBUG
    BasicTypeRegistry:146 - Adding type registration java.lang.Short ->
    org.hibernate.type.ShortType@3efdd686 10:55:00,727 DEBUG
    BasicTypeRegistry:146 - Adding type registration integer ->
    org.hibernate.type.IntegerType@6b38579e 10:55:00,727 DEBUG
    BasicTypeRegistry:146 - Adding type registration int ->
    org.hibernate.type.IntegerType@6b38579e 10:55:00,727 DEBUG
    BasicTypeRegistry:146 - Adding type registration java.lang.Integer ->
    org.hibernate.type.IntegerType@6b38579e 10:55:00,732 DEBUG
    BasicTypeRegistry:146 - Adding type registration long ->
    org.hibernate.type.LongType@726c21e5 10:55:00,732 DEBUG
    BasicTypeRegistry:146 - Adding type registration long ->
    org.hibernate.type.LongType@726c21e5 10:55:00,733 DEBUG
    BasicTypeRegistry:146 - Adding type registration java.lang.Long ->
    org.hibernate.type.LongType@726c21e5 10:55:00,738 DEBUG
    BasicTypeRegistry:146 - Adding type registration float ->
    org.hibernate.type.FloatType@4ab9bc66 10:55:00,738 DEBUG
    BasicTypeRegistry:146 - Adding type registration float ->
    org.hibernate.type.FloatType@4ab9bc66 10:55:00,739 DEBUG
    BasicTypeRegistry:146 - Adding type registration java.lang.Float ->
    org.hibernate.type.FloatType@4ab9bc66 10:55:00,746 DEBUG
    BasicTypeRegistry:146 - Adding type registration double ->
    org.hibernate.type.DoubleType@28031121 10:55:00,747 DEBUG
    BasicTypeRegistry:146 - Adding type registration double ->
    org.hibernate.type.DoubleType@28031121 10:55:00,747 DEBUG
    BasicTypeRegistry:146 - Adding type registration java.lang.Double ->
    org.hibernate.type.DoubleType@28031121 10:55:00,759 DEBUG
    BasicTypeRegistry:146 - Adding type registration big_decimal ->
    org.hibernate.type.BigDecimalType@2ab937ac 10:55:00,759 DEBUG
    BasicTypeRegistry:146 - Adding type registration java.math.BigDecimal
    -> org.hibernate.type.BigDecimalType@2ab937ac 10:55:00,764 DEBUG BasicTypeRegistry:146 - Adding type registration big_integer ->
    org.hibernate.type.BigIntegerType@2b1390c9 10:55:00,765 DEBUG
    BasicTypeRegistry:146 - Adding type registration java.math.BigInteger
    -> org.hibernate.type.BigIntegerType@2b1390c9 10:55:00,769 DEBUG BasicTypeRegistry:146 - Adding type registration string ->
    org.hibernate.type.StringType@6ec5f31e 10:55:00,770 DEBUG
    BasicTypeRegistry:146 - Adding type registration java.lang.String ->
    org.hibernate.type.StringType@6ec5f31e 10:55:00,772 DEBUG
    BasicTypeRegistry:146 - Adding type registration nstring ->
    org.hibernate.type.StringNVarcharType@194b899d 10:55:00,778 DEBUG
    BasicTypeRegistry:146 - Adding type registration ncharacter ->
    org.hibernate.type.CharacterNCharType@5177bcb 10:55:00,780 DEBUG
    BasicTypeRegistry:146 - Adding type registration url ->
    org.hibernate.type.UrlType@28dbcc4d 10:55:00,781 DEBUG
    BasicTypeRegistry:146 - Adding type registration java.net.URL ->
    org.hibernate.type.UrlType@28dbcc4d 10:55:00,788 DEBUG
    BasicTypeRegistry:146 - Adding type registration date ->
    org.hibernate.type.DateType@a33c98c 10:55:00,789 DEBUG
    BasicTypeRegistry:146 - Adding type registration java.sql.Date ->
    org.hibernate.type.DateType@a33c98c 10:55:00,796 DEBUG
    BasicTypeRegistry:146 - Adding type registration time ->
    org.hibernate.type.TimeType@49cda1d4 10:55:00,796 DEBUG
    BasicTypeRegistry:146 - Adding type registration java.sql.Time ->
    org.hibernate.type.TimeType@49cda1d4 10:55:00,804 DEBUG
    BasicTypeRegistry:146 - Adding type registration timestamp ->
    org.hibernate.type.TimestampType@4b8fa058 10:55:00,804 DEBUG
    BasicTypeRegistry:146 - Adding type registration java.sql.Timestamp ->
    org.hibernate.type.TimestampType@4b8fa058 10:55:00,805 DEBUG
    BasicTypeRegistry:146 - Adding type registration java.util.Date ->
    org.hibernate.type.TimestampType@4b8fa058 10:55:00,807 DEBUG
    BasicTypeRegistry:146 - Adding type registration dbtimestamp ->
    org.hibernate.type.DbTimestampType@756b5ac7 10:55:00,816 DEBUG
    BasicTypeRegistry:146 - Adding type registration calendar ->
    org.hibernate.type.CalendarType@64b24f1 10:55:00,817 DEBUG
    BasicTypeRegistry:146 - Adding type registration java.util.Calendar ->
    org.hibernate.type.CalendarType@64b24f1 10:55:00,817 DEBUG
    BasicTypeRegistry:146 - Adding type registration
    java.util.GregorianCalendar -> org.hibernate.type.CalendarType@64b24f1
    10:55:00,825 DEBUG BasicTypeRegistry:146 - Adding type registration
    calendar_date -> org.hibernate.type.CalendarDateType@49574f22
    10:55:00,828 DEBUG BasicTypeRegistry:146 - Adding type registration
    locale -> org.hibernate.type.LocaleType@6ebe10dd 10:55:00,829 DEBUG
    BasicTypeRegistry:146 - Adding type registration java.util.Locale ->
    org.hibernate.type.LocaleType@6ebe10dd 10:55:00,831 DEBUG
    BasicTypeRegistry:146 - Adding type registration currency ->
    org.hibernate.type.CurrencyType@386fd9f1 10:55:00,831 DEBUG
    BasicTypeRegistry:146 - Adding type registration java.util.Currency ->
    org.hibernate.type.CurrencyType@386fd9f1 10:55:00,834 DEBUG
    BasicTypeRegistry:146 - Adding type registration timezone ->
    org.hibernate.type.TimeZoneType@4bb217b8 10:55:00,834 DEBUG
    BasicTypeRegistry:146 - Adding type registration java.util.TimeZone ->
    org.hibernate.type.TimeZoneType@4bb217b8 10:55:00,836 DEBUG
    BasicTypeRegistry:146 - Adding type registration class ->
    org.hibernate.type.ClassType@fedb05d 10:55:00,836 DEBUG
    BasicTypeRegistry:146 - Adding type registration java.lang.Class ->
    org.hibernate.type.ClassType@fedb05d 10:55:00,843 DEBUG
    BasicTypeRegistry:146 - Adding type registration uuid-binary ->
    org.hibernate.type.UUIDBinaryType@31eedb3f 10:55:00,843 DEBUG
    BasicTypeRegistry:146 - Adding type registration java.util.UUID ->
    org.hibernate.type.UUIDBinaryType@31eedb3f 10:55:00,844 DEBUG
    BasicTypeRegistry:146 - Adding type registration uuid-char ->
    org.hibernate.type.UUIDCharType@63ba4c7c 10:55:00,846 DEBUG
    BasicTypeRegistry:146 - Adding type registration pg-uuid ->
    org.hibernate.type.PostgresUUIDType@172d56f6 10:55:00,850 DEBUG
    BasicTypeRegistry:146 - Adding type registration binary ->
    org.hibernate.type.BinaryType@834f782 10:55:00,851 DEBUG
    BasicTypeRegistry:146 - Adding type registration byte[] ->
    org.hibernate.type.BinaryType@834f782 10:55:00,851 DEBUG
    BasicTypeRegistry:146 - Adding type registration [B ->
    org.hibernate.type.BinaryType@834f782 10:55:00,854 DEBUG
    BasicTypeRegistry:146 - Adding type registration wrapper-binary ->
    org.hibernate.type.WrapperBinaryType@3785babe 10:55:00,854 DEBUG
    BasicTypeRegistry:146 - Adding type registration Byte[] ->
    org.hibernate.type.WrapperBinaryType@3785babe 10:55:00,855 DEBUG
    BasicTypeRegistry:146 - Adding type registration [Ljava.lang.Byte; ->
    org.hibernate.type.WrapperBinaryType@3785babe 10:55:00,857 DEBUG
    BasicTypeRegistry:146 - Adding type registration image ->
    org.hibernate.type.ImageType@71c19bf7 10:55:00,865 DEBUG
    BasicTypeRegistry:146 - Adding type registration characters ->
    org.hibernate.type.CharArrayType@7b4ff56a 10:55:00,865 DEBUG
    BasicTypeRegistry:146 - Adding type registration char[] ->
    org.hibernate.type.CharArrayType@7b4ff56a 10:55:00,865 DEBUG
    BasicTypeRegistry:146 - Adding type registration [C ->
    org.hibernate.type.CharArrayType@7b4ff56a 10:55:00,867 DEBUG
    BasicTypeRegistry:146 - Adding type registration wrapper-characters ->
    org.hibernate.type.CharacterArrayType@277c2b4e 10:55:00,867 DEBUG
    BasicTypeRegistry:146 - Adding type registration
    [Ljava.lang.Character; ->
    org.hibernate.type.CharacterArrayType@277c2b4e 10:55:00,868 DEBUG
    BasicTypeRegistry:146 - Adding type registration Character[] ->
    org.hibernate.type.CharacterArrayType@277c2b4e 10:55:00,872 DEBUG
    BasicTypeRegistry:146 - Adding type registration text ->
    org.hibernate.type.TextType@75e64723 10:55:00,873 DEBUG
    BasicTypeRegistry:146 - Adding type registration ntext ->
    org.hibernate.type.NTextType@54ff1aab 10:55:00,890 DEBUG
    BasicTypeRegistry:146 - Adding type registration blob ->
    org.hibernate.type.BlobType@7e1fa11d 10:55:00,891 DEBUG
    BasicTypeRegistry:146 - Adding type registration java.sql.Blob ->
    org.hibernate.type.BlobType@7e1fa11d 10:55:00,892 DEBUG
    BasicTypeRegistry:146 - Adding type registration materialized_blob ->
    org.hibernate.type.MaterializedBlobType@75fa563e 10:55:00,904 DEBUG
    BasicTypeRegistry:146 - Adding type registration clob ->
    org.hibernate.type.ClobType@2a8392b5 10:55:00,904 DEBUG
    BasicTypeRegistry:146 - Adding type registration java.sql.Clob ->
    org.hibernate.type.ClobType@2a8392b5 10:55:00,913 DEBUG
    BasicTypeRegistry:146 - Adding type registration nclob ->
    org.hibernate.type.NClobType@772f11c2 10:55:00,914 DEBUG
    BasicTypeRegistry:146 - Adding type registration java.sql.NClob ->
    org.hibernate.type.NClobType@772f11c2 10:55:00,914 DEBUG
    BasicTypeRegistry:146 - Adding type registration materialized_clob ->
    org.hibernate.type.MaterializedClobType@5939fed6 10:55:00,915 DEBUG
    BasicTypeRegistry:146 - Adding type registration materialized_nclob ->
    org.hibernate.type.MaterializedNClobType@131dda2d 10:55:00,918 DEBUG
    BasicTypeRegistry:146 - Adding type registration serializable ->
    org.hibernate.type.SerializableType@28c61629 10:55:00,927 DEBUG
    BasicTypeRegistry:146 - Adding type registration object ->
    org.hibernate.type.ObjectType@6f14d1b5 10:55:00,927 DEBUG
    BasicTypeRegistry:146 - Adding type registration java.lang.Object ->
    org.hibernate.type.ObjectType@6f14d1b5 10:55:00,928 DEBUG
    BasicTypeRegistry:146 - Adding type registration imm_date ->
    org.hibernate.type.AdaptedImmutableType@1f5198d0 10:55:00,929 DEBUG
    BasicTypeRegistry:146 - Adding type registration imm_time ->
    org.hibernate.type.AdaptedImmutableType@26078fc0 10:55:00,929 DEBUG
    BasicTypeRegistry:146 - Adding type registration imm_timestamp ->
    org.hibernate.type.AdaptedImmutableType@3a6e99c1 10:55:00,929 DEBUG
    BasicTypeRegistry:146 - Adding type registration imm_dbtimestamp ->
    org.hibernate.type.AdaptedImmutableType@33306bdf 10:55:00,930 DEBUG
    BasicTypeRegistry:146 - Adding type registration imm_calendar ->
    org.hibernate.type.AdaptedImmutableType@2ffa17ba 10:55:00,930 DEBUG
    BasicTypeRegistry:146 - Adding type registration imm_calendar_date ->
    org.hibernate.type.AdaptedImmutableType@4c2bccf1 10:55:00,930 DEBUG
    BasicTypeRegistry:146 - Adding type registration imm_binary ->
    org.hibernate.type.AdaptedImmutableType@4f9c0948 10:55:00,930 DEBUG
    BasicTypeRegistry:146 - Adding type registration imm_serializable ->
    org.hibernate.type.AdaptedImmutableType@d257ecd 10:55:01,001  INFO
    Version:66 - HCANN000001: Hibernate Commons Annotations {4.0.5.Final}
    10:55:01,032  INFO Version:54 - HHH000412: Hibernate Core
    {4.3.8.Final} 10:55:01,043  INFO Environment:239 - HHH000206:
    hibernate.properties not found 10:55:01,047  INFO Environment:346 -
    HHH000021: Bytecode provider name : javassist 10:55:01,983  INFO
    Dialect:145 - HHH000400: Using dialect:
    org.hibernate.dialect.MySQL5Dialect 10:55:02,447  WARN
    XmlWebApplicationContext:546 - Exception encountered during context
    initialization - cancelling refresh attempt:
    org.springframework.beans.factory.BeanCreationException: Error
    creating bean with name 'transactionManager' defined in ServletContext
    resource [/WEB-INF/spring-hibernate.xml]: Cannot resolve reference to
    bean 'sessionFactoryBean' while setting bean property
    'sessionFactory'; nested exception is
    org.springframework.beans.factory.BeanCreationException: Error
    creating bean with name 'sessionFactoryBean' defined in ServletContext
    resource [/WEB-INF/spring-hibernate.xml]: Invocation of init method
    failed; nested exception is org.hibernate.AnnotationException: No
    identifier specified for entity: az.inventar.model.UserRoles
    10:55:02,480 ERROR DispatcherServlet:502 - Context initialization
    failed org.springframework.beans.factory.BeanCreationException: Error
    creating bean with name 'transactionManager' defined in ServletContext
    resource [/WEB-INF/spring-hibernate.xml]: Cannot resolve reference to
    bean 'sessionFactoryBean' while setting bean property
    'sessionFactory'; nested exception is
    org.springframework.beans.factory.BeanCreationException: Error
    creating bean with name 'sessionFactoryBean' defined in ServletContext
    resource [/WEB-INF/spring-hibernate.xml]: Invocation of init method
    failed; nested exception is org.hibernate.AnnotationException: No
    identifier specified for entity: az.inventar.model.UserRoles  at
    org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:359)
      at
    org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108)
      at
    org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1481)
      at
    org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1226)
      at
    org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543)
      at
    org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
      at
    org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
      at
    org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
      at
    org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
      at
    org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
      at
    org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:772)
      at
    org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:839)
      at
    org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538)
      at
    org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:668)
      at
    org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:634)
      at
    org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:682)
      at
    org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:553)
      at
    org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:494)
      at
    org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136)
      at javax.servlet.GenericServlet.init(GenericServlet.java:158)   at
    org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1231)
      at
    org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1144)
      at
    org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1031)
      at
    org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4914)
      at
    org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5201)
      at
    org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      at
    org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
      at
    org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
      at java.util.concurrent.FutureTask.run(FutureTask.java:262)     at
    java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at
    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:745) Caused by:
    org.springframework.beans.factory.BeanCreationException: Error
    creating bean with name 'sessionFactoryBean' defined in ServletContext
    resource [/WEB-INF/spring-hibernate.xml]: Invocation of init method
    failed; nested exception is org.hibernate.AnnotationException: No
    identifier specified for entity: az.inventar.model.UserRoles  at
    org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1578)
      at
    org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545)
      at
    org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
      at
    org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
      at
    org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
      at
    org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
      at
    org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
      at
    org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:351)
      ... 31 more Caused by: org.hibernate.AnnotationException: No
    identifier specified for entity: az.inventar.model.UserRoles  at
    org.hibernate.cfg.InheritanceState.determineDefaultAccessType(InheritanceState.java:277)
      at
    org.hibernate.cfg.InheritanceState.getElementsToProcess(InheritanceState.java:224)
      at
    org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:775)
      at
    org.hibernate.cfg.Configuration$MetadataSourceQueue.processAnnotatedClassesQueue(Configuration.java:3845)
      at
    org.hibernate.cfg.Configuration$MetadataSourceQueue.processMetadata(Configuration.java:3799)
      at
    org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1412)
      at
    org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1846)
      at
    org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1930)
      at
    org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:372)
      at
    org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:454)
      at
    org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:439)
      at
    org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1637)
      at
    org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1574)
      ... 38 more</p>
  </blockquote>