title: @EnableTransactionManagement and @Transaction not working with Hibernate
body: <p>I am making an application using <code>Maven</code>, <code>Spring</code>, <code>Hibernate</code> and <code>rest APIs</code>. Following is the hierarchy of my project.
  <em>Persistence</em> module is complied and is made available for <em>Business</em> module and this Business module is made available to <em>Endpoint</em> module. Pretty simple.</p>
  
  <p>I am using the <code>spring annotation</code> instead of xml and this is the flow that I am trying to implement.</p>
  
  <p>Web based application calls a rest API, in the API there is called a function and in that function a call is made to businessLogic module and in that 
  module the persistence module is called in which all the DAOs and its implementation is written. <strong><em>Each of these modules has its own Configuration file</em></strong>. Pretty straigh forward as well.</p>
  
  <p>According to what I have learned, we use the tag <code>@EnableTransactionManagement</code> to get the <code>@Transaction</code> working.
  <code>@Transaction</code> tag can be used on function and that function will be considered as a <strong><em>single transaction</em></strong> no matter how many inserts, updates are called in it.</p>
  
  <p><strong>Problem:</strong>
  Issue is simple, I <em>don't get any exception</em> when i start apache or even when i call API that later calls the persistence to save the object.
  <em>No data is inserted the database and no exception is printed in the log file.</em></p>
  
  <p>Keeping the hierarchy in mind, following are the files that are used in the project.</p>
  
  <blockquote>
    <p>EndpointConfiguration.java</p>
  </blockquote>
  
  <pre><code>@Configuration
  @EnableTransactionManagement
  @PropertySource(value = { "classpath:persistence-hibernate.properties" })
  public class EndpointConfiguration{
  
      @Autowired
      public org.springframework.core.env.Environment environment;
  
  
      @Bean(name = "sessionFactory")
      public LocalSessionFactoryBean sessionFactory() {
          LocalSessionFactoryBean sessionFactory = new LocalSessionFactoryBean();
          sessionFactory.setDataSource(dataSource());
          sessionFactory.setPackagesToScan(new String[] { "com.product.persistence" });
          sessionFactory.setHibernateProperties(hibernateProperties());
          return sessionFactory;
      }
  
      @Bean(name = "dataSource")
      public DataSource dataSource() {
          DriverManagerDataSource dataSource = new DriverManagerDataSource();
          dataSource.setDriverClassName(environment.getRequiredProperty("jdbc.driverClassName"));
          dataSource.setUrl(environment.getRequiredProperty("jdbc.url"));
          dataSource.setUsername(environment.getRequiredProperty("jdbc.username"));
          dataSource.setPassword(environment.getRequiredProperty("jdbc.password"));
          return dataSource;
      }
  
      private Properties hibernateProperties() {
          Properties properties = new Properties();
          properties.put("hibernate.dialect", environment.getRequiredProperty("hibernate.dialect"));
          properties.put("hibernate.show_sql", environment.getRequiredProperty("hibernate.show_sql"));
          properties.put("hibernate.format_sql", environment.getRequiredProperty("hibernate.format_sql"));
          return properties;
      }
  
      @Bean(name = "transactionManager")
      public PlatformTransactionManager transactionManager() {
          return new DataSourceTransactionManager(dataSource());
      }
  
      @Bean(name = "stakeHoldersBusinessLogic")
      public IStakeHoldersBusinessLogic stakeHoldersBusinessLogic(){return new StakeHoldersBusinessLogicImpl(); }
  
      @Bean(name = "daoFactoryCustom")
      public DaoFactoryCustom daoFactoryCustom(){return new DaoFactoryCustomHbnImpl(); }
  
  // some more beans
  
  }
  </code></pre>
  
  <blockquote>
    <p>StakeHoldersEndpointImplRestController.java</p>
  </blockquote>
  
  <pre><code>@CrossOrigin(origins = "http://localhost:9090")
  @RequestMapping(value = "/stakeHolders")
  @RestController
  public class StakeHoldersEndpointImplRestController implements IStakeHoldersEndpoint, InitializingBean {
  @ResponseBody
  @RequestMapping(value = "/createStakeHolder",
          method = RequestMethod.POST,
          headers = "Accept="+ MediaType.APPLICATION_JSON_VALUE,
          produces = MediaType.APPLICATION_JSON_VALUE)
  public CreateStakeHolderResponse createStakeHolderEndpoint(@RequestBody CreateStakeHolderRequest request) {
      LOG.trace("StakeHoldersEndpointImplRestController.createStakeHolder () - Start");
  
      CreateStakeHolderResponse createStakeHolderResponse = new CreateStakeHolderResponse();
  
      try{
          createStakeHolderResponse = innerFunction(request);
      }catch(Exception exception){
          LOG.error("Exception Occurred : "+exception.getMessage());
      }
  
      LOG.trace("StakeHoldersEndpointImplRestController.createStakeHolder () - End");
      return createStakeHolderResponse;
  }
  
  @Transactional
  private CreateStakeHolderResponse innerFunction(CreateStakeHolderRequest request){
  
      CreateStakeHolderResponse createStakeHolderResponse = new CreateStakeHolderResponse();
  
      try {
          createStakeHolderResponse = stakeHoldersBusinessLogic.createStakeHolderBusinessLogic(request);
      }catch (Exception e){
          LOG.error("Exception : ",e);
      }
      return createStakeHolderResponse;
  }
  </code></pre>
  
  <blockquote>
    <p>BusinessLogicConfiguration.java</p>
  </blockquote>
  
  <pre><code>@Configuration
  @EnableTransactionManagement
  public class BusinessLogicConfiguration {
  
  // some beans
  
  }
  </code></pre>
  
  <blockquote>
    <p>StakeHoldersBusinessLogicImpl.java</p>
  </blockquote>
  
  <pre><code>public class StakeHoldersBusinessLogicImpl implements IStakeHoldersBusinessLogic, InitializingBean {
  
      public CreateStakeHolderResponse createStakeHolderBusinessLogic(CreateStakeHolderRequest request) {
          LOG.trace("StakeHoldersBusinessLogicImpl.createStakeHolderBusinessLogic () - Start");
  
          CreateStakeHolderResponse createStakeHolderResponse = new CreateStakeHolderResponse(
                  IConstants.ERROR_CODE_BUSINESS_LOGIC_INITIATED_CODE , IConstants.ERROR_CODE_BUSINESS_LOGIC_INITIATED_STRING);
  
          try{
              //some logic to convert the request into stakeHolders, which is a Model bean mapped to a table
              daoFactoryCustom.getStakeHoldersDAO().save(stakeHolders, 100L);
  
          }catch(Exception exception){
              LOG.error("Exception Occurred : ", exception);
          }
  
          LOG.trace("StakeHoldersBusinessLogicImpl.createStakeHolderBusinessLogic () - End");
          return createStakeHolderResponse;
      }
  
  }
  </code></pre>
  
  <blockquote>
    <p>PersistenceConfiguration.java</p>
  </blockquote>
  
  <pre><code>@Configuration
  @EnableTransactionManagement
  public class PersistenceConfiguration {
  // some beans
  }
  </code></pre>
  
  <blockquote>
    <p>StakeHoldersDAOImpl.java</p>
  </blockquote>
  
  <pre><code>@Autowired(required = true)
  SessionFactory sessionFactory;
  
  public void save(T obj, Long creator) {
      try{
          getSession().save(obj);
      }catch (Exception e){
          LOG.error("Exception : ",e);
      }
  }
  
  public final Session getSession() {
      Session session;
      try{
          session = getSessionFactory().getCurrentSession();
      }catch (HibernateException e){
          session = sessionFactory.openSession();
      }
      return session;
  }
  </code></pre>
  
  <p>I have been on it for more then a week and could not find why is this happening.
  Log trace to this call is below.</p>
  
  <pre><code>18:09:14.653 [http-nio-8080-exec-2] DEBUG org.springframework.web.servlet.mvc.method.annotation.RequestResponseBodyMethodProcessor : 193 - Read [class com.product.contract.requests.CreateStakeHolderRequest] as "application/json" with [org.springframework.http.converter.json.MappingJackson2HttpMessageConverter@30b367c7]
  18:09:14.719 [http-nio-8080-exec-2] TRACE org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod : 134 - Invoking [StakeHoldersEndpointImplRestController.createStakeHolderEndpoint] method with arguments [com.product.contract.requests.CreateStakeHolderRequest@17b06234]
  18:09:14.719 [http-nio-8080-exec-2] TRACE com.product.endpoint.controller.impl.StakeHoldersEndpointImplRestController : 47 - StakeHoldersEndpointImplRestController.createStakeHolder () - Start
  18:09:14.720 [http-nio-8080-exec-2] TRACE com.product.businesslogic.impl.StakeHoldersBusinessLogicImpl : 100 - StakeHoldersBusinessLogicImpl.createStakeHolderBusinessLogic () - Start
  18:09:14.743 [http-nio-8080-exec-2] TRACE org.hibernate.internal.SessionFactoryImpl$SessionBuilderImpl : 1201 - Opening Hibernate Session.  tenant=null, owner=null
  18:09:14.912 [http-nio-8080-exec-2] TRACE org.hibernate.service.internal.AbstractServiceRegistryImpl : 229 - Initializing service [role=org.hibernate.stat.spi.StatisticsImplementor]
  18:09:14.921 [http-nio-8080-exec-2] DEBUG org.hibernate.stat.internal.StatisticsInitiator : 82 - Statistics initialized [enabled=false]
  18:09:14.934 [http-nio-8080-exec-2] TRACE org.hibernate.internal.SessionImpl : 281 - Opened Session [e4202ec0-7fd9-4333-9db4-efefa24d7c53] at timestamp: 14952857548
  18:09:14.938 [http-nio-8080-exec-2] TRACE org.hibernate.event.internal.DefaultSaveOrUpdateEventListener : 163 - Saving transient instance
  18:09:14.949 [http-nio-8080-exec-2] DEBUG org.hibernate.SQL : 92 - 
      select
          nextval ('pro5.entity_large')
  18:09:14.950 [http-nio-8080-exec-2] DEBUG org.springframework.jdbc.datasource.DriverManagerDataSource : 142 - Creating new JDBC DriverManager Connection to [jdbc:postgresql://localhost:5432/postgres]
  18:09:14.980 [http-nio-8080-exec-2] TRACE org.hibernate.resource.jdbc.internal.ResourceRegistryStandardImpl : 55 - Registering statement [select nextval ('pro5.entity_large')]
  18:09:15.086 [http-nio-8080-exec-2] TRACE org.hibernate.resource.jdbc.internal.ResourceRegistryStandardImpl : 182 - Registering result set [org.postgresql.jdbc4.Jdbc4ResultSet@1d32dd3f]
  18:09:15.092 [http-nio-8080-exec-2] DEBUG org.hibernate.id.enhanced.SequenceStructure : 101 - Sequence value obtained: 500046
  18:09:15.093 [http-nio-8080-exec-2] TRACE org.hibernate.resource.jdbc.internal.ResourceRegistryStandardImpl : 91 - Releasing result set [org.postgresql.jdbc4.Jdbc4ResultSet@1d32dd3f]
  18:09:15.093 [http-nio-8080-exec-2] TRACE org.hibernate.resource.jdbc.internal.ResourceRegistryStandardImpl : 132 - Closing result set [org.postgresql.jdbc4.Jdbc4ResultSet@1d32dd3f]
  18:09:15.093 [http-nio-8080-exec-2] TRACE org.hibernate.resource.jdbc.internal.ResourceRegistryStandardImpl : 68 - Releasing statement [select nextval ('pro5.entity_large')]
  18:09:15.093 [http-nio-8080-exec-2] DEBUG org.hibernate.resource.jdbc.internal.ResourceRegistryStandardImpl : 73 - HHH000387: ResultSet's statement was not registered
  18:09:15.093 [http-nio-8080-exec-2] TRACE org.hibernate.resource.jdbc.internal.ResourceRegistryStandardImpl : 148 - Closing prepared statement [select nextval ('pro5.entity_large')]
  18:09:15.094 [http-nio-8080-exec-2] TRACE org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl : 263 - Starting afterQuery statement execution processing [AFTER_TRANSACTION]
  18:09:15.095 [http-nio-8080-exec-2] DEBUG org.hibernate.event.internal.AbstractSaveEventListener : 118 - Generated identifier: 500046, using strategy: org.hibernate.id.enhanced.SequenceStyleGenerator
  18:09:15.096 [http-nio-8080-exec-2] TRACE org.hibernate.event.internal.AbstractSaveEventListener : 157 - Saving [com.product.persistence.model.StakeHolders#500046]
  18:09:15.116 [http-nio-8080-exec-2] TRACE org.hibernate.engine.spi.ActionQueue : 244 - Adding an EntityInsertAction for [com.product.persistence.model.StakeHolders] object
  18:09:15.120 [http-nio-8080-exec-2] TRACE org.hibernate.engine.spi.IdentifierValue : 98 - ID unsaved-value strategy UNDEFINED
  18:09:15.121 [http-nio-8080-exec-2] TRACE org.hibernate.persister.entity.AbstractEntityPersister : 1338 - Getting current persistent state for: [com.product.persistence.model.keyValuePair.CancellationReason#0]
  18:09:15.122 [http-nio-8080-exec-2] DEBUG org.hibernate.SQL : 92 - 
      select
          cancellati_.id_cancellation,
          cancellati_.dat_last_update as dat_last4_1_,
          cancellati_.id_customer_last_update as id_custo5_1_,
          cancellati_.str_cancellation_reason as str_canc6_1_ 
      from
          pro5.cancellation_reason cancellati_ 
      where
          cancellati_.id_cancellation=?
  18:09:15.123 [http-nio-8080-exec-2] TRACE org.hibernate.resource.jdbc.internal.ResourceRegistryStandardImpl : 55 - Registering statement [select cancellati_.id_cancellation, cancellati_.dat_last_update as dat_last4_1_, cancellati_.id_customer_last_update as id_custo5_1_, cancellati_.str_cancellation_reason as str_canc6_1_ from pro5.cancellation_reason cancellati_ where cancellati_.id_cancellation=?]
  18:09:15.127 [http-nio-8080-exec-2] TRACE org.hibernate.type.descriptor.sql.BasicBinder : 65 - binding parameter [1] as [INTEGER] - [0]
  18:09:15.168 [http-nio-8080-exec-2] TRACE org.hibernate.resource.jdbc.internal.ResourceRegistryStandardImpl : 182 - Registering result set [org.postgresql.jdbc4.Jdbc4ResultSet@1f3e3b2c]
  18:09:15.171 [http-nio-8080-exec-2] TRACE org.hibernate.type.descriptor.sql.BasicExtractor : 51 - extracted value ([dat_last4_1_] : [TIMESTAMP]) - [null]
  18:09:15.172 [http-nio-8080-exec-2] TRACE org.hibernate.type.descriptor.sql.BasicExtractor : 51 - extracted value ([id_custo5_1_] : [BIGINT]) - [null]
  18:09:15.174 [http-nio-8080-exec-2] TRACE org.hibernate.type.descriptor.sql.BasicExtractor : 61 - extracted value ([str_canc6_1_] : [VARCHAR]) - [Fraud]
  18:09:15.175 [http-nio-8080-exec-2] TRACE org.hibernate.resource.jdbc.internal.ResourceRegistryStandardImpl : 91 - Releasing result set [org.postgresql.jdbc4.Jdbc4ResultSet@1f3e3b2c]
  18:09:15.175 [http-nio-8080-exec-2] TRACE org.hibernate.resource.jdbc.internal.ResourceRegistryStandardImpl : 132 - Closing result set [org.postgresql.jdbc4.Jdbc4ResultSet@1f3e3b2c]
  18:09:15.175 [http-nio-8080-exec-2] TRACE org.hibernate.resource.jdbc.internal.ResourceRegistryStandardImpl : 68 - Releasing statement [select cancellati_.id_cancellation, cancellati_.dat_last_update as dat_last4_1_, cancellati_.id_customer_last_update as id_custo5_1_, cancellati_.str_cancellation_reason as str_canc6_1_ from pro5.cancellation_reason cancellati_ where cancellati_.id_cancellation=0]
  18:09:15.176 [http-nio-8080-exec-2] DEBUG org.hibernate.resource.jdbc.internal.ResourceRegistryStandardImpl : 73 - HHH000387: ResultSet's statement was not registered
  18:09:15.176 [http-nio-8080-exec-2] TRACE org.hibernate.resource.jdbc.internal.ResourceRegistryStandardImpl : 148 - Closing prepared statement [select cancellati_.id_cancellation, cancellati_.dat_last_update as dat_last4_1_, cancellati_.id_customer_last_update as id_custo5_1_, cancellati_.str_cancellation_reason as str_canc6_1_ from pro5.cancellation_reason cancellati_ where cancellati_.id_cancellation=0]
  18:09:15.176 [http-nio-8080-exec-2] TRACE org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl : 263 - Starting afterQuery statement execution processing [AFTER_TRANSACTION]
  18:09:15.177 [http-nio-8080-exec-2] TRACE org.hibernate.engine.spi.IdentifierValue : 98 - ID unsaved-value strategy UNDEFINED
  18:09:15.177 [http-nio-8080-exec-2] TRACE org.hibernate.persister.entity.AbstractEntityPersister : 1338 - Getting current persistent state for: [com.product.persistence.model.keyValuePair.Cities#0]
  18:09:15.178 [http-nio-8080-exec-2] DEBUG org.hibernate.SQL : 92 - 
      select
          cities_.id_city,
          cities_.dat_last_update as dat_last4_2_,
          cities_.id_customer_last_update as id_custo5_2_,
          cities_.str_city as str_city6_2_ 
      from
          pro5.cities cities_ 
      where
          cities_.id_city=?
  18:09:15.178 [http-nio-8080-exec-2] TRACE org.hibernate.resource.jdbc.internal.ResourceRegistryStandardImpl : 55 - Registering statement [select cities_.id_city, cities_.dat_last_update as dat_last4_2_, cities_.id_customer_last_update as id_custo5_2_, cities_.str_city as str_city6_2_ from pro5.cities cities_ where cities_.id_city=?]
  18:09:15.179 [http-nio-8080-exec-2] TRACE org.hibernate.type.descriptor.sql.BasicBinder : 65 - binding parameter [1] as [BIGINT] - [0]
  18:09:15.199 [http-nio-8080-exec-2] TRACE org.hibernate.resource.jdbc.internal.ResourceRegistryStandardImpl : 182 - Registering result set [org.postgresql.jdbc4.Jdbc4ResultSet@7b2493e9]
  18:09:15.200 [http-nio-8080-exec-2] TRACE org.hibernate.type.descriptor.sql.BasicExtractor : 51 - extracted value ([dat_last4_2_] : [TIMESTAMP]) - [null]
  18:09:15.200 [http-nio-8080-exec-2] TRACE org.hibernate.type.descriptor.sql.BasicExtractor : 51 - extracted value ([id_custo5_2_] : [BIGINT]) - [null]
  18:09:15.201 [http-nio-8080-exec-2] TRACE org.hibernate.type.descriptor.sql.BasicExtractor : 61 - extracted value ([str_city6_2_] : [VARCHAR]) - [Lahore]
  18:09:15.201 [http-nio-8080-exec-2] TRACE org.hibernate.resource.jdbc.internal.ResourceRegistryStandardImpl : 91 - Releasing result set [org.postgresql.jdbc4.Jdbc4ResultSet@7b2493e9]
  18:09:15.201 [http-nio-8080-exec-2] TRACE org.hibernate.resource.jdbc.internal.ResourceRegistryStandardImpl : 132 - Closing result set [org.postgresql.jdbc4.Jdbc4ResultSet@7b2493e9]
  18:09:15.202 [http-nio-8080-exec-2] TRACE org.hibernate.resource.jdbc.internal.ResourceRegistryStandardImpl : 68 - Releasing statement [select cities_.id_city, cities_.dat_last_update as dat_last4_2_, cities_.id_customer_last_update as id_custo5_2_, cities_.str_city as str_city6_2_ from pro5.cities cities_ where cities_.id_city=0]
  18:09:15.202 [http-nio-8080-exec-2] DEBUG org.hibernate.resource.jdbc.internal.ResourceRegistryStandardImpl : 73 - HHH000387: ResultSet's statement was not registered
  18:09:15.202 [http-nio-8080-exec-2] TRACE org.hibernate.resource.jdbc.internal.ResourceRegistryStandardImpl : 148 - Closing prepared statement [select cities_.id_city, cities_.dat_last_update as dat_last4_2_, cities_.id_customer_last_update as id_custo5_2_, cities_.str_city as str_city6_2_ from pro5.cities cities_ where cities_.id_city=0]
  18:09:15.202 [http-nio-8080-exec-2] TRACE org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl : 263 - Starting afterQuery statement execution processing [AFTER_TRANSACTION]
  18:09:15.203 [http-nio-8080-exec-2] TRACE org.hibernate.engine.spi.IdentifierValue : 98 - ID unsaved-value strategy UNDEFINED
  18:09:15.203 [http-nio-8080-exec-2] TRACE org.hibernate.persister.entity.AbstractEntityPersister : 1338 - Getting current persistent state for: [com.product.persistence.model.StakeHoldersType#10]
  18:09:15.203 [http-nio-8080-exec-2] DEBUG org.hibernate.SQL : 92 - 
      select
          stakeholde_.id_stake_holder_type,
          stakeholde_.id_str_role as id_str_r3_25_,
          stakeholde_.str_stake_holder_desc as str_stak2_25_ 
      from
          pro5.stake_holders_type stakeholde_ 
      where
          stakeholde_.id_stake_holder_type=?
  18:09:15.204 [http-nio-8080-exec-2] TRACE org.hibernate.resource.jdbc.internal.ResourceRegistryStandardImpl : 55 - Registering statement [select stakeholde_.id_stake_holder_type, stakeholde_.id_str_role as id_str_r3_25_, stakeholde_.str_stake_holder_desc as str_stak2_25_ from pro5.stake_holders_type stakeholde_ where stakeholde_.id_stake_holder_type=?]
  18:09:15.205 [http-nio-8080-exec-2] TRACE org.hibernate.type.descriptor.sql.BasicBinder : 65 - binding parameter [1] as [BIGINT] - [10]
  18:09:15.208 [http-nio-8080-exec-2] TRACE org.hibernate.resource.jdbc.internal.ResourceRegistryStandardImpl : 182 - Registering result set [org.postgresql.jdbc4.Jdbc4ResultSet@3c215e9d]
  18:09:15.209 [http-nio-8080-exec-2] TRACE org.hibernate.type.descriptor.sql.BasicExtractor : 51 - extracted value ([id_str_r3_25_] : [VARCHAR]) - [null]
  18:09:15.210 [http-nio-8080-exec-2] TRACE org.hibernate.type.descriptor.sql.BasicExtractor : 61 - extracted value ([str_stak2_25_] : [VARCHAR]) - [Transport]
  18:09:15.210 [http-nio-8080-exec-2] TRACE org.hibernate.resource.jdbc.internal.ResourceRegistryStandardImpl : 91 - Releasing result set [org.postgresql.jdbc4.Jdbc4ResultSet@3c215e9d]
  18:09:15.210 [http-nio-8080-exec-2] TRACE org.hibernate.resource.jdbc.internal.ResourceRegistryStandardImpl : 132 - Closing result set [org.postgresql.jdbc4.Jdbc4ResultSet@3c215e9d]
  18:09:15.211 [http-nio-8080-exec-2] TRACE org.hibernate.resource.jdbc.internal.ResourceRegistryStandardImpl : 68 - Releasing statement [select stakeholde_.id_stake_holder_type, stakeholde_.id_str_role as id_str_r3_25_, stakeholde_.str_stake_holder_desc as str_stak2_25_ from pro5.stake_holders_type stakeholde_ where stakeholde_.id_stake_holder_type=10]
  18:09:15.212 [http-nio-8080-exec-2] DEBUG org.hibernate.resource.jdbc.internal.ResourceRegistryStandardImpl : 73 - HHH000387: ResultSet's statement was not registered
  18:09:15.212 [http-nio-8080-exec-2] TRACE org.hibernate.resource.jdbc.internal.ResourceRegistryStandardImpl : 148 - Closing prepared statement [select stakeholde_.id_stake_holder_type, stakeholde_.id_str_role as id_str_r3_25_, stakeholde_.str_stake_holder_desc as str_stak2_25_ from pro5.stake_holders_type stakeholde_ where stakeholde_.id_stake_holder_type=10]
  18:09:15.212 [http-nio-8080-exec-2] TRACE org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl : 263 - Starting afterQuery statement execution processing [AFTER_TRANSACTION]
  18:09:15.213 [http-nio-8080-exec-2] TRACE org.hibernate.engine.spi.ActionQueue : 257 - Adding insert with no non-nullable, transient entities: [EntityInsertAction[com.product.persistence.model.StakeHolders#500046]]
  18:09:15.213 [http-nio-8080-exec-2] TRACE org.hibernate.engine.spi.ActionQueue : 280 - Adding resolved non-early insert action.
  18:09:15.216 [http-nio-8080-exec-2] TRACE org.hibernate.engine.spi.IdentifierValue : 98 - ID unsaved-value strategy UNDEFINED
  18:09:15.216 [http-nio-8080-exec-2] TRACE org.hibernate.engine.spi.IdentifierValue : 98 - ID unsaved-value strategy UNDEFINED
  18:09:15.216 [http-nio-8080-exec-2] TRACE org.hibernate.engine.spi.IdentifierValue : 98 - ID unsaved-value strategy UNDEFINED
  18:09:15.225 [http-nio-8080-exec-2] TRACE com.product.businesslogic.impl.StakeHoldersBusinessLogicImpl : 152 - StakeHoldersBusinessLogicImpl.createStakeHolderBusinessLogic () - End
  18:09:15.225 [http-nio-8080-exec-2] TRACE com.product.endpoint.controller.impl.StakeHoldersEndpointImplRestController : 82 - StakeHoldersEndpointImplRestController.createStakeHolder () - End
  18:09:15.226 [http-nio-8080-exec-2] TRACE org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod : 138 - Method [createStakeHolderEndpoint] returned [com.product.contract.responses.CreateStakeHolderResponse@6aac8e42]
  18:09:15.301 [http-nio-8080-exec-2] DEBUG org.springframework.web.servlet.mvc.method.annotation.RequestResponseBodyMethodProcessor : 226 - Written [com.product.contract.responses.CreateStakeHolderResponse@6aac8e42] as "application/json" using [org.springframework.http.converter.json.MappingJackson2HttpMessageConverter@30b367c7]
  18:09:15.302 [http-nio-8080-exec-2] DEBUG org.springframework.web.servlet.DispatcherServlet : 1036 - Null ModelAndView returned to DispatcherServlet with name 'dispatcher': assuming HandlerAdapter completed request handling
  18:09:15.302 [http-nio-8080-exec-2] TRACE org.springframework.web.servlet.DispatcherServlet : 1059 - Cleared thread-bound request context: org.apache.catalina.connector.RequestFacade@70e62c16
  18:09:15.302 [http-nio-8080-exec-2] DEBUG org.springframework.web.servlet.DispatcherServlet : 997 - Successfully completed request
  18:09:15.302 [http-nio-8080-exec-2] TRACE org.springframework.web.context.support.AnnotationConfigWebApplicationContext : 363 - Publishing event in WebApplicationContext for namespace 'dispatcher-servlet': ServletRequestHandledEvent: url=[/endpoint/stakeHolders/createStakeHolder]; client=[0:0:0:0:0:0:0:1]; method=[POST]; servlet=[dispatcher]; session=[null]; user=[null]; time=[807ms]; status=[OK]
  18:09:15.302 [http-nio-8080-exec-2] TRACE org.springframework.web.context.support.AnnotationConfigWebApplicationContext : 363 - Publishing event in Root WebApplicationContext: ServletRequestHandledEvent: url=[/endpoint/stakeHolders/createStakeHolder]; client=[0:0:0:0:0:0:0:1]; method=[POST]; servlet=[dispatcher]; session=[null]; user=[null]; time=[807ms]; status=[OK]
  </code></pre>
  
  <p>What am I doing wrong in all this, any help would be great. </p>
  
  <p>Thank you</p>
  
  <p>Irshad Ahmad.</p>