| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 5810 人关注过本帖
标题:求助java.lang.NoClassDefFoundError怎么解决,报错信息如下
只看楼主 加入收藏
tianchengtop
Rank: 2
等 级:论坛游民
帖 子:37
专家分:10
注 册:2017-9-22
结帖率:100%
收藏
已结贴  问题点数:15 回复次数:36 
求助java.lang.NoClassDefFoundError怎么解决,报错信息如下
四月 14, 2018 11:03:07 上午 org.apache.catalina.startup.Embedded start
信息: Starting tomcat server
四月 14, 2018 11:03:07 上午 org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/6.0.29
四月 14, 2018 11:03:07 上午 org.apache.catalina.core.StandardContext listenerStart
严重: Error configuring application listener of class com.enation.eop.sdk.listener.EopSessionListener
java.lang.NoClassDefFoundError: org/apache/log4j/Logger
    at com.enation.eop.sdk.listener.EopSessionListener.<init>(EopSessionListener.java:19)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at java.lang.Class.newInstance(Class.java:442)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4079)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4630)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
    at org.apache.catalina.startup.Embedded.start(Embedded.java:825)
    at org.codehaus.mojo.tomcat.AbstractRunMojo.startContainer(AbstractRunMojo.java:558)
    at org.codehaus.mojo.tomcat.AbstractRunMojo.execute(AbstractRunMojo.java:255)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:107)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:534)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Logger
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1645)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1491)
    ... 36 more

四月 14, 2018 11:03:07 上午 org.apache.catalina.core.StandardContext listenerStart
严重: Skipped installing application listeners due to previous error(s)
四月 14, 2018 11:03:07 上午 org.apache.catalina.core.StandardContext start
严重: Error listenerStart
四月 14, 2018 11:03:07 上午 org.apache.catalina.core.StandardContext start
严重: Context [/b2c] startup failed due to previous errors
四月 14, 2018 11:03:07 上午 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
严重: The web application [/b2c] registered the JBDC driver [com.microsoft.sqlserver.jdbc.SQLServerDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
搜索更多相关主题的帖子: java lang apache start maven 
2018-04-14 11:22
tianchengtop
Rank: 2
等 级:论坛游民
帖 子:37
专家分:10
注 册:2017-9-22
收藏
得分:0 
回复 楼主 tianchengtop
图片附件: 游客没有浏览图片的权限,请 登录注册

有梦想,我还有梦想,要提醒自己还有梦(ˇˍˇ) 想~
2018-04-14 11:22
tianchengtop
Rank: 2
等 级:论坛游民
帖 子:37
专家分:10
注 册:2017-9-22
收藏
得分:0 
回复 楼主 tianchengtop
图片附件: 游客没有浏览图片的权限,请 登录注册

有梦想,我还有梦想,要提醒自己还有梦(ˇˍˇ) 想~
2018-04-14 11:23
tianchengtop
Rank: 2
等 级:论坛游民
帖 子:37
专家分:10
注 册:2017-9-22
收藏
得分:0 
新人接手一个b2c网站,运行环境eclipse + tomcat + macos系统  ,maven项目

有梦想,我还有梦想,要提醒自己还有梦(ˇˍˇ) 想~
2018-04-14 11:24
tianchengtop
Rank: 2
等 级:论坛游民
帖 子:37
专家分:10
注 册:2017-9-22
收藏
得分:0 
网上搜了好多问题都解决不了

有梦想,我还有梦想,要提醒自己还有梦(ˇˍˇ) 想~
2018-04-14 11:25
疯狂的小a
Rank: 10Rank: 10Rank: 10
等 级:贵宾
威 望:39
帖 子:423
专家分:1871
注 册:2018-2-6
收藏
得分:0 
Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Logger
是不是日志包冲突了

假如人生没有梦想,和咸鱼有什么区别!
2018-04-14 11:25
tianchengtop
Rank: 2
等 级:论坛游民
帖 子:37
专家分:10
注 册:2017-9-22
收藏
得分:0 
回复 6楼 疯狂的小a
可以具体说一下么,我这还是个新手,不太明白

有梦想,我还有梦想,要提醒自己还有梦(ˇˍˇ) 想~
2018-04-14 11:26
疯狂的小a
Rank: 10Rank: 10Rank: 10
等 级:贵宾
威 望:39
帖 子:423
专家分:1871
注 册:2018-2-6
收藏
得分:0 
把pom.xml文件贴出来

假如人生没有梦想,和咸鱼有什么区别!
2018-04-14 11:29
tianchengtop
Rank: 2
等 级:论坛游民
帖 子:37
专家分:10
注 册:2017-9-22
收藏
得分:0 
回复 6楼 疯狂的小a
严重: Error configuring application listener of class com.enation.eop.sdk.listener.EopSessionListener
java.lang.NoClassDefFoundError: org/apache/log4j/Logger
    at com.enation.eop.sdk.listener.EopSessionListener.<init>(EopSessionListener.java:19)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62

主要是这个,网上说这两个报错不一样,而且两个都有了,第一个是deffound,下面那个是notFound

有梦想,我还有梦想,要提醒自己还有梦(ˇˍˇ) 想~
2018-04-14 11:31
tianchengtop
Rank: 2
等 级:论坛游民
帖 子:37
专家分:10
注 册:2017-9-22
收藏
得分:0 
回复 8楼 疯狂的小a
<?xml version="1.0"?>
<project
        xsi:schemaLocation="http://maven. http://maven.
        xmlns="http://maven. xmlns:xsi="http://www.
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>com.enation.app.javashop</groupId>
        <artifactId>javashop</artifactId>
        <version>6.3.1</version>
        <relativePath>../</relativePath>
    </parent>
    <artifactId>b2c</artifactId>
    <packaging>war</packaging>
    <name>b2c Maven Webapp</name>
    <url>http://maven.

    <build>
        <resources>
            <resource>
                <directory>src/main/java</directory>
                <includes>
                    <include>**/*.xml</include>
                    <include>**/*.html</include>
                    <include>**/*.css</include>
                </includes>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
            </plugin>

        </plugins>
        <testResources>
            <testResource>
                <directory>src/test/java</directory>
                <includes>
                    <include>**/*.xml</include>
                    <include>**/*.css</include>
                    <include>**/*.html</include>
                </includes>
            </testResource>
        </testResources>
        <defaultGoal>compile</defaultGoal>
        <finalName>b2c</finalName>
    </build>

    <dependencies>

        <!-- 测试框架依赖 -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
        </dependency>

        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-core</artifactId>
        </dependency>

        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
        </dependency>


        <dependency>
            <groupId>com.jayway.jsonpath</groupId>
            <artifactId>json-path</artifactId>
        </dependency>

        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
        </dependency>

        <dependency>
            <groupId>org.powermock</groupId>
            <artifactId>powermock-module-junit4</artifactId>
        </dependency>

        <dependency>
            <groupId>org.powermock</groupId>
            <artifactId>powermock-api-mockito</artifactId>
        </dependency>
        <dependency>
            <groupId>org.powermock</groupId>
            <artifactId>powermock-module-junit4-rule-agent</artifactId>
        </dependency>
        <dependency>
            <groupId>org.powermock</groupId>
            <artifactId>powermock-classloading-objenesis</artifactId>
        </dependency>

        <dependency>
            <groupId>org.jmock</groupId>
            <artifactId>jmock-junit4</artifactId>
        </dependency>

        <dependency>
            <groupId>org.jmockit</groupId>
            <artifactId>jmockit</artifactId>
        </dependency>

        <dependency>
            <groupId>org.skyscreamer</groupId>
            <artifactId>jsonassert</artifactId>
        </dependency>

        <!-- Javashop 工程依赖 -->
        <dependency>
            <groupId>com.enation.app.javashop</groupId>
            <artifactId>core</artifactId>
            <version>6.3.1</version>
        </dependency>
        <dependency>
            <groupId>com.enation.app.javashop</groupId>
            <artifactId>shop-core</artifactId>
            <version>6.3.1</version>
        </dependency>
        <dependency>
            <groupId>com.enation.app.javashop</groupId>
            <artifactId>cms-core</artifactId>
            <version>6.3.1</version>
        </dependency>

        <!-- 短信网关 -->
        <dependency>
            <groupId>com.enation.app.javashop</groupId>
            <artifactId>zt-sms</artifactId>
            <version>6.3.1</version>
        </dependency>
        <!-- 微信组件 -->
        <dependency>
            <groupId>com.enation.app.javashop</groupId>
            <artifactId>weixin</artifactId>
            <version>6.3.1</version>
        </dependency>

        <!-- servlet -->
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <scope>provided</scope>
        </dependency>


    </dependencies>
</project>

有梦想,我还有梦想,要提醒自己还有梦(ˇˍˇ) 想~
2018-04-14 11:32
快速回复:求助java.lang.NoClassDefFoundError怎么解决,报错信息如下
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.022709 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved