title: Trouble Running a Stored Procedure Using Spring Data JPA - SQLServerException: The column name id is not valid
body: <p>Hi I'm trying to call a stored procedure 'my_sp' in on a SqlServer DB table 'my_table'</p>
  
  <p>I have my entity class:</p>
  
  <pre><code>@Entity
  @Table(name="my_table")
  public class MyPojo {
      @Id
      @GeneratedValue
      private long id;
      @Column(name = "param1")
      private String param1;
      @Column(name = "param2")
      private String param2;
      @Column(name = "param3")
      private String param3;
      @Column(name = "param4")
      private String param4;
      @Column(name = "output")
      private String spWillPopulateThis;
  
  //getters and setters
  </code></pre>
  
  <p>and here is my Spring data JPA repo:</p>
  
  <pre><code>public interface MyWonderfulRepository extends CrudRepository&lt;MyPojo, Long&gt; {
  
  @Query(value = "{call my_sp(:param1,:param2,:param3,:param4)}", nativeQuery = true)
  MyPojo my_sp(@Param("param1") String param1,
                              @Param("param2") String param1,
                              @Param("param3") String  param3,
                              @Param("param4") String param4);
  </code></pre>
  
  <p>The sp works just fine, I've tested it with:</p>
  
  <pre><code>exec my_table.my_sp 'someValueForParam1', 'someValueForParam2', 'someValueForParam3', 'someValueForParam4';
  </code></pre>
  
  <p>but on using my repo like this:</p>
  
  <p>(my repository call is in my SpringBoot's Application class)</p>
  
  <pre><code>@EnableJpaRepositories
  @Configuration
  @SpringBootApplication
  public class SpPocApplication {
  
      @Autowired
      MyWonderfulRepo myRepo;
  
      @PostConstruct
      public void init(){
          myRepo.my_sp("value1","value2","value3","value4");         
      }
  
      public static void main(String[] args) {
          SpringApplication.run(SpPocApplication.class, args);
      }
  
  }
  </code></pre>
  
  <p>I get:</p>
  
  <p><code>Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The column name id is not valid.</code></p>
  
  <p>Here is the stack trace:</p>
  
  <pre><code>  .   ____          _            __ _ _
   /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
  ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
   \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
    '  |____| .__|_| |_|_| |_\__, | / / / /
   =========|_|==============|___/=/_/_/_/
   :: Spring Boot ::        (v2.2.1.RELEASE)
  
  2019-11-13 15:40:37.164  INFO 13365 --- [           main] com.logicbig.example.SpPocApplication    : Starting SpPocApplication on Loki-7281 with PID 13365 (/home/charliejade/dev/apps/spring-data-jpa-procedure-annotation/target/classes started by charliejade in /home/charliejade/dev/apps/spring-data-jpa-procedure-annotation)
  2019-11-13 15:40:37.185  INFO 13365 --- [           main] com.logicbig.example.SpPocApplication    : The following profiles are active: prod
  2019-11-13 15:40:38.179  INFO 13365 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data repositories in DEFAULT mode.
  2019-11-13 15:40:38.241  INFO 13365 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 52ms. Found 1 repository interfaces.
  2019-11-13 15:40:38.944  INFO 13365 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
  2019-11-13 15:40:39.737  INFO 13365 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8080 (http)
  2019-11-13 15:40:39.747  INFO 13365 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
  2019-11-13 15:40:39.748  INFO 13365 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.27]
  2019-11-13 15:40:39.997  INFO 13365 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
  2019-11-13 15:40:39.998  INFO 13365 --- [           main] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 2567 ms
  2019-11-13 15:40:40.347  INFO 13365 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Starting...
  2019-11-13 15:40:40.992  INFO 13365 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Start completed.
  2019-11-13 15:40:41.051  INFO 13365 --- [           main] o.hibernate.jpa.internal.util.LogHelper  : HHH000204: Processing PersistenceUnitInfo [
      name: default
      ...]
  2019-11-13 15:40:41.125  INFO 13365 --- [           main] org.hibernate.Version                    : HHH000412: Hibernate Core {5.3.6.Final}
  2019-11-13 15:40:41.128  INFO 13365 --- [           main] org.hibernate.cfg.Environment            : HHH000206: hibernate.properties not found
  2019-11-13 15:40:41.284  INFO 13365 --- [           main] o.hibernate.annotations.common.Version   : HCANN000001: Hibernate Commons Annotations {5.0.4.Final}
  2019-11-13 15:40:41.386  INFO 13365 --- [           main] org.hibernate.dialect.Dialect            : HHH000400: Using dialect: org.hibernate.dialect.MySQL5Dialect
  2019-11-13 15:40:42.178  INFO 13365 --- [           main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
  Hibernate: {call my_sp(?,?,?,?)}
  2019-11-13 15:40:42.836  WARN 13365 --- [           main] o.h.engine.jdbc.spi.SqlExceptionHelper   : SQL Error: 0, SQLState: S1093
  2019-11-13 15:40:42.837 ERROR 13365 --- [           main] o.h.engine.jdbc.spi.SqlExceptionHelper   : The column name id is not valid.
  2019-11-13 15:40:42.841  WARN 13365 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'spPocApplication': Invocation of init method failed; nested exception is org.springframework.orm.jpa.JpaSystemException: could not execute query; nested exception is org.hibernate.exception.GenericJDBCException: could not execute query
  2019-11-13 15:40:42.843  INFO 13365 --- [           main] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'
  2019-11-13 15:40:42.845  INFO 13365 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Shutdown initiated...
  2019-11-13 15:40:42.858  INFO 13365 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Shutdown completed.
  2019-11-13 15:40:42.878  INFO 13365 --- [           main] o.apache.catalina.core.StandardService   : Stopping service [Tomcat]
  2019-11-13 15:40:42.912  INFO 13365 --- [           main] ConditionEvaluationReportLoggingListener : 
  
  Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
  2019-11-13 15:40:42.919 ERROR 13365 --- [           main] o.s.boot.SpringApplication               : Application run failed
  
  org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'spPocApplication': Invocation of init method failed; nested exception is org.springframework.orm.jpa.JpaSystemException: could not execute query; nested exception is org.hibernate.exception.GenericJDBCException: could not execute query
      at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:160) ~[spring-beans-5.2.1.RELEASE.jar:5.2.1.RELEASE]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:416) ~[spring-beans-5.2.1.RELEASE.jar:5.2.1.RELEASE]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1795) ~[spring-beans-5.2.1.RELEASE.jar:5.2.1.RELEASE]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:595) ~[spring-beans-5.2.1.RELEASE.jar:5.2.1.RELEASE]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.1.RELEASE.jar:5.2.1.RELEASE]
      at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.1.RELEASE.jar:5.2.1.RELEASE]
      at org.springframework.beans.factory.support.AbstractBeanFactory$$Lambda$162.0000000088B8F760.getObject(Unknown Source) ~[na:na]
      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.1.RELEASE.jar:5.2.1.RELEASE]
      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.1.RELEASE.jar:5.2.1.RELEASE]
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.1.RELEASE.jar:5.2.1.RELEASE]
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:879) ~[spring-beans-5.2.1.RELEASE.jar:5.2.1.RELEASE]
      at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:878) ~[spring-context-5.2.1.RELEASE.jar:5.2.1.RELEASE]
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550) ~[spring-context-5.2.1.RELEASE.jar:5.2.1.RELEASE]
      at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) ~[spring-boot-2.2.1.RELEASE.jar:2.2.1.RELEASE]
      at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) [spring-boot-2.2.1.RELEASE.jar:2.2.1.RELEASE]
      at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [spring-boot-2.2.1.RELEASE.jar:2.2.1.RELEASE]
      at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) [spring-boot-2.2.1.RELEASE.jar:2.2.1.RELEASE]
      at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) [spring-boot-2.2.1.RELEASE.jar:2.2.1.RELEASE]
      at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) [spring-boot-2.2.1.RELEASE.jar:2.2.1.RELEASE]
      at com.logicbig.example.SpPocApplication.main(SpPocApplication.java:38) [classes/:na]
  Caused by: org.springframework.orm.jpa.JpaSystemException: could not execute query; nested exception is org.hibernate.exception.GenericJDBCException: could not execute query
      at org.springframework.orm.jpa.vendor.HibernateJpaDialect.convertHibernateAccessException(HibernateJpaDialect.java:353) ~[spring-orm-5.2.1.RELEASE.jar:5.2.1.RELEASE]
      at org.springframework.orm.jpa.vendor.HibernateJpaDialect.translateExceptionIfPossible(HibernateJpaDialect.java:255) ~[spring-orm-5.2.1.RELEASE.jar:5.2.1.RELEASE]
      at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.translateExceptionIfPossible(AbstractEntityManagerFactoryBean.java:528) ~[spring-orm-5.2.1.RELEASE.jar:5.2.1.RELEASE]
      at org.springframework.dao.support.ChainedPersistenceExceptionTranslator.translateExceptionIfPossible(ChainedPersistenceExceptionTranslator.java:61) ~[spring-tx-5.2.1.RELEASE.jar:5.2.1.RELEASE]
      at org.springframework.dao.support.DataAccessUtils.translateIfNecessary(DataAccessUtils.java:242) ~[spring-tx-5.2.1.RELEASE.jar:5.2.1.RELEASE]
      at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:153) ~[spring-tx-5.2.1.RELEASE.jar:5.2.1.RELEASE]
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.2.1.RELEASE.jar:5.2.1.RELEASE]
      at org.springframework.data.jpa.repository.support.CrudMethodMetadataPostProcessor$CrudMethodMetadataPopulatingMethodInterceptor.invoke(CrudMethodMetadataPostProcessor.java:149) ~[spring-data-jpa-2.2.1.RELEASE.jar:2.2.1.RELEASE]
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.2.1.RELEASE.jar:5.2.1.RELEASE]
      at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:93) ~[spring-aop-5.2.1.RELEASE.jar:5.2.1.RELEASE]
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.2.1.RELEASE.jar:5.2.1.RELEASE]
      at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212) ~[spring-aop-5.2.1.RELEASE.jar:5.2.1.RELEASE]
      at com.sun.proxy.$Proxy85.my_sp(Unknown Source) ~[na:na]
      at com.logicbig.example.SpPocApplication.init(SpPocApplication.java:33) [classes/:na]
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_222]
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_222]
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_222]
      at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_222]
      at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:389) ~[spring-beans-5.2.1.RELEASE.jar:5.2.1.RELEASE]
      at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:333) ~[spring-beans-5.2.1.RELEASE.jar:5.2.1.RELEASE]
      at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:157) ~[spring-beans-5.2.1.RELEASE.jar:5.2.1.RELEASE]
      ... 19 common frames omitted
  Caused by: org.hibernate.exception.GenericJDBCException: could not execute query
      at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:47) ~[hibernate-core-5.3.6.Final.jar:5.3.6.Final]
      at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:113) ~[hibernate-core-5.3.6.Final.jar:5.3.6.Final]
      at org.hibernate.loader.Loader.doList(Loader.java:2692) ~[hibernate-core-5.3.6.Final.jar:5.3.6.Final]
      at org.hibernate.loader.Loader.doList(Loader.java:2672) ~[hibernate-core-5.3.6.Final.jar:5.3.6.Final]
      at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2506) ~[hibernate-core-5.3.6.Final.jar:5.3.6.Final]
      at org.hibernate.loader.Loader.list(Loader.java:2501) ~[hibernate-core-5.3.6.Final.jar:5.3.6.Final]
      at org.hibernate.loader.custom.CustomLoader.list(CustomLoader.java:338) ~[hibernate-core-5.3.6.Final.jar:5.3.6.Final]
      at org.hibernate.internal.SessionImpl.listCustomQuery(SessionImpl.java:2223) ~[hibernate-core-5.3.6.Final.jar:5.3.6.Final]
      at org.hibernate.internal.AbstractSharedSessionContract.list(AbstractSharedSessionContract.java:1053) ~[hibernate-core-5.3.6.Final.jar:5.3.6.Final]
      at org.hibernate.query.internal.NativeQueryImpl.doList(NativeQueryImpl.java:170) ~[hibernate-core-5.3.6.Final.jar:5.3.6.Final]
      at org.hibernate.query.internal.AbstractProducedQuery.list(AbstractProducedQuery.java:1505) ~[hibernate-core-5.3.6.Final.jar:5.3.6.Final]
      at org.hibernate.query.internal.AbstractProducedQuery.getSingleResult(AbstractProducedQuery.java:1553) ~[hibernate-core-5.3.6.Final.jar:5.3.6.Final]
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_222]
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_222]
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_222]
      at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_222]
      at org.springframework.orm.jpa.SharedEntityManagerCreator$DeferredQueryInvocationHandler.invoke(SharedEntityManagerCreator.java:409) ~[spring-orm-5.2.1.RELEASE.jar:5.2.1.RELEASE]
      at com.sun.proxy.$Proxy89.getSingleResult(Unknown Source) ~[na:na]
      at org.springframework.data.jpa.repository.query.JpaQueryExecution$SingleEntityExecution.doExecute(JpaQueryExecution.java:196) ~[spring-data-jpa-2.2.1.RELEASE.jar:2.2.1.RELEASE]
      at org.springframework.data.jpa.repository.query.JpaQueryExecution.execute(JpaQueryExecution.java:88) ~[spring-data-jpa-2.2.1.RELEASE.jar:2.2.1.RELEASE]
      at org.springframework.data.jpa.repository.query.AbstractJpaQuery.doExecute(AbstractJpaQuery.java:154) ~[spring-data-jpa-2.2.1.RELEASE.jar:2.2.1.RELEASE]
      at org.springframework.data.jpa.repository.query.AbstractJpaQuery.execute(AbstractJpaQuery.java:142) ~[spring-data-jpa-2.2.1.RELEASE.jar:2.2.1.RELEASE]
      at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.doInvoke(RepositoryFactorySupport.java:618) ~[spring-data-commons-2.2.1.RELEASE.jar:2.2.1.RELEASE]
      at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:605) ~[spring-data-commons-2.2.1.RELEASE.jar:2.2.1.RELEASE]
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.2.1.RELEASE.jar:5.2.1.RELEASE]
      at org.springframework.transaction.interceptor.TransactionInterceptor$$Lambda$665.0000000089B72250.proceedWithInvocation(Unknown Source) ~[na:na]
      at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:366) ~[spring-tx-5.2.1.RELEASE.jar:5.2.1.RELEASE]
      at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:99) ~[spring-tx-5.2.1.RELEASE.jar:5.2.1.RELEASE]
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.2.1.RELEASE.jar:5.2.1.RELEASE]
      at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:139) ~[spring-tx-5.2.1.RELEASE.jar:5.2.1.RELEASE]
      ... 34 common frames omitted
  Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The column name id is not valid.
      at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:234) ~[mssql-jdbc-7.4.1.jre8.jar:na]
      at com.microsoft.sqlserver.jdbc.SQLServerResultSet.findColumn(SQLServerResultSet.java:686) ~[mssql-jdbc-7.4.1.jre8.jar:na]
      at com.microsoft.sqlserver.jdbc.SQLServerResultSet.getInt(SQLServerResultSet.java:2310) ~[mssql-jdbc-7.4.1.jre8.jar:na]
      at com.zaxxer.hikari.pool.HikariProxyResultSet.getInt(HikariProxyResultSet.java) ~[HikariCP-3.4.1.jar:na]
      at org.hibernate.type.descriptor.sql.IntegerTypeDescriptor$2.doExtract(IntegerTypeDescriptor.java:62) ~[hibernate-core-5.3.6.Final.jar:5.3.6.Final]
      at org.hibernate.type.descriptor.sql.BasicExtractor.extract(BasicExtractor.java:47) ~[hibernate-core-5.3.6.Final.jar:5.3.6.Final]
      at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:261) ~[hibernate-core-5.3.6.Final.jar:5.3.6.Final]
      at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:257) ~[hibernate-core-5.3.6.Final.jar:5.3.6.Final]
      at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:247) ~[hibernate-core-5.3.6.Final.jar:5.3.6.Final]
      at org.hibernate.type.AbstractStandardBasicType.hydrate(AbstractStandardBasicType.java:333) ~[hibernate-core-5.3.6.Final.jar:5.3.6.Final]
      at org.hibernate.loader.Loader.extractKeysFromResultSet(Loader.java:793) ~[hibernate-core-5.3.6.Final.jar:5.3.6.Final]
      at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:718) ~[hibernate-core-5.3.6.Final.jar:5.3.6.Final]
      at org.hibernate.loader.Loader.processResultSet(Loader.java:990) ~[hibernate-core-5.3.6.Final.jar:5.3.6.Final]
      at org.hibernate.loader.Loader.doQuery(Loader.java:948) ~[hibernate-core-5.3.6.Final.jar:5.3.6.Final]
      at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:340) ~[hibernate-core-5.3.6.Final.jar:5.3.6.Final]
      at org.hibernate.loader.Loader.doList(Loader.java:2689) ~[hibernate-core-5.3.6.Final.jar:5.3.6.Final]
      ... 61 common frames omitted
  
  
  Process finished with exit code 1
  </code></pre>
  
  <p>Can you spot what I'm doing wrong?</p>
  
  <p>Thanks!</p>