johnzon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Romain Manni-Bucau (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (JOHNZON-160) org.apache.johnzon.mapper.MapperException: ObjectConverters are only supported for Classes not Types
Date Sun, 04 Mar 2018 14:09:00 GMT

     [ https://issues.apache.org/jira/browse/JOHNZON-160?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Romain Manni-Bucau closed JOHNZON-160.
--------------------------------------
    Resolution: Duplicate

Closing this one as duplicates.

Note this is being discussed on @tomee/@johnzon lists. Options are to do a 1.0.1 from 1.1
to not loose fixes, upgrade tomee to the 1.1 or potentially do some cherry picking (would
be longer due to the testing required).

> org.apache.johnzon.mapper.MapperException: ObjectConverters are only supported for Classes
not Types
> ----------------------------------------------------------------------------------------------------
>
>                 Key: JOHNZON-160
>                 URL: https://issues.apache.org/jira/browse/JOHNZON-160
>             Project: Johnzon
>          Issue Type: Bug
>          Components: JSON-B, Mapper
>    Affects Versions: 1.0.0
>            Reporter: Alexandre Vermeerbergen
>            Priority: Blocker
>             Fix For: 1.0.1
>
>
> Hello All,
> We have a blocking issue with Johnzon 1.0.0 as it's packaged in TomEE+ 7.0.4, with this
type of REST service signature:
>  
> @Consumes(\{ MediaType.APPLICATION_JSON, MediaProviderJSON.TYPE })
>     @Produces({
>         MediaType.APPLICATION_JSON + ";charset=UTF-8",
>         MediaProviderJSON.TYPE + ";charset=UTF-8"  })
>     @Path("carts/\{physicalid:(([0-9])|([A-F])){32}}")
>     public Response updateCartv2(
>             @Context final HttpServletRequest request,
>             @Context final HttpServletResponse response,
>             Map<String,Object> body,
>             @PathParam("physicalid") final String strPhysicalID,
>             @QueryParam("project") String projectName,
>             @QueryParam("service") String service,
>             @DefaultValue("false") @QueryParam("noRefresh") boolean noRefresh)
>                     throws Exception
>     {
>        // .. busines logic here
>     
>     }
> it systematically dumps the following error / stack trace:
>  
> 2017-12-07 07:12:49.216 | [http-nio-7025-exec-18]  | ERROR | o.acme.mp.model.BaseApp
|  | 64211872E888250972DAE396F395A082 | 9b2e5a5b-fecc-4e05-a8a4-33f8c9772eb7 | EXCEPTION
- Request URI: /shop/resources/me/carts/                                                                                                                                                                                                             
 
> 2017-12-07 07:12:49.216 | [http-nio-7025-exec-18]  | ERROR | o.acme.mp.model.BaseApp
|  | 64211872E888250972DAE396F395A082 | 9b2e5a5b-fecc-4e05-a8a4-33f8c9772eb7 | EXCEPTION
- Http code  : Internal Server Error                                                                                                                                                                                                                   
 
> 2017-12-07 07:12:49.216 | [http-nio-7025-exec-18]  | ERROR | o.acme.mp.model.BaseApp
|  | 64211872E888250972DAE396F395A082 | 9b2e5a5b-fecc-4e05-a8a4-33f8c9772eb7 | EXCEPTION
- Message    : ObjectConverters are only supported for Classes not Types                                                                                                                                                                               
 
> 2017-12-07 07:12:49.220 | [http-nio-7025-exec-18]  | ERROR | o.acme.mp.model.BaseApp
|  | 64211872E888250972DAE396F395A082 | 9b2e5a5b-fecc-4e05-a8a4-33f8c9772eb7 | EXCEPTION
- Stack trace:                 
> org.apache.johnzon.mapper.MapperException: ObjectConverters are only supported for Classes
not Types                                                                                                                    
 
>         at org.apache.johnzon.mapper.MappingParserImpl.buildObject(MappingParserImpl.java:198)                                                                                                                          
 
>         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:233)                                                                                                                                                  
 
>         at org.apache.johnzon.mapper.Mapper.readObject(Mapper.java:188)                                                                                                                                                 
 
>         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:1373)                                                                                                                        
 
>         at org.apache.cxf.jaxrs.utils.JAXRSUtils.readFromMessageBody(JAXRSUtils.java:1324)                                                                                                                              
 
>         at org.apache.cxf.jaxrs.utils.JAXRSUtils.processParameter(JAXRSUtils.java:850)                                                                                                                                  
 
>         at org.apache.cxf.jaxrs.utils.JAXRSUtils.processParameters(JAXRSUtils.java:814)                                                                                                                                 
 
>         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:267)                                                                                                               
 
>         at org.apache.openejb.server.cxf.rs.CxfRsHttpListener.doInvoke(CxfRsHttpListener.java:253)                                                                                                                      
 
>         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.acme.platform.restServices.monitoring.MonitoringFilter.doFilter(MonitoringFilter.java:117)                                                                                                  
 
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)                                                                                                            
 
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)                                                                                                                    
 
>         at org.foo.apps.domain.util.LicCheckFilter.doFilter(LicCheckFilter.java:98)                                                                                                                               
 
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)                                                                                                            
 
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)                                                                                                                    
 
>         at org.foo.apps.domain.util.XSSInputFilter.doFilter(XSSInputFilter.java:288)                                                                                                                              
 
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)                                                                                                            
 
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)                                                                                                                    
 
>         at org.jasig.cas.client.util.HttpServletRequestWrapperFilter.doFilter(HttpServletRequestWrapperFilter.java:70)                                                                                                  
 
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)                                                                                                            
 
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

>         at org.jasig.cas.client.util.HttpServletRequestWrapperFilter.doFilter(HttpServletRequestWrapperFilter.java:70)                                                                                                  
 
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)                                                                                                            
 
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)                                                                                                                    
 
>         at org.acme.mypassport.cas.client.authentication.DynamicServiceUrlAuthenticationFilter.doFilter(DynamicServiceUrlAuthenticationFilter.java:197)                                                    
 
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)                                                                                                            
 
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)                                                                                                                    
 
>         at org.acme.mypassport.cas.client.validation.DynamicServiceUrlAbstractTicketValidationFilter.doFilter(DynamicServiceUrlAbstractTicketValidationFilter.java:326)                                    
 
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)                                                                                                            
 
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)                                                                                                                    
 
>         at org.acme.mypassport.cas.client.validation.CASProxyTicketValidationFilter.doFilter(CASProxyTicketValidationFilter.java:134)                                                                      
 
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)                                                                                                            
 
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)                                                                                                                    
 
>         at org.acme.plmsecurity.ticket.servlet.LoginTicketAuthenticationFilter.doFilter(LoginTicketAuthenticationFilter.java:74)                                                                           
 
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)                                                                                                            
 
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)                                                                                                                    
 
>         at org.jasig.cas.client.session.SingleSignOutFilter.doFilter(SingleSignOutFilter.java:100)                                                                                                                      
 
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)                                                                                                            
 
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)                                                                                                                    
 
>         at org.foo.servlet.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:173)                                                                                                               
 
>         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:199)                                                                                                                          
 
>         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.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)                                                                                                                                 
 
>         at org.apache.tomee.catalina.OpenEJBSecurityListener$RequestCapturer.invoke(OpenEJBSecurityListener.java:97)                                                                                                    
 
>         at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650)                                                                                                                    
 
>         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:803)                                                                                                                                   
 
>         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:1459)                                                                                                                          
 
>         at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)                                                                                                                              
 
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)                                                                                                                              
 
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)                                                                                                                              
 
>         at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)                                                                                                                           
 
>         at java.lang.Thread.run(Thread.java:748)         
>  
> Some of our folks have been by-passing this issue by copying
> *johnzon-mapper-1.1.5.jar* into <tomee install path>/lib, but it's quite dirty.
> Would it be possible to release a Johnzon 1.0.1 soon enough to fix this issue & make
it into TomEE+ 7.0.5 ?
>  
> Best regards,
> Alexandre Vermeerbergen
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
Mime
View raw message