访问页面报了stackoverflow的异常

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/qq_34523020/article/details/78722875

早上盯着半天短短的几行代码,找的我心碎,最后还是旁观者清,是自己眼拙!!!不够心细!不说了上图。
@RequestMapping(value="/index",method=RequestMethod.GET)
public String find(){return "index";}

写出这样的代码也只能说自己够蠢,url拦截index,然后接着访问index,不停自己访问自己,然后就溢出了,笑哭!写在这里,给自己提个醒,大家笑着看看就好。哈哈

展开阅读全文

tomcat 7.0 安装时报了异常

07-23

[2012-07-23 12:59:22] [info] Commons Daemon procrun (1.0.10.0 32-bit) startedrn[2012-07-23 12:59:22] [info] Service tomcat7 name Apache Tomcat 7.0 tomcat7rn[2012-07-23 12:59:22] [error] 指定的服务已存在rnrn我选择了忽略rnrn之后开服务就出现自动关闭的异常rnrn2012-7-23 13:34:05 org.apache.catalina.core.AprLifecycleListener initrn信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files (x86)\Apache Software Foundation\Tomcat 7.0\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;E:\oracle\product\10.2.0\db_1\bin;%JAVA_HOME%/bin;D:/jakarta-tomcat-5.0.30/bin; C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\;C:\Program Files (x86) Java\jdk1.6.0_10/bin;C:\Program Files (x86)\Apache Software Foundation\Tomcat 7.0/bin;C:\Program Files (x86) Java\jdk1.6.0_10bin;C:\Program Files (x86) Java\jdk1.6.0_10\jre\bin;C:\Program Files (x86)\Apache Software Foundation\Tomcat 7.0\binrn2012-7-23 13:34:06 org.apache.coyote.AbstractProtocol initrn信息: Initializing ProtocolHandler ["http-bio-8080"]rn2012-7-23 13:34:06 org.apache.coyote.AbstractProtocol initrn信息: Initializing ProtocolHandler ["ajp-bio-8009"]rn2012-7-23 13:34:06 org.apache.catalina.startup.Catalina loadrn信息: Initialization processed in 334 msrn2012-7-23 13:34:06 org.apache.catalina.core.StandardService startInternalrn信息: Starting service Catalinarn2012-7-23 13:34:06 org.apache.catalina.core.StandardEngine startInternalrn信息: Starting Servlet Engine: Apache Tomcat/7.0.29rn2012-7-23 13:34:06 org.apache.catalina.startup.HostConfig deployDirectoryrn信息: Deploying web application directory C:\Program Files (x86)\Apache Software Foundation\Tomcat 7.0\webapps\docsrn2012-7-23 13:34:06 org.apache.catalina.startup.HostConfig deployDirectoryrn信息: Deploying web application directory C:\Program Files (x86)\Apache Software Foundation\Tomcat 7.0\webapps\managerrn2012-7-23 13:34:06 org.apache.catalina.startup.HostConfig deployDirectoryrn信息: Deploying web application directory C:\Program Files (x86)\Apache Software Foundation\Tomcat 7.0\webapps\ROOTrn2012-7-23 13:34:06 org.apache.coyote.AbstractProtocol startrn信息: Starting ProtocolHandler ["http-bio-8080"]rn2012-7-23 13:34:06 org.apache.coyote.AbstractProtocol startrn信息: Starting ProtocolHandler ["ajp-bio-8009"]rn2012-7-23 13:34:06 org.apache.catalina.startup.Catalina startrn信息: Server startup in 281 msrn2012-7-23 13:34:06 org.apache.catalina.core.StandardServer awaitrn严重: StandardServer.await: create[localhost:8005]: rnjava.net.BindException: Cannot assign requested address: JVM_Bindrn at java.net.PlainSocketImpl.socketBind(Native Method)rn at java.net.PlainSocketImpl.bind(Unknown Source)rn at java.net.ServerSocket.bind(Unknown Source)rn at java.net.ServerSocket.(Unknown Source)rn at org.apache.catalina.core.StandardServer.await(StandardServer.java:427)rn at org.apache.catalina.startup.Catalina.await(Catalina.java:757)rn at org.apache.catalina.startup.Catalina.start(Catalina.java:703)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)rn at java.lang.reflect.Method.invoke(Unknown Source)rn at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:322)rn at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:451)rn2012-7-23 13:34:06 org.apache.coyote.AbstractProtocol pausern信息: Pausing ProtocolHandler ["http-bio-8080"]rn2012-7-23 13:34:08 org.apache.coyote.AbstractProtocol pausern信息: Pausing ProtocolHandler ["ajp-bio-8009"]rn2012-7-23 13:34:10 org.apache.catalina.core.StandardService stopInternalrn信息: Stopping service Catalinarn2012-7-23 13:34:10 org.apache.coyote.AbstractProtocol stoprn信息: Stopping ProtocolHandler ["http-bio-8080"]rn2012-7-23 13:34:12 org.apache.coyote.AbstractProtocol stoprn信息: Stopping ProtocolHandler ["ajp-bio-8009"]rn2012-7-23 13:34:14 org.apache.coyote.AbstractProtocol destroyrn信息: Destroying ProtocolHandler ["http-bio-8080"]rn2012-7-23 13:34:14 org.apache.coyote.AbstractProtocol destroyrn信息: Destroying ProtocolHandler ["ajp-bio-8009"] 论坛

Struts2 json 返回 报了异常

10-24

信息如下:rn2011-10-24 15:43:23 org.apache.catalina.core.StandardWrapperValve invokern严重: Servlet.service() for servlet default threw exceptionrnjava.lang.NoSuchMethodError: com.opensymphony.xwork2.ActionContext.get(Ljava/lang/Object;)Ljava/lang/Object;rn at com.googlecode.jsonplugin.JSONResult.execute(JSONResult.java:104)rn at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:362)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:266)rn at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:165)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:252)rn at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:122)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:179)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:235)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:89)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:130)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:126)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:138)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:165)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:179)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)rn at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:488)rn at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)rn at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)rn at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)rn at java.lang.Thread.run(Thread.java:619)rnrn网上查了下,说是jar包有问题..rnrncommons-beanutils-1.7.0.jar rncommons-collections-3.1.jar rncommons-fileupload-1.2.1.jar rncommons-io-1.3.2.jar rncommons-lang-2.6.jar rncommons-logging.jar rnjsonplugin-0.7.jar rnjson-lib-2.3-jdk15.jar rnfreemarker-2.3.15.jar rnezmorph-1.0.6.jar rnstruts2-core-2.1.8.jar rnxwork-core-2.1.6.jar 相关jar包就这些了,求大牛指导,哪里出问题了 论坛

stackoverflow的问题

12-20

我写一个定制的menu控件,控件里用了topmenu,submenu,menuitem这几个对象(类),每个类都代表一个层次的菜单。但是这里有一个stackoverflow的问题,总是得不到解决,希望那位大虾指点一下。部分程序如下:rnrnrnClass menurnrn rnrn //前面的没有问题,就不贴出来了rnrn public void AddTopmenu(Topmenu tm)rnrn private ArrayList topmenus=new ArrayList();rnrn rn rn if (tm !=null)rn this.topmenus.Add(tm);rn rn rn rn rnrnrnrnClass Topmenurnrn private ArrayList submenus=new ArrayList();rnrn rnpublic void AddSubmenu(Submenu sm)rn rn rn this.submenus.Add(sm);rn rn rnrnrnrnrnrnrnrnrnrnrnClass Submenurnrnrnrn //与这里无关,就省略了rnrnrnrnrnrn 结果在新建了一个webapplication之后,把这个控件放如form中后,我在page-load事件中写入下面的代码:rnrnprivate void Page_Load(object sender, System.EventArgs e)rn rn // 在此处放置用户代码以初始化页面rn Topmenu tm=new Topmenu("sina1","sina");rn Menu1.AddTopmenu(tm);rn Submenu sm=new Submenu("xix","hehe");rn rn rn tm.AddSubmenu(sm); //这一行就有问题了,出现stackoverflow的错误rnrn rnrn 这里我大致说一下我的menu的实现原理:rn 在每一个上层菜单对象里放入一个arraylist的成员来存储下一级的菜单,便于在输出的时候可以通过这个成员来输出下一级的菜单,但是这里就出现了这个overflow的问题,请大峡指点一二,谢谢了,如果方便,请留下您的联系方式,qq或者emailrn 论坛

没有更多推荐了,返回首页