Package org.springframework.integration

Examples of org.springframework.integration.MessagingException


          value = Boolean.valueOf(transformNodeToString(n));
        }
        results.add(value);
      }
    } catch (Exception e) {
      throw new MessagingException("Caught Exception while mapping the result sequence to string",e);
    }
    return results;
  }
View Full Code Here


          }
        }
        results.add(value);
      }
    } catch (Exception e) {
      throw new MessagingException("Caught Exception while mapping the result sequence to string",e);
    }
    return results;
  }
View Full Code Here

          Node n = result.getNode();
          results.add(n);
        }
      }
    } catch (Exception e) {
      throw new MessagingException("Caught Exception while mapping the result sequence to string",e);
    }
    return results;
  }
View Full Code Here

        }
      }
      expression.close();
      conn.close();
    } catch (XQException e) {
      throw new MessagingException("Caught Exception while opening a connection to the datasource", e);
    }

    if(xQueryParameters != null) {
      if (xQueryParameterMap == null) {
        throw new MessagingException("Expecting " + xQueryParameters.size() + " parameters in the xquery, " +
            "but none provided to the router");
      }

      //now check if all the parameter needed are present in the map
      List<String> missingParameters = new ArrayList<String>();
      for(String xQueryParameter:xQueryParameters) {
        if(!xQueryParameterMap.containsKey(xQueryParameter)) {
          missingParameters.add(xQueryParameter);
        }
      }

      if(missingParameters.size() > 0) {
        StringBuilder builder = new StringBuilder();
        builder.append("[").append("$").append(missingParameters.get(0));
        if(missingParameters.size() > 1) {
          for(int i = 1;i < missingParameters.size();i++) {
            builder.append(", ").append("$").append(missingParameters.get(i));
          }
        }
        builder.append("]");
        throw new MessagingException("Missing parameter(s) " + builder.toString());
      }
    }


  }
View Full Code Here

      if(ClassUtils.isPresent(SAXON_XQ_DATASOURCE_CLASS, classLoader)) {
        dataSource = Class.forName(SAXON_XQ_DATASOURCE_CLASS).newInstance();
      }
      //For now its just Saxon we will discover, we can add other implementations here later
    } catch (Exception e) {
      throw new MessagingException("Unable to discover/instantiate an XQDataSource, " +
          "see nested exception for details", e);
    }
    Assert.notNull(dataSource, "No XQDataSource provided nor any known implementation discovered in the classpath");
    logger.info("Using \"" + dataSource.getClass() + "\" as the XQDataSource implementation");
    return (XQDataSource)dataSource;
View Full Code Here

      XQResultSequence result = expression.executeQuery();
      return mapper.mapResults(result);

    } catch (XQException e) {
      throw new MessagingException("Caught Exception while opening a connection to the datasource", e);
    } finally {
      try {
        if(expression != null) {
          expression.close();
        }
View Full Code Here

      } else {
        queue.add(serializedMessage);
      }
    } catch (MessageMarshallerException e) {
      log.error(e.getMessage(), e);
      throw new MessagingException(e.getMessage(), e.getCause());
    }

    return message.getPayload();
  }
View Full Code Here

        }
        Message<?> packet = null;
        try {
          packet = messageMarshaller.deserialize(payloadJSON);
        } catch (MessageMarshallerException marshallingException) {
          throw new MessagingException(
              marshallingException.getMessage(),
              marshallingException.getCause());
        }
        MessageBuilder<?> builder = MessageBuilder.fromMessage(packet);
        if (qMessage != null) {
View Full Code Here

        for (int i = 0; i < statements.length(); i++) {
          existingLabels.add(statements.getJSONObject(i).getString(
              "Sid"));
        }
      } catch (JSONException e) {
        throw new MessagingException(e.getMessage(), e);
      }
    }
    for (Permission p : permissions) {
      if (existingLabels.contains(p.getLabel()) == false) {
        handler.execute(p);
View Full Code Here

        sent = future.get(timeout, TimeUnit.MILLISECONDS);
      }
    } catch (InterruptedException e) {
      log.warn(e.getMessage(), e);
    } catch (Exception e) {
      throw new MessagingException(e.getMessage(), e);
    } finally {
      if (!sent && !future.isDone()) {
        future.cancel(true);
      }
    }
View Full Code Here

TOP

Related Classes of org.springframework.integration.MessagingException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.