上面的信息并没有显示

上面的信息并没有显示

http://img1.sycdn.imooc.com//climg/5ddd3f7709a9b0a114020390.jpghttp://img1.sycdn.imooc.com//climg/5ddd3f9109ba735707030292.jpg

26-Nov-2019 23:02:55.655 警告 [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.startup.SetContextPropertiesRule.begin [SetContextPropertiesRule]{Context} Setting property 'source' to 'org.eclipse.jst.jee.server:o2o' did not find a matching property.

26-Nov-2019 23:02:55.982 警告 [RMI TCP Connection(3)-127.0.0.1] org.apache.tomcat.util.descriptor.web.WebXml.setVersion Unknown version string [4.0]. Default version will be used.

26-Nov-2019 23:02:57.395 信息 [RMI TCP Connection(3)-127.0.0.1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.

还有老师帮忙看一下这个警告

正在回答

登陆购买课程后可参与讨论,去登陆

12回答

同学你好,建议同学检查一下shopDao.xml中queryByShopId是否正确,如:

http://img1.sycdn.imooc.com//climg/5de0afe109ffa0d110570829.jpg

如果不是这里的问题,建议同学使用debug的方式执行一下,查看是执行到哪里报错。

祝:学习愉快~

提问者 学习中的傅山 2019-11-29 09:12:30
提问者 学习中的傅山 2019-11-29 09:07:27

http://img1.sycdn.imooc.com//climg/5de06f2209312e7204800117.jpg

老师 我这个也没错啊

好帮手慕阿满 2019-11-28 19:14:19

同学你好,报错提示依然是'class java.lang.Long'这个类中没有'shopCondition' 属性的get方法,但是有提示报错可能出现的位置,如:

http://img1.sycdn.imooc.com//climg/5ddfaab10914a8f315410508.jpg

建议同学查看一下shopServiceImpl类的getByShopId()方法中的第67行的代码是什么?

在老师的代码中,这里只是调用了dao中的queryByShopId()方法,并没有shopCondition属性,如:

http://img1.sycdn.imooc.com//climg/5ddfabfe0949f01d04500095.jpg

祝:学习愉快~

  • 提问者 学习中的傅山 #1
    老师我和你一样的啊 还是不知道是什么错啊
    2019-11-29 09:07:45
提问者 学习中的傅山 2019-11-28 16:19:41

 java.lang.Object.wait(Native Method)

 java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:143)

 com.mysql.jdbc.AbandonedConnectionCleanupThread.run(AbandonedConnectionCleanupThread.java:64)

 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

 java.lang.Thread.run(Thread.java:748)


提问者 学习中的傅山 2019-11-28 16:19:20
好帮手慕阿满 2019-11-28 14:43:47

同学你好,Root Cause是指如下,

http://img1.sycdn.imooc.com//climg/5ddf6b2109d91b2110450452.jpg

在Root Cause通常会提示具体报错以及报错的具体位置等信息。建议同学这里的报错等贴出来。

另外同学说的没有显示是指如下不显示吗?

http://img1.sycdn.imooc.com//climg/5ddf6c700985907c16060682.jpg

问一下同学浏览器的控制台有报错,如果有,建议将报错信息贴一下。

祝:学习愉快~

  • 提问者 学习中的傅山 #1
    已上传!!!!
    2019-11-28 16:22:01
  • 提问者 学习中的傅山 #2
    是啊老师 我都把代码复制为老师的代码了 不知道为什么上面那个部分还是没有显示还是报500
    2019-11-28 18:03:49
提问者 学习中的傅山 2019-11-27 22:24:53

找到了

org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'shopCondition' in 'class java.lang.Long'
org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:77)
org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:446)
com.sun.proxy.$Proxy119.selectOne(Unknown Source)
org.mybatis.spring.SqlSessionTemplate.selectOne(SqlSessionTemplate.java:166)
org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:82)
org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:59)
com.sun.proxy.$Proxy131.queryByShopId(Unknown Source)
com.fushan.o2o.service.impl.ShopServiceImpl.getByShopId(ShopServiceImpl.java:67)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:498)
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
com.sun.proxy.$Proxy132.getByShopId(Unknown Source)
com.fushan.o2o.controller.frontend.ShopDetailController.listShopDetailPageInfo(ShopDetailController.java:48)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:498)
org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:222)
org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137)
org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110)
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:814)
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:737)
org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:969)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:860)
javax.servlet.http.HttpServlet.service(HttpServlet.java:635)
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:845)
javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

提问者 学习中的傅山 2019-11-27 22:08:54
提问者 学习中的傅山 2019-11-27 22:08:11

我不是很懂老师的Root cause

7-Nov-2019 22:01:03.241 信息 [http-nio-8080-exec-2] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.register Mapped "{[/frontend/index],methods=[GET]}" onto private java.lang.String com.fushan.o2o.controller.frontend.FrontendController.index()

27-Nov-2019 22:01:03.242 信息 [http-nio-8080-exec-2] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.register Mapped "{[/frontend/productdetail],methods=[GET]}" onto private java.lang.String com.fushan.o2o.controller.frontend.FrontendController.showProductDetail()

27-Nov-2019 22:01:03.242 信息 [http-nio-8080-exec-2] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.register Mapped "{[/frontend/shoplist],methods=[GET]}" onto private java.lang.String com.fushan.o2o.controller.frontend.FrontendController.showShopList()

27-Nov-2019 22:01:03.242 信息 [http-nio-8080-exec-2] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.register Mapped "{[/frontend/shopdetail],methods=[GET]}" onto private java.lang.String com.fushan.o2o.controller.frontend.FrontendController.showShopDetail()

27-Nov-2019 22:01:03.243 信息 [http-nio-8080-exec-2] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.register Mapped "{[/frontend/listmainpageinfo],methods=[GET]}" onto private java.util.Map<java.lang.String, java.lang.Object> com.fushan.o2o.controller.frontend.MainPageController.listMainPageInfo()

27-Nov-2019 22:01:03.245 信息 [http-nio-8080-exec-2] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.register Mapped "{[/frontend/listproductdetailpageinfo],methods=[GET]}" onto private java.util.Map<java.lang.String, java.lang.Object> com.fushan.o2o.controller.frontend.ProductDetailController.listProductDetailPageInfo(javax.servlet.http.HttpServletRequest)

27-Nov-2019 22:01:03.248 信息 [http-nio-8080-exec-2] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.register Mapped "{[/frontend/listshopdetailpageinfo],methods=[GET]}" onto private java.util.Map<java.lang.String, java.lang.Object> com.fushan.o2o.controller.frontend.ShopDetailController.listShopDetailPageInfo(javax.servlet.http.HttpServletRequest)

27-Nov-2019 22:01:03.248 信息 [http-nio-8080-exec-2] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.register Mapped "{[/frontend/listproductsbyshop],methods=[GET]}" onto private java.util.Map<java.lang.String, java.lang.Object> com.fushan.o2o.controller.frontend.ShopDetailController.listProductsByShop(javax.servlet.http.HttpServletRequest)

27-Nov-2019 22:01:03.250 信息 [http-nio-8080-exec-2] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.register Mapped "{[/frontend/listshopspageinfo],methods=[GET]}" onto private java.util.Map<java.lang.String, java.lang.Object> com.fushan.o2o.controller.frontend.ShopListController.listShopsPageInfo(javax.servlet.http.HttpServletRequest)

27-Nov-2019 22:01:03.270 信息 [http-nio-8080-exec-2] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.register Mapped "{[/frontend/listshops],methods=[GET]}" onto private java.util.Map<java.lang.String, java.lang.Object> com.fushan.o2o.controller.frontend.ShopListController.listShops(javax.servlet.http.HttpServletRequest)

27-Nov-2019 22:01:03.273 信息 [http-nio-8080-exec-2] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.register Mapped "{[/shopadmin/getproductcategorylist],methods=[GET]}" onto private com.fushan.o2o.dto.Result<java.util.List<com.fushan.o2o.entity.ProductCategory>> com.fushan.o2o.controller.shopadmin.ProductCategoryManagementController.getProductCategoryList(javax.servlet.http.HttpServletRequest)

27-Nov-2019 22:01:03.273 信息 [http-nio-8080-exec-2] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.register Mapped "{[/shopadmin/addproductcategorys],methods=[POST]}" onto private java.util.Map<java.lang.String, java.lang.Object> com.fushan.o2o.controller.shopadmin.ProductCategoryManagementController.addProductCategorys(java.util.List<com.fushan.o2o.entity.ProductCategory>,javax.servlet.http.HttpServletRequest)

Wed Nov 27 22:01:03 CST 2019 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.

27-Nov-2019 22:01:03.398 信息 [http-nio-8080-exec-2] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.register Mapped "{[/shopadmin/removeproductcategory],methods=[POST]}" onto private java.util.Map<java.lang.String, java.lang.Object> com.fushan.o2o.controller.shopadmin.ProductCategoryManagementController.removeProductCategory(java.lang.Long,javax.servlet.http.HttpServletRequest)

27-Nov-2019 22:01:03.400 信息 [http-nio-8080-exec-2] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.register Mapped "{[/shopadmin/getproductlistbyshop],methods=[GET]}" onto private java.util.Map<java.lang.String, java.lang.Object> com.fushan.o2o.controller.shopadmin.ProductManagementController.getProductListByShop(javax.servlet.http.HttpServletRequest)

27-Nov-2019 22:01:03.400 信息 [http-nio-8080-exec-2] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.register Mapped "{[/shopadmin/getproductbyid],methods=[GET]}" onto private java.util.Map<java.lang.String, java.lang.Object> com.fushan.o2o.controller.shopadmin.ProductManagementController.getProductById(java.lang.Long)

27-Nov-2019 22:01:03.400 信息 [http-nio-8080-exec-2] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.register Mapped "{[/shopadmin/addproduct],methods=[POST]}" onto private java.util.Map<java.lang.String, java.lang.Object> com.fushan.o2o.controller.shopadmin.ProductManagementController.addProduct(javax.servlet.http.HttpServletRequest)

27-Nov-2019 22:01:03.400 信息 [http-nio-8080-exec-2] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.register Mapped "{[/shopadmin/modifyproduct],methods=[POST]}" onto private java.util.Map<java.lang.String, java.lang.Object> com.fushan.o2o.controller.shopadmin.ProductManagementController.modifyProduct(javax.servlet.http.HttpServletRequest)

27-Nov-2019 22:01:03.402 信息 [http-nio-8080-exec-2] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.register Mapped "{[/shopadmin/productcategorymanagement],methods=[GET]}" onto public java.lang.String com.fushan.o2o.controller.shopadmin.ShopAdminController.productCategoryManage()

com.fushan.o2o.controller.shopadmin.ShopAdminController.productManagement()

com.fushan.o2o.controller.shopadmin.ShopAdminController.productOperation()

com.fushan.o2o.controller.shopadmin.ShopAdminController.shopOperation()

com.fushan.o2o.controller.shopadmin.ShopAdminController.shopManagement()

是不是这个  我没什么印象定义了什么long类

提问者 学习中的傅山 2019-11-27 22:05:48

http://img1.sycdn.imooc.com//climg/5dde828609f3808816180708.jpg

 private Shop compactShopCondition4Search(long parentId, long shopCategoryId, int areaId, String shopName) {

        Shop shopCondition = new Shop();

        if (parentId != -1L) {

            // 查询某个一级ShopCategory下面的所有二级ShopCategory里面的店铺列表

            ShopCategory childCategory = new ShopCategory();

            ShopCategory parentCategory = new ShopCategory();

            parentCategory.setShopCategoryId(parentId);

            childCategory.setParent(parentCategory);

            shopCondition.setShopCategory(childCategory);

        }

        if (shopCategoryId != -1L) {

            // 查询某个二级ShopCategory下面的店铺列表

            ShopCategory shopCategory = new ShopCategory();

            shopCategory.setShopCategoryId(shopCategoryId);

            shopCondition.setShopCategory(shopCategory);

        }

        if (areaId != -1L) {

            // 查询位于某个区域Id下的店铺列表

            Area area = new Area();

            area.setAreaId(areaId);

            shopCondition.setArea(area);

        }


        if (shopName != null) {

            // 查询名字里包含shopName的店铺列表

            shopCondition.setShopName(shopName);

        }

        // 前端展示的店铺都是审核成功的店铺

        shopCondition.setEnableStatus(1);

        return shopCondition;

    }

}

这是我代码里面含有ShopCondition的

好帮手慕阿满 2019-11-27 13:44:42

同学你好,报错提示在' class java.lang.Long'这个类中没有'shopCondition' 属性的get方法。问一下同学是哪里用到了shopCondition,这个属性是在那个类中的?建议同学详细描述一下。另外建议同学将Root Cause的信息也贴出来。

下边的警告信息并不影响程序运行,可以忽略的。

祝:学习愉快~

问题已解决,确定采纳
还有疑问,暂不采纳

恭喜解决一个难题,获得1积分~

来为老师/同学的回答评分吧

0 星
请稍等 ...
意见反馈 帮助中心 APP下载
官方微信

在线咨询

领取优惠

免费试听

领取大纲

扫描二维码,添加
你的专属老师