title: When running a project "Unsatisfied dependency expressed through constructor parameter 0"
body: <p>When running a project, an error occurs:</p>
  <blockquote>
  <p>UnsatisfiedDependencyException: Error creating bean with name
  'sqlServerQueryDaoImpl' defined in file SqlServerQueryDaoImpl.class :
  Unsatisfied dependency expressed through constructor parameter 0;
  nested exception is
  org.springframework.beans.factory.NoSuchBeanDefinitionException: No
  qualifying bean of type 'javax.persistence.EntityManagerFactory'
  available: expected at least 1 bean which qualifies as autowire
  candidate. Dependency annotations: {}</p>
  </blockquote>
  <p><strong>Code</strong></p>
  <pre><code>@Configuration
  @EnableTransactionManagement
  @EnableJpaRepositories(
      entityManagerFactoryRef = &quot;sqlserverEntityManager&quot;,
      transactionManagerRef = &quot;sqlserverTransactionManager&quot;,
      basePackages = &quot;com.server.dao.sqlserverDao&quot;
  )
  public class SqlserverConfiguration {
  
  /**
   * Sqlserver datasource definition.
   *
   * @return datasource.
   */
  @Primary
  @Bean
  @ConfigurationProperties(prefix = &quot;spring.sqlserver.datasource&quot;)
  public DataSource sqlserverDataSource() {
      return DataSourceBuilder
              .create()
              .build();
  }
  
  /**
   * Entity manager definition.
   *
   * @param builder an EntityManagerFactoryBuilder.
   * @return LocalContainerEntityManagerFactoryBean.
   */
  @Primary
  @Bean(name = &quot;sqlserverEntityManager&quot;)
  public LocalContainerEntityManagerFactoryBean 
  sqlserverEntityManagerFactory(EntityManagerFactoryBuilder builder) {
      return builder
              .dataSource(sqlserverDataSource())
              .properties(hibernateProperties())
              .packages(&quot;com.server.entity.sqlserver&quot;)
              .persistenceUnit(&quot;sqlserverPU&quot;)
              .build();
  }
  
  /**
   * @param entityManagerFactory
   * @return
   */
  @Primary
  @Bean(name = &quot;sqlserverTransactionManager&quot;)
  public PlatformTransactionManager 
  sqlserverTransactionManager(@Qualifier(&quot;sqlserverEntityManager&quot;) 
  EntityManagerFactory entityManagerFactory) {
      return new JpaTransactionManager(entityManagerFactory);
  }
  
  private Map&lt;String, Object&gt; hibernateProperties() {
  
      Resource resource = new ClassPathResource(&quot;sqlserver-hibernate.cfg.xml&quot;);
      try {
          Properties properties = 
  PropertiesLoaderUtils.loadProperties(resource);
          return properties.entrySet().stream()
                  .collect(Collectors.toMap(
                          e -&gt; e.getKey().toString(),
                          e -&gt; e.getValue())
                  );
      } catch (IOException e) {
          return new HashMap&lt;String, Object&gt;();
       }
   }
  }
  </code></pre>
  <p><strong>Dao</strong></p>
  <pre><code>package com.server.dao.sqlserverDao;
  
  import com.server.entity.postgresql.DayVisits;
  import java.util.List;
  
  public interface SqlServerDao {
  
  List&lt;DayVisits&gt; getDayVisits(int startDate, int finishDate, long branchKey, 
  long serviceKey);
  
  }
  </code></pre>
  <p><strong>DaoImpl</strong></p>
  <pre><code>package com.server.dao.sqlserverDao;
  import com.server.entity.postgresql.DayVisits;
  import org.hibernate.Session;
  import org.hibernate.query.NativeQuery;
  import org.springframework.stereotype.Repository;
  
  import javax.persistence.EntityManagerFactory;
  import javax.persistence.PersistenceContext;
  import javax.persistence.Query;
  import java.util.List;
  
  @Repository
  public class SqlServerQueryDaoImpl implements  SqlServerDao {
  
  @PersistenceContext(unitName=&quot;sqlserverPU&quot;)
  private EntityManagerFactory sqlserverEntityManager;
  
  public SqlServerQueryDaoImpl(EntityManagerFactory sqlserverEntityManager) {
      this.sqlserverEntityManager = sqlserverEntityManager;
  }
  
  Session session = sqlserverEntityManager.unwrap(Session.class);
  
  @Override
  public List&lt;DayVisits&gt; getDayVisits(int startDate, int finishDate, long 
  branchKey, long serviceKey){
  String sql =&quot;select dd.year, dd.month, dd.day_of_month, dd.day_of_week,\n&quot; +
             &quot;count(fvt.id) as visit_count\n&quot; +
             &quot;from stat.fact_visit_transaction fvt \n&quot; +
             &quot;join stat.dim_date dd on date_key=dd.id\n&quot; +
             &quot;where branch_key =:serviceKey \n&quot; +
             &quot;and service_key =:branchKey\n&quot; +
             &quot;and date_key between :startDate and :finishDate \n&quot; +
             &quot;group by dd.year, dd.month, dd.day_of_month, dd.day_of_week\n&quot; +
             &quot;order by dd.year, dd.month, dd.day_of_month, dd.day_of_week\n&quot;;
     Query q = session.createNativeQuery(sql).addEntity(DayVisits.class);
     q.setParameter(&quot;startDate&quot;,startDate);
     q.setParameter(&quot;finishDate&quot;,finishDate);
     q.setParameter(&quot;branchKey&quot;,branchKey);
     q.setParameter(&quot;serviceKey&quot;,serviceKey);
     List&lt;DayVisits&gt; dayVisitsList =((NativeQuery) q).list();
  
     return dayVisitsList;
     }
    }
  </code></pre>
  <p>my pom.xml</p>
  <pre><code>    &lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot; 
    xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
    xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 
    http://maven.apache.org/maven-v4_0_0.xsd&quot;&gt;
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  &lt;groupId&gt;com.arithmos&lt;/groupId&gt;
  &lt;artifactId&gt;WebAppForecast&lt;/artifactId&gt;
  &lt;packaging&gt;war&lt;/packaging&gt;
  &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
  &lt;name&gt;Forecast&lt;/name&gt;
  &lt;parent&gt;
      &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
      &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
      &lt;version&gt;2.0.2.RELEASE&lt;/version&gt;
  &lt;/parent&gt;
  &lt;properties&gt;
      &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
      &lt;project.reporting.outputEncoding&gt;UTF- 
       8&lt;/project.reporting.outputEncoding&gt;
      &lt;spring.version&gt;5.0.5.RELEASE&lt;/spring.version&gt;
  &lt;/properties&gt;
  &lt;dependencies&gt;
  &lt;!-- Unit Test --&gt;
  &lt;dependency&gt;
    &lt;groupId&gt;junit&lt;/groupId&gt;
    &lt;artifactId&gt;junit&lt;/artifactId&gt;
    &lt;version&gt;4.12&lt;/version&gt;
  &lt;/dependency&gt;
  
   &lt;!-- Spring Core --&gt;
  &lt;dependency&gt;
    &lt;groupId&gt;org.springframework&lt;/groupId&gt;
      &lt;artifactId&gt;spring-core&lt;/artifactId&gt;
    &lt;version&gt;${spring.version}&lt;/version&gt;
    &lt;exclusions&gt;
      &lt;exclusion&gt;
        &lt;groupId&gt;commons-logging&lt;/groupId&gt;
        &lt;artifactId&gt;commons-logging&lt;/artifactId&gt;
      &lt;/exclusion&gt;
    &lt;/exclusions&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
    &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
    &lt;artifactId&gt;jcl-over-slf4j&lt;/artifactId&gt;
    &lt;version&gt;1.7.6&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
    &lt;groupId&gt;org.springframework&lt;/groupId&gt;
     &lt;artifactId&gt;spring-web&lt;/artifactId&gt;
    &lt;version&gt;${spring.version}&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
    &lt;groupId&gt;org.springframework&lt;/groupId&gt;
     &lt;artifactId&gt;spring-webmvc&lt;/artifactId&gt;
    &lt;version&gt;${spring.version}&lt;/version&gt;
    &lt;/dependency&gt;
    &lt;!-- Spring boot --&gt;
    &lt;dependency&gt;
        &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
        &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;
        &lt;exclusions&gt;
            &lt;exclusion&gt;
                &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                &lt;artifactId&gt;spring-boot-starter-tomcat&lt;/artifactId&gt;
            &lt;/exclusion&gt;
        &lt;/exclusions&gt;
    &lt;/dependency&gt;
    &lt;dependency&gt;
        &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
        &lt;artifactId&gt;spring-boot-starter-test&lt;/artifactId&gt;
        &lt;scope&gt;test&lt;/scope&gt;
    &lt;/dependency&gt;
    &lt;dependency&gt;
        &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
        &lt;artifactId&gt;spring-boot-starter-jdbc&lt;/artifactId&gt;
    &lt;/dependency&gt;
    &lt;dependency&gt;
        &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
        &lt;artifactId&gt;spring-boot-starter-data-jpa&lt;/artifactId&gt;
    &lt;/dependency&gt;
    &lt;dependency&gt;
        &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
        &lt;artifactId&gt;spring-boot-configuration-processor&lt;/artifactId&gt;
        &lt;optional&gt;true&lt;/optional&gt;
    &lt;/dependency&gt;
    &lt;!-- SqlServer --&gt;
    &lt;dependency&gt;
        &lt;groupId&gt;com.microsoft.sqlserver&lt;/groupId&gt;
        &lt;artifactId&gt;mssql-jdbc&lt;/artifactId&gt;
        &lt;version&gt;6.4.0.jre8&lt;/version&gt;
    &lt;/dependency&gt;
    &lt;!-- PostgreSQL --&gt;
    &lt;dependency&gt;
        &lt;groupId&gt;postgresql&lt;/groupId&gt;
        &lt;artifactId&gt;postgresql&lt;/artifactId&gt;
        &lt;version&gt;9.1-901-1.jdbc4&lt;/version&gt;
    &lt;/dependency&gt;
  &lt;!-- JAVA EE 8 API --&gt;
  &lt;dependency&gt;
    &lt;groupId&gt;javax&lt;/groupId&gt;
     &lt;artifactId&gt;javaee-api&lt;/artifactId&gt;
    &lt;version&gt;8.0&lt;/version&gt;
    &lt;scope&gt;provided&lt;/scope&gt;
  &lt;/dependency&gt;
  &lt;!-- Servlet Library --&gt;
  &lt;dependency&gt;
    &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
    &lt;artifactId&gt;javax.servlet-api&lt;/artifactId&gt;
    &lt;version&gt;3.1.0&lt;/version&gt;
    &lt;scope&gt;provided&lt;/scope&gt;
  &lt;/dependency&gt;
  &lt;!-- jstl --&gt;
  &lt;dependency&gt;
    &lt;groupId&gt;jstl&lt;/groupId&gt;
     &lt;artifactId&gt;jstl&lt;/artifactId&gt;
    &lt;version&gt;1.2&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;!-- hibernate-core --&gt;
  &lt;dependency&gt;
  &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
    &lt;artifactId&gt;hibernate-core&lt;/artifactId&gt;
  &lt;version&gt;5.2.16.Final&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
    &lt;groupId&gt;org.apache.commons&lt;/groupId&gt;
    &lt;artifactId&gt;commons-lang3&lt;/artifactId&gt;
    &lt;version&gt;3.5&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
    &lt;groupId&gt;commons-dbcp&lt;/groupId&gt;
    &lt;artifactId&gt;commons-dbcp&lt;/artifactId&gt;
    &lt;version&gt;1.4&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
     &lt;groupId&gt;org.springframework&lt;/groupId&gt;
     &lt;artifactId&gt;spring-orm&lt;/artifactId&gt;
     &lt;version&gt;${spring.version}&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;/dependencies&gt;
  &lt;build&gt;
  &lt;finalName&gt;WebAppForecast&lt;/finalName&gt;
  &lt;plugins&gt;
    &lt;plugin&gt;
      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
      &lt;artifactId&gt;maven-idea-plugin&lt;/artifactId&gt;
      &lt;version&gt;2.2.1&lt;/version&gt;
      &lt;configuration&gt;
        &lt;downloadSources&gt;true&lt;/downloadSources&gt;
        &lt;downloadJavadocs&gt;false&lt;/downloadJavadocs&gt;
      &lt;/configuration&gt;
    &lt;/plugin&gt;
    &lt;plugin&gt;
      &lt;groupId&gt;org.wildfly.plugins&lt;/groupId&gt;
      &lt;artifactId&gt;wildfly-maven-plugin&lt;/artifactId&gt;
      &lt;version&gt;1.2.1.Final&lt;/version&gt;
    &lt;/plugin&gt;
    &lt;plugin&gt;
      &lt;groupId&gt;org.eclipse.jetty&lt;/groupId&gt;
      &lt;artifactId&gt;jetty-maven-plugin&lt;/artifactId&gt;
      &lt;version&gt;9.4.10.v20180503&lt;/version&gt;
    &lt;/plugin&gt;
    &lt;plugin&gt;
      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
      &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
      &lt;configuration&gt;
        &lt;source&gt;8&lt;/source&gt;
        &lt;target&gt;8&lt;/target&gt;
      &lt;/configuration&gt;
    &lt;/plugin&gt;
      &lt;plugin&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
      &lt;/plugin&gt;
    &lt;/plugins&gt;
   &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>
  <p>stacktrace</p>
  <pre><code>09:42:56.171 [main] ERROR org.springframework.web.context.ContextLoader - Context initialization failed
  org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sqlServerQueryDaoImpl' defined in file [C:\aritmos\target\classes\com\server\dao\sqlserverDao\SqlServerQueryDaoImpl.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'javax.persistence.EntityManagerFactory' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
      at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:729)
      at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:192)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1270)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1127)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:541)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:501)
      at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317)
      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:760)
      at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:869)
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550)
      at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:409)
      at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:291)
      at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:103)
      at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:890)
      at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:558)
      at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:853)
      at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:370)
      at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1497)
      at org.eclipse.jetty.maven.plugin.JettyWebAppContext.startWebapp(JettyWebAppContext.java:360)
      at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1459)
      at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:785)
      at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:287)
      at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:545)
      at org.eclipse.jetty.maven.plugin.JettyWebAppContext.doStart(JettyWebAppContext.java:428)
      at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
      at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:138)
      at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117)
      at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
      at org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:167)
      at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
      at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:138)
      at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117)
      at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
      at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
      at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:138)
      at org.eclipse.jetty.server.Server.start(Server.java:419)
      at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:108)
      at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
      at org.eclipse.jetty.server.Server.doStart(Server.java:386)
      at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
      at org.eclipse.jetty.maven.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:477)
      at org.eclipse.jetty.maven.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:343)
      at org.eclipse.jetty.maven.plugin.JettyRunMojo.execute(JettyRunMojo.java:173)
      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
      at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
      at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
      at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
      at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
      at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
      at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
      at org.codehaus.classworlds.Launcher.main(Launcher.java:47)
  Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'javax.persistence.EntityManagerFactory' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoMatchingBeanFound(DefaultListableBeanFactory.java:1509)
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1104)
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1065)
      at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:815)
      at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:721)
      ... 68 common frames omitted
  [WARNING] Failed startup of context o.e.j.m.p.JettyWebAppContext@12a3b37{/,file:///C:/Users/alena.s/aritmos/src/main/webapp/,UNAVAILABLE}{file:///C:/Users/alena.s/aritmos/src/main/webapp/}
  org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sqlServerQueryDaoImpl' defined in file [C:\Users\alena.s\aritmos\target\classes\com\server\dao\sqlserverDao\SqlServerQueryDaoImpl.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'javax.persistence.EntityManagerFactory' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
      at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:729)
      at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:192)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1270)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1127)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:541)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:501)
      at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317)
      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:760)
      at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:869)
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550)
      at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:409)
      at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:291)
      at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:103)
      at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:890)
      at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:558)
      at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:853)
      at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:370)
      at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1497)
      at org.eclipse.jetty.maven.plugin.JettyWebAppContext.startWebapp(JettyWebAppContext.java:360)
      at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1459)
      at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:785)
      at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:287)
      at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:545)
      at org.eclipse.jetty.maven.plugin.JettyWebAppContext.doStart(JettyWebAppContext.java:428)
      at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
      at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:138)
      at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117)
      at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
      at org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:167)
      at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
      at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:138)
      at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117)
      at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
      at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
      at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:138)
      at org.eclipse.jetty.server.Server.start(Server.java:419)
      at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:108)
      at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
      at org.eclipse.jetty.server.Server.doStart(Server.java:386)
      at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
      at org.eclipse.jetty.maven.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:477)
      at org.eclipse.jetty.maven.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:343)
      at org.eclipse.jetty.maven.plugin.JettyRunMojo.execute(JettyRunMojo.java:173)
      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
      at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
      at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
      at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
      at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
      at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
      at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
      at org.codehaus.classworlds.Launcher.main(Launcher.java:47)
  Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'javax.persistence.EntityManagerFactory' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoMatchingBeanFound(DefaultListableBeanFactory.java:1509)
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1104)
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1065)
      at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:815)
      at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:721)
      ... 68 more
  </code></pre>