终于完成了一部分ExtJS

偶泪滴嘎嘎,终于,终于变成了一部分ExtJS。
(基础坚实一点,会有实益的,排错的时候就体现出来了)
下边就Ext.Direct做一些排错笔记:

错误一

复制代码 代码如下:

严重: StandardWrapper.Throwable
java.lang.ArrayIndexOutOfBoundsException: 1
at
com.softwarementors.extjs.djn.api.RegisteredStandardMethod.isValidFormHandlingMethod(RegisteredStandardMethod.java:53)
at
com.softwarementors.extjs.djn.scanner.Scanner.scanAndRegisterActionClass(Scanner.java:206)
at
com.softwarementors.extjs.djn.scanner.Scanner.scanAndRegisterActionClass(Scanner.java:105)
at
com.softwarementors.extjs.djn.scanner.Scanner.scanAndRegisterApiConfiguration(Scanner.java:82)
at
com.softwarementors.extjs.djn.scanner.Scanner.scanAndRegisterApiConfigurations(Scanner.java:64)
at
com.softwarementors.extjs.djn.servlet.DirectJNgineServlet.createDirectJNgineRouter(DirectJNgineServlet.java:182)
at
com.softwarementors.extjs.djn.servlet.DirectJNgineServlet.init(DirectJNgineServlet.java:155)
at
org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280)
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193)
at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1088)
at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5033)
at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5317)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown
Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
2013-3-28 17:43:52 org.apache.catalina.core.StandardContext
loadOnStartup

那是怎么吧?
答案:
@DirectFormPostMethod
本条不对,这么些爆发了地方的不当,改成: @DirectMethod
再者删掉,由@DirectFormPostMethod生成的出口:

复制代码 代码如下:

import
com.softwarementors.extjs.djn.config.annotations.DirectFormPostMethod;

错误二

复制代码 代码如下:

ERROR:
com.softwarementors.extjs.djn.router.processor.standard.json.JsonRequestProcessor

  • “(Controlled) server error: 1 for Method ‘FormAction.submitData'”
    (rid=1000)
    java.lang.ArrayIndexOutOfBoundsException: 1
    at
    com.softwarementors.extjs.djn.router.processor.standard.json.JsonRequestProcessor.checkJsonMethodParameterTypes(JsonRequestProcessor.java:352)
    at
    com.softwarementors.extjs.djn.router.processor.standard.json.JsonRequestProcessor.getIndividualRequestParameters(JsonRequestProcessor.java:247)
    金沙网址,at
    com.softwarementors.extjs.djn.router.processor.standard.json.JsonRequestProcessor.processIndividualRequest(JsonRequestProcessor.java:404)
    at
    com.softwarementors.extjs.djn.router.processor.standard.json.JsonRequestProcessor.processIndividualRequestsInThisThread(JsonRequestProcessor.java:143)
    at
    com.softwarementors.extjs.djn.router.processor.standard.json.JsonRequestProcessor.process(JsonRequestProcessor.java:126)
    at
    com.softwarementors.extjs.djn.router.RequestRouter.processJsonRequest(RequestRouter.java:83)
    at
    com.softwarementors.extjs.djn.servlet.DirectJNgineServlet.processRequest(DirectJNgineServlet.java:617)
    at
    com.softwarementors.extjs.djn.servlet.DirectJNgineServlet.doPost(DirectJNgineServlet.java:580)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
    at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
    at
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
    at
    org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
    at
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
    at
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
    at
    org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
    at
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
    at
    org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
    at
    org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
    at
    org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown
    Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

调控层出错,也正是逻辑上狼狈,小编的函数里面供给传入的参数,和交由的参数不对,
放心,不是xml配置难点,是流传的参数难点。所以最首要在参数上,也正是语法。

作者的一无所能原因
Java须要传入的参数为多个:

复制代码 代码如下:

public Info submitData(String name,String password)

而我在ExtJS 中实际上传入的参数是一个:

复制代码 代码如下:

var params= username.getValue()+Password.getValue();
FormAction.submitData(params,function(result,e){}

改写一下就行了:

复制代码 代码如下:

FormAction.submitData(username.getValue(),Password.getValue(),function(result,e){}

错误三

复制代码 代码如下:

FATAL: com.softwarementors.extjs.djn.servlet.DirectJNgineServlet –
“Unable to find class
‘com.softwarementors.extjs.djn.test.config.GsonBuilderConfiguratorForTesting'”
()
com.softwarementors.extjs.djn.servlet.ServletConfigurationException:
Unable to find class
‘com.softwarementors.extjs.djn.test.config.GsonBuilderConfiguratorForTesting’
at
com.softwarementors.extjs.djn.servlet.ServletConfigurationException.forClassNotFound(ServletConfigurationException.java:63)
at
com.softwarementors.extjs.djn.servlet.DirectJNgineServlet.getGsonBuilderConfiguratorClass(DirectJNgineServlet.java:362)
at
com.softwarementors.extjs.djn.servlet.DirectJNgineServlet.createGlobalConfiguration(DirectJNgineServlet.java:324)
at
com.softwarementors.extjs.djn.servlet.DirectJNgineServlet.createDirectJNgineRouter(DirectJNgineServlet.java:164)
at
com.softwarementors.extjs.djn.servlet.DirectJNgineServlet.init(DirectJNgineServlet.java:155)
at
org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280)
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193)
at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1088)
at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5033)
at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5317)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown
Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException:
com.softwarementors.extjs.djn.test.config.GsonBuilderConfiguratorForTesting
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1713)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1558)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at
com.softwarementors.extjs.djn.servlet.DirectJNgineServlet.getGsonBuilderConfiguratorClass(DirectJNgineServlet.java:353)
… 16 more
2013-3-28 17:59:39 org.apache.catalina.core.ApplicationContext log
严重: StandardWrapper.Throwable
com.softwarementors.extjs.djn.servlet.ServletConfigurationException:
Unable to find class
‘com.softwarementors.extjs.djn.test.config.GsonBuilderConfiguratorForTesting’
at
com.softwarementors.extjs.djn.servlet.ServletConfigurationException.forClassNotFound(ServletConfigurationException.java:63)
at
com.softwarementors.extjs.djn.servlet.DirectJNgineServlet.getGsonBuilderConfiguratorClass(DirectJNgineServlet.java:362)
at
com.softwarementors.extjs.djn.servlet.DirectJNgineServlet.createGlobalConfiguration(DirectJNgineServlet.java:324)
at
com.softwarementors.extjs.djn.servlet.DirectJNgineServlet.createDirectJNgineRouter(DirectJNgineServlet.java:164)
at
com.softwarementors.extjs.djn.servlet.DirectJNgineServlet.init(DirectJNgineServlet.java:155)
at
org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280)
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193)
at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1088)
at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5033)
at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5317)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown
Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException:
com.softwarementors.extjs.djn.test.config.GsonBuilderConfiguratorForTesting
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1713)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1558)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at
com.softwarementors.extjs.djn.servlet.DirectJNgineServlet.getGsonBuilderConfiguratorClass(DirectJNgineServlet.java:353)
… 16 more
2013-3-28 17:59:39 org.apache.catalina.core.StandardContext
loadOnStartup
严重: Servlet /DirectJS threw load() exception
java.lang.ClassNotFoundException:
com.softwarementors.extjs.djn.test.config.GsonBuilderConfiguratorForTesting
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1713)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1558)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at
com.softwarementors.extjs.djn.servlet.DirectJNgineServlet.getGsonBuilderConfiguratorClass(DirectJNgineServlet.java:353)
at
com.softwarementors.extjs.djn.servlet.DirectJNgineServlet.createGlobalConfiguration(DirectJNgineServlet.java:324)
at
com.softwarementors.extjs.djn.servlet.DirectJNgineServlet.createDirectJNgineRouter(DirectJNgineServlet.java:164)
at
com.softwarementors.extjs.djn.servlet.DirectJNgineServlet.init(DirectJNgineServlet.java:155)
at
org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280)
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193)
at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1088)
at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5033)
at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5317)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown
Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

由来是里面未有这么些类
com.softwarementors.extjs.djn.test.config.GsonBuilderConfiguratorForTesting
其一错误在web.xml里面,把它们删了就行了:

复制代码 代码如下:

<init-param>
<param-name>registryConfiguratorClass</param-name>
<param-value>com.softwarementors.extjs.djn.test.servlet.config.RegistryConfiguratorForTesting</param-value>
</init-param>
<init-param>
<param-name>gsonBuilderConfiguratorClass</param-name>
<param-value>com.softwarementors.extjs.djn.test.config.GsonBuilderConfiguratorForTesting</param-value></init-param>

大致就那多少个,小编的处境正是如此。
(MLGBD,我在百度发博文被封闭扼杀了,已经是第四篇了,小编再也不再百度写博客了,酷路泽百度)
给自家的样例U本田CR-VL吧:

相关文章