Package org.apache.camel

Examples of org.apache.camel.RuntimeCamelException


        return new LanguageProducer(this);
    }

    public Consumer createConsumer(Processor processor) throws Exception {
        throw new RuntimeCamelException("Cannot consume to a LanguageEndpoint: " + getEndpointUri());
    }
View Full Code Here


            answer.setEncoders(encodersCopy);
            List<ChannelHandler> decodersCopy = new ArrayList<ChannelHandler>(decoders);
            answer.setDecoders(decodersCopy);
            return answer;
        } catch (CloneNotSupportedException e) {
            throw new RuntimeCamelException(e);
        }
    }
View Full Code Here

    public XmlSignerConfiguration copy() {
        try {
            return (XmlSignerConfiguration) clone();
        } catch (CloneNotSupportedException e) {
            throw new RuntimeCamelException(e);
        }
    }
View Full Code Here

                headers.put(JmsMessageHeaderType.JMSType.toString(), SjmsExchangeMessageHelper.getJMSType(jmsMessage));

                // this works around a bug in the ActiveMQ property handling
                headers.put(JmsMessageHeaderType.JMSXGroupID.toString(), jmsMessage.getStringProperty(JmsMessageHeaderType.JMSXGroupID.toString()));
            } catch (JMSException e) {
                throw new RuntimeCamelException(e);
            }

            for (Enumeration<String> enumeration = jmsMessage.getPropertyNames(); enumeration.hasMoreElements();) {
                String key = enumeration.nextElement();
                if (hasIllegalHeaderKey(key)) {
View Full Code Here

     *
     * @param message
     */
    @Override
    public void onMessage(Message message) {
        RuntimeCamelException rce = null;
        try {
            final DefaultExchange exchange = (DefaultExchange) SjmsExchangeMessageHelper.createExchange(message, getEndpoint());

            log.debug("Processing Exchange.id:{}", exchange.getExchangeId());

View Full Code Here

                boxClient.authenticate(authFlowUI, true, listener);

                // wait for login to finish or timeout
                if (!latch.await(configuration.getLoginTimeout(), TimeUnit.SECONDS)) {
                    if (!boxClient.isAuthenticated()) {
                        throw new RuntimeCamelException(String.format("Login timeout for %s", cachedBoxClient));
                    }
                }
                final Exception ex = listener.getException();
                if (ex != null) {
                    throw new RuntimeCamelException(String.format("Login error for %s: %s",
                        cachedBoxClient, ex.getMessage()), ex);
                }
            }

            LOG.debug("OAuth token created for {}", cachedBoxClient);
View Full Code Here

        try {
            // only load the core type converters, as osgi activator will keep track on bundles
            // being installed/uninstalled and load type converters as part of that process
            answer.loadCoreTypeConverters();
        } catch (Exception e) {
            throw new RuntimeCamelException("Error loading CoreTypeConverter due: " + e.getMessage(), e);
        }

        // Load the type converters the tracker has been tracking
        // Here we need to use the ServiceReference to check the ranking
        ServiceReference<TypeConverterLoader>[] serviceReferences = this.tracker.getServiceReferences();
        if (serviceReferences != null) {
            ArrayList<ServiceReference<TypeConverterLoader>> servicesList =
                new ArrayList<ServiceReference<TypeConverterLoader>>(Arrays.asList(serviceReferences));
            // Just make sure we install the high ranking fallback converter at last
            Collections.sort(servicesList);
            for (ServiceReference<TypeConverterLoader> sr : servicesList) {
                try {
                    LOG.debug("loading the type converter from bundle{} ", sr.getBundle().getSymbolicName());
                    ((TypeConverterLoader)this.tracker.getService(sr)).load(answer);
                } catch (Throwable t) {
                    throw new RuntimeCamelException("Error loading type converters from service: " + sr + " due: " + t.getMessage(), t);
                }
            }
        }

        LOG.trace("Created TypeConverter: {}", answer);
View Full Code Here

                    throw new IllegalArgumentException("Invalid route builder " + reference
                            + " of type " + beanClass.getName()
                            + ". Should be RoutesBuilder or RoutesContainer");
                }
            } catch (Exception e) {
                throw new RuntimeCamelException(
                        "Could not add " + reference + " to CamelContext: " + camelContext + ". Reason: " + e,
                        e);
            }
        }
    }
View Full Code Here

    }
   
    private void checkParameterSize(CxfEndpoint endpoint, Exchange exchange, Object[] parameters) {
        BindingOperationInfo boi = getBindingOperationInfo(exchange);
        if (boi == null) {
            throw new RuntimeCamelException("Can't find the binding operation information from camel exchange");
        }
        if (!endpoint.isWrapped()) {
            if (boi.isUnwrappedCapable()) {
                boi = boi.getUnwrappedOperation();
            }
View Full Code Here

   
    public DefaultNettyHttpBinding copy() {
        try {
            return (DefaultNettyHttpBinding)this.clone();
        } catch (CloneNotSupportedException e) {
            throw new RuntimeCamelException(e);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.camel.RuntimeCamelException

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.