Probleme with johnzon

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Probleme with johnzon

olivier_1
I encounter a problem around Apache Johnzon
in my application i use jackson-jaxrs-json-provider.
server : tomee 7.

when i try to convert the object to json i have exception :

25-Jul-2017 17:15:38.115 WARNING [http-nio-8080-exec-1] org.apache.cxf.phase.PhaseInterceptorChain.doDefaultLogging Interceptor for {http://webservices.pers.refer.icb.bnpparibas.com/}PersonWebService has thrown exception, unwinding now
 org.apache.johnzon.mapper.MapperException: Using fallback converter, this only works in write mode but not in read. Please register a custom converter to do so.
        at org.apache.johnzon.mapper.MappingParserImpl$FallbackConverter.fromString(MappingParserImpl.java:715)
        at org.apache.johnzon.mapper.internal.ConverterAdapter.to(ConverterAdapter.java:37)
        at org.apache.johnzon.mapper.internal.ConverterAdapter.to(ConverterAdapter.java:24)
        at org.apache.johnzon.mapper.MappingParserImpl.convertTo(MappingParserImpl.java:682)
        at org.apache.johnzon.mapper.MappingParserImpl.toObject(MappingParserImpl.java:523)
        at org.apache.johnzon.mapper.MappingParserImpl.toValue(MappingParserImpl.java:634)
        at org.apache.johnzon.mapper.MappingParserImpl.buildObject(MappingParserImpl.java:318)
        at org.apache.johnzon.mapper.MappingParserImpl.toObject(MappingParserImpl.java:468)
        at org.apache.johnzon.mapper.MappingParserImpl.mapCollection(MappingParserImpl.java:587)
        at org.apache.johnzon.mapper.MappingParserImpl.buildArray(MappingParserImpl.java:544)
        at org.apache.johnzon.mapper.MappingParserImpl.toObject(MappingParserImpl.java:477)
        at org.apache.johnzon.mapper.MappingParserImpl.toValue(MappingParserImpl.java:634)
        at org.apache.johnzon.mapper.MappingParserImpl.buildObject(MappingParserImpl.java:318)
        at org.apache.johnzon.mapper.MappingParserImpl.readObject(MappingParserImpl.java:133)
        at org.apache.johnzon.mapper.MappingParserImpl.readObject(MappingParserImpl.java:125)
        at org.apache.johnzon.mapper.MappingParserImpl.readObject(MappingParserImpl.java:112)
        at org.apache.johnzon.mapper.Mapper.mapObject(Mapper.java:237)
        at org.apache.johnzon.mapper.Mapper.readObject(Mapper.java:192)
        at org.apache.johnzon.jaxrs.JohnzonMessageBodyReader.readFrom(JohnzonMessageBodyReader.java:76)
        at org.apache.johnzon.jaxrs.DelegateProvider.readFrom(DelegateProvider.java:51)
        at org.apache.cxf.jaxrs.utils.JAXRSUtils.readFromMessageBodyReader(JAXRSUtils.java:1366)
        at org.apache.cxf.jaxrs.utils.JAXRSUtils.readFromMessageBody(JAXRSUtils.java:1317)
        at org.apache.cxf.jaxrs.utils.JAXRSUtils.processParameter(JAXRSUtils.java:824)
        at org.apache.cxf.jaxrs.utils.JAXRSUtils.processParameters(JAXRSUtils.java:788)
        at org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.processRequest(JAXRSInInterceptor.java:212)
        at org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.handleMessage(JAXRSInInterceptor.java:77)
        at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
        at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
        at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:252)
        at org.apache.openejb.server.cxf.rs.CxfRsHttpListener.doInvoke(CxfRsHttpListener.java:251)
        at org.apache.tomee.webservices.CXFJAXRSFilter.doFilter(CXFJAXRSFilter.java:94)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at org.apache.openejb.server.httpd.EEFilter.doFilter(EEFilter.java:65)
        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:198)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
        at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:44)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
        at org.apache.tomee.catalina.OpenEJBSecurityListener$RequestCapturer.invoke(OpenEJBSecurityListener.java:97)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80)
        at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:624)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
        at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:799)
        at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
        at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1455)
        at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.lang.Thread.run(Thread.java:745)

25-Jul-2017 17:15:38.237 WARNING [http-nio-8080-exec-1] org.apache.cxf.phase.PhaseInterceptorChain.unwind Exception in handleFault on interceptor org.apache.cxf.jaxrs.interceptor.JAXRSDefaultFaultOutInterceptor@7e8f9153
 org.apache.cxf.interceptor.Fault: Using fallback converter, this only works in write mode but not in read. Please register a custom converter to do so.
        at org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:75)
        at org.apache.cxf.phase.PhaseInterceptorChain.wrapExceptionAsFault(PhaseInterceptorChain.java:366)
        at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:324)
        at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
        at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:252)
        at org.apache.openejb.server.cxf.rs.CxfRsHttpListener.doInvoke(CxfRsHttpListener.java:251)
        at org.apache.tomee.webservices.CXFJAXRSFilter.doFilter(CXFJAXRSFilter.java:94)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at org.apache.openejb.server.httpd.EEFilter.doFilter(EEFilter.java:65)
        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:198)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
        at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:44)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
        at org.apache.tomee.catalina.OpenEJBSecurityListener$RequestCapturer.invoke(OpenEJBSecurityListener.java:97)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80)
        at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:624)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
        at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:799)
        at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
        at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1455)
        at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.johnzon.mapper.MapperException: Using fallback converter, this only works in write mode but not in read. Please register a custom converter to do so.
        at org.apache.johnzon.mapper.MappingParserImpl$FallbackConverter.fromString(MappingParserImpl.java:715)
        at org.apache.johnzon.mapper.internal.ConverterAdapter.to(ConverterAdapter.java:37)
        at org.apache.johnzon.mapper.internal.ConverterAdapter.to(ConverterAdapter.java:24)
        at org.apache.johnzon.mapper.MappingParserImpl.convertTo(MappingParserImpl.java:682)
        at org.apache.johnzon.mapper.MappingParserImpl.toObject(MappingParserImpl.java:523)
        at org.apache.johnzon.mapper.MappingParserImpl.toValue(MappingParserImpl.java:634)
        at org.apache.johnzon.mapper.MappingParserImpl.buildObject(MappingParserImpl.java:318)
        at org.apache.johnzon.mapper.MappingParserImpl.toObject(MappingParserImpl.java:468)
        at org.apache.johnzon.mapper.MappingParserImpl.mapCollection(MappingParserImpl.java:587)
        at org.apache.johnzon.mapper.MappingParserImpl.buildArray(MappingParserImpl.java:544)
        at org.apache.johnzon.mapper.MappingParserImpl.toObject(MappingParserImpl.java:477)
        at org.apache.johnzon.mapper.MappingParserImpl.toValue(MappingParserImpl.java:634)
        at org.apache.johnzon.mapper.MappingParserImpl.buildObject(MappingParserImpl.java:318)
        at org.apache.johnzon.mapper.MappingParserImpl.readObject(MappingParserImpl.java:133)
        at org.apache.johnzon.mapper.MappingParserImpl.readObject(MappingParserImpl.java:125)
        at org.apache.johnzon.mapper.MappingParserImpl.readObject(MappingParserImpl.java:112)
        at org.apache.johnzon.mapper.Mapper.mapObject(Mapper.java:237)
        at org.apache.johnzon.mapper.Mapper.readObject(Mapper.java:192)
        at org.apache.johnzon.jaxrs.JohnzonMessageBodyReader.readFrom(JohnzonMessageBodyReader.java:76)
        at org.apache.johnzon.jaxrs.DelegateProvider.readFrom(DelegateProvider.java:51)
        at org.apache.cxf.jaxrs.utils.JAXRSUtils.readFromMessageBodyReader(JAXRSUtils.java:1366)
        at org.apache.cxf.jaxrs.utils.JAXRSUtils.readFromMessageBody(JAXRSUtils.java:1317)
        at org.apache.cxf.jaxrs.utils.JAXRSUtils.processParameter(JAXRSUtils.java:824)
        at org.apache.cxf.jaxrs.utils.JAXRSUtils.processParameters(JAXRSUtils.java:788)
        at org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.processRequest(JAXRSInInterceptor.java:212)
        at org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.handleMessage(JAXRSInInterceptor.java:77)
        at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
        ... 31 more

25-Jul-2017 17:15:38.352 SEVERE [http-nio-8080-exec-1] org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage Error occurred during error handling, give up!
 org.apache.cxf.interceptor.Fault: Using fallback converter, this only works in write mode but not in read. Please register a custom converter to do so.
        at org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:75)
        at org.apache.cxf.phase.PhaseInterceptorChain.wrapExceptionAsFault(PhaseInterceptorChain.java:366)
        at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:324)
        at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
        at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:252)
        at org.apache.openejb.server.cxf.rs.CxfRsHttpListener.doInvoke(CxfRsHttpListener.java:251)
        at org.apache.tomee.webservices.CXFJAXRSFilter.doFilter(CXFJAXRSFilter.java:94)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at org.apache.openejb.server.httpd.EEFilter.doFilter(EEFilter.java:65)
        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:198)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
        at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:44)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
        at org.apache.tomee.catalina.OpenEJBSecurityListener$RequestCapturer.invoke(OpenEJBSecurityListener.java:97)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80)
        at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:624)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
        at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:799)
        at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
        at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1455)
        at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.johnzon.mapper.MapperException: Using fallback converter, this only works in write mode but not in read. Please register a custom converter to do so.
        at org.apache.johnzon.mapper.MappingParserImpl$FallbackConverter.fromString(MappingParserImpl.java:715)
        at org.apache.johnzon.mapper.internal.ConverterAdapter.to(ConverterAdapter.java:37)
        at org.apache.johnzon.mapper.internal.ConverterAdapter.to(ConverterAdapter.java:24)
        at org.apache.johnzon.mapper.MappingParserImpl.convertTo(MappingParserImpl.java:682)
        at org.apache.johnzon.mapper.MappingParserImpl.toObject(MappingParserImpl.java:523)
        at org.apache.johnzon.mapper.MappingParserImpl.toValue(MappingParserImpl.java:634)
        at org.apache.johnzon.mapper.MappingParserImpl.buildObject(MappingParserImpl.java:318)
        at org.apache.johnzon.mapper.MappingParserImpl.toObject(MappingParserImpl.java:468)
        at org.apache.johnzon.mapper.MappingParserImpl.mapCollection(MappingParserImpl.java:587)
        at org.apache.johnzon.mapper.MappingParserImpl.buildArray(MappingParserImpl.java:544)
        at org.apache.johnzon.mapper.MappingParserImpl.toObject(MappingParserImpl.java:477)
        at org.apache.johnzon.mapper.MappingParserImpl.toValue(MappingParserImpl.java:634)
        at org.apache.johnzon.mapper.MappingParserImpl.buildObject(MappingParserImpl.java:318)
        at org.apache.johnzon.mapper.MappingParserImpl.readObject(MappingParserImpl.java:133)
        at org.apache.johnzon.mapper.MappingParserImpl.readObject(MappingParserImpl.java:125)
        at org.apache.johnzon.mapper.MappingParserImpl.readObject(MappingParserImpl.java:112)
        at org.apache.johnzon.mapper.Mapper.mapObject(Mapper.java:237)
        at org.apache.johnzon.mapper.Mapper.readObject(Mapper.java:192)
        at org.apache.johnzon.jaxrs.JohnzonMessageBodyReader.readFrom(JohnzonMessageBodyReader.java:76)
        at org.apache.johnzon.jaxrs.DelegateProvider.readFrom(DelegateProvider.java:51)
        at org.apache.cxf.jaxrs.utils.JAXRSUtils.readFromMessageBodyReader(JAXRSUtils.java:1366)
        at org.apache.cxf.jaxrs.utils.JAXRSUtils.readFromMessageBody(JAXRSUtils.java:1317)
        at org.apache.cxf.jaxrs.utils.JAXRSUtils.processParameter(JAXRSUtils.java:824)
        at org.apache.cxf.jaxrs.utils.JAXRSUtils.processParameters(JAXRSUtils.java:788)
        at org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.processRequest(JAXRSInInterceptor.java:212)
        at org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.handleMessage(JAXRSInInterceptor.java:77)
        at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
        ... 31 more

25-Jul-2017 17:15:38.470 INFO [http-nio-8080-exec-6] org.apache.cxf.interceptor.LoggingInInterceptor.null Inbound Message
----------------------------
ID: 2
Response-Code: 500
Encoding: UTF-8
Content-Type: text/html;charset=utf-8
Headers: {connection=[close], Content-Language=[en], Content-Length=[4489], content-type=[text/html;charset=utf-8], Date=[Tue, 25 Jul 2017 15:15:38 GMT]}
Payload: <!doctype html><html lang="en"><head><title>HTTP Status 500 û Internal Server Error</title><style type="text/css">h1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} h2 {font-family:Tahoma,Aria l,sans-serif;color:white;background-color:#525D76;font-size:16px;} h3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} body {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} b {f ont-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} p {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;} a {color:black;} a.name {color:black;} .line {height:1px;background-color:#525D76;bor der:none;}</style></head><body>

HTTP Status 500 û Internal Server Error

<hr class="line" /><p>Type Exception Report</p><p>Message Error processing webservice request</p><p>Description The server encountered an unexpe
cted condition that prevented it from fulfilling the request.</p><p>Exception</p><pre>javax.servlet.ServletException: Error processing webservice request
        org.apache.tomee.webservices.CXFJAXRSFilter.doFilter(CXFJAXRSFilter.java:98)
        org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
        org.apache.openejb.server.httpd.EEFilter.doFilter(EEFilter.java:65)
</pre><p>Root Cause</p><pre>org.apache.johnzon.mapper.MapperException: Using fallback converter, this only works in write mode but not in read. Please register a custom converter to do so.
        org.apache.johnzon.mapper.MappingParserImpl$FallbackConverter.fromString(MappingParserImpl.java:715)
        org.apache.johnzon.mapper.internal.ConverterAdapter.to(ConverterAdapter.java:37)
        org.apache.johnzon.mapper.internal.ConverterAdapter.to(ConverterAdapter.java:24)
        org.apache.johnzon.mapper.MappingParserImpl.convertTo(MappingParserImpl.java:682)
        org.apache.johnzon.mapper.MappingParserImpl.toObject(MappingParserImpl.java:523)
        org.apache.johnzon.mapper.MappingParserImpl.toValue(MappingParserImpl.java:634)
        org.apache.johnzon.mapper.MappingParserImpl.buildObject(MappingParserImpl.java:318)
        org.apache.johnzon.mapper.MappingParserImpl.toObject(MappingParserImpl.java:468)
        org.apache.johnzon.mapper.MappingParserImpl.mapCollection(MappingParserImpl.java:587)
        org.apache.johnzon.mapper.MappingParserImpl.buildArray(MappingParserImpl.java:544)
        org.apache.johnzon.mapper.MappingParserImpl.toObject(MappingParserImpl.java:477)
        org.apache.johnzon.mapper.MappingParserImpl.toValue(MappingParserImpl.java:634)
        org.apache.johnzon.mapper.MappingParserImpl.buildObject(MappingParserImpl.java:318)
        org.apache.johnzon.mapper.MappingParserImpl.readObject(MappingParserImpl.java:133)
        org.apache.johnzon.mapper.MappingParserImpl.readObject(MappingParserImpl.java:125)
        org.apache.johnzon.mapper.MappingParserImpl.readObject(MappingParserImpl.java:112)
        org.apache.johnzon.mapper.Mapper.mapObject(Mapper.java:237)
        org.apache.johnzon.mapper.Mapper.readObject(Mapper.java:192)
        org.apache.johnzon.jaxrs.JohnzonMessageBodyReader.readFrom(JohnzonMessageBodyReader.java:76)
        org.apache.johnzon.jaxrs.DelegateProvider.readFrom(DelegateProvider.java:51)
        org.apache.cxf.jaxrs.utils.JAXRSUtils.readFromMessageBodyReader(JAXRSUtils.java:1366)
        org.apache.cxf.jaxrs.utils.JAXRSUtils.readFromMessageBody(JAXRSUtils.java:1317)
        org.apache.cxf.jaxrs.utils.JAXRSUtils.processParameter(JAXRSUtils.java:824)
        org.apache.cxf.jaxrs.utils.JAXRSUtils.processParameters(JAXRSUtils.java:788)
        org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.processRequest(JAXRSInInterceptor.java:212)
        org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.handleMessage(JAXRSInInterceptor.java:77)
        org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
        org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
        org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:252)
        org.apache.openejb.server.cxf.rs.CxfRsHttpListener.doInvoke(CxfRsHttpListener.java:251)
        org.apache.tomee.webservices.CXFJAXRSFilter.doFilter(CXFJAXRSFilter.java:94)
        org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
        org.apache.openejb.server.httpd.EEFilter.doFilter(EEFilter.java:65)
</pre><p>Note The full stack trace of the root cause is available in the server logs.</p><hr class="line" />

Apache Tomcat/8.5.16

</body></html>
--------------------------------------
######################## org.apache.cxf.jaxrs.impl.ResponseImpl@68dd1335
######################## 4489
25-Jul-2017 17:15:38.584 SEVERE [http-nio-8080-exec-6] com.bnpparibas.icb.refer.pers.view.PersonAction.save null
 java.lang.NullPointerException
        at com.bnpparibas.icb.refer.pers.common.client.RestTemplate.put(RestTemplate.java:77)
        at com.bnpparibas.icb.refer.pers.view.PersonAction.saveOrUpdatePerson(PersonAction.java:227)
        at com.bnpparibas.icb.refer.pers.view.PersonAction.save(PersonAction.java:132)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.el.parser.AstValue.invoke(AstValue.java:247)
        at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:267)
        at org.apache.webbeans.el22.WrappedMethodExpression.invoke(WrappedMethodExpression.java:52)
        at org.apache.myfaces.view.facelets.el.ContextAwareTagMethodExpression.invoke(ContextAwareTagMethodExpression.java:96)
        at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:74)
        at javax.faces.component.UICommand.broadcast(UICommand.java:120)
        at javax.faces.component.UIViewRoot._broadcastAll(UIViewRoot.java:1174)
        at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:365)
        at javax.faces.component.UIViewRoot._process(UIViewRoot.java:1660)
        at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:864)
        at org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:42)
        at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:196)
        at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:143)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
        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:52)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at org.apache.openejb.server.httpd.EEFilter.doFilter(EEFilter.java:65)
        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:198)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
        at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:44)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
        at org.apache.tomee.catalina.OpenEJBSecurityListener$RequestCapturer.invoke(OpenEJBSecurityListener.java:97)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80)
        at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:624)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
        at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:799)
        at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
        at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1455)
        at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.lang.Thread.run(Thread.java:745)

i don't know why he try to use johnzon ?

Thank you in advance

Regards,
Olivier.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Probleme with johnzon

Romain Manni-Bucau
Hi

this is an old jackson bug now, story short jackson is defined as a
fallback provider (*/*) whereas johnzon is a json one. Just wrap jackson
override produces/consumes type to application/json in your app.


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://blog-rmannibucau.rhcloud.com> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2017-07-25 17:02 GMT+02:00 olivier_1 <[hidden email]>:

> I encounter a problem around Apache Johnzon
> in my application i use jackson-jaxrs-json-provider.
> server : tomee 7.
>
> when i try to convert the object to json i have exception :
>
> 25-Jul-2017 17:15:38.115 WARNING [http-nio-8080-exec-1]
> org.apache.cxf.phase.PhaseInterceptorChain.doDefaultLogging Interceptor
> for
> {http://webservices.pers.refer.icb.bnpparibas.com/}PersonWebService has
> thrown exception, unwinding now
>  org.apache.johnzon.mapper.MapperException: Using fallback converter, this
> only works in write mode but not in read. Please register a custom
> converter
> to do so.
>         at
> org.apache.johnzon.mapper.MappingParserImpl$FallbackConverter.fromString(
> MappingParserImpl.java:715)
>         at
> org.apache.johnzon.mapper.internal.ConverterAdapter.to(
> ConverterAdapter.java:37)
>         at
> org.apache.johnzon.mapper.internal.ConverterAdapter.to(
> ConverterAdapter.java:24)
>         at
> org.apache.johnzon.mapper.MappingParserImpl.convertTo(
> MappingParserImpl.java:682)
>         at
> org.apache.johnzon.mapper.MappingParserImpl.toObject(
> MappingParserImpl.java:523)
>         at
> org.apache.johnzon.mapper.MappingParserImpl.toValue(
> MappingParserImpl.java:634)
>         at
> org.apache.johnzon.mapper.MappingParserImpl.buildObject(
> MappingParserImpl.java:318)
>         at
> org.apache.johnzon.mapper.MappingParserImpl.toObject(
> MappingParserImpl.java:468)
>         at
> org.apache.johnzon.mapper.MappingParserImpl.mapCollection(
> MappingParserImpl.java:587)
>         at
> org.apache.johnzon.mapper.MappingParserImpl.buildArray(
> MappingParserImpl.java:544)
>         at
> org.apache.johnzon.mapper.MappingParserImpl.toObject(
> MappingParserImpl.java:477)
>         at
> org.apache.johnzon.mapper.MappingParserImpl.toValue(
> MappingParserImpl.java:634)
>         at
> org.apache.johnzon.mapper.MappingParserImpl.buildObject(
> MappingParserImpl.java:318)
>         at
> org.apache.johnzon.mapper.MappingParserImpl.readObject(
> MappingParserImpl.java:133)
>         at
> org.apache.johnzon.mapper.MappingParserImpl.readObject(
> MappingParserImpl.java:125)
>         at
> org.apache.johnzon.mapper.MappingParserImpl.readObject(
> MappingParserImpl.java:112)
>         at org.apache.johnzon.mapper.Mapper.mapObject(Mapper.java:237)
>         at org.apache.johnzon.mapper.Mapper.readObject(Mapper.java:192)
>         at
> org.apache.johnzon.jaxrs.JohnzonMessageBodyReader.readFrom(
> JohnzonMessageBodyReader.java:76)
>         at
> org.apache.johnzon.jaxrs.DelegateProvider.readFrom(
> DelegateProvider.java:51)
>         at
> org.apache.cxf.jaxrs.utils.JAXRSUtils.readFromMessageBodyReader(
> JAXRSUtils.java:1366)
>         at
> org.apache.cxf.jaxrs.utils.JAXRSUtils.readFromMessageBody(
> JAXRSUtils.java:1317)
>         at
> org.apache.cxf.jaxrs.utils.JAXRSUtils.processParameter(
> JAXRSUtils.java:824)
>         at
> org.apache.cxf.jaxrs.utils.JAXRSUtils.processParameters(
> JAXRSUtils.java:788)
>         at
> org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.processRequest(
> JAXRSInInterceptor.java:212)
>         at
> org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.handleMessage(
> JAXRSInInterceptor.java:77)
>         at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(
> PhaseInterceptorChain.java:308)
>         at
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(
> ChainInitiationObserver.java:121)
>         at
> org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(
> AbstractHTTPDestination.java:252)
>         at
> org.apache.openejb.server.cxf.rs.CxfRsHttpListener.doInvoke(
> CxfRsHttpListener.java:251)
>         at
> org.apache.tomee.webservices.CXFJAXRSFilter.doFilter(
> CXFJAXRSFilter.java:94)
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
> ApplicationFilterChain.java:193)
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(
> ApplicationFilterChain.java:166)
>         at
> org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
> ApplicationFilterChain.java:193)
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(
> ApplicationFilterChain.java:166)
>         at
> org.apache.openejb.server.httpd.EEFilter.doFilter(EEFilter.java:65)
>         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:198)
>         at
> org.apache.catalina.core.StandardContextValve.invoke(
> StandardContextValve.java:96)
>         at
> org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:44)
>         at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(
> AuthenticatorBase.java:478)
>         at
> org.apache.catalina.core.StandardHostValve.invoke(
> StandardHostValve.java:140)
>         at
> org.apache.tomee.catalina.OpenEJBSecurityListener$RequestCapturer.invoke(
> OpenEJBSecurityListener.java:97)
>         at
> org.apache.catalina.valves.ErrorReportValve.invoke(
> ErrorReportValve.java:80)
>         at
> org.apache.catalina.valves.AbstractAccessLogValve.invoke(
> AbstractAccessLogValve.java:624)
>         at
> org.apache.catalina.core.StandardEngineValve.invoke(
> StandardEngineValve.java:87)
>         at
> org.apache.catalina.connector.CoyoteAdapter.service(
> CoyoteAdapter.java:342)
>         at
> org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:799)
>         at
> org.apache.coyote.AbstractProcessorLight.process(
> AbstractProcessorLight.java:66)
>         at
> org.apache.coyote.AbstractProtocol$ConnectionHandler.process(
> AbstractProtocol.java:868)
>         at
> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.
> doRun(NioEndpoint.java:1455)
>         at
> org.apache.tomcat.util.net.SocketProcessorBase.run(
> SocketProcessorBase.java:49)
>         at
> java.util.concurrent.ThreadPoolExecutor.runWorker(
> ThreadPoolExecutor.java:1142)
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(
> ThreadPoolExecutor.java:617)
>         at
> org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(
> TaskThread.java:61)
>         at java.lang.Thread.run(Thread.java:745)
>
> 25-Jul-2017 17:15:38.237 WARNING [http-nio-8080-exec-1]
> org.apache.cxf.phase.PhaseInterceptorChain.unwind Exception in handleFault
> on interceptor
> org.apache.cxf.jaxrs.interceptor.JAXRSDefaultFaultOutInterceptor@7e8f9153
>  org.apache.cxf.interceptor.Fault: Using fallback converter, this only
> works
> in write mode but not in read. Please register a custom converter to do so.
>         at
> org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(
> AbstractFaultChainInitiatorObserver.java:75)
>         at
> org.apache.cxf.phase.PhaseInterceptorChain.wrapExceptionAsFault(
> PhaseInterceptorChain.java:366)
>         at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(
> PhaseInterceptorChain.java:324)
>         at
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(
> ChainInitiationObserver.java:121)
>         at
> org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(
> AbstractHTTPDestination.java:252)
>         at
> org.apache.openejb.server.cxf.rs.CxfRsHttpListener.doInvoke(
> CxfRsHttpListener.java:251)
>         at
> org.apache.tomee.webservices.CXFJAXRSFilter.doFilter(
> CXFJAXRSFilter.java:94)
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
> ApplicationFilterChain.java:193)
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(
> ApplicationFilterChain.java:166)
>         at
> org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
> ApplicationFilterChain.java:193)
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(
> ApplicationFilterChain.java:166)
>         at
> org.apache.openejb.server.httpd.EEFilter.doFilter(EEFilter.java:65)
>         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:198)
>         at
> org.apache.catalina.core.StandardContextValve.invoke(
> StandardContextValve.java:96)
>         at
> org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:44)
>         at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(
> AuthenticatorBase.java:478)
>         at
> org.apache.catalina.core.StandardHostValve.invoke(
> StandardHostValve.java:140)
>         at
> org.apache.tomee.catalina.OpenEJBSecurityListener$RequestCapturer.invoke(
> OpenEJBSecurityListener.java:97)
>         at
> org.apache.catalina.valves.ErrorReportValve.invoke(
> ErrorReportValve.java:80)
>         at
> org.apache.catalina.valves.AbstractAccessLogValve.invoke(
> AbstractAccessLogValve.java:624)
>         at
> org.apache.catalina.core.StandardEngineValve.invoke(
> StandardEngineValve.java:87)
>         at
> org.apache.catalina.connector.CoyoteAdapter.service(
> CoyoteAdapter.java:342)
>         at
> org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:799)
>         at
> org.apache.coyote.AbstractProcessorLight.process(
> AbstractProcessorLight.java:66)
>         at
> org.apache.coyote.AbstractProtocol$ConnectionHandler.process(
> AbstractProtocol.java:868)
>         at
> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.
> doRun(NioEndpoint.java:1455)
>         at
> org.apache.tomcat.util.net.SocketProcessorBase.run(
> SocketProcessorBase.java:49)
>         at
> java.util.concurrent.ThreadPoolExecutor.runWorker(
> ThreadPoolExecutor.java:1142)
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(
> ThreadPoolExecutor.java:617)
>         at
> org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(
> TaskThread.java:61)
>         at java.lang.Thread.run(Thread.java:745)
> Caused by: org.apache.johnzon.mapper.MapperException: Using fallback
> converter, this only works in write mode but not in read. Please register a
> custom converter to do so.
>         at
> org.apache.johnzon.mapper.MappingParserImpl$FallbackConverter.fromString(
> MappingParserImpl.java:715)
>         at
> org.apache.johnzon.mapper.internal.ConverterAdapter.to(
> ConverterAdapter.java:37)
>         at
> org.apache.johnzon.mapper.internal.ConverterAdapter.to(
> ConverterAdapter.java:24)
>         at
> org.apache.johnzon.mapper.MappingParserImpl.convertTo(
> MappingParserImpl.java:682)
>         at
> org.apache.johnzon.mapper.MappingParserImpl.toObject(
> MappingParserImpl.java:523)
>         at
> org.apache.johnzon.mapper.MappingParserImpl.toValue(
> MappingParserImpl.java:634)
>         at
> org.apache.johnzon.mapper.MappingParserImpl.buildObject(
> MappingParserImpl.java:318)
>         at
> org.apache.johnzon.mapper.MappingParserImpl.toObject(
> MappingParserImpl.java:468)
>         at
> org.apache.johnzon.mapper.MappingParserImpl.mapCollection(
> MappingParserImpl.java:587)
>         at
> org.apache.johnzon.mapper.MappingParserImpl.buildArray(
> MappingParserImpl.java:544)
>         at
> org.apache.johnzon.mapper.MappingParserImpl.toObject(
> MappingParserImpl.java:477)
>         at
> org.apache.johnzon.mapper.MappingParserImpl.toValue(
> MappingParserImpl.java:634)
>         at
> org.apache.johnzon.mapper.MappingParserImpl.buildObject(
> MappingParserImpl.java:318)
>         at
> org.apache.johnzon.mapper.MappingParserImpl.readObject(
> MappingParserImpl.java:133)
>         at
> org.apache.johnzon.mapper.MappingParserImpl.readObject(
> MappingParserImpl.java:125)
>         at
> org.apache.johnzon.mapper.MappingParserImpl.readObject(
> MappingParserImpl.java:112)
>         at org.apache.johnzon.mapper.Mapper.mapObject(Mapper.java:237)
>         at org.apache.johnzon.mapper.Mapper.readObject(Mapper.java:192)
>         at
> org.apache.johnzon.jaxrs.JohnzonMessageBodyReader.readFrom(
> JohnzonMessageBodyReader.java:76)
>         at
> org.apache.johnzon.jaxrs.DelegateProvider.readFrom(
> DelegateProvider.java:51)
>         at
> org.apache.cxf.jaxrs.utils.JAXRSUtils.readFromMessageBodyReader(
> JAXRSUtils.java:1366)
>         at
> org.apache.cxf.jaxrs.utils.JAXRSUtils.readFromMessageBody(
> JAXRSUtils.java:1317)
>         at
> org.apache.cxf.jaxrs.utils.JAXRSUtils.processParameter(
> JAXRSUtils.java:824)
>         at
> org.apache.cxf.jaxrs.utils.JAXRSUtils.processParameters(
> JAXRSUtils.java:788)
>         at
> org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.processRequest(
> JAXRSInInterceptor.java:212)
>         at
> org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.handleMessage(
> JAXRSInInterceptor.java:77)
>         at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(
> PhaseInterceptorChain.java:308)
>         ... 31 more
>
> 25-Jul-2017 17:15:38.352 SEVERE [http-nio-8080-exec-1]
> org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage
> Error occurred during error handling, give up!
>  org.apache.cxf.interceptor.Fault: Using fallback converter, this only
> works
> in write mode but not in read. Please register a custom converter to do so.
>         at
> org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(
> AbstractFaultChainInitiatorObserver.java:75)
>         at
> org.apache.cxf.phase.PhaseInterceptorChain.wrapExceptionAsFault(
> PhaseInterceptorChain.java:366)
>         at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(
> PhaseInterceptorChain.java:324)
>         at
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(
> ChainInitiationObserver.java:121)
>         at
> org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(
> AbstractHTTPDestination.java:252)
>         at
> org.apache.openejb.server.cxf.rs.CxfRsHttpListener.doInvoke(
> CxfRsHttpListener.java:251)
>         at
> org.apache.tomee.webservices.CXFJAXRSFilter.doFilter(
> CXFJAXRSFilter.java:94)
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
> ApplicationFilterChain.java:193)
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(
> ApplicationFilterChain.java:166)
>         at
> org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
> ApplicationFilterChain.java:193)
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(
> ApplicationFilterChain.java:166)
>         at
> org.apache.openejb.server.httpd.EEFilter.doFilter(EEFilter.java:65)
>         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:198)
>         at
> org.apache.catalina.core.StandardContextValve.invoke(
> StandardContextValve.java:96)
>         at
> org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:44)
>         at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(
> AuthenticatorBase.java:478)
>         at
> org.apache.catalina.core.StandardHostValve.invoke(
> StandardHostValve.java:140)
>         at
> org.apache.tomee.catalina.OpenEJBSecurityListener$RequestCapturer.invoke(
> OpenEJBSecurityListener.java:97)
>         at
> org.apache.catalina.valves.ErrorReportValve.invoke(
> ErrorReportValve.java:80)
>         at
> org.apache.catalina.valves.AbstractAccessLogValve.invoke(
> AbstractAccessLogValve.java:624)
>         at
> org.apache.catalina.core.StandardEngineValve.invoke(
> StandardEngineValve.java:87)
>         at
> org.apache.catalina.connector.CoyoteAdapter.service(
> CoyoteAdapter.java:342)
>         at
> org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:799)
>         at
> org.apache.coyote.AbstractProcessorLight.process(
> AbstractProcessorLight.java:66)
>         at
> org.apache.coyote.AbstractProtocol$ConnectionHandler.process(
> AbstractProtocol.java:868)
>         at
> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.
> doRun(NioEndpoint.java:1455)
>         at
> org.apache.tomcat.util.net.SocketProcessorBase.run(
> SocketProcessorBase.java:49)
>         at
> java.util.concurrent.ThreadPoolExecutor.runWorker(
> ThreadPoolExecutor.java:1142)
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(
> ThreadPoolExecutor.java:617)
>         at
> org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(
> TaskThread.java:61)
>         at java.lang.Thread.run(Thread.java:745)
> Caused by: org.apache.johnzon.mapper.MapperException: Using fallback
> converter, this only works in write mode but not in read. Please register a
> custom converter to do so.
>         at
> org.apache.johnzon.mapper.MappingParserImpl$FallbackConverter.fromString(
> MappingParserImpl.java:715)
>         at
> org.apache.johnzon.mapper.internal.ConverterAdapter.to(
> ConverterAdapter.java:37)
>         at
> org.apache.johnzon.mapper.internal.ConverterAdapter.to(
> ConverterAdapter.java:24)
>         at
> org.apache.johnzon.mapper.MappingParserImpl.convertTo(
> MappingParserImpl.java:682)
>         at
> org.apache.johnzon.mapper.MappingParserImpl.toObject(
> MappingParserImpl.java:523)
>         at
> org.apache.johnzon.mapper.MappingParserImpl.toValue(
> MappingParserImpl.java:634)
>         at
> org.apache.johnzon.mapper.MappingParserImpl.buildObject(
> MappingParserImpl.java:318)
>         at
> org.apache.johnzon.mapper.MappingParserImpl.toObject(
> MappingParserImpl.java:468)
>         at
> org.apache.johnzon.mapper.MappingParserImpl.mapCollection(
> MappingParserImpl.java:587)
>         at
> org.apache.johnzon.mapper.MappingParserImpl.buildArray(
> MappingParserImpl.java:544)
>         at
> org.apache.johnzon.mapper.MappingParserImpl.toObject(
> MappingParserImpl.java:477)
>         at
> org.apache.johnzon.mapper.MappingParserImpl.toValue(
> MappingParserImpl.java:634)
>         at
> org.apache.johnzon.mapper.MappingParserImpl.buildObject(
> MappingParserImpl.java:318)
>         at
> org.apache.johnzon.mapper.MappingParserImpl.readObject(
> MappingParserImpl.java:133)
>         at
> org.apache.johnzon.mapper.MappingParserImpl.readObject(
> MappingParserImpl.java:125)
>         at
> org.apache.johnzon.mapper.MappingParserImpl.readObject(
> MappingParserImpl.java:112)
>         at org.apache.johnzon.mapper.Mapper.mapObject(Mapper.java:237)
>         at org.apache.johnzon.mapper.Mapper.readObject(Mapper.java:192)
>         at
> org.apache.johnzon.jaxrs.JohnzonMessageBodyReader.readFrom(
> JohnzonMessageBodyReader.java:76)
>         at
> org.apache.johnzon.jaxrs.DelegateProvider.readFrom(
> DelegateProvider.java:51)
>         at
> org.apache.cxf.jaxrs.utils.JAXRSUtils.readFromMessageBodyReader(
> JAXRSUtils.java:1366)
>         at
> org.apache.cxf.jaxrs.utils.JAXRSUtils.readFromMessageBody(
> JAXRSUtils.java:1317)
>         at
> org.apache.cxf.jaxrs.utils.JAXRSUtils.processParameter(
> JAXRSUtils.java:824)
>         at
> org.apache.cxf.jaxrs.utils.JAXRSUtils.processParameters(
> JAXRSUtils.java:788)
>         at
> org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.processRequest(
> JAXRSInInterceptor.java:212)
>         at
> org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.handleMessage(
> JAXRSInInterceptor.java:77)
>         at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(
> PhaseInterceptorChain.java:308)
>         ... 31 more
>
> 25-Jul-2017 17:15:38.470 INFO [http-nio-8080-exec-6]
> org.apache.cxf.interceptor.LoggingInInterceptor.null Inbound Message
> ----------------------------
> ID: 2
> Response-Code: 500
> Encoding: UTF-8
> Content-Type: text/html;charset=utf-8
> Headers: {connection=[close], Content-Language=[en], Content-Length=[4489],
> content-type=[text/html;charset=utf-8], Date=[Tue, 25 Jul 2017 15:15:38
> GMT]}
> Payload: <!doctype html><html lang="en"><head><title>HTTP Status 500 û
> Internal Server Error</title></head><body>
> HTTP Status 500 û Internal Server Error
> <hr class="line" /><p>*Type* Exception Report</p><p>*Message* Error
> processing webservice request</p><p>*Description* The server encountered an
> unexpe
> cted condition that prevented it from fulfilling the
> request.</p><p>*Exception*</p><pre>javax.servlet.ServletException: Error
> processing webservice request
>
> org.apache.tomee.webservices.CXFJAXRSFilter.doFilter(
> CXFJAXRSFilter.java:98)
>
> org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
>         org.apache.openejb.server.httpd.EEFilter.doFilter(
> EEFilter.java:65)
> </pre><p>*Root Cause*</p><pre>org.apache.johnzon.mapper.MapperException:
> Using fallback converter, this only works in write mode but not in read.
> Please register a custom converter to do so.
>
> org.apache.johnzon.mapper.MappingParserImpl$FallbackConverter.fromString(
> MappingParserImpl.java:715)
>
> org.apache.johnzon.mapper.internal.ConverterAdapter.to(
> ConverterAdapter.java:37)
>
> org.apache.johnzon.mapper.internal.ConverterAdapter.to(
> ConverterAdapter.java:24)
>
> org.apache.johnzon.mapper.MappingParserImpl.convertTo(
> MappingParserImpl.java:682)
>
> org.apache.johnzon.mapper.MappingParserImpl.toObject(
> MappingParserImpl.java:523)
>
> org.apache.johnzon.mapper.MappingParserImpl.toValue(
> MappingParserImpl.java:634)
>
> org.apache.johnzon.mapper.MappingParserImpl.buildObject(
> MappingParserImpl.java:318)
>
> org.apache.johnzon.mapper.MappingParserImpl.toObject(
> MappingParserImpl.java:468)
>
> org.apache.johnzon.mapper.MappingParserImpl.mapCollection(
> MappingParserImpl.java:587)
>
> org.apache.johnzon.mapper.MappingParserImpl.buildArray(
> MappingParserImpl.java:544)
>
> org.apache.johnzon.mapper.MappingParserImpl.toObject(
> MappingParserImpl.java:477)
>
> org.apache.johnzon.mapper.MappingParserImpl.toValue(
> MappingParserImpl.java:634)
>
> org.apache.johnzon.mapper.MappingParserImpl.buildObject(
> MappingParserImpl.java:318)
>
> org.apache.johnzon.mapper.MappingParserImpl.readObject(
> MappingParserImpl.java:133)
>
> org.apache.johnzon.mapper.MappingParserImpl.readObject(
> MappingParserImpl.java:125)
>
> org.apache.johnzon.mapper.MappingParserImpl.readObject(
> MappingParserImpl.java:112)
>         org.apache.johnzon.mapper.Mapper.mapObject(Mapper.java:237)
>         org.apache.johnzon.mapper.Mapper.readObject(Mapper.java:192)
>
> org.apache.johnzon.jaxrs.JohnzonMessageBodyReader.readFrom(
> JohnzonMessageBodyReader.java:76)
>
> org.apache.johnzon.jaxrs.DelegateProvider.readFrom(
> DelegateProvider.java:51)
>
> org.apache.cxf.jaxrs.utils.JAXRSUtils.readFromMessageBodyReader(
> JAXRSUtils.java:1366)
>
> org.apache.cxf.jaxrs.utils.JAXRSUtils.readFromMessageBody(
> JAXRSUtils.java:1317)
>
> org.apache.cxf.jaxrs.utils.JAXRSUtils.processParameter(
> JAXRSUtils.java:824)
>
> org.apache.cxf.jaxrs.utils.JAXRSUtils.processParameters(
> JAXRSUtils.java:788)
>
> org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.processRequest(
> JAXRSInInterceptor.java:212)
>
> org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.handleMessage(
> JAXRSInInterceptor.java:77)
>
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(
> PhaseInterceptorChain.java:308)
>
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(
> ChainInitiationObserver.java:121)
>
> org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(
> AbstractHTTPDestination.java:252)
>
> org.apache.openejb.server.cxf.rs.CxfRsHttpListener.doInvoke(
> CxfRsHttpListener.java:251)
>
> org.apache.tomee.webservices.CXFJAXRSFilter.doFilter(
> CXFJAXRSFilter.java:94)
>
> org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
>         org.apache.openejb.server.httpd.EEFilter.doFilter(
> EEFilter.java:65)
> </pre><p>*Note* The full stack trace of the root cause is available in the
> server logs.</p><hr class="line" />
> Apache Tomcat/8.5.16
> </body></html>
> --------------------------------------
> ######################## org.apache.cxf.jaxrs.impl.ResponseImpl@68dd1335
> ######################## 4489
> 25-Jul-2017 17:15:38.584 SEVERE [http-nio-8080-exec-6]
> com.bnpparibas.icb.refer.pers.view.PersonAction.save null
>  java.lang.NullPointerException
>         at
> com.bnpparibas.icb.refer.pers.common.client.RestTemplate.
> put(RestTemplate.java:77)
>         at
> com.bnpparibas.icb.refer.pers.view.PersonAction.saveOrUpdatePerson(
> PersonAction.java:227)
>         at
> com.bnpparibas.icb.refer.pers.view.PersonAction.save(
> PersonAction.java:132)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
> 62)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:498)
>         at org.apache.el.parser.AstValue.invoke(AstValue.java:247)
>         at
> org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:267)
>         at
> org.apache.webbeans.el22.WrappedMethodExpression.invoke(
> WrappedMethodExpression.java:52)
>         at
> org.apache.myfaces.view.facelets.el.ContextAwareTagMethodExpressio
> n.invoke(ContextAwareTagMethodExpression.java:96)
>         at
> org.apache.myfaces.application.ActionListenerImpl.processAction(
> ActionListenerImpl.java:74)
>         at javax.faces.component.UICommand.broadcast(UICommand.java:120)
>         at
> javax.faces.component.UIViewRoot._broadcastAll(UIViewRoot.java:1174)
>         at
> javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:365)
>         at javax.faces.component.UIViewRoot._process(UIViewRoot.java:1660)
>         at
> javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:864)
>         at
> org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(
> InvokeApplicationExecutor.java:42)
>         at
> org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(
> LifecycleImpl.java:196)
>         at
> org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:143)
>         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
>         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:52)
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
> ApplicationFilterChain.java:193)
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(
> ApplicationFilterChain.java:166)
>         at
> org.apache.openejb.server.httpd.EEFilter.doFilter(EEFilter.java:65)
>         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:198)
>         at
> org.apache.catalina.core.StandardContextValve.invoke(
> StandardContextValve.java:96)
>         at
> org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:44)
>         at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(
> AuthenticatorBase.java:478)
>         at
> org.apache.catalina.core.StandardHostValve.invoke(
> StandardHostValve.java:140)
>         at
> org.apache.tomee.catalina.OpenEJBSecurityListener$RequestCapturer.invoke(
> OpenEJBSecurityListener.java:97)
>         at
> org.apache.catalina.valves.ErrorReportValve.invoke(
> ErrorReportValve.java:80)
>         at
> org.apache.catalina.valves.AbstractAccessLogValve.invoke(
> AbstractAccessLogValve.java:624)
>         at
> org.apache.catalina.core.StandardEngineValve.invoke(
> StandardEngineValve.java:87)
>         at
> org.apache.catalina.connector.CoyoteAdapter.service(
> CoyoteAdapter.java:342)
>         at
> org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:799)
>         at
> org.apache.coyote.AbstractProcessorLight.process(
> AbstractProcessorLight.java:66)
>         at
> org.apache.coyote.AbstractProtocol$ConnectionHandler.process(
> AbstractProtocol.java:868)
>         at
> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.
> doRun(NioEndpoint.java:1455)
>         at
> org.apache.tomcat.util.net.SocketProcessorBase.run(
> SocketProcessorBase.java:49)
>         at
> java.util.concurrent.ThreadPoolExecutor.runWorker(
> ThreadPoolExecutor.java:1142)
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(
> ThreadPoolExecutor.java:617)
>         at
> org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(
> TaskThread.java:61)
>         at java.lang.Thread.run(Thread.java:745)
>
> i don't know why he try to use johnzon ?
>
> Thank you in advance
>
> Regards,
> Olivier.
>
>
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.
> n4.nabble.com/Probleme-with-johnzon-tp4682312.html
> Sent from the TomEE Dev mailing list archive at Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Probleme with johnzon

olivier_1
Hi
Thank you  for your reactivity

i have already make it .

  @PUT
        @Consumes(MediaType.APPLICATION_JSON)
        @Produces(MediaType.APPLICATION_JSON)
        public Response putPerson(Person person) throws URISyntaxException{
                logger.info(person.toString());
                URI location = new URI(propertyConfiguration.getProperties().get("rootUrl").toString()+iPersonService.save(person));
                logger.info(location.toString());
                return Response.created(location).build();


        }

NB: in jboss and tomee 1.7.4 it work, but in tomee 7 it's not working
Regards,
Olivier.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Probleme with johnzon

Romain Manni-Bucau
2017-07-26 11:19 GMT+02:00 olivier_1 <[hidden email]>:

> Hi
> Thank you  for your reactivity
>
> i have already make it .
>

Not really. This specifies the endpoint types but jackson is still */*:

        @Provider
        @Consumes(MediaType.APPLICATION_JSON)
        @Produces(MediaType.APPLICATION_JSON)
        public class MyjsonProvider extends JacksonJsonProvider {}


>
>         @PUT
>         @Consumes(MediaType.APPLICATION_JSON)
>         @Produces(MediaType.APPLICATION_JSON)
>         public Response putPerson(Person person) throws URISyntaxException{
>                 logger.info(person.toString());
>                 URI     location = new
> URI(propertyConfiguration.getProperties().get("rootUrl")
> .toString()+iPersonService.save(person));
>                 logger.info(location.toString());
>                 return Response.created(location).build();
>
>
>         }
>
> NB: in jboss and tomee 1.7.4 it work, but in tomee 7 it's not working
> Regards,
> Olivier.
>
>
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.
> n4.nabble.com/Probleme-with-johnzon-tp4682312p4682321.html
> Sent from the TomEE Dev mailing list archive at Nabble.com.
>
Loading...