关于运行cat的问题
当我安装完毕之后,使用命令“cd cat-home;mvn jetty:run" 启动成功后,试图通过http://localhost:2281/cat/来访问项目时报了如下异常:
Error occured when handling uri: /cat/r
完整异常信息如下:
[06-11 21:35:52.726] [ERROR] [HttpServlet] Error occured when handling uri: /cat/r
java.lang.RuntimeException: Error occured during creating instance of class org.unidal.web.mvc.ActionContext
at org.unidal.lookup.util.ReflectUtils.createInstance(ReflectUtils.java:17)
at org.unidal.web.mvc.lifecycle.DefaultRequestLifecycle.createActionContext(DefaultRequestLifecycle.java:47)
at org.unidal.web.mvc.lifecycle.DefaultRequestLifecycle.handleRequest(DefaultRequestLifecycle.java:248)
at org.unidal.web.mvc.lifecycle.DefaultRequestLifecycle.handle(DefaultRequestLifecycle.java:155)
at org.unidal.web.MVC.service(MVC.java:72)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1221)
at com.dianping.cat.servlet.DomainFilter.doFilter(DomainFilter.java:79)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
at com.dianping.cat.servlet.CatFilter$Context.handle(CatFilter.java:359)
at com.dianping.cat.servlet.CatFilter$CatHandler$3.handle(CatFilter.java:212)
at com.dianping.cat.servlet.CatFilter$Context.handle(CatFilter.java:357)
at com.dianping.cat.servlet.CatFilter$CatHandler$4.handle(CatFilter.java:258)
at com.dianping.cat.servlet.CatFilter$Context.handle(CatFilter.java:357)
at com.dianping.cat.servlet.CatFilter$CatHandler$2.handle(CatFilter.java:195)
at com.dianping.cat.servlet.CatFilter$Context.handle(CatFilter.java:357)
at com.dianping.cat.servlet.CatFilter$CatHandler$1.handle(CatFilter.java:102)
at com.dianping.cat.servlet.CatFilter$Context.handle(CatFilter.java:357)
at com.dianping.cat.servlet.CatFilter.doFilter(CatFilter.java:43)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:399)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
[06-11 21:35:55.810] [ERROR] [HttpServlet] Error occured when handling uri: /cat/r
java.lang.RuntimeException: Error occured during creating instance of class org.unidal.web.mvc.ActionContext
at org.unidal.lookup.util.ReflectUtils.createInstance(ReflectUtils.java:17)
at org.unidal.web.mvc.lifecycle.DefaultRequestLifecycle.createActionContext(DefaultRequestLifecycle.java:47)
at org.unidal.web.mvc.lifecycle.DefaultRequestLifecycle.handleRequest(DefaultRequestLifecycle.java:248)
at org.unidal.web.mvc.lifecycle.DefaultRequestLifecycle.handle(DefaultRequestLifecycle.java:155)
at org.unidal.web.MVC.service(MVC.java:72)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1221)
at com.dianping.cat.servlet.DomainFilter.doFilter(DomainFilter.java:79)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
at com.dianping.cat.servlet.CatFilter$Context.handle(CatFilter.java:359)
at com.dianping.cat.servlet.CatFilter$CatHandler$3.handle(CatFilter.java:212)
at com.dianping.cat.servlet.CatFilter$Context.handle(CatFilter.java:357)
at com.dianping.cat.servlet.CatFilter$CatHandler$4.handle(CatFilter.java:258)
at com.dianping.cat.servlet.CatFilter$Context.handle(CatFilter.java:357)
at com.dianping.cat.servlet.CatFilter$CatHandler$2.handle(CatFilter.java:195)
at com.dianping.cat.servlet.CatFilter$Context.handle(CatFilter.java:357)
at com.dianping.cat.servlet.CatFilter$CatHandler$1.handle(CatFilter.java:102)
at com.dianping.cat.servlet.CatFilter$Context.handle(CatFilter.java:357)
at com.dianping.cat.servlet.CatFilter.doFilter(CatFilter.java:43)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:399)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
请知道的指教下,谢谢!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(8)
我也遇到过这个问题,后来试的结果是:jdk1.7而且得是32位的才行
建议JDK去官方下载RPM安装,再构建试试,你下面的提示可能有tool.jar找不到之类的。
升级了,试了也不行,找不到这个jar
回复
找到了https://raw.githubusercontent.com/dianping/cat/mvn-repo/org/unidal/maven/plugins/codegen/2.3.2/codegen-2.3.2.jar
请问楼主,你是怎么构建成功的,好像找不到
```
org.unidal.maven.plugins:codegen-maven-plugin:jar:2.1.3
```
安装JDK7后,更改JAVA变量,重新构建项目和CAT配置,显示正常。
用jdk7不要用8!
你应该是没有按照上面步骤运行