我改变了我的应用程序的工作流程,删除了以前使用过的4个操作。当代码没有引用该操作时,为什么我找不到Action?
我改变了,所以我不再有creditcardsaved,achsaved和其他一些行动。
在我的日志文件,我得到的错误
"payment.creditcardsaved action not found"
其他3个行动还没有登录同样的问题。我已经搜遍了我的项目,而且我没有在任何地方引用creditcardsaved操作。我仍然渲染该模板,但直接使用renderTemplate(“Payment/CreditCardSaved.html”,args)渲染它;
此前有控制器
public static void creditcardsaved() {}
保存方法public static void SaveCreditCard
保存付款,然后叫creditcardsaved()操作的方法。从任何角度都没有提到这个行为。
我不再想单独行动到creditcardsaved(),我不希望它显示在URL中。因此,我不是在SaveCreditCard方法的末尾调用它,而是将其更改为renderTemplate(“Payment/CreditCardSaved.html”,args);而不是在SaveCreditCard方法的末尾调用该方法。
屏幕上的输出将与之前的输出相匹配,但url应该是SaveCreditCard。我也删除了方法creditcardsaved(),所以它不会在任何地方被意外调用。
错误的错误完整堆栈跟踪是。
ERROR play - @67bi2d4oj payment.creditcardsaved action not found Action not found Action payment.creditcardsaved could not be found. Error raised is No method public static void creditcardsaved() was found in class controllers.payment play.exceptions.ActionNotFoundException: Action payment.creditcardsaved not found at play.mvc.ActionInvoker.getActionMethod(ActionInvoker.java:447) at play.mvc.ActionInvoker.invoke(ActionInvoker.java:76) at play.server.ServletWrapper$ServletInvocation.execute(ServletWrapper.java:472) at play.Invoker$Invocation.run(Invoker.java:187) at play.server.ServletWrapper$ServletInvocation.run(ServletWrapper.java:463) at play.Invoker.invokeInThread(Invoker.java:61) at play.server.ServletWrapper.service(ServletWrapper.java:113) at javax.servlet.http.HttpServlet.service(HttpServlet.java:831) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1657) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:939) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:502) at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:179) at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3826) at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:276) at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:931) at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1583) at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:445) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:504) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:301) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:275) at com.ibm.ws.ssl.channel.impl.SSLConnectionLink.determineNextChannel(SSLConnectionLink.java:1016) at com.ibm.ws.ssl.channel.impl.SSLConnectionLink$MyReadCompletedCallback.complete(SSLConnectionLink.java:639) at com.ibm.ws.ssl.channel.impl.SSLReadServiceContext$SSLReadCompletedCallback.complete(SSLReadServiceContext.java:1772) at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165) at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217) at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161) at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138) at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204) at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775) at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1563) Caused by: java.lang.Exception: No method public static void creditcardsaved() was found in class controllers.payment ... 32 more
已移除操作?你的意思是你的控制器上的方法?这个问题需要更多细节才能得到很好的回答。你从什么开始?你做了什么?你期望什么?确切的错误信息是什么,它死在哪一行? –