OpenEngSB
  1. OpenEngSB
  2. OPENENGSB-2128

Exception cannot be deserialized when transported via JSON

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: framework-2.0.1, framework-2.2.0
    • Fix Version/s: openengsb-3.0.0.M1
    • Component/s: framework
    • Labels:

      Description

      When a method throws an exception and that exception-result is transported back via jms-json, The remote client cannot deserialize the Exception, because the JSON-lib cannot handle it.

      We need some way to properly transmit Exceptions.

      In addition an itest is required to verify this behavior

        Gliffy Diagrams

        Error rendering 'com.meetme.plugins.jira.gerrit-plugin:gerritreviewsmodule'. Please contact your JIRA administrators.

          Activity

          Hide
          Andreas Pieber added a comment -

          what does it mean? We've to find out which type of exception is transported? Do we have to extend the parser? Or what exactly is the problem?

          Show
          Andreas Pieber added a comment - what does it mean? We've to find out which type of exception is transported? Do we have to extend the parser? Or what exactly is the problem?
          Hide
          Christoph Gritschenberger added a comment -

          I increased the priority of this issue.
          It's the reason for strange exceptions like these:

          2011-11-28 12:17:19,374 | ERROR | Q Session Task-3 | JMSIncomingPort                  | ngsb.ports.jms.JMSIncomingPort$1   87 | 196 - org.openengsb.ports.jms - 2.2.0 | an error occured when processing the filterchain       
          org.openengsb.core.api.remote.FilterException: java.io.FileNotFoundException: reader cannot be resolved to URL                                                                                                                 
                  at org.openengsb.core.security.filter.JsonSecureRequestStringMarshallerFilter.doFilter(JsonSecureRequestStringMarshallerFilter.java:81)[172:org.openengsb.framework.security:2.2.0]                                    
                  at org.openengsb.core.security.filter.JsonSecureRequestStringMarshallerFilter.doFilter(JsonSecureRequestStringMarshallerFilter.java:49)[172:org.openengsb.framework.security:2.2.0]                                    
                  at org.openengsb.core.common.remote.AbstractFilterAction.filter(AbstractFilterAction.java:45)[169:org.openengsb.framework.common:2.2.0]                                                                                
                  at org.openengsb.core.common.remote.FilterChain.filter(FilterChain.java:38)[169:org.openengsb.framework.common:2.2.0]                                                                                                  
                  at org.openengsb.ports.jms.JMSIncomingPort$1.onMessage(JMSIncomingPort.java:74)[196:org.openengsb.ports.jms:2.2.0]                                                                                                     
                  at org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:560)[142:org.springframework.jms:3.0.6.RELEASE]                                            
                  at org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:498)[142:org.springframework.jms:3.0.6.RELEASE]                                              
                  at org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:467)[142:org.springframework.jms:3.0.6.RELEASE]                                           
                  at org.springframework.jms.listener.AbstractMessageListenerContainer.executeListener(AbstractMessageListenerContainer.java:439)[142:org.springframework.jms:3.0.6.RELEASE]                                             
                  at org.springframework.jms.listener.SimpleMessageListenerContainer.processMessage(SimpleMessageListenerContainer.java:311)[142:org.springframework.jms:3.0.6.RELEASE]                                                  
                  at org.springframework.jms.listener.SimpleMessageListenerContainer$2.onMessage(SimpleMessageListenerContainer.java:287)[142:org.springframework.jms:3.0.6.RELEASE]                                                     
                  at org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQMessageConsumer.java:1230)[187:org.apache.activemq.activemq-core:5.5.0]                                                                                
                  at org.apache.activemq.ActiveMQSessionExecutor.dispatch(ActiveMQSessionExecutor.java:134)[187:org.apache.activemq.activemq-core:5.5.0]                                                                                 
                  at org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQSessionExecutor.java:205)[187:org.apache.activemq.activemq-core:5.5.0]                                                                                  
                  at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:127)[187:org.apache.activemq.activemq-core:5.5.0]                                                                                         
                  at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:48)[187:org.apache.activemq.activemq-core:5.5.0]                                                                                            
                  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)[:1.6.0_23]                                                                                                                          
                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)[:1.6.0_23]                                                                                                                          
                  at java.lang.Thread.run(Thread.java:679)[:1.6.0_23]                                                                                                                                                                    
          Caused by: java.io.FileNotFoundException: reader cannot be resolved to URL                                                                                                                                                     
                  at org.drools.io.impl.ReaderResource.getURL(ReaderResource.java:52)                                                                                                                                                    
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.6.0_23]                                                                                                                                              
                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.6.0_23]                                                                                                                            
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.6.0_23]                                                                                                                    
                  at java.lang.reflect.Method.invoke(Method.java:616)[:1.6.0_23]                                                                                                                                                         
                  at org.codehaus.jackson.map.ser.BeanPropertyWriter.get(BeanPropertyWriter.java:467)[139:jackson-mapper-asl:1.8.5]                                                                                                      
                  at org.codehaus.jackson.map.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:402)[139:jackson-mapper-asl:1.8.5]                                                                                         
                  at org.codehaus.jackson.map.ser.BeanSerializer.serializeFields(BeanSerializer.java:175)[139:jackson-mapper-asl:1.8.5]                                                                                                  
                  at org.codehaus.jackson.map.ser.BeanSerializer.serialize(BeanSerializer.java:142)[139:jackson-mapper-asl:1.8.5]                                                                                                        
                  at org.codehaus.jackson.map.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:430)[139:jackson-mapper-asl:1.8.5]                                                                                         
                  at org.codehaus.jackson.map.ser.BeanSerializer.serializeFields(BeanSerializer.java:175)[139:jackson-mapper-asl:1.8.5]                                                                                                  
                  at org.codehaus.jackson.map.ser.BeanSerializer.serialize(BeanSerializer.java:142)[139:jackson-mapper-asl:1.8.5]                                                                                                        
                  at org.codehaus.jackson.map.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:430)[139:jackson-mapper-asl:1.8.5]                                                                                         
                  at org.codehaus.jackson.map.ser.BeanSerializer.serializeFields(BeanSerializer.java:175)[139:jackson-mapper-asl:1.8.5]                                                                                                  
                  at org.codehaus.jackson.map.ser.BeanSerializer.serialize(BeanSerializer.java:142)[139:jackson-mapper-asl:1.8.5]                                                                                                        
                  at org.codehaus.jackson.map.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:430)[139:jackson-mapper-asl:1.8.5]                                                                                         
                  at org.codehaus.jackson.map.ser.BeanSerializer.serializeFields(BeanSerializer.java:175)[139:jackson-mapper-asl:1.8.5]                                                                                                  
                  at org.codehaus.jackson.map.ser.BeanSerializer.serialize(BeanSerializer.java:142)[139:jackson-mapper-asl:1.8.5]                                                                                                        
                  at org.codehaus.jackson.map.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:430)[139:jackson-mapper-asl:1.8.5]                                                                                         
                  at org.codehaus.jackson.map.ser.BeanSerializer.serializeFields(BeanSerializer.java:175)[139:jackson-mapper-asl:1.8.5]                                                                                                  
                  at org.codehaus.jackson.map.ser.BeanSerializer.serialize(BeanSerializer.java:142)[139:jackson-mapper-asl:1.8.5]                                                                                                        
                  at org.codehaus.jackson.map.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:430)[139:jackson-mapper-asl:1.8.5]                                                                                         
                  at org.codehaus.jackson.map.ser.BeanSerializer.serializeFields(BeanSerializer.java:175)[139:jackson-mapper-asl:1.8.5]                                                                                                  
                  at org.codehaus.jackson.map.ser.BeanSerializer.serialize(BeanSerializer.java:142)[139:jackson-mapper-asl:1.8.5]                                                                                                        
                  at org.codehaus.jackson.map.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:430)[139:jackson-mapper-asl:1.8.5]                                                                                         
                  at org.codehaus.jackson.map.ser.BeanSerializer.serializeFields(BeanSerializer.java:175)[139:jackson-mapper-asl:1.8.5]                                                                                                  
                  at org.codehaus.jackson.map.ser.BeanSerializer.serialize(BeanSerializer.java:142)[139:jackson-mapper-asl:1.8.5]                                                                                                        
                  at org.codehaus.jackson.map.ser.StdSerializerProvider._serializeValue(StdSerializerProvider.java:600)[139:jackson-mapper-asl:1.8.5]                                                                                    
                  at org.codehaus.jackson.map.ser.StdSerializerProvider.serializeValue(StdSerializerProvider.java:280)[139:jackson-mapper-asl:1.8.5]                                                                                     
                  at org.codehaus.jackson.map.ObjectMapper._configAndWriteValue(ObjectMapper.java:2260)[139:jackson-mapper-asl:1.8.5]                                                                                                    
                  at org.codehaus.jackson.map.ObjectMapper.writeValueAsString(ObjectMapper.java:1829)[139:jackson-mapper-asl:1.8.5]                                                                                                      
                  at org.openengsb.core.security.filter.JsonSecureRequestStringMarshallerFilter.doFilter(JsonSecureRequestStringMarshallerFilter.java:79)[172:org.openengsb.framework.security:2.2.0]                                    
                  ... 18 more 

          This happens when an exception (any exception) in a rule-consequece occurs and a ConsequenceException is thrown by the workflow engine.
          It cannot be serialized.

          Show
          Christoph Gritschenberger added a comment - I increased the priority of this issue. It's the reason for strange exceptions like these: 2011-11-28 12:17:19,374 | ERROR | Q Session Task-3 | JMSIncomingPort | ngsb.ports.jms.JMSIncomingPort$1 87 | 196 - org.openengsb.ports.jms - 2.2.0 | an error occured when processing the filterchain org.openengsb.core.api.remote.FilterException: java.io.FileNotFoundException: reader cannot be resolved to URL at org.openengsb.core.security.filter.JsonSecureRequestStringMarshallerFilter.doFilter(JsonSecureRequestStringMarshallerFilter.java:81)[172:org.openengsb.framework.security:2.2.0] at org.openengsb.core.security.filter.JsonSecureRequestStringMarshallerFilter.doFilter(JsonSecureRequestStringMarshallerFilter.java:49)[172:org.openengsb.framework.security:2.2.0] at org.openengsb.core.common.remote.AbstractFilterAction.filter(AbstractFilterAction.java:45)[169:org.openengsb.framework.common:2.2.0] at org.openengsb.core.common.remote.FilterChain.filter(FilterChain.java:38)[169:org.openengsb.framework.common:2.2.0] at org.openengsb.ports.jms.JMSIncomingPort$1.onMessage(JMSIncomingPort.java:74)[196:org.openengsb.ports.jms:2.2.0] at org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:560)[142:org.springframework.jms:3.0.6.RELEASE] at org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:498)[142:org.springframework.jms:3.0.6.RELEASE] at org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:467)[142:org.springframework.jms:3.0.6.RELEASE] at org.springframework.jms.listener.AbstractMessageListenerContainer.executeListener(AbstractMessageListenerContainer.java:439)[142:org.springframework.jms:3.0.6.RELEASE] at org.springframework.jms.listener.SimpleMessageListenerContainer.processMessage(SimpleMessageListenerContainer.java:311)[142:org.springframework.jms:3.0.6.RELEASE] at org.springframework.jms.listener.SimpleMessageListenerContainer$2.onMessage(SimpleMessageListenerContainer.java:287)[142:org.springframework.jms:3.0.6.RELEASE] at org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQMessageConsumer.java:1230)[187:org.apache.activemq.activemq-core:5.5.0] at org.apache.activemq.ActiveMQSessionExecutor.dispatch(ActiveMQSessionExecutor.java:134)[187:org.apache.activemq.activemq-core:5.5.0] at org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQSessionExecutor.java:205)[187:org.apache.activemq.activemq-core:5.5.0] at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:127)[187:org.apache.activemq.activemq-core:5.5.0] at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:48)[187:org.apache.activemq.activemq-core:5.5.0] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)[:1.6.0_23] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)[:1.6.0_23] at java.lang.Thread.run(Thread.java:679)[:1.6.0_23] Caused by: java.io.FileNotFoundException: reader cannot be resolved to URL at org.drools.io.impl.ReaderResource.getURL(ReaderResource.java:52) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.6.0_23] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.6.0_23] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.6.0_23] at java.lang.reflect.Method.invoke(Method.java:616)[:1.6.0_23] at org.codehaus.jackson.map.ser.BeanPropertyWriter.get(BeanPropertyWriter.java:467)[139:jackson-mapper-asl:1.8.5] at org.codehaus.jackson.map.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:402)[139:jackson-mapper-asl:1.8.5] at org.codehaus.jackson.map.ser.BeanSerializer.serializeFields(BeanSerializer.java:175)[139:jackson-mapper-asl:1.8.5] at org.codehaus.jackson.map.ser.BeanSerializer.serialize(BeanSerializer.java:142)[139:jackson-mapper-asl:1.8.5] at org.codehaus.jackson.map.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:430)[139:jackson-mapper-asl:1.8.5] at org.codehaus.jackson.map.ser.BeanSerializer.serializeFields(BeanSerializer.java:175)[139:jackson-mapper-asl:1.8.5] at org.codehaus.jackson.map.ser.BeanSerializer.serialize(BeanSerializer.java:142)[139:jackson-mapper-asl:1.8.5] at org.codehaus.jackson.map.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:430)[139:jackson-mapper-asl:1.8.5] at org.codehaus.jackson.map.ser.BeanSerializer.serializeFields(BeanSerializer.java:175)[139:jackson-mapper-asl:1.8.5] at org.codehaus.jackson.map.ser.BeanSerializer.serialize(BeanSerializer.java:142)[139:jackson-mapper-asl:1.8.5] at org.codehaus.jackson.map.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:430)[139:jackson-mapper-asl:1.8.5] at org.codehaus.jackson.map.ser.BeanSerializer.serializeFields(BeanSerializer.java:175)[139:jackson-mapper-asl:1.8.5] at org.codehaus.jackson.map.ser.BeanSerializer.serialize(BeanSerializer.java:142)[139:jackson-mapper-asl:1.8.5] at org.codehaus.jackson.map.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:430)[139:jackson-mapper-asl:1.8.5] at org.codehaus.jackson.map.ser.BeanSerializer.serializeFields(BeanSerializer.java:175)[139:jackson-mapper-asl:1.8.5] at org.codehaus.jackson.map.ser.BeanSerializer.serialize(BeanSerializer.java:142)[139:jackson-mapper-asl:1.8.5] at org.codehaus.jackson.map.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:430)[139:jackson-mapper-asl:1.8.5] at org.codehaus.jackson.map.ser.BeanSerializer.serializeFields(BeanSerializer.java:175)[139:jackson-mapper-asl:1.8.5] at org.codehaus.jackson.map.ser.BeanSerializer.serialize(BeanSerializer.java:142)[139:jackson-mapper-asl:1.8.5] at org.codehaus.jackson.map.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:430)[139:jackson-mapper-asl:1.8.5] at org.codehaus.jackson.map.ser.BeanSerializer.serializeFields(BeanSerializer.java:175)[139:jackson-mapper-asl:1.8.5] at org.codehaus.jackson.map.ser.BeanSerializer.serialize(BeanSerializer.java:142)[139:jackson-mapper-asl:1.8.5] at org.codehaus.jackson.map.ser.StdSerializerProvider._serializeValue(StdSerializerProvider.java:600)[139:jackson-mapper-asl:1.8.5] at org.codehaus.jackson.map.ser.StdSerializerProvider.serializeValue(StdSerializerProvider.java:280)[139:jackson-mapper-asl:1.8.5] at org.codehaus.jackson.map.ObjectMapper._configAndWriteValue(ObjectMapper.java:2260)[139:jackson-mapper-asl:1.8.5] at org.codehaus.jackson.map.ObjectMapper.writeValueAsString(ObjectMapper.java:1829)[139:jackson-mapper-asl:1.8.5] at org.openengsb.core.security.filter.JsonSecureRequestStringMarshallerFilter.doFilter(JsonSecureRequestStringMarshallerFilter.java:79)[172:org.openengsb.framework.security:2.2.0] ... 18 more This happens when an exception (any exception) in a rule-consequece occurs and a ConsequenceException is thrown by the workflow engine. It cannot be serialized.
          Hide
          Christoph Gritschenberger added a comment -

          More on the deserialize-issue:
          JSON cannot serialize and deserialize Exceptions.
          We need to find some way to wrap this.

          Show
          Christoph Gritschenberger added a comment - More on the deserialize-issue: JSON cannot serialize and deserialize Exceptions. We need to find some way to wrap this.
          Hide
          Christoph Gritschenberger added a comment -

          Workaround for the consequence-exception has been implemented

          Show
          Christoph Gritschenberger added a comment - Workaround for the consequence-exception has been implemented
          Hide
          Stefan Scheiber added a comment -

          Issue dates back to 2011.
          Workaround available (see comment from 29.11.2011)
          If problem persists, please open new issue.

          Show
          Stefan Scheiber added a comment - Issue dates back to 2011. Workaround available (see comment from 29.11.2011) If problem persists, please open new issue.

            People

            • Assignee:
              Stefan Scheiber
              Reporter:
              Christoph Gritschenberger
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: