收藏
回答

公众号服务器配置url,验证token一直出错,为什么?

江湖救急:

在公众号A上配置好url,token验证通过并能正常跑起来,

但在公众号B上配置相同的配置,却一直提示token验证失败,后台报错:

Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.dom4j.DocumentException: Error on line 1 of document  : 文件提前结束。] with root cause




回答关注问题邀请回答
收藏

3 个回答

  • 唐斌宗
    唐斌宗
    2020-08-05

    我也遇到这个问题了,,只不过我的是ssl证书忘了换了。。找了半天,用postman测出来的

    2020-08-05
    有用 1
    回复
  • 王浩Hanks🇨🇳
    王浩Hanks🇨🇳
    2019-11-20

    同一个接口吗?对请求做不同公众号的区分了吗

    2019-11-20
    有用
    回复 11
    • Ethan文
      Ethan文
      2019-11-20
      2个接口,两个token,其他都是一样,一个测试一个正式,测试通过,正式一直验证失败
      2019-11-20
      回复
    • 王浩Hanks🇨🇳
      王浩Hanks🇨🇳
      2019-11-20回复Ethan文
      B的接收不到消息了?同样的环境?
      2019-11-20
      回复
    • Ethan文
      Ethan文
      2019-11-20回复王浩Hanks🇨🇳
      B在提交验证token,就提示验证失败了
      2019-11-20
      回复
    • Ethan文
      Ethan文
      2019-11-20
      配置的url可以单独访问,token在代码中也和配置的token一致,一验证就提示“文件提前结束”
      2019-11-20
      回复
    • 王浩Hanks🇨🇳
      王浩Hanks🇨🇳
      2019-11-20回复Ethan文
      俩环境一样吗?你后台报错。。。似曾相识,我也想不起来了,尴尬
      2019-11-20
      回复
    查看更多(6)
  • Ethan文
    Ethan文
    2019-11-20

    详细日志:

    org.xml.sax.SAXParseException: 文件提前结束。

    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203) ~[na:1.8.0_111]

    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:177) ~[na:1.8.0_111]

    at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:400) ~[na:1.8.0_111]

    at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327) ~[na:1.8.0_111]

    at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1472) ~[na:1.8.0_111]

    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:1014) ~[na:1.8.0_111]

    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602) ~[na:1.8.0_111]

    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112) ~[na:1.8.0_111]

    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505) ~[na:1.8.0_111]

    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:841) ~[na:1.8.0_111]

    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:770) ~[na:1.8.0_111]

    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141) ~[na:1.8.0_111]

    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213) ~[na:1.8.0_111]

    at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643) ~[na:1.8.0_111]

    at org.dom4j.io.SAXReader.read(SAXReader.java:445) ~[dom4j-2.1.1.jar!/:na]

    at org.dom4j.io.SAXReader.read(SAXReader.java:325) ~[dom4j-2.1.1.jar!/:na]

    at cn.helpin.token.base.BaseUtils.xmlToMap(BaseUtils.java:51) ~[classes!/:0.0.1]

    at cn.helpin.token.VerifyTokenController.verifyWXToken(VerifyTokenController.java:54) ~[classes!/:0.0.1]

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_111]

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_111]

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_111]

    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_111]

    at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190) ~[spring-web-5.2.1.RELEASE.jar!/:5.2.1.RELEASE]

    at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138) ~[spring-web-5.2.1.RELEASE.jar!/:5.2.1.RELEASE]

    at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:106) ~[spring-webmvc-5.2.1.RELEASE.jar!/:5.2.1.RELEASE]

    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:888) ~[spring-webmvc-5.2.1.RELEASE.jar!/:5.2.1.RELEASE]

    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:793) ~[spring-webmvc-5.2.1.RELEASE.jar!/:5.2.1.RELEASE]


    2019-11-20
    有用
    回复
登录 后发表内容
问题标签