Maven

时间:2017-10-23 09:04:06

标签: java

我试图在Maven中使用Hibernate,但我收到了错误。它似乎是由Caused by: java.lang.NoClassDefFoundError: org/hibernate/HibernateException引起的,但我依赖于我的pom.xml。那么问题是什么?

的pom.xml

<?xml version="1.0" encoding="UTF-8"?>
  <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>com.atp</groupId>
<artifactId>ATP_UI</artifactId>
<version>1.0-0</version>

<properties>
    <maven.compiler.target>1.8</maven.compiler.target>
    <maven.compiler.source>1.8</maven.compiler.source>
</properties>

<dependencies>
    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-core</artifactId>
        <version>5.2.10.Final</version>
    </dependency>
    <dependency>
        <groupId>com.github.docker-java</groupId>
        <artifactId>docker-java</artifactId>
        <!-- use latest version https://github.com/docker-java/docker-java/releases -->
        <version>3.0.14</version>
    </dependency>
    <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>javax.servlet-api</artifactId>
        <version>3.0.1</version>
    </dependency>
    <!-- https://mvnrepository.com/artifact/org.gitlab/java-gitlab-api -->
    <dependency>
        <groupId>org.gitlab</groupId>
        <artifactId>java-gitlab-api</artifactId>
        <version>1.2.8</version>
    </dependency>
    <dependency>
        <groupId>commons-lang</groupId>
        <artifactId>commons-lang</artifactId>
        <version>2.6</version>
    </dependency>
    <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-lang3</artifactId>
        <version>3.1</version>
    </dependency>
</dependencies>

ERROR:

  

连接服务器[2017-10-23 09:58:56,822]神器ATP_UI:战争   爆炸:正在部署神器,请等待...... 2017年第23期   上午9:58:56 org.apache.catalina.deploy.WebXml setVersion警告:   未知版本字符串[3.1]。将使用默认版本。出23,   2017 9:58:57 am org.apache.catalina.core.ContainerBase   addChildInternal SEVERE:ContainerBase.addChild:start:   org.apache.catalina.LifecycleException:无法启动组件   [StandardEngine [卡塔利娜] .StandardHost [本地主机] .StandardContext []]     在   org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:162)     在   org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:1015)     在   org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:991)     在   org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)     在   org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1899)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at   sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)     在   sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     在java.lang.reflect.Method.invoke(Method.java:498)at   org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)     在   com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)     在   com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)     在   org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:618)     在   org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:565)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at   sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)     在   sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     在java.lang.reflect.Method.invoke(Method.java:498)at   org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)     在   com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)     在   com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)     在   javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468)     在   javax.management.remote.rmi.RMIConnectionImpl.access $ 300(RMIConnectionImpl.java:76)     在   javax.management.remote.rmi.RMIConnectionImpl $ PrivilegedOperation.run(RMIConnectionImpl.java:1309)     在   javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1401)     在   javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:829)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at   sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)     在   sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     在java.lang.reflect.Method.invoke(Method.java:498)at   sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:357)     在sun.rmi.transport.Transport $ 1.run(Transport.java:200)at   sun.rmi.transport.Transport $ 1.run(Transport.java:197)at   java.security.AccessController.doPrivileged(Native Method)at   sun.rmi.transport.Transport.serviceCall(Transport.java:196)at   sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)     在   sun.rmi.transport.tcp.TCPTransport $ ConnectionHandler.run0(TCPTransport.java:826)     在   sun.rmi.transport.tcp.TCPTransport $ ConnectionHandler.lambda $运行$ 0(TCPTransport.java:683)     在java.security.AccessController.doPrivileged(Native Method)at   sun.rmi.transport.tcp.TCPTransport $ ConnectionHandler.run(TCPTransport.java:682)     在   java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)     在   java.util.concurrent.ThreadPoolExecutor中的$ Worker.run(ThreadPoolExecutor.java:624)     在java.lang.Thread.run(Thread.java:748)引起:   java.lang.NoClassDefFoundError:org / hibernate / HibernateException at   java.lang.Class.getDeclaredFields0(Native Method)at   java.lang.Class.privateGetDeclaredFields(Class.java:2583)at at   java.lang.Class.getDeclaredFields(Class.java:1916)at   org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:106)     在   org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:270)     在   org.apache.catalina.startup.WebAnnotationSet.loadApplicationServletAnnotations(WebAnnotationSet.java:139)     在   org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:65)     在   org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:417)     在   org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:891)     在   org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:388)     在   org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)     在   org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)     在   org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5519)     在   org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)     ... 42更多引起:java.lang.ClassNotFoundException:   org.hibernate.HibernateException at   org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1892)     在   org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1735)     ......还有56个

     

out 23,2017 9:58:57 AM org.apache.tomcat.util.modeler.BaseModelMBean   调用SEVERE:异常调用方法manageApp   java.lang.IllegalStateException:ContainerBase.addChild:start:   org.apache.catalina.LifecycleException:无法启动组件   [StandardEngine [卡塔利娜] .StandardHost [本地主机] .StandardContext []]     在   org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:1019)     在   org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:991)     在   org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)     在   org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1899)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at   sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)     在   sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     在java.lang.reflect.Method.invoke(Method.java:498)at   org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)     在   com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)     在   com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)     在   org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:618)     在   org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:565)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at   sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)     在   sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     在java.lang.reflect.Method.invoke(Method.java:498)at   org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)     在   com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)     在   com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)     在   javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468)     在   javax.management.remote.rmi.RMIConnectionImpl.access $ 300(RMIConnectionImpl.java:76)     在   javax.management.remote.rmi.RMIConnectionImpl $ PrivilegedOperation.run(RMIConnectionImpl.java:1309)     在   javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1401)     在   javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:829)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at   sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)     在   sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     在java.lang.reflect.Method.invoke(Method.java:498)at   sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:357)     在sun.rmi.transport.Transport $ 1.run(Transport.java:200)at   sun.rmi.transport.Transport $ 1.run(Transport.java:197)at   java.security.AccessController.doPrivileged(Native Method)at   sun.rmi.transport.Transport.serviceCall(Transport.java:196)at   sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)     在   sun.rmi.transport.tcp.TCPTransport $ ConnectionHandler.run0(TCPTransport.java:826)     在   sun.rmi.transport.tcp.TCPTransport $ ConnectionHandler.lambda $运行$ 0(TCPTransport.java:683)     在java.security.AccessController.doPrivileged(Native Method)at   sun.rmi.transport.tcp.TCPTransport $ ConnectionHandler.run(TCPTransport.java:682)     在   java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)     在   java.util.concurrent.ThreadPoolExecutor中的$ Worker.run(ThreadPoolExecutor.java:624)     在java.lang.Thread.run(Thread.java:748)

     

out 23,2017 9:58:57 AM org.apache.tomcat.util.modeler.BaseModelMBean   调用SEVERE:异常调用方法createStandardContext   javax.management.RuntimeOperationsException:异常调用方法   manageApp at   org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:309)     在   com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)     在   com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)     在   org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:618)     在   org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:565)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at   sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)     在   sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     在java.lang.reflect.Method.invoke(Method.java:498)at   org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)     在   com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)     在   com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)     在   javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468)     在   javax.management.remote.rmi.RMIConnectionImpl.access $ 300(RMIConnectionImpl.java:76)     在   javax.management.remote.rmi.RMIConnectionImpl $ PrivilegedOperation.run(RMIConnectionImpl.java:1309)     在   javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1401)     在   javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:829)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at   sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)     在   sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     在java.lang.reflect.Method.invoke(Method.java:498)at   sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:357)     在sun.rmi.transport.Transport $ 1.run(Transport.java:200)at   sun.rmi.transport.Transport $ 1.run(Transport.java:197)at   java.security.AccessController.doPrivileged(Native Method)at   sun.rmi.transport.Transport.serviceCall(Transport.java:196)at   sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)     在   sun.rmi.transport.tcp.TCPTransport $ ConnectionHandler.run0(TCPTransport.java:826)     在   sun.rmi.transport.tcp.TCPTransport $ ConnectionHandler.lambda $运行$ 0(TCPTransport.java:683)     在java.security.AccessController.doPrivileged(Native Method)at   sun.rmi.transport.tcp.TCPTransport $ ConnectionHandler.run(TCPTransport.java:682)     在   java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)     在   java.util.concurrent.ThreadPoolExecutor中的$ Worker.run(ThreadPoolExecutor.java:624)     在java.lang.Thread.run(Thread.java:748)引起:   java.lang.IllegalStateException:ContainerBase.addChild:start:   org.apache.catalina.LifecycleException:无法启动组件   [StandardEngine [卡塔利娜] .StandardHost [本地主机] .StandardContext []]     在   org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:1019)     在   org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:991)     在   org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)     在   org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1899)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at   sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)     在   sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     在java.lang.reflect.Method.invoke(Method.java:498)at   org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)     ......还有33个

0 个答案:

没有答案