@Claus: Could this be related to the doTry()/doCatch() issue you are
investigating at present? Or is the exception, which is thrown in the
doCatch() clause, wrapped into another exception?

    public void onAcceptDeliverSm(DeliverSm deliverSm) throws
ProcessRequestException {
        LOG.debug("Received a deliverSm {}", deliverSm);

        try {
            Exchange exchange =
endpoint.createOnAcceptDeliverSmExchange(deliverSm);

            LOG.trace("processing the new smpp exchange...");
            processor.process(exchange);
            LOG.trace("processed the new smpp exchange");
        } catch (Exception e) {
            exceptionHandler.handleException(e);
            if (e instanceof ProcessRequestException) {
                throw (ProcessRequestException) e;
            }
        }
    }

Best,
Christian

On Wed, Oct 3, 2012 at 10:29 PM, chudak <meadand...@gmail.com> wrote:

> I'm following the SMPP documentation and trying to setup a consumer route.
> I
> have my route talking to the Logica simulator and am trying to configure
> the
> exception handling as discussed in the documentation. It seems that none of
> the ways I've tried to configure the route are working correctly.
>
> My current routebuilder looks like this:
>
>  from(inboundSmppUri)
>         .doTry()
>           .to(inboundTargetUri)
>         .doCatch(NullPointerException.class)
>           .throwException(new ProcessRequestException("update of sms state
> failed", 100))
>         .doCatch(Throwable.class)
>           .throwException(new ProcessRequestException("update of sms state
> failed", 100))
>         .end();
>
> Where SMPP uri looks like this:
>
> smpp://pavel@localhost
> :1717?password=wpsd&amp;enquireLinkTimer=5000&amp;transactionTimer=5000&amp;systemType=consumer
>
> And the target URI looks like this:
>
> activemqnontx:queue:inbound-sms
>
> I have a broken transaction configuration on my jms configuration so the
> message processing is failing:
>
> 2012-10-03 13:09:59,934 DEBUG [pool-1-thread-1]
> [AbstractSessionContext.java:82] Activity notified
> 2012-10-03 13:09:59,937 DEBUG [pool-1-thread-1]
> [MessageReceiverListenerImpl.java:65] Received a deliverSm PDUHeader(40,
> 00000005, 00000000, 15)
> 2012-10-03 13:09:59,960 DEBUG [pool-1-thread-1] [SendProcessor.java:114]
> >>>> Endpoint[activemqnontx://queue:sms-inbound] Exchange[SmppMessage:
> PDUHeader(40, 00000005, 00000000, 15)]
> 2012-10-03 13:09:59,970 INFO  [pool-1-thread-1]
> [SingleConnectionFactory.java:291] Established shared JMS Connection:
> com.atomikos.jms.JtaQueueConnection@ccd09b
> 2012-10-03 13:09:59,978 DEBUG [pool-1-thread-1] [JmsTemplate.java:464]
> Executing callback on JMS Session: com.atomikos.jms.JtaQueueSession@1f613c
> 2012-10-03 13:10:00,026 DEBUG [pool-1-thread-1] [JmsConfiguration.java:266]
> Sending JMS message to: queue://sms-inbound with message:
> ActiveMQTextMessage {commandId = 0, responseRequired = false, messageId =
> null, originalDestination = null, originalTransactionId = null, producerId
> =
> null, destination = null, transactionId = null, expiration = 0, timestamp =
> 0, arrival = 0, brokerInTime = 0, brokerOutTime = 0, correlationId = null,
> replyTo = null, persistent = true, type = null, priority = 0, groupID =
> null, groupSequence = 0, targetConsumerId = null, compressed = false,
> userID
> = null, content = null, marshalledProperties = null, dataStructure = null,
> redeliveryCounter = 0, size = 0, properties = {CamelSmppSequenceNumber=15,
> breadcrumbId=ID-chudak-laptop2-59053-1349294879289-0-2,
> CamelSmppCommandId=5, CamelSmppMessageType=DeliverSm}, readOnlyProperties =
> false, readOnlyBody = false, droppable = false, text = 2314234}
> 2012-10-03 13:10:00,030 DEBUG [pool-1-thread-1] [TryProcessor.java:361] The
> exception is handled: true for the exception:
> org.springframework.jms.UncategorizedJmsException caused by: Uncategorized
> exception occured during JMS processing; nested exception is
> javax.jms.JMSException: JTA transaction required for JtaMessageProducer
> 2012-10-03 13:10:00,032 DEBUG [pool-1-thread-1] [SMPPSession.java:499]
> deliver_sm_resp with seq_number 15 has been sent
>
> However, the response being sent to the simulator shows no errors:
>
> > 01:10:00 [pavel] client response: (deliver_resp: (pdu: 17 80000005 0 15)
> > )
>
> Does anyone know what I have to do to get this exception propagated up to
> the JSMPP library so it returns an error to the SMSC? This is not working
> as
> advertised...
>
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Problem-with-SMPP-Consumer-error-handling-tp5720516.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



--

Reply via email to