jfinal_weixin开发问题

wangzkui1983 发布于 2016/04/20 16:35
阅读 651
收藏 0

@JFinal 你好,想跟你请教个问题:


jfinal_weixin开发怎么在启动之后,访问http://localhost/msg报500错误,本人是新手,希望能得到你的帮助!


------------------------------------------------------------------------------------------------


接收消息:




[Fatal Error] :1:1: 文件提前结束。
四月 20, 2016 3:21:56 下午 com.jfinal.core.ActionHandler error
SEVERE: /msg
java.lang.RuntimeException: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; 文件提前结束。
at com.jfinal.weixin.sdk.kit.XmlKit.parse(XmlKit.java:45)
at com.jfinal.weixin.sdk.msg.InMsgParser.parse(InMsgParser.java:38)
at com.jfinal.weixin.sdk.jfinal.MsgController.getInMsg(MsgController.java:141)
at com.jfinal.weixin.sdk.jfinal.MsgController.index(MsgController.java:54)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at com.jfinal.aop.Invocation.invoke(Invocation.java:73)
at com.jfinal.weixin.sdk.jfinal.MsgInterceptor.intercept(MsgInterceptor.java:46)
at com.jfinal.aop.Invocation.invoke(Invocation.java:67)
at com.jfinal.core.ActionHandler.handle(ActionHandler.java:74)
at com.jfinal.core.JFinalFilter.doFilter(JFinalFilter.java:72)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1307)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:453)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:560)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1072)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:382)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1006)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at org.eclipse.jetty.server.Server.handle(Server.java:365)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:485)
at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:926)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:988)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:635)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:628)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
at java.lang.Thread.run(Thread.java:722)
Caused by: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; 文件提前结束。
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:251)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:300)
at com.jfinal.weixin.sdk.kit.XmlKit.parse(XmlKit.java:39)
... 35 more

加载中
1
如梦技术
如梦技术

这玩意本来就是不能直接在浏览器打开的,这样的问题在osc上有很多了,下次遇到啥问题先在右上角得搜索栏中搜索一下比如:jfinal weixin 文件提前结束

http://www.oschina.net/search?scope=bbs&q=jfinal+weixin+%E6%96%87%E4%BB%B6%E6%8F%90%E5%89%8D%E7%BB%93%E6%9D%9F

0
JFinal
JFinal
  得用微信客户端发送请求,直接浏览器打开仅仅是请求了一个 url,并没有传递合适的参数
wangzkui1983
wangzkui1983
谢谢!
0
C
Chark-Leo

兄弟怎么解决的

OSCHINA
登录后可查看更多优质内容
返回顶部
顶部