8-3商品添加之service层的实现下

来源:8-3 商品添加之Service层的实现下

草田光日天

2019-12-30

老师你好!我跟着视频做不知道写错哪里导致dao层和service层出现同样的错,错误如下:

在十二月 30, 2019 10:45:26 下午 org.springframework.test.context.support.DefaultTestContextBootstrapper getDefaultTestExecutionListenerClassNames
信息: Loaded default TestExecutionListener class names from location [META-INF/spring.factories]: [org.springframework.test.context.web.ServletTestExecutionListener, org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener, org.springframework.test.context.support.DependencyInjectionTestExecutionListener, org.springframework.test.context.support.DirtiesContextTestExecutionListener, org.springframework.test.context.transaction.TransactionalTestExecutionListener, org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener]
十二月 30, 2019 10:45:26 下午 org.springframework.test.context.support.DefaultTestContextBootstrapper getTestExecutionListeners
信息: Using TestExecutionListeners: [org.springframework.test.context.web.ServletTestExecutionListener@1324409e, org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener@2c6a3f77, org.springframework.test.context.support.DependencyInjectionTestExecutionListener@246ae04d, org.springframework.test.context.support.DirtiesContextTestExecutionListener@62043840, org.springframework.test.context.transaction.TransactionalTestExecutionListener@5315b42e, org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener@2ef9b8bc]
十二月 30, 2019 10:45:26 下午 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
信息: Loading XML bean definitions from class path resource [spring/spring-dao.xml]
十二月 30, 2019 10:45:26 下午 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
信息: Loading XML bean definitions from class path resource [spring/spring-service.xml]
十二月 30, 2019 10:45:26 下午 org.springframework.context.support.GenericApplicationContext prepareRefresh
信息: Refreshing org.springframework.context.support.GenericApplicationContext@7f9a81e8: startup date [Mon Dec 30 22:45:26 CST 2019]; root of context hierarchy
十二月 30, 2019 10:45:26 下午 com.mchange.v2.log.MLog <clinit>
信息: MLog clients using java 1.4+ standard logging.
十二月 30, 2019 10:45:26 下午 com.mchange.v2.c3p0.C3P0Registry banner
信息: Initializing c3p0-0.9.2.1 [built 20-March-2013 10:47:27 +0000; debug? true; trace: 10]
十二月 30, 2019 10:45:27 下午 org.springframework.context.support.GenericApplicationContext refresh
警告: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring/spring-dao.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: com/imooc/o2o/entity/productImg (wrong name: com/imooc/o2o/entity/ProductImg)
十二月 30, 2019 10:45:27 下午 org.springframework.test.context.TestContextManager prepareTestInstance
严重: Caught exception while allowing TestExecutionListener [org.springframework.test.context.support.DependencyInjectionTestExecutionListener@246ae04d] to prepare test instance [com.imooc.o2o.dao.AreaDaoTest@4c012563]
java.lang.IllegalStateException: Failed to load ApplicationContext
	at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:124)
	at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:83)
	at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:117)
	at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:83)
	at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:230)
	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:228)
	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:287)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:289)
	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:247)
	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:94)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
	at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
	at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:191)
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:89)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:41)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:541)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:763)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:463)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:209)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring/spring-dao.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: com/imooc/o2o/entity/productImg (wrong name: com/imooc/o2o/entity/ProductImg)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1628)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:742)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542)
	at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:128)
	at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:60)
	at org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.delegateLoading(AbstractDelegatingSmartContextLoader.java:108)
	at org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.loadContext(AbstractDelegatingSmartContextLoader.java:251)
	at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:98)
	at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:116)
	... 25 more
Caused by: java.lang.NoClassDefFoundError: com/imooc/o2o/entity/productImg (wrong name: com/imooc/o2o/entity/ProductImg)
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:348)
	at org.apache.ibatis.io.ClassLoaderWrapper.classForName(ClassLoaderWrapper.java:186)
	at org.apache.ibatis.io.ClassLoaderWrapper.classForName(ClassLoaderWrapper.java:89)
	at org.apache.ibatis.io.Resources.classForName(Resources.java:261)
	at org.apache.ibatis.type.TypeAliasRegistry.resolveAlias(TypeAliasRegistry.java:116)
	at org.apache.ibatis.builder.BaseBuilder.resolveAlias(BaseBuilder.java:149)
	at org.apache.ibatis.builder.BaseBuilder.resolveClass(BaseBuilder.java:116)
	at org.apache.ibatis.builder.xml.XMLMapperBuilder.resultMapElement(XMLMapperBuilder.java:265)
	at org.apache.ibatis.builder.xml.XMLMapperBuilder.processNestedResultMappings(XMLMapperBuilder.java:386)
	at org.apache.ibatis.builder.xml.XMLMapperBuilder.buildResultMappingFromContext(XMLMapperBuilder.java:367)
	at org.apache.ibatis.builder.xml.XMLMapperBuilder.resultMapElement(XMLMapperBuilder.java:280)
	at org.apache.ibatis.builder.xml.XMLMapperBuilder.resultMapElement(XMLMapperBuilder.java:252)
	at org.apache.ibatis.builder.xml.XMLMapperBuilder.resultMapElements(XMLMapperBuilder.java:244)
	at org.apache.ibatis.builder.xml.XMLMapperBuilder.configurationElement(XMLMapperBuilder.java:116)
	at org.apache.ibatis.builder.xml.XMLMapperBuilder.parse(XMLMapperBuilder.java:92)
	at org.mybatis.spring.SqlSessionFactoryBean.buildSqlSessionFactory(SqlSessionFactoryBean.java:521)
	at org.mybatis.spring.SqlSessionFactoryBean.afterPropertiesSet(SqlSessionFactoryBean.java:380)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1687)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1624)
	... 40 more

这里输入代码
java.lang.IllegalStateException: Failed to load ApplicationContext
	at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:124)
	at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:83)
	at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:117)
	at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:83)
	at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:230)
	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:228)
	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:287)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:289)
	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:247)
	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:94)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
	at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
	at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:191)
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:89)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:41)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:541)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:763)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:463)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:209)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring/spring-dao.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: com/imooc/o2o/entity/productImg (wrong name: com/imooc/o2o/entity/ProductImg)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1628)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:742)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542)
	at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:128)
	at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:60)
	at org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.delegateLoading(AbstractDelegatingSmartContextLoader.java:108)
	at org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.loadContext(AbstractDelegatingSmartContextLoader.java:251)
	at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:98)
	at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:116)
	... 25 more
Caused by: java.lang.NoClassDefFoundError: com/imooc/o2o/entity/productImg (wrong name: com/imooc/o2o/entity/ProductImg)
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:348)
	at org.apache.ibatis.io.ClassLoaderWrapper.classForName(ClassLoaderWrapper.java:186)
	at org.apache.ibatis.io.ClassLoaderWrapper.classForName(ClassLoaderWrapper.java:89)
	at org.apache.ibatis.io.Resources.classForName(Resources.java:261)
	at org.apache.ibatis.type.TypeAliasRegistry.resolveAlias(TypeAliasRegistry.java:116)
	at org.apache.ibatis.builder.BaseBuilder.resolveAlias(BaseBuilder.java:149)
	at org.apache.ibatis.builder.BaseBuilder.resolveClass(BaseBuilder.java:116)
	at org.apache.ibatis.builder.xml.XMLMapperBuilder.resultMapElement(XMLMapperBuilder.java:265)
	at org.apache.ibatis.builder.xml.XMLMapperBuilder.processNestedResultMappings(XMLMapperBuilder.java:386)
	at org.apache.ibatis.builder.xml.XMLMapperBuilder.buildResultMappingFromContext(XMLMapperBuilder.java:367)
	at org.apache.ibatis.builder.xml.XMLMapperBuilder.resultMapElement(XMLMapperBuilder.java:280)
	at org.apache.ibatis.builder.xml.XMLMapperBuilder.resultMapElement(XMLMapperBuilder.java:252)
	at org.apache.ibatis.builder.xml.XMLMapperBuilder.resultMapElements(XMLMapperBuilder.java:244)
	at org.apache.ibatis.builder.xml.XMLMapperBuilder.configurationElement(XMLMapperBuilder.java:116)
	at org.apache.ibatis.builder.xml.XMLMapperBuilder.parse(XMLMapperBuilder.java:92)
	at org.mybatis.spring.SqlSessionFactoryBean.buildSqlSessionFactory(SqlSessionFactoryBean.java:521)
	at org.mybatis.spring.SqlSessionFactoryBean.afterPropertiesSet(SqlSessionFactoryBean.java:380)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1687)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1624)
	... 40 more


Tomcat都拒绝我启动了

Publishing failed
Publishing failed with multiple errors
Error copying file META-INF\MANIFEST.MF: 拒绝访问。
Error copying file META-INF\maven\Demo\Demo\pom.properties: 拒绝访问。
Error copying file META-INF\maven\Demo\Demo\pom.xml: 拒绝访问。
Could not delete C:\Program Files\Java\apache-tomcat-9.0.4\webapps\o2o\WEB-INF\classes\com\imooc\o2o\dao\AreaDao.class. May be locked by another process.
Could not delete C:\Program Files\Java\apache-tomcat-9.0.4\webapps\o2o\WEB-INF\classes\com\imooc\o2o\dao\ProductCategoryDao.class. May be locked by another process.
Could not delete C:\Program Files\Java\apache-tomcat-9.0.4\webapps\o2o\WEB-INF\classes\com\imooc\o2o\dao\ProductDao.class. May be locked by another process.
Could not delete C:\Program Files\Java\apache-tomcat-9.0.4\webapps\o2o\WEB-INF\classes\com\imooc\o2o\dao\ProductImgDao.class. May be locked by another process.
Could not delete C:\Program Files\Java\apache-tomcat-9.0.4\webapps\o2o\WEB-INF\classes\com\imooc\o2o\dao\ShopCategoryDao.class. May be locked by another process.
Could not delete C:\Program Files\Java\apache-tomcat-9.0.4\webapps\o2o\WEB-INF\classes\com\imooc\o2o\dao\ShopDao.class. May be locked by another process.
Could not delete C:\Program Files\Java\apache-tomcat-9.0.4\webapps\o2o\WEB-INF\classes\com\imooc\o2o\dto\ProductCategoryExecution.class. May be locked by another process.
Could not delete C:\Program Files\Java\apache-tomcat-9.0.4\webapps\o2o\WEB-INF\classes\com\imooc\o2o\dto\Result.class. May be locked by another process.
Could not delete C:\Program Files\Java\apache-tomcat-9.0.4\webapps\o2o\WEB-INF\classes\com\imooc\o2o\dto\ShopExecution.class. May be locked by another process.
Could not delete C:\Program Files\Java\apache-tomcat-9.0.4\webapps\o2o\WEB-INF\classes\com\imooc\o2o\entity\Area.class. May be locked by another process.
Could not delete C:\Program Files\Java\apache-tomcat-9.0.4\webapps\o2o\WEB-INF\classes\com\imooc\o2o\entity\HeadLine.class. May be locked by another process.
Could not delete C:\Program Files\Java\apache-tomcat-9.0.4\webapps\o2o\WEB-INF\classes\com\imooc\o2o\entity\LocalAuth.class. May be locked by another process.
Could not delete C:\Program Files\Java\apache-tomcat-9.0.4\webapps\o2o\WEB-INF\classes\com\imooc\o2o\entity\PersonInfo.class. May be locked by another process.
Could not delete C:\Program Files\Java\apache-tomcat-9.0.4\webapps\o2o\WEB-INF\classes\com\imooc\o2o\entity\Product.class. May be locked by another process.
Could not delete C:\Program Files\Java\apache-tomcat-9.0.4\webapps\o2o\WEB-INF\classes\com\imooc\o2o\entity\ProductCategory.class. May be locked by another process.
Could not delete C:\Program Files\Java\apache-tomcat-9.0.4\webapps\o2o\WEB-INF\classes\com\imooc\o2o\entity\ProductImg.class. May be locked by another process.
Could not delete C:\Program Files\Java\apache-tomcat-9.0.4\webapps\o2o\WEB-INF\classes\com\imooc\o2o\entity\Shop.class. May be locked by another process.
Could not delete C:\Program Files\Java\apache-tomcat-9.0.4\webapps\o2o\WEB-INF\classes\com\imooc\o2o\entity\ShopCategory.class. May be locked by another process.
Could not delete C:\Program Files\Java\apache-tomcat-9.0.4\webapps\o2o\WEB-INF\classes\com\imooc\o2o\entity\WechatAuth.class. May be locked by another process.
Could not delete C:\Program Files\Java\apache-tomcat-9.0.4\webapps\o2o\WEB-INF\classes\com\imooc\o2o\enums\ProductCategoryStateEnum.class. May be locked by another process.
Could not delete C:\Program Files\Java\apache-tomcat-9.0.4\webapps\o2o\WEB-INF\classes\com\imooc\o2o\enums\ShopStateEnum.class. May be locked by another process.
Could not delete C:\Program Files\Java\apache-tomcat-9.0.4\webapps\o2o\WEB-INF\classes\com\imooc\o2o\exceptions\ProductCategoryOperationException.class. May be locked by another process.
Could not delete C:\Program Files\Java\apache-tomcat-9.0.4\webapps\o2o\WEB-INF\classes\com\imooc\o2o\exceptions\ShopOperationException.class. May be locked by another process.
Could not delete C:\Program Files\Java\apache-tomcat-9.0.4\webapps\o2o\WEB-INF\classes\com\imooc\o2o\service\AreaService.class. May be locked by another process.
Could not delete C:\Program Files\Java\apache-tomcat-9.0.4\webapps\o2o\WEB-INF\classes\com\imooc\o2o\service\ProductCategoryService.class. May be locked by another process.
Could not delete C:\Program Files\Java\apache-tomcat-9.0.4\webapps\o2o\WEB-INF\classes\com\imooc\o2o\service\ShopCategoryService.class. May be locked by another process.
Could not delete C:\Program Files\Java\apache-tomcat-9.0.4\webapps\o2o\WEB-INF\classes\com\imooc\o2o\service\ShopService.class. May be locked by another process.
Could not delete C:\Program Files\Java\apache-tomcat-9.0.4\webapps\o2o\WEB-INF\classes\com\imooc\o2o\service\impl\AreaServiceImpl.class. May be locked by another process.
Could not delete C:\Program Files\Java\apache-tomcat-9.0.4\webapps\o2o\WEB-INF\classes\com\imooc\o2o\service\impl\ProductCategoryServiceImpl.class. May be locked by another process.
Could not delete C:\Program Files\Java\apache-tomcat-9.0.4\webapps\o2o\WEB-INF\classes\com\imooc\o2o\service\impl\ShopCategoryServiceImpl.class. May be locked by another process.
Could not delete C:\Program Files\Java\apache-tomcat-9.0.4\webapps\o2o\WEB-INF\classes\com\imooc\o2o\service\impl\ShopServiceImpl.class. May be locked by another process.
Could not delete C:\Program Files\Java\apache-tomcat-9.0.4\webapps\o2o\WEB-INF\classes\com\imooc\o2o\util\CodeUtil.class. May be locked by another process.
Could not delete C:\Program Files\Java\apache-tomcat-9.0.4\webapps\o2o\WEB-INF\classes\com\imooc\o2o\util\HttpServletRequestUtil.class. May be locked by another process.
Could not delete C:\Program Files\Java\apache-tomcat-9.0.4\webapps\o2o\WEB-INF\classes\com\imooc\o2o\util\ImageUtil.class. May be locked by another process.
Could not delete C:\Program Files\Java\apache-tomcat-9.0.4\webapps\o2o\WEB-INF\classes\com\imooc\o2o\util\PageCalculator.class. May be locked by another process.
Could not delete C:\Program Files\Java\apache-tomcat-9.0.4\webapps\o2o\WEB-INF\classes\com\imooc\o2o\util\PathUtil.class. May be locked by another process.
Could not delete C:\Program Files\Java\apache-tomcat-9.0.4\webapps\o2o\WEB-INF\classes\com\imooc\o2o\web\shopadmin\ProductCategoryManagementController.class. May be locked by another process.
Could not delete C:\Program Files\Java\apache-tomcat-9.0.4\webapps\o2o\WEB-INF\classes\com\imooc\o2o\web\shopadmin\ShopAdminController.class. May be locked by another process.
Could not delete C:\Program Files\Java\apache-tomcat-9.0.4\webapps\o2o\WEB-INF\classes\com\imooc\o2o\web\shopadmin\ShopManagementController.class. May be locked by another process.
Could not delete C:\Program Files\Java\apache-tomcat-9.0.4\webapps\o2o\WEB-INF\classes\com\imooc\o2o\web\superadmin\AreaController.class. May be locked by another process.
Error copying file WEB-INF\classes\B.jpg: 拒绝访问。
Error copying file WEB-INF\classes\jdbc.properties: 拒绝访问。
Error copying file WEB-INF\classes\logback.xml: 拒绝访问。
Error copying file WEB-INF\classes\mapper\AreaDao.xml: 拒绝访问。
Error copying file WEB-INF\classes\mapper\ProductCategoryDao.xml: 拒绝访问。
Error copying file WEB-INF\classes\mapper\ProductDao.xml: 拒绝访问。
Error copying file WEB-INF\classes\mapper\ProductImgDao.xml: 拒绝访问。
Error copying file WEB-INF\classes\mapper\ShopCategoryDao.xml: 拒绝访问。
Error copying file WEB-INF\classes\mapper\ShopDao.xml: 拒绝访问。
Error copying file WEB-INF\classes\mybatis-config.xml: 拒绝访问。
Error copying file WEB-INF\classes\spring\spring-dao.xml: 拒绝访问。
Error copying file WEB-INF\classes\spring\spring-service.xml: 拒绝访问。
Error copying file WEB-INF\classes\spring\spring-web.xml: 拒绝访问。
Error copying file WEB-INF\classes\ProductCategoryDao.xml: 拒绝访问。
Error copying file WEB-INF\classes\ProductDao.xml: 拒绝访问。
Error copying file WEB-INF\classes\ProductImgDao.xml: 拒绝访问。
Error copying file WEB-INF\classes\ShopDao.xml: 拒绝访问。
Error copying file WEB-INF\web.xml: 拒绝访问。
Error copying file spring-web-4.3.7.RELEASE.jar: 拒绝访问。

弄成这样我真佩服自己。。。

写回答

1回答

翔仔

2019-12-31

同学好,我看异常是Caused by: java.lang.NoClassDefFoundError: com/imooc/o2o/entity/productImg (wrong name: com/imooc/o2o/entity/ProductImg)

主要核对一下实体类ProductImg是否写对,并且包名是否正确

0
1
草田光日天
谢谢老师
2019-12-31
共1条回复

Java双版本(SSM到SpringBoot)校园商铺全栈开发

SSM商铺V1.0,解决毕设痛点;SpringBoot商铺V2.0,满足工作刚需

5113 学习 · 8144 问题

查看课程