title: Unable to use Spring Boot Data on Websphere traditional 8.5
body: <p>I am trying to run a Spring Boot 1.5.9 application on Websphere 8.5.5.13 (class loading is parent last and I don't have shared library)
  and when trying to call JpaRepository built in methods (I notice that the SQL query is being executed) but I am getting the following exception :</p>
  
  <pre><code>org.springframework.transaction.TransactionSystemException: 
  UOWManager transaction processing failed; nested exception is com.ibm.wsspi.uow.UOWException: 
  java.lang.LinkageError: com/ibm/websphere/uow/UOWSynchronizationRegistry.registerInterposedSynchronization
  (Ljavax/transaction/Synchronization;)V (loaded from file:/D:/IBM/WebSphere/AppServer/plugins/com.ibm.ws.runtime.jar 
  by org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader@873a9f67) 
  called from class org.springframework.transaction.jta.WebSphereUowTransactionManager$UOWActionAdapter 
  (loaded from file:/D:/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/D1SHLAPXXPWV1Node01Cell
  /Spring.ear/SpringJSF.war/WEB-INF/lib/spring-tx-4.3.13.RELEASE.jar by 
  com.ibm.ws.classloader.CompoundClassLoader@7c146942[war:Spring/SpringJSF.war]
  </code></pre>
  
  <p>My pom file is as follows :</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project xmlns="http://maven.apache.org/POM/4.0.0"
      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;groupId&gt;org.springframework&lt;/groupId&gt;
      &lt;artifactId&gt;SpringJSF&lt;/artifactId&gt;
      &lt;version&gt;1&lt;/version&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;1.5.9.RELEASE&lt;/version&gt;  
      &lt;/parent&gt; 
  
      &lt;properties&gt;
          &lt;java.version&gt;1.8&lt;/java.version&gt;   
      &lt;/properties&gt;
  
      &lt;packaging&gt;war&lt;/packaging&gt;
  
      &lt;dependencies&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;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-actuator&lt;/artifactId&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-cache&lt;/artifactId&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-mail&lt;/artifactId&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-thymeleaf&lt;/artifactId&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-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-data-jpa&lt;/artifactId&gt;   
              &lt;exclusions&gt;
                  &lt;exclusion&gt;
                      &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
                  &lt;/exclusion&gt;
              &lt;/exclusions&gt;               
          &lt;/dependency&gt;
  
         &lt;dependency&gt;
              &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
              &lt;artifactId&gt;hibernate-core&lt;/artifactId&gt;
              &lt;version&gt;4.2.15.Final&lt;/version&gt;
         &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
              &lt;artifactId&gt;hibernate-entitymanager&lt;/artifactId&gt;
              &lt;version&gt;4.2.15.Final&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.hibernate.javax.persistence&lt;/groupId&gt;
              &lt;artifactId&gt;hibernate-jpa-2.0-api&lt;/artifactId&gt;
              &lt;version&gt;1.0.0.Final&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-security&lt;/artifactId&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;javax&lt;/groupId&gt; 
              &lt;artifactId&gt;javaee-api&lt;/artifactId&gt;
              &lt;version&gt;6.0&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;javax.el&lt;/groupId&gt;
              &lt;artifactId&gt;javax.el-api&lt;/artifactId&gt;
              &lt;version&gt;3.0.0&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&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.2.2.jre8&lt;/version&gt;
          &lt;/dependency&gt;
  
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.glassfish&lt;/groupId&gt;
              &lt;artifactId&gt;javax.faces&lt;/artifactId&gt;
              &lt;version&gt;2.2.9&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;javax.enterprise&lt;/groupId&gt;
              &lt;artifactId&gt;cdi-api&lt;/artifactId&gt;
              &lt;version&gt;1.2&lt;/version&gt;
          &lt;/dependency&gt;
  
  
          &lt;dependency&gt;
              &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
              &lt;artifactId&gt;jstl&lt;/artifactId&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.primefaces&lt;/groupId&gt;
              &lt;artifactId&gt;primefaces&lt;/artifactId&gt;
              &lt;version&gt;6.1&lt;/version&gt;
          &lt;/dependency&gt;
  
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.ocpsoft.rewrite&lt;/groupId&gt;
              &lt;artifactId&gt;rewrite-servlet&lt;/artifactId&gt;
              &lt;version&gt;3.4.1.Final&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.ocpsoft.rewrite&lt;/groupId&gt;
              &lt;artifactId&gt;rewrite-config-prettyfaces&lt;/artifactId&gt;
              &lt;version&gt;3.4.1.Final&lt;/version&gt;
          &lt;/dependency&gt;
  
  
  
          &lt;dependency&gt;
              &lt;groupId&gt;commons-codec&lt;/groupId&gt;
              &lt;artifactId&gt;commons-codec&lt;/artifactId&gt;
              &lt;version&gt;1.10&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;javax.mail&lt;/groupId&gt;
              &lt;artifactId&gt;mail&lt;/artifactId&gt;
              &lt;version&gt;1.4.7&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;commons-validator&lt;/groupId&gt;
              &lt;artifactId&gt;commons-validator&lt;/artifactId&gt;
              &lt;version&gt;1.6&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;commons-fileupload&lt;/groupId&gt;
              &lt;artifactId&gt;commons-fileupload&lt;/artifactId&gt;
              &lt;version&gt;1.3.3&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;commons-io&lt;/groupId&gt;
              &lt;artifactId&gt;commons-io&lt;/artifactId&gt;
              &lt;version&gt;2.5&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;joda-time&lt;/groupId&gt;
              &lt;artifactId&gt;joda-time&lt;/artifactId&gt;
              &lt;version&gt;2.9.9&lt;/version&gt;
          &lt;/dependency&gt;
  
      &lt;/dependencies&gt;
  
      &lt;build&gt;
          &lt;finalName&gt;SpringJSF&lt;/finalName&gt;
          &lt;plugins&gt;
  
              &lt;plugin&gt;
                 &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                 &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
                 &lt;version&gt;2.20&lt;/version&gt;
                 &lt;configuration&gt;
                    &lt;argLine&gt;-Dfile.encoding=UTF8&lt;/argLine&gt;
                 &lt;/configuration&gt;
              &lt;/plugin&gt;
  
  
  
          &lt;/plugins&gt;
      &lt;/build&gt;
  
      &lt;repositories&gt;
          &lt;repository&gt;
              &lt;id&gt;spring-releases&lt;/id&gt;
              &lt;name&gt;Spring Releases&lt;/name&gt;
              &lt;url&gt;https://repo.spring.io/libs-release&lt;/url&gt;
          &lt;/repository&gt;
          &lt;repository&gt;
              &lt;id&gt;org.jboss.repository.releases&lt;/id&gt;
              &lt;name&gt;JBoss Maven Release Repository&lt;/name&gt;
              &lt;url&gt;https://repository.jboss.org/nexus/content/repositories/releases&lt;/url&gt;
          &lt;/repository&gt;
  
  
      &lt;/repositories&gt;
  
      &lt;pluginRepositories&gt;
          &lt;pluginRepository&gt;
              &lt;id&gt;spring-releases&lt;/id&gt;
              &lt;name&gt;Spring Releases&lt;/name&gt;
              &lt;url&gt;https://repo.spring.io/libs-release&lt;/url&gt;
          &lt;/pluginRepository&gt;
      &lt;/pluginRepositories&gt;
  
  &lt;/project&gt;
  </code></pre>
  
  <p>My repository interface :</p>
  
  <pre><code>public interface EmployeeRepository extends JpaRepository&lt;Employee, Long&gt; {
  
      @Query("from Employee u where u.userName = :userName")
      Employee findByUserName(@Param("userName") String username);
  
  }
  </code></pre>
  
  <p>Maven dependency tree:</p>
  
  <pre><code>[INFO] org.springframework:SpringJSF:war:1
  [INFO] +- javax.servlet:javax.servlet-api:jar:3.1.0:provided
  [INFO] +- org.springframework.boot:spring-boot-starter-actuator:jar:1.5.9.RELEAS
  E:compile
  [INFO] |  +- org.springframework.boot:spring-boot-starter:jar:1.5.9.RELEASE:comp
  ile
  [INFO] |  |  +- org.springframework.boot:spring-boot:jar:1.5.9.RELEASE:compile
  [INFO] |  |  +- org.springframework.boot:spring-boot-autoconfigure:jar:1.5.9.REL
  EASE:compile
  [INFO] |  |  +- org.springframework.boot:spring-boot-starter-logging:jar:1.5.9.R
  ELEASE:compile
  [INFO] |  |  |  +- ch.qos.logback:logback-classic:jar:1.1.11:compile
  [INFO] |  |  |  |  \- ch.qos.logback:logback-core:jar:1.1.11:compile
  [INFO] |  |  |  +- org.slf4j:jul-to-slf4j:jar:1.7.25:compile
  [INFO] |  |  |  \- org.slf4j:log4j-over-slf4j:jar:1.7.25:compile
  [INFO] |  |  \- org.yaml:snakeyaml:jar:1.17:runtime
  [INFO] |  \- org.springframework.boot:spring-boot-actuator:jar:1.5.9.RELEASE:com
  pile
  [INFO] +- org.springframework.boot:spring-boot-starter-cache:jar:1.5.9.RELEASE:c
  ompile
  [INFO] |  +- org.springframework:spring-context:jar:4.3.13.RELEASE:compile
  [INFO] |  |  +- org.springframework:spring-beans:jar:4.3.13.RELEASE:compile
  [INFO] |  |  \- org.springframework:spring-expression:jar:4.3.13.RELEASE:compile
  
  [INFO] |  \- org.springframework:spring-context-support:jar:4.3.13.RELEASE:compi
  le
  [INFO] +- org.springframework.boot:spring-boot-starter-mail:jar:1.5.9.RELEASE:co
  mpile
  [INFO] |  \- com.sun.mail:javax.mail:jar:1.5.6:compile
  [INFO] +- org.springframework.boot:spring-boot-starter-thymeleaf:jar:1.5.9.RELEA
  SE:compile
  [INFO] |  +- org.thymeleaf:thymeleaf-spring4:jar:2.1.6.RELEASE:compile
  [INFO] |  |  +- org.thymeleaf:thymeleaf:jar:2.1.6.RELEASE:compile
  [INFO] |  |  |  +- ognl:ognl:jar:3.0.8:compile
  [INFO] |  |  |  \- org.unbescape:unbescape:jar:1.1.0.RELEASE:compile
  [INFO] |  |  \- org.slf4j:slf4j-api:jar:1.7.25:compile
  [INFO] |  \- nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect:jar:1.4.0:compile
  [INFO] |     \- org.codehaus.groovy:groovy:jar:2.4.13:compile
  [INFO] +- org.springframework.boot:spring-boot-starter-test:jar:1.5.9.RELEASE:te
  st
  [INFO] |  +- org.springframework.boot:spring-boot-test:jar:1.5.9.RELEASE:test
  [INFO] |  +- org.springframework.boot:spring-boot-test-autoconfigure:jar:1.5.9.R
  ELEASE:test
  [INFO] |  +- com.jayway.jsonpath:json-path:jar:2.2.0:test
  [INFO] |  |  \- net.minidev:json-smart:jar:2.2.1:test
  [INFO] |  |     \- net.minidev:accessors-smart:jar:1.1:test
  [INFO] |  |        \- org.ow2.asm:asm:jar:5.0.3:test
  [INFO] |  +- junit:junit:jar:4.12:test
  [INFO] |  +- org.assertj:assertj-core:jar:2.6.0:test
  [INFO] |  +- org.mockito:mockito-core:jar:1.10.19:test
  [INFO] |  |  \- org.objenesis:objenesis:jar:2.1:test
  [INFO] |  +- org.hamcrest:hamcrest-core:jar:1.3:test
  [INFO] |  +- org.hamcrest:hamcrest-library:jar:1.3:test
  [INFO] |  +- org.skyscreamer:jsonassert:jar:1.4.0:test
  [INFO] |  |  \- com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1
  :test
  [INFO] |  +- org.springframework:spring-core:jar:4.3.13.RELEASE:compile
  [INFO] |  \- org.springframework:spring-test:jar:4.3.13.RELEASE:test
  [INFO] +- org.springframework.boot:spring-boot-starter-web:jar:1.5.9.RELEASE:com
  pile
  [INFO] |  +- org.hibernate:hibernate-validator:jar:5.3.6.Final:compile
  [INFO] |  |  +- javax.validation:validation-api:jar:1.1.0.Final:compile
  [INFO] |  |  \- com.fasterxml:classmate:jar:1.3.4:compile
  [INFO] |  +- com.fasterxml.jackson.core:jackson-databind:jar:2.8.10:compile
  [INFO] |  |  +- com.fasterxml.jackson.core:jackson-annotations:jar:2.8.0:compile
  
  [INFO] |  |  \- com.fasterxml.jackson.core:jackson-core:jar:2.8.10:compile
  [INFO] |  +- org.springframework:spring-web:jar:4.3.13.RELEASE:compile
  [INFO] |  \- org.springframework:spring-webmvc:jar:4.3.13.RELEASE:compile
  [INFO] +- org.springframework.boot:spring-boot-starter-data-jpa:jar:1.5.9.RELEAS
  E:compile
  [INFO] |  +- org.springframework.boot:spring-boot-starter-aop:jar:1.5.9.RELEASE:
  compile
  [INFO] |  |  \- org.aspectj:aspectjweaver:jar:1.8.13:compile
  [INFO] |  +- org.springframework.boot:spring-boot-starter-jdbc:jar:1.5.9.RELEASE
  :compile
  [INFO] |  |  +- org.apache.tomcat:tomcat-jdbc:jar:8.5.23:compile
  [INFO] |  |  |  \- org.apache.tomcat:tomcat-juli:jar:8.5.23:compile
  [INFO] |  |  \- org.springframework:spring-jdbc:jar:4.3.13.RELEASE:compile
  [INFO] |  +- javax.transaction:javax.transaction-api:jar:1.2:compile
  [INFO] |  +- org.springframework.data:spring-data-jpa:jar:1.11.9.RELEASE:compile
  
  [INFO] |  |  +- org.springframework.data:spring-data-commons:jar:1.13.9.RELEASE:
  compile
  [INFO] |  |  +- org.springframework:spring-orm:jar:4.3.13.RELEASE:compile
  [INFO] |  |  +- org.springframework:spring-tx:jar:4.3.13.RELEASE:compile
  [INFO] |  |  \- org.slf4j:jcl-over-slf4j:jar:1.7.25:compile
  [INFO] |  \- org.springframework:spring-aspects:jar:4.3.13.RELEASE:compile
  [INFO] +- org.hibernate:hibernate-core:jar:4.2.15.Final:compile
  [INFO] |  +- antlr:antlr:jar:2.7.7:compile
  [INFO] |  +- org.jboss.logging:jboss-logging:jar:3.3.1.Final:compile
  [INFO] |  +- dom4j:dom4j:jar:1.6.1:compile
  [INFO] |  +- org.javassist:javassist:jar:3.21.0-GA:compile
  [INFO] |  +- org.jboss.spec.javax.transaction:jboss-transaction-api_1.1_spec:jar
  :1.0.1.Final:compile
  [INFO] |  \- org.hibernate.common:hibernate-commons-annotations:jar:4.0.2.Final:
  compile
  [INFO] +- org.hibernate:hibernate-entitymanager:jar:4.2.15.Final:compile
  [INFO] +- org.hibernate.javax.persistence:hibernate-jpa-2.0-api:jar:1.0.0.Final:
  compile
  [INFO] +- org.springframework.boot:spring-boot-starter-security:jar:1.5.9.RELEAS
  E:compile
  [INFO] |  +- org.springframework:spring-aop:jar:4.3.13.RELEASE:compile
  [INFO] |  +- org.springframework.security:spring-security-config:jar:4.2.3.RELEA
  SE:compile
  [INFO] |  |  \- org.springframework.security:spring-security-core:jar:4.2.3.RELE
  ASE:compile
  [INFO] |  \- org.springframework.security:spring-security-web:jar:4.2.3.RELEASE:
  compile
  [INFO] +- javax:javaee-api:jar:6.0:provided
  [INFO] +- javax.el:javax.el-api:jar:3.0.0:provided
  [INFO] +- com.microsoft.sqlserver:mssql-jdbc:jar:6.2.2.jre8:compile
  [INFO] +- org.glassfish:javax.faces:jar:2.2.9:compile
  [INFO] +- javax.enterprise:cdi-api:jar:1.2:compile
  [INFO] |  +- javax.interceptor:javax.interceptor-api:jar:1.2:compile
  [INFO] |  \- javax.inject:javax.inject:jar:1:compile
  [INFO] +- javax.servlet:jstl:jar:1.2:compile
  [INFO] +- org.primefaces:primefaces:jar:6.1:compile
  [INFO] +- org.ocpsoft.rewrite:rewrite-servlet:jar:3.4.1.Final:compile
  [INFO] +- org.ocpsoft.rewrite:rewrite-config-prettyfaces:jar:3.4.1.Final:compile
  
  [INFO] |  \- org.ocpsoft.rewrite:rewrite-integration-faces:jar:3.4.1.Final:compi
  le
  [INFO] +- commons-codec:commons-codec:jar:1.10:compile
  [INFO] +- org.apache.commons:commons-lang3:jar:3.5:compile
  [INFO] +- javax.mail:mail:jar:1.4.7:compile
  [INFO] |  \- javax.activation:activation:jar:1.1:compile
  [INFO] +- commons-validator:commons-validator:jar:1.6:compile
  [INFO] |  +- commons-beanutils:commons-beanutils:jar:1.9.3:compile
  [INFO] |  +- commons-digester:commons-digester:jar:2.1:compile
  [INFO] |  +- commons-logging:commons-logging:jar:1.2:compile
  [INFO] |  \- commons-collections:commons-collections:jar:3.2.2:compile
  [INFO] +- commons-fileupload:commons-fileupload:jar:1.3.3:compile
  [INFO] +- commons-io:commons-io:jar:2.5:compile
  [INFO] \- joda-time:joda-time:jar:2.9.9:compile
  </code></pre>
  
  <p><strong>NOTE:</strong> any dao method annotated with <strong>@Query works fine</strong> with no issues, my current issue is with JpaRepository built in methods like findAll, it doesn't work and produces the above exception.</p>
  
  <p><strong>UPDATE 1</strong> : I tried marking the class loading to be parent first, and move all the jars from my application lib folder and put them in an isolated shared library, but this solution make the application started without springboot being initialized and neither hibernate nor jsf, so it's not working.</p>