老师好,店铺授权二维码的问题
来源:14-14 店铺授权之部署以及远程调试
慕雪9541260
2020-01-02
老师,我跟着做到了14-14章,项目打包部署好之后,不管是本地还是服务器上都是可以显示二维码的,但是当我第一次用另一个微信(已经关注测试号)扫码授权之后,成功跳转操作成功界面,然后刷新店家授权管理界面也成功显示多了一条员工信息,应该算是成功了。但是当我重新再进店铺授权管理页的时候,二维码就再也不出现了(之前还没有授权员工前一直都有的,不管刷新多少次,但是授权一次之后就不出现了),然后我删掉那条员工记录或者重新打包项目都是已经不能再出现二维码了。老师可以帮我排查一下原因吗?万分感谢!具体截图如下。
代码报错为:
user dose not have resource to register long term short url
2020-01-02 15:24:33.708 [http-nio-8080-exec-3] ERROR o.a.c.c.C.[.[localhost].[/o2o].[dispatcherServlet] - Servlet.service() for servlet [dispatcherServlet] in context with path [/o2o] threw exception [Request processing failed; nested exception is java.lang.IllegalArgumentException: Found empty contents] with root cause
java.lang.IllegalArgumentException: Found empty contents
at com.google.zxing.qrcode.QRCodeWriter.encode(QRCodeWriter.java:55)
at com.google.zxing.MultiFormatWriter.encode(MultiFormatWriter.java:102)
at com.wzxy.o2o.util.CodeUtil.generateQRCodeStream(CodeUtil.java:51)
at com.wzxy.o2o.web.shopadmin.ShopAuthManagementController.generateQRCode4ShopAuth(ShopAuthManagementController.java:207)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:892)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:797)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1039)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:942)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1005)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:897)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:645)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:882)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:750)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:109)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocolConnectionHandler.process(AbstractProtocol.java:853)atorg.apache.tomcat.util.net.NioEndpointConnectionHandler.process(AbstractProtocol.java:853)
at org.apache.tomcat.util.net.NioEndpointConnectionHandler.process(AbstractProtocol.java:853)atorg.apache.tomcat.util.net.NioEndpointSocketProcessor.doRun(NioEndpoint.java:1587)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutorWorker.run(UnknownSource)atorg.apache.tomcat.util.threads.TaskThreadWorker.run(Unknown Source)
at org.apache.tomcat.util.threads.TaskThreadWorker.run(UnknownSource)atorg.apache.tomcat.util.threads.TaskThreadWrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Unknown Source)
我百度了这个原因,说是短地址接口到期了,无法再生成短url了,可是我上一秒还是成功加载出来的啊,而且短地址免费点数还有80多点,而且我用的短地址ShortNetAddressUtil工具类是您最新改的这种
麻烦老师了!
3回答
-
慕雪9541260
提问者
2020-01-03
通过大佬的帮助,暂时解决了,分享一下,修改这三处地方还可以继续用。
022020-01-04 -
慕雪9541260
提问者
2020-01-02
如果用这个的话,https://segmentfault.com/a/1190000021159027?utm_source=tag-newest
我应该怎么替换代码,老师可以教一下吗,谢谢!
012020-01-02 -
慕雪9541260
提问者
2020-01-02
我再去ShortNetAddressUtil工具类运行该类,昨天和今天都是直接输出一个短地址,授权了一次之后就输出这个了,是我的原因,还是百度接口又不能用了,有什么办法吗
(我用的这个类是您给的这个,已经换成我的token了:https://coding.imooc.com/learn/questiondetail/149313.html)
022020-01-03
相似问题