免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3051 | 回复: 0

淘宝网表现层设计分析 [复制链接]

论坛徽章:
0
发表于 2010-01-18 11:44 |显示全部楼层

[/url]

前几天突然发现淘宝网访问非常慢而且出错(出现异常),猜测是淘宝网在发布新版本时出现错误或是某个服务器出现异常。但淘宝网的工程师在输出错误时生成了客户端注释掉的Java异常信息(包含在和-->之间),虽然在画面上是看不到的,但查看源代码就可以清楚的看到这个Java出错信息。
  淘宝网采用阿里巴巴自己开发的一个MVC框架,动态网页(
[url=http://www.9shequ.cn/]jhtml页面

)的通用入是口WebxControllerServlet,最终调用/执行模版是在TemplateModule的子类中完成的,然后在
Module
执行完成后跳转到一个视图(JSP文件),在
Servlet

Module
中是通过Valve的职责链处理。
[/url]
                  

                               图1 淘宝网部分类图
  一个Web请求的基本处理流程是:
  客户端发出Web请求
  WebxControllerServlet      PerformScreenTemplateValve    TemplateModule
  附(本文基于下面的异常分析):
  Exception: com.alibaba.webx.WebxException: Failed to execute screen: home.MyTaobao (template:
  screen/home/myTaobao.vm)
  at com.alibaba.webx.WebxControllerServlet.handleRequest(WebxControllerServlet.java:111)
  at com.alibaba.webx.controller.AbstractWebxControllerServlet.doGet(AbstractWebxControllerServlet.java:113)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  at com.alibaba.webx.filter.rundata.RunDataFilter.doFilter(RunDataFilter.java:48)
  at com.alibaba.webx.filter.AbstractFilter.doFilter(AbstractFilter.java:150)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  at com.taobao.common.webx.filter.RemoteAddrFilter.doFilter(RemoteAddrFilter.java:16)
  at com.alibaba.webx.filter.AbstractFilter.doFilter(AbstractFilter.java:150)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  at com.alibaba.webx.filter.timer.TimerFilter.doFilter(TimerFilter.java:93)
  at com.alibaba.webx.filter.AbstractFilter.doFilter(AbstractFilter.java:150)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
  at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
  at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
  at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
  at org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:419)
  at org.apache.coyote.ajp.AjpAprProtocol$AjpConnectionHandler.process(AjpAprProtocol.java:378)
  at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1508)
  at java.lang.Thread.run(Thread.java:595)
  Caused by: com.alibaba.service.pipeline.PipelineException: Failed to execute screen: home.MyTaobao (template:
  screen/home/myTaobao.vm)
  at com.alibaba.turbine.pipeline.PerformScreenTemplateValve.performScreenModule
 (PerformScreenTemplateValve.java:112)
  at com.alibaba.turbine.pipeline.PerformScreenTemplateValve.invoke(PerformScreenTemplateValve.java:48)
  at com.alibaba.turbine.pipeline.AbstractValve.invoke(AbstractValve.java:33)
  at com.alibaba.service.pipeline.DefaultPipeline.invokeNext(DefaultPipeline.java:224)
  at com.alibaba.service.pipeline.DefaultPipeline.invoke(DefaultPipeline.java:187)
  at com.alibaba.turbine.pipeline.ChooseValve$Condition.invokeSubPipeline(ChooseValve.java:82)
  at com.alibaba.turbine.pipeline.ChooseValve.invoke(ChooseValve.java:57)
  at com.alibaba.turbine.pipeline.AbstractValve.invoke(AbstractValve.java:33)
  at com.alibaba.service.pipeline.DefaultPipeline.invokeNext(DefaultPipeline.java:224)
  at com.alibaba.service.pipeline.DefaultPipeline.invoke(DefaultPipeline.java:187)
  at com.alibaba.service.pipeline.TryCatchFinallyValve.invokeTryPipeline(TryCatchFinallyValve.java:114)
  at com.alibaba.webx.WebxControllerServlet.handleRequest(WebxControllerServlet.java:108)
  ... 33 more
  Caused by: com.alibaba.webx.WebxException: [MyTaobao] Response is null or failed
  at com.taobao.web.mytaobao.module.screen.home.MyTaobao.execute(MyTaobao.java:104)
  at com.alibaba.turbine.module.TemplateModule.execute(TemplateModule.java:38)
  at com.alibaba.turbine.pipeline.PerformScreenTemplateValve.performScreenModule
  (PerformScreenTemplateValve.java:108)
  ... 44 more

更多交流请上作者个人博客:

新浪博客
[url=http://blog.sina.com.cn/9shequ]http://blog.sina.com.cn/9shequ

   
搜狐博客
http://9shequ.blog.sohu.com/






本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u3/110522/showart_2151897.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

DTCC2020中国数据库技术大会

【架构革新 高效可控】2020年12月21日-23日第十一届中国数据库技术大会将在北京隆重召开。

大会设置2大主会场,20+技术专场,将邀请超百位行业专家,重点围绕数据架构、AI与大数据、传统企业数据库实践和国产开源数据库等内容展开分享和探讨,为广大数据领域从业人士提供一场年度盛会和交流平台。

http://dtcc.it168.com


大会官网>>
  

北京盛拓优讯信息技术有限公司. 版权所有 16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122
中国互联网协会会员  联系我们:huangweiwei@it168.com
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP