回复 13楼 疯狂的小a
请问下是在maven的pom中添加,还是web得那里
有梦想,我还有梦想,要提醒自己还有梦(ˇˍˇ) 想~
四月 14, 2018 11:41:43 上午 org.apache.catalina.startup.Embedded start 信息: Starting tomcat server 四月 14, 2018 11:41:43 上午 org.apache.catalina.core.StandardEngine start 信息: Starting Servlet Engine: Apache Tomcat/6.0.29 四月 14, 2018 11:41:43 上午 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:41:43 上午 org.apache.catalina.core.StandardContext listenerStart 严重: Skipped installing application listeners due to previous error(s) 四月 14, 2018 11:41:43 上午 org.apache.catalina.core.StandardContext start 严重: Error listenerStart 四月 14, 2018 11:41:43 上午 org.apache.catalina.core.StandardContext start 严重: Context [/b2c] startup failed due to previous errors 四月 14, 2018 11:41:43 上午 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.
<?xml version="1.0"?> <project xsi:schemaLocation="http://maven. 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>