spring boot : error when add spring-boot-starter-data-jpa dependency -
when add simple spring-boot-starter-data-jpa dependency in pom.xml, got error in pom.xml file. if remove dependency there no more errors. no sure why happening, because trying execute simple jpa example. haven't had problems if add others starters dependencies, have problems specific starter.
i using spring sts 3.7.0 develop tests.
use jdk 8.0.0.60
thank help.
my pom.xml (i removed links in header because dont have enought reputatios post ilimited links)
<?xml version="1.0" encoding="utf-8"?> <project xmlns="(maven link)" xmlns:xsi="(w3 link)" xsi:schemalocation="link"> <modelversion>4.0.0</modelversion> <groupid>org.test</groupid> <artifactid>demo</artifactid> <version>0.0.1-snapshot</version> <packaging>jar</packaging> <name>demo</name> <description>demo project spring boot</description> <parent> <groupid>org.springframework.boot</groupid> <artifactid>spring-boot-starter-parent</artifactid> <version>1.2.6.release</version> <relativepath/> <!-- lookup parent repository --> </parent> <properties> <project.build.sourceencoding>utf-8</project.build.sourceencoding> <java.version>1.8</java.version> </properties> <dependencies> <dependency> <groupid>org.springframework.boot</groupid> <artifactid>spring-boot-starter-data-jpa</artifactid> </dependency> <dependency> <groupid>org.springframework.boot</groupid> <artifactid>spring-boot-starter-test</artifactid> <scope>test</scope> </dependency> </dependencies> <build> <plugins> <plugin> <groupid>org.springframework.boot</groupid> <artifactid>spring-boot-maven-plugin</artifactid> </plugin> </plugins> </build> </project>
exception
org.eclipse.aether.transfer.artifacttransferexception: failure transfer org.hibernate:hibernate-core:jar:4.3.11.final https://repo.maven.apache.org/maven2 cached in local repository, resolution not reattempted until update interval of central has elapsed or updates forced. original error: not transfer artifact org.hibernate:hibernate-core:jar:4.3.11.final from/to central (https://repo.maven.apache.org/maven2): operation cancelled. @ org.eclipse.aether.internal.impl.defaultupdatecheckmanager.newexception(defaultupdatecheckmanager.java:238) @ org.eclipse.aether.internal.impl.defaultupdatecheckmanager.checkartifact(defaultupdatecheckmanager.java:206) @ org.eclipse.aether.internal.impl.defaultartifactresolver.gatherdownloads(defaultartifactresolver.java:585) @ org.eclipse.aether.internal.impl.defaultartifactresolver.performdownloads(defaultartifactresolver.java:503) @ org.eclipse.aether.internal.impl.defaultartifactresolver.resolve(defaultartifactresolver.java:421) @ org.eclipse.aether.internal.impl.defaultartifactresolver.resolveartifacts(defaultartifactresolver.java:246) @ org.eclipse.aether.internal.impl.defaultrepositorysystem.resolvedependencies(defaultrepositorysystem.java:367) @ org.apache.maven.project.defaultprojectdependenciesresolver.resolve(defaultprojectdependenciesresolver.java:205) @ org.apache.maven.project.defaultprojectbuilder.resolvedependencies(defaultprojectbuilder.java:215) @ org.apache.maven.project.defaultprojectbuilder.build(defaultprojectbuilder.java:188) @ org.apache.maven.project.defaultprojectbuilder.build(defaultprojectbuilder.java:119) @ org.eclipse.m2e.core.internal.embedder.mavenimpl.readmavenproject(mavenimpl.java:636) @ org.eclipse.m2e.core.internal.project.registry.defaultmavendependencyresolver.resolveprojectdependencies(defaultmavendependencyresolver.java:63) @ org.eclipse.m2e.core.internal.project.registry.projectregistrymanager.refreshphase2(projectregistrymanager.java:529) @ org.eclipse.m2e.core.internal.project.registry.projectregistrymanager$3.call(projectregistrymanager.java:491) @ org.eclipse.m2e.core.internal.project.registry.projectregistrymanager$3.call(projectregistrymanager.java:1) @ org.eclipse.m2e.core.internal.embedder.mavenexecutioncontext.executebare(mavenexecutioncontext.java:176) @ org.eclipse.m2e.core.internal.embedder.mavenexecutioncontext.execute(mavenexecutioncontext.java:151) @ org.eclipse.m2e.core.internal.project.registry.projectregistrymanager.refresh(projectregistrymanager.java:495) @ org.eclipse.m2e.core.internal.project.registry.projectregistrymanager.refresh(projectregistrymanager.java:350) @ org.eclipse.m2e.core.internal.project.registry.projectregistrymanager.refresh(projectregistrymanager.java:297) @ org.eclipse.m2e.core.internal.builder.mavenbuilder$buildmethod.getprojectfacade(mavenbuilder.java:154) @ org.eclipse.m2e.core.internal.builder.mavenbuilder$buildmethod$1.call(mavenbuilder.java:89) @ org.eclipse.m2e.core.internal.embedder.mavenexecutioncontext.executebare(mavenexecutioncontext.java:176) @ org.eclipse.m2e.core.internal.embedder.mavenexecutioncontext.execute(mavenexecutioncontext.java:151) @ org.eclipse.m2e.core.internal.embedder.mavenexecutioncontext.execute(mavenexecutioncontext.java:99) @ org.eclipse.m2e.core.internal.builder.mavenbuilder$buildmethod.execute(mavenbuilder.java:86) @ org.eclipse.m2e.core.internal.builder.mavenbuilder.build(mavenbuilder.java:200) @ org.eclipse.core.internal.events.buildmanager$2.run(buildmanager.java:734) @ org.eclipse.core.runtime.saferunner.run(saferunner.java:42) @ org.eclipse.core.internal.events.buildmanager.basicbuild(buildmanager.java:205) @ org.eclipse.core.internal.events.buildmanager.basicbuild(buildmanager.java:245) @ org.eclipse.core.internal.events.buildmanager$1.run(buildmanager.java:300) @ org.eclipse.core.runtime.saferunner.run(saferunner.java:42) @ org.eclipse.core.internal.events.buildmanager.basicbuild(buildmanager.java:303) @ org.eclipse.core.internal.events.buildmanager.basicbuildloop(buildmanager.java:359) @ org.eclipse.core.internal.events.buildmanager.build(buildmanager.java:382) @ org.eclipse.core.internal.events.autobuildjob.dobuild(autobuildjob.java:144) @ org.eclipse.core.internal.events.autobuildjob.run(autobuildjob.java:235) @ org.eclipse.core.internal.jobs.worker.run(worker.java:55) failure transfer org.hibernate:hibernate-core:jar:4.3.11.final cached in local repository, resolution not reattempted until update interval of spring-ext has elapsed or updates forced. original error: not transfer artifact org.hibernate:hibernate-core:jar:4.3.11.final from/to spring-ext : operation cancelled. org.eclipse.aether.transfer.artifacttransferexception: failure transfer org.hibernate:hibernate-core:jar:4.3.11.final (url spring edited) cached in local repository, resolution not reattempted until update interval of spring-ext has elapsed or updates forced. original error: not transfer artifact org.hibernate:hibernate-core:jar:4.3.11.final from/to spring-ext (url spring edited): operation cancelled. @ org.eclipse.aether.internal.impl.defaultupdatecheckmanager.newexception(defaultupdatecheckmanager.java:238) @ org.eclipse.aether.internal.impl.defaultupdatecheckmanager.checkartifact(defaultupdatecheckmanager.java:206) @ org.eclipse.aether.internal.impl.defaultartifactresolver.gatherdownloads(defaultartifactresolver.java:585) @ org.eclipse.aether.internal.impl.defaultartifactresolver.performdownloads(defaultartifactresolver.java:503) @ org.eclipse.aether.internal.impl.defaultartifactresolver.resolve(defaultartifactresolver.java:421) @ org.eclipse.aether.internal.impl.defaultartifactresolver.resolveartifacts(defaultartifactresolver.java:246) @ org.eclipse.aether.internal.impl.defaultrepositorysystem.resolvedependencies(defaultrepositorysystem.java:367) @ org.apache.maven.project.defaultprojectdependencies[![enter image description here][1]][1]resolver.resolve(defaultprojectdependenciesresolver.java:205) @ org.apache.maven.project.defaultprojectbuilder.resolvedependencies(defaultprojectbuilder.java:215) @ org.apache.maven.project.defaultprojectbuilder.build(defaultprojectbuilder.java:188) @ org.apache.maven.project.defaultprojectbuilder.build(defaultprojectbuilder.java:119) @ org.eclipse.m2e.core.internal.embedder.mavenimpl.readmavenproject(mavenimpl.java:636) @ org.eclipse.m2e.core.internal.project.registry.defaultmavendependencyresolver.resolveprojectdependencies(defaultmavendependencyresolver.java:63) @ org.eclipse.m2e.core.internal.project.registry.projectregistrymanager.refreshphase2(projectregistrymanager.java:529) @ org.eclipse.m2e.core.internal.project.registry.projectregistrymanager$3.call(projectregistrymanager.java:491) @ org.eclipse.m2e.core.internal.project.registry.projectregistrymanager$3.call(projectregistrymanager.java:1) @ org.eclipse.m2e.core.internal.embedder.mavenexecutioncontext.executebare(mavenexecutioncontext.java:176) @ org.eclipse.m2e.core.internal.embedder.mavenexecutioncontext.execute(mavenexecutioncontext.java:151) @ org.eclipse.m2e.core.internal.project.registry.projectregistrymanager.refresh(projectregistrymanager.java:495) @ org.eclipse.m2e.core.internal.project.registry.projectregistrymanager.refresh(projectregistrymanager.java:350) @ org.eclipse.m2e.core.internal.project.registry.projectregistrymanager.refresh(projectregistrymanager.java:297) @ org.eclipse.m2e.core.internal.builder.mavenbuilder$buildmethod.getprojectfacade(mavenbuilder.java:154) @ org.eclipse.m2e.core.internal.builder.mavenbuilder$buildmethod$1.call(mavenbuilder.java:89) @ org.eclipse.m2e.core.internal.embedder.mavenexecutioncontext.executebare(mavenexecutioncontext.java:176) @ org.eclipse.m2e.core.internal.embedder.mavenexecutioncontext.execute(mavenexecutioncontext.java:151) @ org.eclipse.m2e.core.internal.embedder.mavenexecutioncontext.execute(mavenexecutioncontext.java:99) @ org.eclipse.m2e.core.internal.builder.mavenbuilder$buildmethod.execute(mavenbuilder.java:86) @ org.eclipse.m2e.core.internal.builder.mavenbuilder.build(mavenbuilder.java:200) @ org.eclipse.core.internal.events.buildmanager$2.run(buildmanager.java:734) @ org.eclipse.core.runtime.saferunner.run(saferunner.java:42) @ org.eclipse.core.internal.events.buildmanager.basicbuild(buildmanager.java:205) @ org.eclipse.core.internal.events.buildmanager.basicbuild(buildmanager.java:245) @ org.eclipse.core.internal.events.buildmanager$1.run(buildmanager.java:300) @ org.eclipse.core.runtime.saferunner.run(saferunner.java:42) @ org.eclipse.core.internal.events.buildmanager.basicbuild(buildmanager.java:303) @ org.eclipse.core.internal.events.buildmanager.basicbuildloop(buildmanager.java:359) @ org.eclipse.core.internal.events.buildmanager.build(buildmanager.java:382) @ org.eclipse.core.internal.events.autobuildjob.dobuild(autobuildjob.java:144) @ org.eclipse.core.internal.events.autobuildjob.run(autobuildjob.java:235) @ org.eclipse.core.internal.jobs.worker.run(worker.java:55)
your maven configurations in eclipse ide may misconfigured when running spring boot application. in order resolve problem need provide more information on setup, or can use maven command line more information.
from terminal, navigate directory of pom.xml
file. run following command.
$ mvn clean install
note output , if build successful can use maven spring-boot plugin run application. use following maven command:
$ mvn spring-boot:run
Comments
Post a Comment