Play framework 2.5 JPAApi:java.lang.NoSuchFieldError:NONE

时间:2016-07-13 17:04:32

标签: java hibernate jpa playframework nosuchfieldexception

我正在将我的项目更新为Play 2.5。我正在使用JPAApi来创建本机查询。这是一段代码:

package models;

import javax.persistence.Entity;
import javax.persistence.EntityManager;
import javax.persistence.Id;
import javax.persistence.Query;


import com.avaje.ebean.Model;
import com.avaje.ebean.annotation.Sql;

import play.api.Play;
import play.db.jpa.JPAApi;

@Entity
@Sql
public class PersonModel extends Model {

    private static final long serialVersionUID = 1L;

    @Id
    private Integer id;
    private String firstName;
    private String middleName;
    private String lastName;
    private Integer age;
    public Integer getId() {
        return id;
    }
    public void setId(Integer id) {
        this.id = id;
    }
    public String getFirstName() {
        return firstName;
    }
    public void setFirstName(String firstName) {
        this.firstName = firstName;
    }
    public String getMiddleName() {
        return middleName;
    }
    public void setMiddleName(String middleName) {
        this.middleName = middleName;
    }
    public String getLastName() {
        return lastName;
    }
    public void setLastName(String lastName) {
        this.lastName = lastName;
    }
    public Integer getAge() {
        return age;
    }
    public void setAge(Integer age) {
        this.age = age;
    }
    public static long getSerialversionuid() {
        return serialVersionUID;
    }

    public static void updatePerson(Integer id, String firstName, String middleName, String lastName, Integer age) {
        JPAApi jpaApi = Play.current().injector().instanceOf(JPAApi.class);
        EntityManager em = jpaApi.em();

        Query query = em.createNativeQuery("select FIRST_NAME, MIDDLE_NAME, LAST_NAME, AGE FROM PERSON where ID=:PERSON_ID");
        query.setParameter("PERSON_ID", id);
        ...

但是这段代码崩溃了,例外:

[ERROR] from akka.actor.ActorSystemImpl in application-akka.actor.default-dispatcher-4 - Uncaught fatal error from thread [application-akka.actor.default-dispatcher-3] shutting down ActorSystem [application]
java.lang.NoSuchFieldError: NONE
    at org.hibernate.jpa.spi.AbstractQueryImpl.<init>(AbstractQueryImpl.java:99)
    at org.hibernate.jpa.internal.QueryImpl.<init>(QueryImpl.java:75)
    at org.hibernate.jpa.internal.QueryImpl.<init>(QueryImpl.java:68)
    at org.hibernate.jpa.spi.AbstractEntityManagerImpl.createNativeQuery(AbstractEntityManagerImpl.java:905)
    at models.PersonModel.updatePerson(PersonModel.java:65)
    at router.Routes$$anonfun$routes$1$$anonfun$applyOrElse$5$$anonfun$apply$5.apply(Routes.scala:168)
    at router.Routes$$anonfun$routes$1$$anonfun$applyOrElse$5$$anonfun$apply$5.apply(Routes.scala:168)
    at play.core.routing.HandlerInvokerFactory$$anon$4.resultCall(HandlerInvoker.scala:157)
    at play.core.routing.HandlerInvokerFactory$$anon$4.resultCall(HandlerInvoker.scala:156)
    at play.core.routing.HandlerInvokerFactory$JavaActionInvokerFactory$$anon$14$$anon$3$$anon$1.invocation(HandlerInvoker.scala:136)
    at play.core.j.JavaAction$$anon$1.call(JavaAction.scala:73)
    at play.http.HttpRequestHandler$1.call(HttpRequestHandler.java:54)
    at play.db.jpa.TransactionalAction.lambda$call$4(TransactionalAction.java:28)
    at play.db.jpa.DefaultJPAApi.lambda$withTransaction$3(DefaultJPAApi.java:196)
    at play.db.jpa.DefaultJPAApi.withTransaction(DefaultJPAApi.java:137)
    at play.db.jpa.DefaultJPAApi.withTransaction(DefaultJPAApi.java:195)
    at play.db.jpa.TransactionalAction.call(TransactionalAction.java:25)
    at play.core.j.JavaAction$$anonfun$7.apply(JavaAction.scala:108)
    at play.core.j.JavaAction$$anonfun$7.apply(JavaAction.scala:108)
    at scala.concurrent.impl.Future$PromiseCompletingRunnable.liftedTree1$1(Future.scala:24)
    at scala.concurrent.impl.Future$PromiseCompletingRunnable.run(Future.scala:24)
    at play.core.j.HttpExecutionContext$$anon$2.run(HttpExecutionContext.scala:56)
    at play.api.libs.iteratee.Execution$trampoline$.execute(Execution.scala:70)
    at play.core.j.HttpExecutionContext.execute(HttpExecutionContext.scala:48)
    at scala.concurrent.impl.Future$.apply(Future.scala:31)
    at scala.concurrent.Future$.apply(Future.scala:494)
    at play.core.j.JavaAction.apply(JavaAction.scala:108)
    at play.api.mvc.Action$$anonfun$apply$2$$anonfun$apply$5$$anonfun$apply$6.apply(Action.scala:112)
    at play.api.mvc.Action$$anonfun$apply$2$$anonfun$apply$5$$anonfun$apply$6.apply(Action.scala:112)
    at play.utils.Threads$.withContextClassLoader(Threads.scala:21)
    at play.api.mvc.Action$$anonfun$apply$2$$anonfun$apply$5.apply(Action.scala:111)
    at play.api.mvc.Action$$anonfun$apply$2$$anonfun$apply$5.apply(Action.scala:110)
    at scala.Option.map(Option.scala:146)
    at play.api.mvc.Action$$anonfun$apply$2.apply(Action.scala:110)
    at play.api.mvc.Action$$anonfun$apply$2.apply(Action.scala:103)
    at scala.concurrent.Future$$anonfun$flatMap$1.apply(Future.scala:253)
    at scala.concurrent.Future$$anonfun$flatMap$1.apply(Future.scala:251)
    at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:32)
    at akka.dispatch.BatchingExecutor$AbstractBatch.processBatch(BatchingExecutor.scala:55)
    at akka.dispatch.BatchingExecutor$BlockableBatch$$anonfun$run$1.apply$mcV$sp(BatchingExecutor.scala:91)
    at akka.dispatch.BatchingExecutor$BlockableBatch$$anonfun$run$1.apply(BatchingExecutor.scala:91)
    at akka.dispatch.BatchingExecutor$BlockableBatch$$anonfun$run$1.apply(BatchingExecutor.scala:91)
    at scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:72)
    at akka.dispatch.BatchingExecutor$BlockableBatch.run(BatchingExecutor.scala:90)
    at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:39)
    at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:405)
    at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
    at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
    at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
    at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)

我在我的项目中使用Hibernate作为JPA实现。这是我的build.sbt:

name := "MyProject"

version := "1.0-SNAPSHOT"

lazy val root = (project in file(".")).enablePlugins(PlayJava, PlayEbean)

scalaVersion := "2.11.8"

routesGenerator := StaticRoutesGenerator

libraryDependencies ++= Seq(
  javaJdbc,
  javaJpa,
  "org.hibernate" % "hibernate-entitymanager" % "5.1.0.Final",
  cache,
  javaWs
)

fork in run := true

这是persistence.xml:

<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
             version="2.0">

    <persistence-unit name="defaultPersistenceUnit" >
        <provider>org.hibernate.ejb.HibernatePersistence</provider>
        <non-jta-data-source>DefaultDS</non-jta-data-source>
        <properties>
            <property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5InnoDBDialect"/>
        </properties>
    </persistence-unit>

</persistence>

来自应用程序conf的数据库设置:

# Database configuration
# ~~~~~
# You can declare as many datasources as you want.
# By convention, the default datasource is named `default`
#
db.default.driver=com.mysql.jdbc.Driver
db.default.url="jdbc:mysql://test-box/sleb_db?characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull"
db.default.user=sleb
db.default.password=sleb
#db.default.url="jdbc:mysql://localhost/db?characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull"
#db.default.user=user
#db.default.password=password
db.default.logStatements=true
db.default.partitionCount=20
db.default.maxConnectionsPerPartition=10
db.default.minConnectionsPerPartition=1
db.default.connectionTimeout=3 seconds

#
# You can expose this datasource via JNDI if needed (Useful for JPA)
db.default.jndiName=DefaultDS
jpa.default=defaultPersistenceUnit

# Evolutions
# ~~~~~
# You can disable evolutions if needed
play.evolutions.enabled=false

# Ebean configuration
# ~~~~~
# You can declare as many Ebean servers as you want.
# By convention, the default server is named `default`
#

ebean.default=["models.*"]

我的课程路径:

List(Attributed(G:\Projects\MyProject\lib\apns-1.0.0.Beta7.jar), Attributed(G:\Projects\MyProject\lib\bcprov-jdk15-146.jar), Attributed(G:\Projects\MyProject\lib\dom4j-1.5.2.jar),
  Attributed(G:\Projects\MyProject\lib\EJML.jar), Attributed(G:\Projects\MyProject\lib\httpclient-4.2.3.jar), Attributed(G:\Projects\MyProject\lib\httpcore-4.2.jar), Attributed(G:\Projects\MyProject\lib\JavaPNS_2.2.jar), 
  Attributed(G:\Projects\MyProject\lib\jaxen.jar), Attributed(G:\Projects\MyProject\lib\jboss-client.jar), Attributed(G:\Projects\MyProject\lib\jbossall-client.jar), Attributed(G:\Projects\MyProject\lib\log4j-1.2.13.jar),
  Attributed(G:\Projects\MyProject\lib\mysql-connector-java-5.1.32-bin.jar), Attributed(G:\Projects\MyProject\lib\picketbox-4.0.21.Final.jar), 
  Attributed(C:\Users\sleb\.ivy2\cache\org.scala-lang\scala-library\jars\scala-library-2.11.8.jar), Attributed(C:\Users\sleb\.ivy2\cache\com.typesafe.play\play-enhancer\jars\play-enhancer-1.1.0.jar), 
  (C:\Users\sleb\.ivy2\cache\com.typesafe.play\twirl-api_2.11\jars\twirl-api_2.11-1.1.1.jar), Attributed(C:\Users\sleb\.ivy2\cache\org.apache.commons\commons-lang3\jars\commons-lang3-3.4.jar), 
  Attributed(C:\Users\sleb\.ivy2\cache\org.scala-lang.modules\scala-xml_2.11\bundles\scala-xml_2.11-1.0.1.jar), Attributed(C:\Users\sleb\.ivy2\cache\com.typesafe.play\play-ebean_2.11\jars\play-ebean_2.11-3.0.0.jar), Attributed(C:\Users\sleb\.ivy2\cache\com.typesafe.play\play-java-jdbc_2.11\jars\play-java-jdbc_2.11-2.5.4.jar), Attributed(C:\Users\sleb\.ivy2\cache\com.typesafe.play\play-jdbc_2.11\jars\play-jdbc_2.11-2.5.4.jar), Attributed(C:\Users\sleb\.ivy2\cache\com.typesafe.play\play-jdbc-api_2.11\jars\play-jdbc-api_2.11-2.5.4.jar), Attributed(C:\Users\sleb\.ivy2\cache\com.typesafe.play\play_2.11\jars\play_2.11-2.5.4.jar), 
  Attributed(C:\Users\sleb\.ivy2\cache\com.typesafe.play\build-link\jars\build-link-2.5.4.jar), Attributed(C:\Users\sleb\.ivy2\cache\com.typesafe.play\play-exceptions\jars\play-exceptions-2.5.4.jar), 
  Attributed(C:\Users\sleb\.ivy2\cache\com.typesafe.play\play-iteratees_2.11\jars\play-iteratees_2.11-2.5.4.jar), Attributed(C:\Users\sleb\.ivy2\cache\org.scala-stm\scala-stm_2.11\jars\scala-stm_2.11-0.7.jar), Attributed(C:\Users\sleb\.ivy2\cache\com.typesafe\config\bundles\config-1.3.0.jar), Attributed(C:\Users\sleb\.ivy2\cache\ch.qos.logback\logback-classic\jars\logback-classic-1.1.7.jar), 
  Attributed(C:\Users\sleb\.ivy2\cache\ch.qos.logback\logback-core\jars\logback-core-1.1.7.jar), Attributed(C:\Users\sleb\.ivy2\cache\com.typesafe.play\play-json_2.11\jars\play-json_2.11-2.5.4.jar), 
  Attributed(C:\Users\sleb\.ivy2\cache\com.typesafe.play\play-functional_2.11\jars\play-functional_2.11-2.5.4.jar), Attributed(C:\Users\sleb\.ivy2\cache\com.typesafe.play\play-datacommons_2.11\jars\play-datacommons_2.11-2.5.4.jar), Attributed(C:\Users\sleb\.ivy2\cache\joda-time\joda-time\jars\joda-time-2.9.2.jar), 
  Attributed(C:\Users\sleb\.ivy2\cache\org.joda\joda-convert\jars\joda-convert-1.8.1.jar), Attributed(C:\Users\sleb\.ivy2\cache\org.scala-lang\scala-reflect\jars\scala-reflect-2.11.7.jar), Attributed(C:\Users\sleb\.ivy2\cache\com.fasterxml.jackson.core\jackson-core\bundles\jackson-core-2.7.1.jar), 
  Attributed(C:\Users\sleb\.ivy2\cache\com.fasterxml.jackson.core\jackson-annotations\bundles\jackson-annotations-2.7.1.jar), 
  Attributed(C:\Users\sleb\.ivy2\cache\com.fasterxml.jackson.core\jackson-databind\bundles\jackson-databind-2.7.1.jar), 
  Attributed(C:\Users\sleb\.ivy2\cache\com.fasterxml.jackson.datatype\jackson-datatype-jdk8\bundles\jackson-datatype-jdk8-2.7.1.jar), Attributed(C:\Users\sleb\.ivy2\cache\com.fasterxml.jackson.datatype\jackson-datatype-jsr310\bundles\jackson-datatype-jsr310-2.7.1.jar), 
  Attributed(C:\Users\sleb\.ivy2\cache\com.typesafe.play\play-netty-utils\jars\play-netty-utils-2.5.4.jar), Attributed(C:\Users\sleb\.ivy2\cache\org.slf4j\jul-to-slf4j\jars\jul-to-slf4j-1.7.19.jar), 
  Attributed(C:\Users\sleb\.ivy2\cache\org.slf4j\jcl-over-slf4j\jars\jcl-over-slf4j-1.7.19.jar), Attributed(C:\Users\sleb\.ivy2\cache\com.typesafe.play\play-streams_2.11\jars\play-streams_2.11-2.5.4.jar), 
  Attributed(C:\Users\sleb\.ivy2\cache\org.reactivestreams\reactive-streams\jars\reactive-streams-1.0.0.jar), Attributed(C:\Users\sleb\.ivy2\cache\com.typesafe.akka\akka-stream_2.11\jars\akka-stream_2.11-2.4.4.jar), Attributed(C:\Users\sleb\.ivy2\cache\com.typesafe.akka\akka-actor_2.11\jars\akka-actor_2.11-2.4.4.jar), Attributed(C:\Users\sleb\.ivy2\cache\org.scala-lang.modules\scala-java8-compat_2.11\bundles\scala-java8-compat_2.11-0.7.0.jar), Attributed(C:\Users\sleb\.ivy2\cache\com.typesafe\ssl-config-akka_2.11\bundles\ssl-config-akka_2.11-0.2.1.jar), 
  Attributed(C:\Users\sleb\.ivy2\cache\com.typesafe\ssl-config-core_2.11\bundles\ssl-config-core_2.11-0.2.1.jar), Attributed(C:\Users\sleb\.ivy2\cache\org.scala-lang.modules\scala-parser-combinators_2.11\bundles\scala-parser-combinators_2.11-1.0.4.jar), Attributed(C:\Users\sleb\.ivy2\cache\com.typesafe.akka\akka-slf4j_2.11\jars\akka-slf4j_2.11-2.4.4.jar), Attributed(C:\Users\sleb\.ivy2\cache\commons-codec\commons-codec\jars\commons-codec-1.10.jar), 
  Attributed(C:\Users\sleb\.ivy2\cache\xerces\xercesImpl\jars\xercesImpl-2.11.0.jar), Attributed(C:\Users\sleb\.ivy2\cache\xml-apis\xml-apis\jars\xml-apis-1.4.01.jar), 
  Attributed(C:\Users\sleb\.ivy2\cache\javax.transaction\jta\jars\jta-1.1.jar), Attributed(C:\Users\sleb\.ivy2\cache\com.google.inject\guice\jars\guice-4.0.jar), 
  Attributed(C:\Users\sleb\.ivy2\cache\javax.inject\javax.inject\jars\javax.inject-1.jar), Attributed(C:\Users\sleb\.ivy2\cache\aopalliance\aopalliance\jars\aopalliance-1.0.jar), 
  Attributed(C:\Users\sleb\.ivy2\cache\com.google.inject.extensions\guice-assistedinject\jars\guice-assistedinject-4.0.jar), Attributed(C:\Users\sleb\.ivy2\cache\com.jolbox\bonecp\bundles\bonecp-0.8.0.RELEASE.jar), Attributed(C:\Users\sleb\.ivy2\cache\com.zaxxer\HikariCP\bundles\HikariCP-2.4.3.jar), Attributed(C:\Users\sleb\.ivy2\cache\com.googlecode.usc\jdbcdslog\jars\jdbcdslog-1.0.6.2.jar), 
  Attributed(C:\Users\sleb\.ivy2\cache\com.h2database\h2\jars\h2-1.4.191.jar), Attributed(C:\Users\sleb\.ivy2\cache\tyrex\tyrex\jars\tyrex-1.0.1.jar), 
  Attributed(C:\Users\sleb\.ivy2\cache\com.typesafe.play\play-java_2.11\jars\play-java_2.11-2.5.4.jar), Attributed(C:\Users\sleb\.ivy2\cache\org.yaml\snakeyaml\bundles\snakeyaml-1.16.jar), 
  Attributed(C:\Users\sleb\.ivy2\cache\org.hibernate\hibernate-validator\jars\hibernate-validator-5.2.4.Final.jar), Attributed(C:\Users\sleb\.ivy2\cache\javax.validation\validation-api\jars\validation-api-1.1.0.Final.jar), Attributed(C:\Users\sleb\.ivy2\cache\javax.el\javax.el-api\jars\javax.el-api-3.0.0.jar), Attributed(C:\Users\sleb\.ivy2\cache\org.springframework\spring-context\jars\spring-context-4.2.4.RELEASE.jar), 
  Attributed(C:\Users\sleb\.ivy2\cache\org.springframework\spring-core\jars\spring-core-4.2.4.RELEASE.jar), Attributed(C:\Users\sleb\.ivy2\cache\org.springframework\spring-beans\jars\spring-beans-4.2.4.RELEASE.jar),
  Attributed(C:\Users\sleb\.ivy2\cache\org.reflections\reflections\jars\reflections-0.9.10.jar), Attributed(C:\Users\sleb\.ivy2\cache\com.google.guava\guava\bundles\guava-19.0.jar), 
  Attributed(C:\Users\sleb\.ivy2\cache\net.jodah\typetools\bundles\typetools-0.4.4.jar), Attributed(C:\Users\sleb\.ivy2\cache\com.google.code.findbugs\jsr305\jars\jsr305-3.0.1.jar), 
  Attributed(C:\Users\sleb\.ivy2\cache\org.apache.tomcat\tomcat-servlet-api\jars\tomcat-servlet-api-8.0.33.jar), Attributed(C:\Users\sleb\.ivy2\cache\com.typesafe.play\play-jdbc-evolutions_2.11\jars\play-jdbc-evolutions_2.11-2.5.0.jar), Attributed(C:\Users\sleb\.ivy2\cache\org.avaje.ebeanorm\avaje-ebeanorm\jars\avaje-ebeanorm-6.18.1.jar), Attributed(C:\Users\sleb\.ivy2\cache\org.jetbrains\annotations\jars\annotations-13.0.jar), 
  Attributed(C:\Users\sleb\.ivy2\cache\javax.persistence\persistence-api\jars\persistence-api-1.0.jar), Attributed(C:\Users\sleb\.ivy2\cache\org.avaje.ebeanorm\avaje-ebeanorm-agent\jars\avaje-ebeanorm-agent-4.9.1.jar),
  Attributed(C:\Users\sleb\.ivy2\cache\com.typesafe.play\play-server_2.11\jars\play-server_2.11-2.5.4.jar), Attributed(C:\Users\sleb\.ivy2\cache\com.typesafe.play\play-netty-server_2.11\jars\play-netty-server_2.11-2.5.4.jar), 
  Attributed(C:\Users\sleb\.ivy2\cache\com.typesafe.netty\netty-reactive-streams-http\jars\netty-reactive-streams-http-1.0.6.jar), 
  Attributed(C:\Users\sleb\.ivy2\cache\com.typesafe.netty\netty-reactive-streams\jars\netty-reactive-streams-1.0.6.jar), Attributed(C:\Users\sleb\.ivy2\cache\io.netty\netty-handler\jars\netty-handler-4.0.36.Final.jar),
  Attributed(C:\Users\sleb\.ivy2\cache\io.netty\netty-buffer\jars\netty-buffer-4.0.36.Final.jar), Attributed(C:\Users\sleb\.ivy2\cache\io.netty\netty-common\jars\netty-common-4.0.36.Final.jar), 
  Attributed(C:\Users\sleb\.ivy2\cache\io.netty\netty-transport\jars\netty-transport-4.0.36.Final.jar), Attributed(C:\Users\sleb\.ivy2\cache\io.netty\netty-codec\jars\netty-codec-4.0.36.Final.jar), 
  Attributed(C:\Users\sleb\.ivy2\cache\io.netty\netty-codec-http\jars\netty-codec-http-4.0.36.Final.jar), Attributed(C:\Users\sleb\.ivy2\cache\io.netty\netty-transport-native-epoll\jars\netty-transport-native-epoll-4.0.36.Final-linux-x86_64.jar), Attributed(C:\Users\sleb\.ivy2\cache\com.typesafe.play\play-logback_2.11\jars\play-logback_2.11-2.5.4.jar), Attributed(C:\Users\sleb\.ivy2\cache\com.typesafe.play\play-java-jpa_2.11\jars\play-java-jpa_2.11-2.5.4.jar), 
  Attributed(C:\Users\sleb\.ivy2\cache\org.hibernate.javax.persistence\hibernate-jpa-2.1-api\jars\hibernate-jpa-2.1-api-1.0.0.Final.jar), 
  Attributed(C:\Users\ \.ivy2\cache\org.hibernate\hibernate-entitymanager\jars\hibernate-entitymanager-5.1.0.Final.jar), Attributed(C:\Users\sleb\.ivy2\cache\org.jboss.logging\jboss-logging\jars\jboss-logging-3.3.0.Final.jar),
  Attributed(C:\Users\sleb\.ivy2\cache\org.hibernate\hibernate-core\jars\hibernate-core-5.1.0.Final.jar), Attributed(C:\Users\sleb\.ivy2\cache\org.javassist\javassist\bundles\javassist-3.20.0-GA.jar), 
  Attributed(C:\Users\sleb\.ivy2\cache\antlr\antlr\jars\antlr-2.7.7.jar), Attributed(C:\Users\sleb\.ivy2\cache\org.apache.geronimo.specs\geronimo-jta_1.1_spec\jars\geronimo-jta_1.1_spec-1.1.1.jar), 
  Attributed(C:\Users\sleb\.ivy2\cache\org.jboss\jandex\bundles\jandex-2.0.0.Final.jar), Attributed(C:\Users\sleb\.ivy2\cache\com.fasterxml\classmate\bundles\classmate-1.3.0.jar), 
  Attributed(C:\Users\sleb\.ivy2\cache\dom4j\dom4j\jars\dom4j-1.6.1.jar), Attributed(C:\Users\sleb\.ivy2\cache\org.hibernate.common\hibernate-commons-annotations\jars\hibernate-commons-annotations-5.0.1.Final.jar), 
  Attributed(C:\Users\sleb\.ivy2\cache\com.typesafe.play\play-cache_2.11\jars\play-cache_2.11-2.5.4.jar), Attributed(C:\Users\sleb\.ivy2\cache\net.sf.ehcache\ehcache-core\jars\ehcache-core-2.6.11.jar), 
  Attributed(C:\Users\sleb\.ivy2\cache\com.typesafe.play\play-java-ws_2.11\jars\play-java-ws_2.11-2.5.4.jar), Attributed(C:\Users\sleb\.ivy2\cache\com.typesafe.play\play-ws_2.11\jars\play-ws_2.11-2.5.4.jar), 
  Attributed(C:\Users\sleb\.ivy2\cache\org.asynchttpclient\async-http-client\jars\async-http-client-2.0.2.jar), Attributed(C:\Users\sleb\.ivy2\cache\org.asynchttpclient\netty-resolver-dns\jars\netty-resolver-dns-2.0.2.jar), 
  Attributed(C:\Users\sleb\.ivy2\cache\org.asynchttpclient\netty-resolver\jars\netty-resolver-2.0.2.jar), Attributed(C:\Users\sleb\.ivy2\cache\org.slf4j\slf4j-api\jars\slf4j-api-1.7.21.jar), 
  Attributed(C:\Users\sleb\.ivy2\cache\org.asynchttpclient\netty-codec-dns\jars\netty-codec-dns-2.0.2.jar), Attributed(C:\Users\sleb\.ivy2\cache\oauth.signpost\signpost-core\jars\signpost-core-1.2.1.2.jar), 
  Attributed(C:\Users\sleb\.ivy2\cache\oauth.signpost\signpost-commonshttp4\jars\signpost-commonshttp4-1.2.1.2.jar), Attributed(C:\Users\sleb\.ivy2\cache\org.apache.httpcomponents\httpcore\jars\httpcore-4.0.1.jar), Attributed(C:\Users\sleb\.ivy2\cache\org.apache.httpcomponents\httpclient\jars\httpclient-4.0.1.jar), Attributed(C:\Users\sleb\.ivy2\cache\commons-logging\commons-logging\jars\commons-logging-1.1.1.jar))

你能帮我解决这个问题吗?

1 个答案:

答案 0 :(得分:0)

我通过在build.sbt和plugins.sbt中添加以下行来解决了这个问题:

excludeDependencies += "javax.persistence" % "persistence-api"