0

我有一个 Maven-JSF 2.2 应用程序。我正在使用 Tomcat 7.x 在本地电脑上部署我的应用程序。在连接到数据库时,Tomcat 需要花费大量时间来部署。我的互联网连接速度非常快。顺便说一句,我的应用程序现在无法构建,它突然停止工作。我正在使用最终的休眠 api,并且该应用程序使用以下休眠配置运行。这个问题的原因应该是什么?

休眠依赖:

<dependency>
    <groupId>org.hibernate</groupId>
    <artifactId>hibernate-core</artifactId>
    <version>4.2.3.Final</version>
</dependency>
<dependency>
    <groupId>org.hibernate</groupId>
    <artifactId>hibernate-validator</artifactId>
    <version>4.3.1.Final</version>
</dependency>
<dependency>
    <groupId>org.hibernate.common</groupId>
    <artifactId>hibernate-commons-annotations</artifactId>
    <version>4.0.2.Final</version>
</dependency>
<dependency>
    <groupId>org.hibernate.javax.persistence</groupId>
    <artifactId>hibernate-jpa-2.0-api</artifactId>
    <version>1.0.1.Final</version>
</dependency>
<dependency>
    <groupId>org.hibernate</groupId>
    <artifactId>hibernate-entitymanager</artifactId>
    <version>4.2.1.Final</version>
</dependency>
<dependency>
    <groupId>javax.validation</groupId>
    <artifactId>validation-api</artifactId>
    <version>1.1.0.Final</version>
</dependency>
<dependency>
    <groupId>org.slf4j</groupId>
    <artifactId>slf4j-api</artifactId>
    <version>1.7.5</version>
</dependency>
<dependency>
    <groupId>org.slf4j</groupId>
    <artifactId>slf4j-log4j12</artifactId>
    <version>1.7.5</version>
</dependency>

这是完整的堆栈跟踪:

Ağu 21, 2013 10:30:07 AM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre7\bin;C:\windows\Sun\Java\bin;C:\windows\system32;C:\windows;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Program Files (x86)\AMD APP\bin\x86;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files\Java\jdk1.7.0_05\bin;D:\tools\apache-maven-3.0.4\bin;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\gputils\bin;C:\Program Files (x86)\SDCC\bin;.
Ağu 21, 2013 10:30:08 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:MtsTrackerWeb' did not find a matching property.
Ağu 21, 2013 10:30:08 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Ağu 21, 2013 10:30:08 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Ağu 21, 2013 10:30:08 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2032 ms
Ağu 21, 2013 10:30:09 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Ağu 21, 2013 10:30:09 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.28
Ağu 21, 2013 10:30:10 AM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class com.omega.src.util.InitializeListener
java.lang.NoClassDefFoundError: org/hibernate/HibernateException
    at com.omega.src.util.InitializeListener.contextInitialized(InitializeListener.java:21)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4790)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5284)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1595)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1585)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.hibernate.HibernateException
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1711)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1556)
    ... 11 more

Ağu 21, 2013 10:30:10 AM com.sun.faces.config.ConfigureListener contextInitialized
INFO: Initializing Mojarra 2.2.1 ( 20130709-1453 https://svn.java.net/svn/mojarra~svn/tags/2.2.1@12065) for context '/MtsTrackerWeb'
Ağu 21, 2013 10:30:12 AM com.sun.faces.spi.InjectionProviderFactory createInstance
INFO: JSF1048: PostConstruct/PreDestroy annotations present.  ManagedBeans methods marked with these annotations will have said annotations processed.
Ağu 21, 2013 10:30:16 AM com.sun.faces.config.ConfigureListener$WebConfigResourceMonitor$Monitor <init>
INFO: Monitoring jndi:/localhost/MtsTrackerWeb/WEB-INF/faces-config.xml for modifications
Ağu 21, 2013 10:30:16 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
Ağu 21, 2013 10:30:16 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/MtsTrackerWeb] startup failed due to previous errors
Ağu 21, 2013 10:30:16 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Ağu 21, 2013 10:30:16 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Ağu 21, 2013 10:30:16 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 7645 ms
4

0 回答 0