2

Currently been struggling to deploy my war file in WAS 8.5 but everytime I start my war file, an error occur.

Exception caught while initializing context: {0}org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/my-servlet.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: javax/persistence/Table.indexes()[Ljavax/persistence/Index;

pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>something-awesome</groupId>
<artifactId>something-awesome</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>something-awesome</name>
<url>/something-awesome</url>
<packaging>war</packaging>
<properties>
    <java-version>1.7</java-version>
</properties>
<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>1.5.3.RELEASE</version>
</parent>
<dependencies>

    <dependency>
        <groupId>com.ibm.db2.jcc</groupId>
        <artifactId>db2jcc</artifactId>
        <version>3.61</version>
        <scope>compile</scope>
    </dependency>

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter</artifactId>
    </dependency>

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-data-jpa</artifactId>
        <exclusions>
            <exclusion>
                <groupId>xml-apis</groupId>
                <artifactId>xml-apis</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.hibernate.javax.persistence</groupId>
                <artifactId>hibernate-jpa-2.1-api</artifactId>
            </exclusion>
            <exclusion>
                <groupId>javax.transaction</groupId>
                <artifactId>javax.transaction-api</artifactId>
            </exclusion>
        </exclusions>
    </dependency>

    <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>servlet-api</artifactId>
        <version>2.5</version>
    </dependency>

    <dependency>
        <groupId>org.json</groupId>
        <artifactId>json</artifactId>
        <version>20151123</version>
    </dependency>

    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-core</artifactId>
        <scope>compile</scope>
        <exclusions>
            <exclusion>
                <groupId>org.jboss.spec.javax.transaction</groupId>
                <artifactId>jboss-transaction-api_1.2_spec</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-c3p0</artifactId>
        <version>4.3.5.Final</version>
    </dependency>

    <dependency>
        <groupId>javax.transaction</groupId>
        <artifactId>jta</artifactId>
        <version>1.1</version>
    </dependency>

    <dependency>
        <groupId>org.codehaus.jackson</groupId>
        <artifactId>jackson-mapper-asl</artifactId>
        <version>1.9.13</version>
    </dependency>

    <!-- Swagger Documentation -->
    <dependency>
        <groupId>io.springfox</groupId>
        <artifactId>springfox-swagger2</artifactId>
        <version>2.2.2</version>
    </dependency>

    <dependency>
        <groupId>io.springfox</groupId>
        <artifactId>springfox-swagger-ui</artifactId>
        <version>2.2.2</version>
    </dependency>

    <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-core</artifactId>
    </dependency>

    <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-lang3</artifactId>
        <version>3.4</version>
    </dependency>

    <dependency>
        <groupId>org.projectlombok</groupId>
        <artifactId>lombok</artifactId>
        <scope>provided</scope>
    </dependency>

</dependencies>
<build>
    <defaultGoal>compile</defaultGoal>
    <finalName>${project.name}</finalName>
    <outputDirectory>${project.basedir}\src\main\webapp\WEB-INF\classes</outputDirectory>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
                <source>1.7</source>
                <target>1.7</target>
            </configuration>
        </plugin>
        <plugin>
            <artifactId>maven-war-plugin</artifactId>
            <configuration>
                <packagingExcludes>WEB-INF/lib/servlet-api-2.5.jar,WEB-INF/lib/bootstrap-1.0.0.jar,WEB-INF/lib/com.ibm.mq-1.0.0.jar,WEB-INF/lib/com.ibm.mq.commonservices-1.0.0.jar,WEB-INF/lib/com.ibm.mq.connector-1.0.0.jar,WEB-INF/lib/com.ibm.mq.headers-1.0.0.jar,WEB-INF/lib/com.ibm.mq.jmqi-1.0.0.jar,WEB-INF/lib/com.ibm.mq.pcf-1.0.0.jar,WEB-INF/lib/com.ibm.websphere.sca.1.0-sca_api-1.0.0.jar,WEB-INF/lib/com.ibm.websphere.sca.2.0-sca_api-1.0.0.jar,WEB-INF/lib/com.ibm.ws.admin.core-1.0.0.jar,WEB-INF/lib/com.ibm.ws.admin.services-1.0.0.jar,WEB-INF/lib/com.ibm.ws.batch.runtime-1.0.0.jar,WEB-INF/lib/com.ibm.ws.emf-1.0.0.jar,WEB-INF/lib/com.ibm.ws.jaxrs-1.0.0.jar,WEB-INF/lib/com.ibm.ws.jpa-1.0.0.jar,WEB-INF/lib/com.ibm.ws.jsf.myfaces-1.0.0.jar,WEB-INF/lib/com.ibm.ws.portletcontainer-1.0.0.jar,WEB-INF/lib/com.ibm.ws.prereq.jackson-1.0.0.jar,WEB-INF/lib/com.ibm.ws.prereq.jaxrs-1.0.0.jar,WEB-INF/lib/com.ibm.ws.prereq.soap-1.0.0.jar,WEB-INF/lib/com.ibm.ws.prereq.vajava-1.0.0.jar,WEB-INF/lib/com.ibm.ws.prereq.wsdl4j-1.0.0.jar,WEB-INF/lib/com.ibm.ws.prereq.xlxp-1.0.0.jar,WEB-INF/lib/com.ibm.ws.runtime-1.0.0.jar,WEB-INF/lib/com.ibm.ws.runtime.dist-1.0.0.jar,WEB-INF/lib/com.ibm.ws.sib.server-1.0.0.jar,WEB-INF/lib/com.ibm.ws.sip.container-1.0.0.jar,WEB-INF/lib/com.ibm.ws.sip.interface-1.0.0.jar,WEB-INF/lib/com.ibm.ws.wccm-1.0.0.jar,WEB-INF/lib/com.ibm.ws.webcontainer-1.0.0.jar,WEB-INF/lib/com.ibm.wsfp.main-1.0.0.jar,WEB-INF/lib/dhbcore-1.0.0.jar,WEB-INF/lib/ffdcSupport-1.0.0.jar,WEB-INF/lib/j2ee-1.0.0.jar,WEB-INF/lib/mail-impl-1.0.0.jar,WEB-INF/lib/org.apache.tuscany.sca.api-1.0.0.jar,WEB-INF/lib/org.eclipse.emf.common-1.0.0.jar,WEB-INF/lib/org.eclipse.emf.commonj.sdo-1.0.0.jar,WEB-INF/lib/org.eclipse.emf.ecore-1.0.0.jar,WEB-INF/lib/org.eclipse.emf.ecore.change-1.0.0.jar,WEB-INF/lib/org.eclipse.emf.ecore.sdo-1.0.0.jar,WEB-INF/lib/org.eclipse.emf.ecore.xmi-1.0.0.jar,WEB-INF/lib/osgi.cmpn-1.0.0.jar,WEB-INF/lib/osgi.core-1.0.0.jar,WEB-INF/lib/PD-1.0.0.jar,WEB-INF/lib/RPCAdapter-1.0.0.jar,WEB-INF/lib/RPCAdapter-annotation-1.0.0.jar,WEB-INF/lib/rsadbutils-1.0.0.jar,WEB-INF/lib/servlet-api-2.5.jar,WEB-INF/lib/webmsg_applib-1.0.0.jar,WEB-INF/lib/wink-jaxrs-webdav-1.0.0.jar,WEB-INF/lib/wsadie.marshall-1.0.0.jar,WEB-INF/lib/wsadie.wsatlib-1.0.0.jar,WEB-INF/lib/xmlapi-1.0.0.jar,WEB-INF/lib/wink-jaxrs-webdav-1.0.0.jar,WEB-INF/lib/wsadie.marshall-1.0.0.jar,WEB-INF/lib/wsadie.wsatlib-1.0.0.jar,WEB-INF/lib/xmlapi-1.0.0.jar</packagingExcludes>
            </configuration>
        </plugin>
        <!-- <plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId> 
            <version>2.2</version> <configuration> <port>8080</port> <path>/</path> </configuration> 
            </plugin> -->
    </plugins>
</build>

dependency-tree:

[INFO] +- com.ibm.db2.jcc:db2jcc:jar:3.61:compile
[INFO] +- org.springframework.boot:spring-boot-starter:jar:1.5.3.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot:jar:1.5.3.RELEASE:compile
[INFO] |  |  +- (org.springframework:spring-core:jar:4.3.8.RELEASE:compile - omitted for duplicate)
[INFO] |  |  \- org.springframework:spring-context:jar:4.3.8.RELEASE:compile
[INFO] |  |     +- (org.springframework:spring-aop:jar:4.3.8.RELEASE:compile - omitted for duplicate)
[INFO] |  |     +- (org.springframework:spring-beans:jar:4.3.8.RELEASE:compile - omitted for duplicate)
[INFO] |  |     +- (org.springframework:spring-core:jar:4.3.8.RELEASE:compile - omitted for duplicate)
[INFO] |  |     \- (org.springframework:spring-expression:jar:4.3.8.RELEASE:compile - omitted for duplicate)
[INFO] |  +- org.springframework.boot:spring-boot-autoconfigure:jar:1.5.3.RELEASE:compile
[INFO] |  |  \- (org.springframework.boot:spring-boot:jar:1.5.3.RELEASE:compile - omitted for duplicate)
[INFO] |  +- org.springframework.boot:spring-boot-starter-logging:jar:1.5.3.RELEASE: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:slf4j-api:jar:1.7.25:compile - version managed from 1.7.24; omitted for duplicate)
[INFO] |  |  +- org.slf4j:jcl-over-slf4j:jar:1.7.25:compile
[INFO] |  |  |  \- (org.slf4j:slf4j-api:jar:1.7.25:compile - version managed from 1.7.22; omitted for duplicate)
[INFO] |  |  +- org.slf4j:jul-to-slf4j:jar:1.7.25:compile
[INFO] |  |  |  \- (org.slf4j:slf4j-api:jar:1.7.25:compile - version managed from 1.7.22; omitted for duplicate)
[INFO] |  |  \- org.slf4j:log4j-over-slf4j:jar:1.7.25:compile
[INFO] |  |     \- (org.slf4j:slf4j-api:jar:1.7.25:compile - version managed from 1.7.22; omitted for duplicate)
[INFO] |  +- org.springframework:spring-core:jar:4.3.8.RELEASE:compile
[INFO] |  \- org.yaml:snakeyaml:jar:1.17:runtime
[INFO] +- org.springframework.boot:spring-boot-starter-web:jar:1.5.3.RELEASE:compile
[INFO] |  +- (org.springframework.boot:spring-boot-starter:jar:1.5.3.RELEASE:compile - omitted for duplicate)
[INFO] |  +- org.springframework.boot:spring-boot-starter-tomcat:jar:1.5.3.RELEASE:compile
[INFO] |  |  +- org.apache.tomcat.embed:tomcat-embed-core:jar:8.5.14:compile
[INFO] |  |  +- org.apache.tomcat.embed:tomcat-embed-el:jar:8.5.14:compile
[INFO] |  |  \- org.apache.tomcat.embed:tomcat-embed-websocket:jar:8.5.14:compile
[INFO] |  |     \- (org.apache.tomcat.embed:tomcat-embed-core:jar:8.5.14:compile - omitted for duplicate)
[INFO] |  +- org.hibernate:hibernate-validator:jar:5.3.5.Final:compile
[INFO] |  |  +- javax.validation:validation-api:jar:1.1.0.Final:compile
[INFO] |  |  +- (org.jboss.logging:jboss-logging:jar:3.3.1.Final:compile - version managed from 3.3.0.Final; omitted for duplicate)
[INFO] |  |  \- (com.fasterxml:classmate:jar:1.3.3:compile - version managed from 1.2.0; omitted for duplicate)
[INFO] |  +- com.fasterxml.jackson.core:jackson-databind:jar:2.8.8:compile
[INFO] |  |  +- com.fasterxml.jackson.core:jackson-annotations:jar:2.8.0:compile
[INFO] |  |  \- com.fasterxml.jackson.core:jackson-core:jar:2.8.8:compile
[INFO] |  +- org.springframework:spring-web:jar:4.3.8.RELEASE:compile
[INFO] |  |  +- org.springframework:spring-aop:jar:4.3.8.RELEASE:compile
[INFO] |  |  |  +- (org.springframework:spring-beans:jar:4.3.8.RELEASE:compile - omitted for duplicate)
[INFO] |  |  |  \- (org.springframework:spring-core:jar:4.3.8.RELEASE:compile - omitted for duplicate)
[INFO] |  |  +- org.springframework:spring-beans:jar:4.3.8.RELEASE:compile
[INFO] |  |  |  \- (org.springframework:spring-core:jar:4.3.8.RELEASE:compile - omitted for duplicate)
[INFO] |  |  +- (org.springframework:spring-context:jar:4.3.8.RELEASE:compile - omitted for duplicate)
[INFO] |  |  \- (org.springframework:spring-core:jar:4.3.8.RELEASE:compile - omitted for duplicate)
[INFO] |  \- org.springframework:spring-webmvc:jar:4.3.8.RELEASE:compile
[INFO] |     +- (org.springframework:spring-aop:jar:4.3.8.RELEASE:compile - omitted for duplicate)
[INFO] |     +- (org.springframework:spring-beans:jar:4.3.8.RELEASE:compile - omitted for duplicate)
[INFO] |     +- (org.springframework:spring-context:jar:4.3.8.RELEASE:compile - omitted for duplicate)
[INFO] |     +- (org.springframework:spring-core:jar:4.3.8.RELEASE:compile - omitted for duplicate)
[INFO] |     +- org.springframework:spring-expression:jar:4.3.8.RELEASE:compile
[INFO] |     |  \- (org.springframework:spring-core:jar:4.3.8.RELEASE:compile - omitted for duplicate)
[INFO] |     \- (org.springframework:spring-web:jar:4.3.8.RELEASE:compile - omitted for duplicate)
[INFO] +- org.springframework.boot:spring-boot-starter-data-jpa:jar:1.5.3.RELEASE:compile
[INFO] |  +- (org.springframework.boot:spring-boot-starter:jar:1.5.3.RELEASE:compile - omitted for duplicate)
[INFO] |  +- org.springframework.boot:spring-boot-starter-aop:jar:1.5.3.RELEASE:compile
[INFO] |  |  +- (org.springframework.boot:spring-boot-starter:jar:1.5.3.RELEASE:compile - omitted for duplicate)
[INFO] |  |  +- (org.springframework:spring-aop:jar:4.3.8.RELEASE:compile - omitted for duplicate)
[INFO] |  |  \- (org.aspectj:aspectjweaver:jar:1.8.10:compile - version managed from 1.8.6; omitted for duplicate)
[INFO] |  +- org.springframework.boot:spring-boot-starter-jdbc:jar:1.5.3.RELEASE:compile
[INFO] |  |  +- (org.springframework.boot:spring-boot-starter:jar:1.5.3.RELEASE:compile - omitted for duplicate)
[INFO] |  |  +- org.apache.tomcat:tomcat-jdbc:jar:8.5.14:compile
[INFO] |  |  |  \- org.apache.tomcat:tomcat-juli:jar:8.5.14:compile
[INFO] |  |  \- org.springframework:spring-jdbc:jar:4.3.8.RELEASE:compile
[INFO] |  |     +- (org.springframework:spring-beans:jar:4.3.8.RELEASE:compile - omitted for duplicate)
[INFO] |  |     +- (org.springframework:spring-core:jar:4.3.8.RELEASE:compile - omitted for duplicate)
[INFO] |  |     \- (org.springframework:spring-tx:jar:4.3.8.RELEASE:compile - omitted for duplicate)
[INFO] |  +- (org.hibernate:hibernate-core:jar:5.0.12.Final:compile - omitted for duplicate)
[INFO] |  +- org.hibernate:hibernate-entitymanager:jar:5.0.12.Final:compile
[INFO] |  |  +- (org.jboss.logging:jboss-logging:jar:3.3.1.Final:compile - version managed from 3.3.0.Final; omitted for duplicate)
[INFO] |  |  +- (org.hibernate:hibernate-core:jar:5.0.12.Final:compile - omitted for duplicate)
[INFO] |  |  +- (dom4j:dom4j:jar:1.6.1:compile - omitted for duplicate)
[INFO] |  |  +- (org.hibernate.common:hibernate-commons-annotations:jar:5.0.1.Final:compile - omitted for duplicate)
[INFO] |  |  \- (org.javassist:javassist:jar:3.21.0-GA:compile - version managed from 3.18.1-GA; omitted for duplicate)
[INFO] |  +- org.springframework.data:spring-data-jpa:jar:1.11.3.RELEASE:compile
[INFO] |  |  +- org.springframework.data:spring-data-commons:jar:1.13.3.RELEASE:compile
[INFO] |  |  |  +- (org.springframework:spring-core:jar:4.3.8.RELEASE:compile - omitted for duplicate)
[INFO] |  |  |  +- (org.springframework:spring-beans:jar:4.3.8.RELEASE:compile - omitted for duplicate)
[INFO] |  |  |  +- (org.slf4j:slf4j-api:jar:1.7.25:compile - version managed from 1.7.24; omitted for duplicate)
[INFO] |  |  |  \- (org.slf4j:jcl-over-slf4j:jar:1.7.25:runtime - version managed from 1.7.24; omitted for duplicate)
[INFO] |  |  +- org.springframework:spring-orm:jar:4.3.8.RELEASE:compile
[INFO] |  |  |  +- (org.springframework:spring-beans:jar:4.3.8.RELEASE:compile - omitted for duplicate)
[INFO] |  |  |  +- (org.springframework:spring-core:jar:4.3.8.RELEASE:compile - omitted for duplicate)
[INFO] |  |  |  +- (org.springframework:spring-jdbc:jar:4.3.8.RELEASE:compile - omitted for duplicate)
[INFO] |  |  |  \- (org.springframework:spring-tx:jar:4.3.8.RELEASE:compile - omitted for duplicate)
[INFO] |  |  +- (org.springframework:spring-context:jar:4.3.8.RELEASE:compile - omitted for duplicate)
[INFO] |  |  +- (org.springframework:spring-aop:jar:4.3.8.RELEASE:compile - omitted for duplicate)
[INFO] |  |  +- org.springframework:spring-tx:jar:4.3.8.RELEASE:compile
[INFO] |  |  |  +- (org.springframework:spring-beans:jar:4.3.8.RELEASE:compile - omitted for duplicate)
[INFO] |  |  |  \- (org.springframework:spring-core:jar:4.3.8.RELEASE:compile - omitted for duplicate)
[INFO] |  |  +- (org.springframework:spring-beans:jar:4.3.8.RELEASE:compile - omitted for duplicate)
[INFO] |  |  +- (org.springframework:spring-core:jar:4.3.8.RELEASE:compile - omitted for duplicate)
[INFO] |  |  +- (org.slf4j:slf4j-api:jar:1.7.25:compile - version managed from 1.7.12; omitted for duplicate)
[INFO] |  |  \- (org.slf4j:jcl-over-slf4j:jar:1.7.25:runtime - version managed from 1.7.24; omitted for duplicate)
[INFO] |  \- org.springframework:spring-aspects:jar:4.3.8.RELEASE:compile
[INFO] |     \- (org.aspectj:aspectjweaver:jar:1.8.10:compile - version managed from 1.8.9; omitted for duplicate)
[INFO] +- javax.servlet:servlet-api:jar:2.5:compile
[INFO] +- org.json:json:jar:20151123:compile
[INFO] +- org.hibernate:hibernate-core:jar:5.0.12.Final:compile
[INFO] |  +- org.jboss.logging:jboss-logging:jar:3.3.1.Final:compile
[INFO] |  +- org.hibernate.javax.persistence:hibernate-jpa-2.1-api:jar:1.0.0.Final:compile
[INFO] |  +- org.javassist:javassist:jar:3.21.0-GA:compile (version managed from 3.18.1-GA)
[INFO] |  +- antlr:antlr:jar:2.7.7:compile
[INFO] |  +- org.apache.geronimo.specs:geronimo-jta_1.1_spec:jar:1.1.1:compile
[INFO] |  +- org.jboss:jandex:jar:2.0.0.Final:compile
[INFO] |  +- dom4j:dom4j:jar:1.6.1:compile
[INFO] |  \- org.hibernate.common:hibernate-commons-annotations:jar:5.0.1.Final:compile
[INFO] |     \- (org.jboss.logging:jboss-logging:jar:3.3.1.Final:compile - version managed from 3.3.0.Final; omitted for duplicate)
[INFO] +- org.hibernate:hibernate-c3p0:jar:4.3.5.Final:compile
[INFO] |  +- (org.jboss.logging:jboss-logging:jar:3.3.1.Final:compile - version managed from 3.1.3.GA; omitted for duplicate)
[INFO] |  +- org.jboss.logging:jboss-logging-annotations:jar:1.2.0.Beta1:compile
[INFO] |  +- (org.hibernate:hibernate-core:jar:5.0.12.Final:compile - version managed from 4.3.5.Final; omitted for duplicate)
[INFO] |  \- com.mchange:c3p0:jar:0.9.2.1:compile
[INFO] |     \- com.mchange:mchange-commons-java:jar:0.2.3.4:compile
[INFO] +- javax.transaction:jta:jar:1.1:compile
[INFO] +- org.codehaus.jackson:jackson-mapper-asl:jar:1.9.13:compile
[INFO] |  \- org.codehaus.jackson:jackson-core-asl:jar:1.9.13:compile
[INFO] +- io.springfox:springfox-swagger2:jar:2.2.2:compile
[INFO] |  +- org.mapstruct:mapstruct:jar:1.0.0.CR1:compile
[INFO] |  +- io.swagger:swagger-annotations:jar:1.5.3:compile
[INFO] |  +- io.swagger:swagger-models:jar:1.5.3:compile
[INFO] |  |  +- (com.fasterxml.jackson.core:jackson-annotations:jar:2.8.0:compile - version managed from 2.4.5; omitted for duplicate)
[INFO] |  |  +- (org.slf4j:slf4j-api:jar:1.7.25:compile - version managed from 1.6.3; omitted for duplicate)
[INFO] |  |  \- (io.swagger:swagger-annotations:jar:1.5.3:compile - omitted for duplicate)
[INFO] |  +- io.springfox:springfox-spi:jar:2.2.2:compile
[INFO] |  |  \- io.springfox:springfox-core:jar:2.2.2:compile
[INFO] |  |     +- (com.google.guava:guava:jar:18.0:compile - omitted for duplicate)
[INFO] |  |     +- (com.fasterxml:classmate:jar:1.3.3:compile - version managed from 1.2.0; omitted for duplicate)
[INFO] |  |     +- (org.slf4j:slf4j-api:jar:1.7.25:compile - version managed from 1.7.12; omitted for duplicate)
[INFO] |  |     +- (org.aspectj:aspectjrt:jar:1.8.10:compile - version managed from 1.8.6; omitted for duplicate)
[INFO] |  |     +- (org.aspectj:aspectjweaver:jar:1.8.10:compile - version managed from 1.8.6; omitted for duplicate)
[INFO] |  |     +- (org.springframework.plugin:spring-plugin-core:jar:1.2.0.RELEASE:compile - omitted for duplicate)
[INFO] |  |     +- (org.springframework.plugin:spring-plugin-metadata:jar:1.2.0.RELEASE:compile - omitted for duplicate)
[INFO] |  |     \- (org.springframework.hateoas:spring-hateoas:jar:0.23.0.RELEASE:compile - version managed from 0.18.0.RELEASE; omitted for duplicate)
[INFO] |  +- io.springfox:springfox-schema:jar:2.2.2:compile
[INFO] |  |  +- (io.springfox:springfox-core:jar:2.2.2:compile - omitted for duplicate)
[INFO] |  |  \- (io.springfox:springfox-spi:jar:2.2.2:compile - omitted for duplicate)
[INFO] |  +- io.springfox:springfox-swagger-common:jar:2.2.2:compile
[INFO] |  |  +- (io.swagger:swagger-annotations:jar:1.5.3:compile - omitted for duplicate)
[INFO] |  |  +- (io.swagger:swagger-models:jar:1.5.3:compile - omitted for duplicate)
[INFO] |  |  +- (io.springfox:springfox-spi:jar:2.2.2:compile - omitted for duplicate)
[INFO] |  |  +- (io.springfox:springfox-schema:jar:2.2.2:compile - omitted for duplicate)
[INFO] |  |  +- (io.springfox:springfox-spring-web:jar:2.2.2:compile - omitted for duplicate)
[INFO] |  |  +- (com.google.guava:guava:jar:18.0:compile - omitted for duplicate)
[INFO] |  |  +- (com.fasterxml:classmate:jar:1.3.3:compile - version managed from 1.2.0; omitted for duplicate)
[INFO] |  |  +- (org.slf4j:slf4j-api:jar:1.7.25:compile - version managed from 1.7.12; omitted for duplicate)
[INFO] |  |  +- (org.aspectj:aspectjrt:jar:1.8.10:compile - version managed from 1.8.6; omitted for duplicate)
[INFO] |  |  +- (org.aspectj:aspectjweaver:jar:1.8.10:compile - version managed from 1.8.6; omitted for duplicate)
[INFO] |  |  +- (org.springframework.plugin:spring-plugin-core:jar:1.2.0.RELEASE:compile - omitted for duplicate)
[INFO] |  |  +- (org.springframework.plugin:spring-plugin-metadata:jar:1.2.0.RELEASE:compile - omitted for duplicate)
[INFO] |  |  \- (org.springframework.hateoas:spring-hateoas:jar:0.23.0.RELEASE:compile - version managed from 0.18.0.RELEASE; omitted for duplicate)
[INFO] |  +- io.springfox:springfox-spring-web:jar:2.2.2:compile
[INFO] |  |  +- (com.google.guava:guava:jar:18.0:compile - omitted for duplicate)
[INFO] |  |  +- (com.fasterxml:classmate:jar:1.3.3:compile - version managed from 1.2.0; omitted for duplicate)
[INFO] |  |  +- (org.slf4j:slf4j-api:jar:1.7.25:compile - version managed from 1.7.12; omitted for duplicate)
[INFO] |  |  +- (org.aspectj:aspectjrt:jar:1.8.10:compile - version managed from 1.8.6; omitted for duplicate)
[INFO] |  |  +- (org.aspectj:aspectjweaver:jar:1.8.10:compile - version managed from 1.8.6; omitted for duplicate)
[INFO] |  |  +- (org.springframework.plugin:spring-plugin-core:jar:1.2.0.RELEASE:compile - omitted for duplicate)
[INFO] |  |  +- (org.springframework.plugin:spring-plugin-metadata:jar:1.2.0.RELEASE:compile - omitted for duplicate)
[INFO] |  |  +- (org.springframework.hateoas:spring-hateoas:jar:0.23.0.RELEASE:compile - version managed from 0.18.0.RELEASE; omitted for duplicate)
[INFO] |  |  +- (io.springfox:springfox-spi:jar:2.2.2:compile - omitted for duplicate)
[INFO] |  |  \- (io.springfox:springfox-schema:jar:2.2.2:compile - omitted for duplicate)
[INFO] |  +- com.google.guava:guava:jar:18.0:compile
[INFO] |  +- com.fasterxml:classmate:jar:1.3.3:compile
[INFO] |  +- org.slf4j:slf4j-api:jar:1.7.25:compile
[INFO] |  +- org.aspectj:aspectjrt:jar:1.8.10:compile
[INFO] |  +- org.aspectj:aspectjweaver:jar:1.8.10:compile
[INFO] |  +- org.springframework.plugin:spring-plugin-core:jar:1.2.0.RELEASE:compile
[INFO] |  |  +- (org.springframework:spring-beans:jar:4.3.8.RELEASE:compile - version managed from 4.0.9.RELEASE; omitted for duplicate)
[INFO] |  |  +- (org.springframework:spring-context:jar:4.3.8.RELEASE:compile - version managed from 4.0.9.RELEASE; omitted for duplicate)
[INFO] |  |  +- (org.springframework:spring-aop:jar:4.3.8.RELEASE:compile - version managed from 4.0.9.RELEASE; omitted for duplicate)
[INFO] |  |  \- (org.slf4j:slf4j-api:jar:1.7.25:compile - version managed from 1.7.10; omitted for duplicate)
[INFO] |  +- org.springframework.plugin:spring-plugin-metadata:jar:1.2.0.RELEASE:compile
[INFO] |  |  +- (org.springframework.plugin:spring-plugin-core:jar:1.2.0.RELEASE:compile - omitted for duplicate)
[INFO] |  |  \- (org.slf4j:slf4j-api:jar:1.7.25:compile - version managed from 1.7.10; omitted for duplicate)
[INFO] |  \- org.springframework.hateoas:spring-hateoas:jar:0.23.0.RELEASE:compile
[INFO] |     +- (org.springframework:spring-aop:jar:4.3.8.RELEASE:compile - version managed from 4.3.5.RELEASE; omitted for duplicate)
[INFO] |     +- (org.springframework:spring-beans:jar:4.3.8.RELEASE:compile - version managed from 4.3.5.RELEASE; omitted for duplicate)
[INFO] |     +- (org.springframework:spring-context:jar:4.3.8.RELEASE:compile - version managed from 4.3.5.RELEASE; omitted for duplicate)
[INFO] |     +- (org.springframework:spring-core:jar:4.3.8.RELEASE:compile - version managed from 4.3.5.RELEASE; omitted for duplicate)
[INFO] |     +- (org.springframework:spring-web:jar:4.3.8.RELEASE:compile - version managed from 4.3.5.RELEASE; omitted for duplicate)
[INFO] |     +- (org.springframework:spring-webmvc:jar:4.3.8.RELEASE:compile - version managed from 4.3.5.RELEASE; omitted for duplicate)
[INFO] |     \- (org.slf4j:slf4j-api:jar:1.7.25:compile - version managed from 1.7.22; omitted for duplicate)
[INFO] +- io.springfox:springfox-swagger-ui:jar:2.2.2:compile
[INFO] |  \- (io.springfox:springfox-spring-web:jar:2.2.2:compile - omitted for duplicate)
[INFO] +- org.apache.logging.log4j:log4j-core:jar:2.7:compile
[INFO] |  \- org.apache.logging.log4j:log4j-api:jar:2.7:compile
[INFO] +- org.apache.commons:commons-lang3:jar:3.4:compile
[INFO] \- org.projectlombok:lombok:jar:1.16.16:provided

I just don't know where this error is causing. I implemented other OP's issue which is somehow associated to my current issue but regrettably no luck from my end. Any help guys?

EDIT

After adding hibernate-entityManager dependency in my pom, it created another issue.

Exception caught while initializing context: {0}org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/something-servlet.xml]: Cannot resolve reference to bean 'jpaVendorAdapter' while setting bean property 'jpaVendorAdapter'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jpaVendorAdapter' defined in ServletContext resource [/WEB-INF/something-servlet.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter]: Constructor threw exception; nested exception is java.lang.IllegalStateException: Failed to determine Hibernate PersistenceProvider

Fealrone Alajas
  • 159
  • 1
  • 2
  • 12
  • Hi can you try adding org.hibernate hibernate-entitymanager 5.2.3.Final – Pradeep Aug 21 '17 at 14:35
  • @Pradeep it created another issue. see edited post above. – Fealrone Alajas Aug 21 '17 at 15:32
  • Remove `hibernate-c3p0` you shouldn't need that. Also remove the version for the `hibernate-entitymanager` dependency. Judging from your pom you are trying to use Spring boot but looking at your dependencies and configured plugins you are trying very hard to work around it. Finally as you are shipping hibernate yourself, instead of using the JPA provider from web sphere make sure you have set class loading in WebSphere to parent-last. – M. Deinum Aug 21 '17 at 18:45
  • @M.Deinum removing the version of _hibernate-entitymanager_ , removing _hibernate_-_c3p0_ and setting the class loading in websphere to parent-last still causes **exception is java.lang.NoSuchMethodError: javax/persistence/Table.indexes()[Ljavax/persistence/Index** struggle is real for this. – Fealrone Alajas Aug 22 '17 at 04:25
  • Remove the exclusion of the JPA api. Not sure which JPA version is supported by WebSphere... – M. Deinum Aug 22 '17 at 05:29
  • @M.Deinum done with that. found a link that says the issue lies in the WAS server. https://stackoverflow.com/questions/29476026/deploying-application-using-hibernate-jpa-2-1-to-ibm-websphere-gives-nullpointer https://www.ibm.com/developerworks/community/forums/html/topic?id=f915999f-cbbe-47a4-b419-e63c8b04e830 still doing workaround. ill update this post if am able to proceed deploying my war without any issues. – Fealrone Alajas Aug 22 '17 at 12:11

1 Answers1

0

To those looking for an answer to this question,

we downgraded our JPA from JPA2.1 to JPA2.0 (because WAS8.5 cannot support JPA2.1)

see this table for dependency issues between JPA2.0/JPA2.1 - WAS

because we are using springboot, we removed this dependency

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>

and with the help of dependencyTree in maven, we're able to identify the dependencies attached to the deleted dependency(the one mentioned above) and added these dependencies:

<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-jpa</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-commons</artifactId>
</dependency>

<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>4.1.7.Final</version>
</dependency>

<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>4.1.7.Final</version>

From my understanding, springboot uses the latest version (JPA's latest version is 2.1) thus we did this solution.

Fealrone Alajas
  • 159
  • 1
  • 2
  • 12