NutzCN Logo
问答 Fail to born or cast to 'long' by args: [] because: No suitable Constructor or Factory Method!!
发布于 2500天前 作者 qq_90ecf8d5 3949 次浏览 复制 上一个帖子 下一个帖子
标签:

org.nutz.lang.born.BorningException: Fail to born or cast to 'long'
by args: []
because: No suitable Constructor or Factory Method!!
at org.nutz.lang.Mirror.getBorning(Mirror.java:954)
at org.nutz.mvc.adaptor.injector.ObjectPairInjector.(ObjectPairInjector.java:38)
at org.nutz.mvc.adaptor.PairAdaptor.evalInjectorBy(PairAdaptor.java:54)
at org.nutz.mvc.adaptor.AbstractAdaptor.evalInjector(AbstractAdaptor.java:192)
at org.nutz.mvc.adaptor.AbstractAdaptor.init(AbstractAdaptor.java:131)
at org.nutz.mvc.impl.processor.AdaptorProcessor.evalHttpAdaptor(AdaptorProcessor.java:40)
at org.nutz.mvc.impl.processor.AdaptorProcessor.init(AdaptorProcessor.java:23)
at org.nutz.mvc.impl.NutActionChainMaker.eval(NutActionChainMaker.java:38)
at org.nutz.mvc.impl.UrlMappingImpl.add(UrlMappingImpl.java:54)
at org.nutz.mvc.impl.NutLoading.evalUrlMapping(NutLoading.java:201)
at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:108)
at org.nutz.mvc.ActionHandler.(ActionHandler.java:19)
at org.nutz.mvc.NutFilter._init(NutFilter.java:91)
at org.nutz.mvc.NutFilter.init(NutFilter.java:69)
at com.kf.dms.web.filter.DmsNutzFilter.init(DmsNutzFilter.java:29)
at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)
at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:105)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4809)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5485)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1229)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1875)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
2018-01-11 10:34:24,793 [ERROR-localhost-startStop-1:14080] org.nutz.mvc.impl.NutLoading.load(NutLoading.java:125) Error happend during start serivce!
org.nutz.lang.born.BorningException: Fail to born or cast to 'long'
by args: []
because: No suitable Constructor or Factory Method!!
at org.nutz.lang.Mirror.getBorning(Mirror.java:954)
at org.nutz.mvc.adaptor.injector.ObjectPairInjector.(ObjectPairInjector.java:38)
at org.nutz.mvc.adaptor.PairAdaptor.evalInjectorBy(PairAdaptor.java:54)
at org.nutz.mvc.adaptor.AbstractAdaptor.evalInjector(AbstractAdaptor.java:192)
at org.nutz.mvc.adaptor.AbstractAdaptor.init(AbstractAdaptor.java:131)
at org.nutz.mvc.impl.processor.AdaptorProcessor.evalHttpAdaptor(AdaptorProcessor.java:40)
at org.nutz.mvc.impl.processor.AdaptorProcessor.init(AdaptorProcessor.java:23)
at org.nutz.mvc.impl.NutActionChainMaker.eval(NutActionChainMaker.java:38)
at org.nutz.mvc.impl.UrlMappingImpl.add(UrlMappingImpl.java:54)
at org.nutz.mvc.impl.NutLoading.evalUrlMapping(NutLoading.java:201)
at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:108)
at org.nutz.mvc.ActionHandler.(ActionHandler.java:19)
at org.nutz.mvc.NutFilter._init(NutFilter.java:91)
at org.nutz.mvc.NutFilter.init(NutFilter.java:69)
at com.kf.dms.web.filter.DmsNutzFilter.init(DmsNutzFilter.java:29)
at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)
at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:105)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4809)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5485)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1229)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1875)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
2018-01-11 10:34:24,804 [ERROR-localhost-startStop-1:14091] org.nutz.mvc.impl.NutLoading.load(NutLoading.java:127) try to depose ioc
2018-01-11 10:34:24,812 [INFO-localhost-startStop-1:14099] org.nutz.ioc.impl.NutIoc.depose(NutIoc.java:255) org.nutz.ioc.impl.NutIoc@445282070 is closing. startup date [18-01-11 10:34:22.027]
2018-01-11 10:34:24,821 [INFO-localhost-startStop-1:14108] org.nutz.ioc.impl.NutIoc.depose(NutIoc.java:262) org.nutz.ioc.impl.NutIoc@445282070 is deposed. startup date [18-01-11 10:34:22.027]
һ�� 11, 2018 10:34:24 ���� org.apache.catalina.core.StandardContext filterStart
����: Exception starting filter nutz
org.nutz.mvc.LoadingException: org.nutz.lang.born.BorningException: Fail to born or cast to 'long'
by args: []
because: No suitable Constructor or Factory Method!!
at org.nutz.mvc.LoadingException$FC$9a86caf9ff5d3b587784fcdf555a4a7d.invoke(LoadingException.java)
at org.nutz.lang.born.AbstractConstructorBorning.call(AbstractConstructorBorning.java:25)
at org.nutz.lang.born.ConstructorBorning.born(ConstructorBorning.java:19)
at org.nutz.lang.born.BornContext.doBorn(BornContext.java:60)
at org.nutz.lang.Mirror.born(Mirror.java:990)
at org.nutz.lang.Lang.wrapThrow(Lang.java:200)
at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:135)
at org.nutz.mvc.ActionHandler.(ActionHandler.java:19)
at org.nutz.mvc.NutFilter._init(NutFilter.java:91)
at org.nutz.mvc.NutFilter.init(NutFilter.java:69)
at com.kf.dms.web.filter.DmsNutzFilter.init(DmsNutzFilter.java:29)
at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)
at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:105)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4809)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5485)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1229)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1875)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.nutz.lang.born.BorningException: Fail to born or cast to 'long'
by args: []
because: No suitable Constructor or Factory Method!!
at org.nutz.lang.Mirror.getBorning(Mirror.java:954)
at org.nutz.mvc.adaptor.injector.ObjectPairInjector.(ObjectPairInjector.java:38)
at org.nutz.mvc.adaptor.PairAdaptor.evalInjectorBy(PairAdaptor.java:54)
at org.nutz.mvc.adaptor.AbstractAdaptor.evalInjector(AbstractAdaptor.java:192)
at org.nutz.mvc.adaptor.AbstractAdaptor.init(AbstractAdaptor.java:131)
at org.nutz.mvc.impl.processor.AdaptorProcessor.evalHttpAdaptor(AdaptorProcessor.java:40)
at org.nutz.mvc.impl.processor.AdaptorProcessor.init(AdaptorProcessor.java:23)
at org.nutz.mvc.impl.NutActionChainMaker.eval(NutActionChainMaker.java:38)
at org.nutz.mvc.impl.UrlMappingImpl.add(UrlMappingImpl.java:54)
at org.nutz.mvc.impl.NutLoading.evalUrlMapping(NutLoading.java:201)
at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:108)
... 20 more

22 回复
Caused by: org.nutz.lang.born.BorningException: Fail to born or cast to 'long'
 by args: []
 because: No suitable Constructor or Factory Method!!

用 插入日志 按钮重新贴一次

org.nutz.lang.born.BorningException: Fail to born or cast to 'long'
 by args: []
 because: No suitable Constructor or Factory Method!!
	at org.nutz.lang.Mirror.getBorning(Mirror.java:954)
	at org.nutz.mvc.adaptor.injector.ObjectPairInjector.<init>(ObjectPairInjector.java:38)
	at org.nutz.mvc.adaptor.PairAdaptor.evalInjectorBy(PairAdaptor.java:54)
	at org.nutz.mvc.adaptor.AbstractAdaptor.evalInjector(AbstractAdaptor.java:192)
	at org.nutz.mvc.adaptor.AbstractAdaptor.init(AbstractAdaptor.java:131)
	at org.nutz.mvc.impl.processor.AdaptorProcessor.evalHttpAdaptor(AdaptorProcessor.java:40)
	at org.nutz.mvc.impl.processor.AdaptorProcessor.init(AdaptorProcessor.java:23)
	at org.nutz.mvc.impl.NutActionChainMaker.eval(NutActionChainMaker.java:38)
	at org.nutz.mvc.impl.UrlMappingImpl.add(UrlMappingImpl.java:54)
	at org.nutz.mvc.impl.NutLoading.evalUrlMapping(NutLoading.java:201)
	at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:108)
	at org.nutz.mvc.ActionHandler.<init>(ActionHandler.java:19)
	at org.nutz.mvc.NutFilter._init(NutFilter.java:91)
	at org.nutz.mvc.NutFilter.init(NutFilter.java:69)
	at com.kf.dms.web.filter.DmsNutzFilter.init(DmsNutzFilter.java:29)
	at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)
	at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)
	at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105)
	at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4809)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5485)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1229)
	at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1875)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)
2018-01-11 10:34:24,793 [ERROR-localhost-startStop-1:14080] org.nutz.mvc.impl.NutLoading.load(NutLoading.java:125) Error happend during start serivce!
org.nutz.lang.born.BorningException: Fail to born or cast to 'long'
 by args: []
 because: No suitable Constructor or Factory Method!!
	at org.nutz.lang.Mirror.getBorning(Mirror.java:954)
	at org.nutz.mvc.adaptor.injector.ObjectPairInjector.<init>(ObjectPairInjector.java:38)
	at org.nutz.mvc.adaptor.PairAdaptor.evalInjectorBy(PairAdaptor.java:54)
	at org.nutz.mvc.adaptor.AbstractAdaptor.evalInjector(AbstractAdaptor.java:192)
	at org.nutz.mvc.adaptor.AbstractAdaptor.init(AbstractAdaptor.java:131)
	at org.nutz.mvc.impl.processor.AdaptorProcessor.evalHttpAdaptor(AdaptorProcessor.java:40)
	at org.nutz.mvc.impl.processor.AdaptorProcessor.init(AdaptorProcessor.java:23)
	at org.nutz.mvc.impl.NutActionChainMaker.eval(NutActionChainMaker.java:38)
	at org.nutz.mvc.impl.UrlMappingImpl.add(UrlMappingImpl.java:54)
	at org.nutz.mvc.impl.NutLoading.evalUrlMapping(NutLoading.java:201)
	at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:108)
	at org.nutz.mvc.ActionHandler.<init>(ActionHandler.java:19)
	at org.nutz.mvc.NutFilter._init(NutFilter.java:91)
	at org.nutz.mvc.NutFilter.init(NutFilter.java:69)
	at com.kf.dms.web.filter.DmsNutzFilter.init(DmsNutzFilter.java:29)
	at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)
	at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)
	at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105)
	at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4809)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5485)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1229)
	at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1875)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)
2018-01-11 10:34:24,804 [ERROR-localhost-startStop-1:14091] org.nutz.mvc.impl.NutLoading.load(NutLoading.java:127) try to depose ioc
2018-01-11 10:34:24,812 [INFO-localhost-startStop-1:14099] org.nutz.ioc.impl.NutIoc.depose(NutIoc.java:255) org.nutz.ioc.impl.NutIoc@445282070 is closing. startup date [18-01-11 10:34:22.027]
2018-01-11 10:34:24,821 [INFO-localhost-startStop-1:14108] org.nutz.ioc.impl.NutIoc.depose(NutIoc.java:262) org.nutz.ioc.impl.NutIoc@445282070 is deposed. startup date [18-01-11 10:34:22.027]
һ�� 11, 2018 10:34:24 ���� org.apache.catalina.core.StandardContext filterStart
����: Exception starting filter nutz
org.nutz.mvc.LoadingException: org.nutz.lang.born.BorningException: Fail to born or cast to 'long'
 by args: []
 because: No suitable Constructor or Factory Method!!
	at org.nutz.mvc.LoadingException$FC$9a86caf9ff5d3b587784fcdf555a4a7d.invoke(LoadingException.java)
	at org.nutz.lang.born.AbstractConstructorBorning.call(AbstractConstructorBorning.java:25)
	at org.nutz.lang.born.ConstructorBorning.born(ConstructorBorning.java:19)
	at org.nutz.lang.born.BornContext.doBorn(BornContext.java:60)
	at org.nutz.lang.Mirror.born(Mirror.java:990)
	at org.nutz.lang.Lang.wrapThrow(Lang.java:200)
	at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:135)
	at org.nutz.mvc.ActionHandler.<init>(ActionHandler.java:19)
	at org.nutz.mvc.NutFilter._init(NutFilter.java:91)
	at org.nutz.mvc.NutFilter.init(NutFilter.java:69)
	at com.kf.dms.web.filter.DmsNutzFilter.init(DmsNutzFilter.java:29)
	at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)
	at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)
	at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105)
	at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4809)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5485)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1229)
	at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1875)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)
Caused by: org.nutz.lang.born.BorningException: Fail to born or cast to 'long'
 by args: []
 because: No suitable Constructor or Factory Method!!
	at org.nutz.lang.Mirror.getBorning(Mirror.java:954)
	at org.nutz.mvc.adaptor.injector.ObjectPairInjector.<init>(ObjectPairInjector.java:38)
	at org.nutz.mvc.adaptor.PairAdaptor.evalInjectorBy(PairAdaptor.java:54)
	at org.nutz.mvc.adaptor.AbstractAdaptor.evalInjector(AbstractAdaptor.java:192)
	at org.nutz.mvc.adaptor.AbstractAdaptor.init(AbstractAdaptor.java:131)
	at org.nutz.mvc.impl.processor.AdaptorProcessor.evalHttpAdaptor(AdaptorProcessor.java:40)
	at org.nutz.mvc.impl.processor.AdaptorProcessor.init(AdaptorProcessor.java:23)
	at org.nutz.mvc.impl.NutActionChainMaker.eval(NutActionChainMaker.java:38)
	at org.nutz.mvc.impl.UrlMappingImpl.add(UrlMappingImpl.java:54)
	at org.nutz.mvc.impl.NutLoading.evalUrlMapping(NutLoading.java:201)
	at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:108)
	... 20 more

报错之前的10行日志贴一下

看到错误了,谢谢了。

什么错误?

@wendal 遇到相同的错误了。

org.nutz.json.JsonException: !Json syntax error nearby [row:1,col:1 char 'm'], reason: 'Unexpect String = mCustomerStoreId=1840'
	at org.nutz.json.impl.JsonTokenScan.readObject(JsonCompileImplV2.java:300)
	at org.nutz.json.impl.JsonTokenScan.read(JsonCompileImplV2.java:356)
	at org.nutz.json.impl.JsonCompileImplV2.parse(JsonCompileImplV2.java:26)
	at org.nutz.json.Json.fromJson(Json.java:42)
	at org.nutz.mvc.adaptor.JsonAdaptor.getReferObject(JsonAdaptor.java:41)
	at org.nutz.mvc.adaptor.AbstractAdaptor.adapt(AbstractAdaptor.java:250)
	at org.nutz.mvc.impl.processor.AdaptorProcessor.process(AdaptorProcessor.java:25)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.ActionFiltersProcessor.process(ActionFiltersProcessor.java:58)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.ModuleProcessor.process(ModuleProcessor.java:123)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.EncodingProcessor.process(EncodingProcessor.java:27)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.UpdateRequestAttributesProcessor.process(UpdateRequestAttributesProcessor.java:15)
	at org.nutz.mvc.impl.NutActionChain.doChain(NutActionChain.java:44)
	at org.nutz.mvc.impl.ActionInvoker.invoke(ActionInvoker.java:67)
	at org.nutz.mvc.ActionHandler.handle(ActionHandler.java:31)
	at org.nutz.mvc.NutFilter.doFilter(NutFilter.java:202)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:528)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1099)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:670)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1520)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1476)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:748)

浏览器上显示的
content-type :application/json;charset=UTF-8
参数:
mCustomerStoreId 1840

状态码是 200....

var ret = public_getServerData(
					"${base!}/hrp/kh/customer/controller/mCustomerStore/queryCustomerStoreById", {
						"mCustomerStoreId" : node.id  //number类型的数据
					});

ajax 请求

$.ajax({
		type : 'POST',
		url : surl,
		data : JSON.stringify(tempJsonObj),
		dataType : "json",

之前错误跟他一样,现在是这个错误。。。。

贴入口方法看看

上面都贴了的。。。。
var ret = public_getServerData(
"${base!}/hrp/kh/customer/controller/mCustomerStore/queryCustomerStoreById", {
"mCustomerStoreId" : node.id //number类型的数据
});
这个就是入口方法。

$.ajax({
type : 'POST',
url : surl,
data : JSON.stringify(tempJsonObj),
dataType : "json"

ajax的配置
@wendal

@At("/queryCustomerStoreById")
@Ok("json")
@AdaptBy(type = JsonAdaptor.class)
public Object queryCustomerStoreById(@Param("mCustomerStoreId")long mCustomerStoreId) {
return customerStoreService.queryCustomerStoreById(mCustomerStoreId);
}

f12,看看浏览器发送的是不是json字符串

是json。在上面也说了.....
浏览器上显示的
content-type :application/json;charset=UTF-8
参数:
mCustomerStoreId 1840

状态码是 200....

用 "插入代码" 按钮!!!

这个貌似是网页显示的数据。

浏览器上显示的
content-type :application/json;charset=UTF-8
参数:
mCustomerStoreId 1840

状态码是 200....
mCustomerStoreId 1840

并不是json的样子,下面的才是json

{mCustomerStoreId:1840}
$.ajax({
 type : 'POST',
 url : surl,
 data : JSON.stringify(tempJsonObj),
 dataType : "json"

我再ajax里面配置了
JSON.stringify(tempJsonObj), 
到ajax的参数就是一个obj

var ret = public_getServerData(
 "${base!}/hrp/kh/customer/controller/mCustomerStore/queryCustomerStoreById", {
 "mCustomerStoreId" : node.id //number类型的数据
 });

@wendal 我都通过JSON.stringify(tempJsonObj)去转了。mCustomerStoreId 1840 这个只是在浏览器上f12看请求里面的参数,不是打印出来的,打印出来的是

{mCustomerStoreId:“1840“}

这样吧,你单独写个页面来测试吧,data的数据也写死成合法的json,测试一下

把f12的请求截图一下

添加回复
请先登陆
回到顶部