["EXAMPLE"] is an array, but just "EXAMPLE" as string is expected?
--
You received this message because you are subscribed to the Google Groups "JSON-RPC" group.
To unsubscribe from this group and stop receiving emails from it, send an email to json-rpc+u...@googlegroups.com.
To post to this group, send email to json...@googlegroups.com.
Visit this group at http://groups.google.com/group/json-rpc.
For more options, visit https://groups.google.com/d/optout.
["EXAMPLE"] - это массив, но только "EXAMPLE", как ожидается строка?
26 ноября 2014 г. 19:38 «Андрес Наварро» < nava ... @ gmail.com > писал:Привет ребят,Я собрал свой первый веб-сервис JSON-RPC, используя ваш фреймворк, и получил эту ошибку.Я не уверен, о чем это, но я просмотрел мини-учебник, который у вас есть ( https://github.com/ briandilley / jsonrpc4j ), и все выглядит хорошо.Я использую версию 1.1 с Spring и «Автообнаружение с аннотациями».Вот мой интерфейс:@JsonRpcService ( "/ jsonrpc")открытый интерфейс TickerListService {@JsonRpcMethod (" getTickerLists")public List <TickerList> getTickerLists (@JsonRpcParam (" custCode") final String custCode);....и вот моя реализация:@Составная частьоткрытый класс TickerListServiceImpl реализует TickerListService {
@Overridepublic List <TickerList> getTickerLists (final String custCode) {
-вернуть тикерListDAOImpl. getTickerLists (custCode);}Вот моя запись контекста приложения XML:<bean class = "com.googlecode. jsonrpc4j.spring. AutoJsonRpcServiceExporter" /><bean class = "com.mine.tickerlist. services. TickerListServiceImpl" />И вот мой запрос от браузера:http: // localhost: 8080 / TickerListService / jsonrpc? { " jsonrpc": "2.0", "method": "getTickerLists", "params": {"custCode": ["EXAMPLE"]}, "id": 1 }Это ошибка, которую я получаю обратно:SEVERE: Servlet.service () для сервлета [spring] в контексте с путем [/ TickerListService] выдало исключение [Ошибка обработки запроса; Вложенным исключением является java.lang. NullPointerException: входная строка была нулевой.] С основной причинойjava.lang. NullPointerException: входная строка была нулевой.на com.googlecode.jsonrpc4j. Base64.decode (Base64.java: 1379)на com.googlecode.jsonrpc4j. Base64.decode (Base64.java: 1357)на com.googlecode.jsonrpc4j. JsonRpcServer. createInputStream ( JsonRpcServer.java:246)на com.googlecode.jsonrpc4j. JsonRpcServer.handle ( JsonRpcServer.java:195)на com.googlecode.jsonrpc4j. spring.JsonServiceExporter. handleRequest ( JsonServiceExporter.java:40)на org.springframework.web. servlet.mvc. HttpRequestHandlerAdapter. дескриптор ( HttpRequestHandlerAdapter. Java: 49)на org.springframework.web. servlet.DispatcherServlet. doDispatch (DispatcherServlet. java: 923)на org.springframework.web. servlet.DispatcherServlet. doService (DispatcherServlet. java: 852)на org.springframework.web. servlet.FrameworkServlet. processRequest ( FrameworkServlet.java:882)на org.springframework.web. servlet.FrameworkServlet. doGet (FrameworkServlet.java: 778)на javax.servlet.http. HttpServlet.service ( HttpServlet.java:620)на javax.servlet.http. HttpServlet.service ( HttpServlet.java:727)в org.apache.catalina.core. ApplicationFilterChain. internalDoFilter ( ApplicationFilterChain.java: 303)в org.apache.catalina.core. ApplicationFilterChain. doFilter ( ApplicationFilterChain.java: 208)в org.apache.tomcat.websocket. server.WsFilter.doFilter ( WsFilter.java:52)в org.apache.catalina.core. ApplicationFilterChain. internalDoFilter ( ApplicationFilterChain.java: 241)в org.apache.catalina.core. ApplicationFilterChain. doFilter ( ApplicationFilterChain.java: 208)в org.springframework.security. web.FilterChainProxy $ VirtualFilterChain.doFilter ( FilterChainProxy.java:330)в org.springframework.security. web.access.intercept. FilterSecurityInterceptor. invoke ( FilterSecurityInterceptor. Java: 118)в org.springframework.security. web.access.intercept. FilterSecurityInterceptor. doFilter ( FilterSecurityInterceptor. java: 84)в org.springframework.security. web.FilterChainProxy $ VirtualFilterChain.doFilter ( FilterChainProxy.java:342)в org.springframework.security. web.access. ExceptionTranslationFilter. doFilter ( ExceptionTranslationFilter. java: 113)в org.springframework.security. web.FilterChainProxy $ VirtualFilterChain.doFilter ( FilterChainProxy.java:342)в org.springframework.security. web.session. SessionManagementFilter. doFilter ( SessionManagementFilter.java: 103)в org.springframework.security. web.FilterChainProxy $ VirtualFilterChain.doFilter ( FilterChainProxy.java:342)в org.springframework.security. web.authentication. AnonymousAuthenticationFilter. doFilter ( AnonymousAuthenticationFilter. java: 113)в org.springframework.security. web.FilterChainProxy $ VirtualFilterChain.doFilter ( FilterChainProxy.java:342)в org.springframework.security. web.servletapi. SecurityContextHolderAwareRequ estFilter.doFilter ( SecurityContextHolderAwareRequ estFilter.java:54)в org.springframework.security. web.FilterChainProxy $ VirtualFilterChain.doFilter ( FilterChainProxy.java:342)в org.springframework.security. web.savedrequest. RequestCacheAwareFilter. doFilter ( RequestCacheAwareFilter.java: 45)в org.springframework.security. web.FilterChainProxy $ VirtualFilterChain.doFilter ( FilterChainProxy.java:342)в org.springframework.security. web.authentication.www. BasicAuthenticationFilter. doFilter ( BasicAuthenticationFilter. java: 201)в org.springframework.security. web.FilterChainProxy $ VirtualFilterChain.doFilter ( FilterChainProxy.java:342)в org.springframework.security. web.context. SecurityContextPersistenceFilt er.doFilter ( SecurityContextPersistenceFilt er.java:87)в org.springframework.security. web.FilterChainProxy $ VirtualFilterChain.doFilter ( FilterChainProxy.java:342)в org.springframework.security. web.FilterChainProxy. doFilterInternal ( FilterChainProxy.java:192)в org.springframework.security. web.FilterChainProxy.doFilter ( FilterChainProxy.java:160)на org.springframework.web. filter.DelegatingFilterProxy. invokeDelegate ( DelegatingFilterProxy.java: 346)на org.springframework.web. filter.DelegatingFilterProxy. doFilter ( DelegatingFilterProxy.java: 259)в org.apache.catalina.core. ApplicationFilterChain. internalDoFilter ( ApplicationFilterChain.java: 241)в org.apache.catalina.core. ApplicationFilterChain. doFilter ( ApplicationFilterChain.java: 208)в org.apache.catalina.core. StandardWrapperValve.invoke ( StandardWrapperValve.java:220)в org.apache.catalina.core. StandardContextValve.invoke ( StandardContextValve.java:122)в org.apache.catalina. аутентификатор. AuthenticatorBase.invoke ( AuthenticatorBase.java:501)в org.apache.catalina.core. StandardHostValve.invoke ( StandardHostValve.java:170)в org.apache.catalina.valves. ErrorReportValve.invoke ( ErrorReportValve.java:98)в org.apache.catalina.valves. AccessLogValve.invoke ( AccessLogValve.java:950)в org.apache.catalina.core. StandardEngineValve.invoke ( StandardEngineValve.java:116)в org.apache.catalina.connector. CoyoteAdapter.service ( CoyoteAdapter.java:408)на org.apache.coyote.http11. AbstractHttp11Processor. процесс ( AbstractHttp11Processor.java: 1040)на org.apache.coyote. AbstractProtocol $ AbstractConnectionHandler. процесс (AbstractProtocol.java: 607)на org.apache.tomcat.util.net. JIoEndpoint $ SocketProcessor. бежать (JIoEndpoint.java:313)на java.util.concurrent. ThreadPoolExecutor.runWorker ( ThreadPoolExecutor.java:1145)на java.util.concurrent. ThreadPoolExecutor $ Worker.run ( ThreadPoolExecutor.java:615)в java.lang.Thread.run (Тема. Java: 745)Спасибо за вашу помощь,Andres
Вы получили это сообщение, потому что вы подписаны на группу JSON-RPC групп Google.
Чтобы отписаться от этой группы и прекратить получать от нее электронные письма, отправьте электронное письмо на адрес json ... @ googlegroups.com .
Чтобы отправить сообщение в эту группу, отправьте электронное письмо на адрес json ... @ googlegroups.com .
Посетите эту группу по адресу http://groups.google.com/ group / json-rpc .
Для получения дополнительной информации посетите страницу https://groups.google.com/d/ optout .