hibernate Apache:配置应用程序监听程序时出错

os8fio9y  于 2022-11-30  发布在  Apache
关注(0)|答案(4)|浏览(200)

I'm facing with this problem when I try to run the application:
WARNING: [SetContextPropertiesRule]{Context} Setting property 'source' to 'org.eclipse.jst.j2ee.server:CongressApp' did not find a matching property. May 13, 2014 1:35:26 PM org.apache.catalina.core.StandardContext listenerStart SEVERE: Error configuring application listener of class org.apache.catalina.deploy.ApplicationListener@bdeab java.lang.ClassNotFoundException: com.iss.congress.core.util.CongressContextListener at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559) at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:527) at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:509) at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:137) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4854) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:656) at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1635) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:722)
May 13, 2014 1:35:26 PM org.apache.catalina.core.StandardContext listenerStart SEVERE: Error configuring application listener of class org.apache.catalina.deploy.ApplicationListener@6a5b20 java.lang.ClassNotFoundException: com.iss.congress.core.util.CongressHttpSessionListener at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559) at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:527) at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:509) at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:137) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4854) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:656) at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1635) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:722)

May 13, 2014 1:35:26 PM org.apache.catalina.core.StandardContext listenerStart SEVERE: Error configuring application listener of class org.apache.catalina.deploy.ApplicationListener@1bacb12 java.lang.ClassNotFoundException: com.iss.congress.core.util.HibernateListener at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559) at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:527) at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:509) at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:137) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4854) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:656) at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1635) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:722)
In web.xml listeners are configured in this manner:

<listener>
        <listener-class>com.iss.congress.core.util.CongressContextListener</listener-class>
    </listener>

    <listener>
        <listener-class>com.iss.congress.core.util.CongressHttpSessionListener</listener-class>
    </listener>

    <listener>
        <display-name>Hibernate Session Listener</display-name>
        <listener-class>com.iss.congress.core.util.HibernateListener</listener-class>
    </listener>
zf9nrax1

zf9nrax11#

这是java.lang.ClassNotFoundException: com.iss.congress.core.util.HibernateListener的情况,表示类别HibernateListener不在类别路径中。请确定包含此类别的jar存在于应用程序的WEB-INF/lib文件夹中。
如果src文件夹中存在该类,请检查包名。包名/类名区分大小写。

up9lanfz

up9lanfz2#

可能有以下任何原因:
1.您的类文件在指定的位置不可用(请检查您的package_name/class_file_name.java)
1.或者,文件存在于指定位置,但文件中有错误,可以生成(生成类文件)
(for问题的根本原因是,我更改(升级)了rest库的版本,这导致了现有类文件的问题。
我通过添加/选择适当的apache tomcat服务器解决了一个问题。
项目属性=〉Java构建路径=〉添加库=〉选择Server Runtime =〉单击“下一步”并选择“Apache Tomcat”=〉完成

aiazj4mn

aiazj4mn3#

碰巧我在listener类中编辑了它,在我保存它并将应用程序重新发布到tomcat后,我发现类的错误未找到。
我所做的是删除我在侦听器类中的更新,重新发布到Tomcat,然后再次添加更新..我这样做是因为我怀疑无论什么原因Eclipse in .class生成中存在问题,尽管我清理了项目几次。
删除我的更新,保存(以拥有类的新编译版本),然后再次添加我的更新,已经为我解决了这个问题。
是的,这似乎不合逻辑,但IDE问题有时会发生。

rur96b6h

rur96b6h4#

在我的情况下,一些jar文件丢失,如javax.ejb-api-3.2.jar在Tomcat目录的libs文件夹中丢失。也请检查项目的.m2资源库的jar libs。

相关问题