Petals BC Filetransfer

Variables '$content' and '$attachment' of 'base-message' are not trimmed

Details

  • Type: Improvement Request Improvement Request
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 3.2.0
  • Fix Version/s: 3.2.2
  • Security Level: Public
  • Description:
    Hide

    Variables '$content' and '$attachment' of 'base-message' are not trimmed. So when the 'base-message' is declared as following, the variable '$content' is not found because of the content of the variable node: "\n$content"

    <filetransfer3:base-message><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
    <ver:put xmlns:ver="http://petals.ow2.org/components/filetransfer/version-3">
    $content</ver:put>]]></filetransfer3:base-message>

    and the following error occurs at runtime:

    sample-0 2014/08/12 17:50:02,639 GMT+0200 INFO [Petals.Container.Components.petals-bc-filetransfer] : Can't process file put-33562177567431.xml
    javax.jbi.messaging.MessagingException: $content variable not found in the base message.
    	at org.ow2.petals.bc.filetransfer.util.FileTransferUtils.replaceVariableByXmlFileContent(FileTransferUtils.java:641)
    	at org.ow2.petals.bc.filetransfer.util.FileTransferUtils.createMessageOnBaseMsg(FileTransferUtils.java:316)
    	at org.ow2.petals.bc.filetransfer.service.consume.ExternalEventProcessor.run(ExternalEventProcessor.java:96)
    	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
    	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
    	at java.lang.Thread.run(Thread.java:662)
    Show
    Variables '$content' and '$attachment' of 'base-message' are not trimmed. So when the 'base-message' is declared as following, the variable '$content' is not found because of the content of the variable node: "\n$content"
    <filetransfer3:base-message><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
    <ver:put xmlns:ver="http://petals.ow2.org/components/filetransfer/version-3">
    $content</ver:put>]]></filetransfer3:base-message>
    and the following error occurs at runtime:
    sample-0 2014/08/12 17:50:02,639 GMT+0200 INFO [Petals.Container.Components.petals-bc-filetransfer] : Can't process file put-33562177567431.xml
    javax.jbi.messaging.MessagingException: $content variable not found in the base message.
    	at org.ow2.petals.bc.filetransfer.util.FileTransferUtils.replaceVariableByXmlFileContent(FileTransferUtils.java:641)
    	at org.ow2.petals.bc.filetransfer.util.FileTransferUtils.createMessageOnBaseMsg(FileTransferUtils.java:316)
    	at org.ow2.petals.bc.filetransfer.service.consume.ExternalEventProcessor.run(ExternalEventProcessor.java:96)
    	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
    	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
    	at java.lang.Thread.run(Thread.java:662)
  • Environment:
    -

Issue Links

Activity

Christophe DENEUX made changes - Tue, 12 Aug 2014 - 17:52:04 +0200
Field Original Value New Value
Status New [ 10000 ] Open [ 10002 ]
Priority Major [ 3 ]
Assignee Mathieu Carrolle [ mcarrolle ] Christophe DENEUX [ cdeneux ]
Christophe DENEUX made changes - Tue, 12 Aug 2014 - 17:52:07 +0200
Status Open [ 10002 ] In Progress [ 10003 ]
Christophe DENEUX made changes - Tue, 12 Aug 2014 - 17:54:33 +0200
Link This issue depends on PETALSCDK-118 [ PETALSCDK-118 ]
Christophe DENEUX made changes - Tue, 12 Aug 2014 - 18:34:22 +0200
Status In Progress [ 10003 ] Resolved [ 10004 ]
Resolution Fixed [ 1 ]
Christophe DENEUX made changes - Tue, 12 Aug 2014 - 18:35:12 +0200
Fix Version/s 3.2.2 [ 10487 ]
Christophe DENEUX made changes - Thu, 2 Jun 2016 - 15:21:27 +0200
Component/s File listening (consumer part) [ 10397 ]

People

Dates

  • Created:
    Tue, 12 Aug 2014 - 17:51:26 +0200
    Updated:
    Thu, 2 Jun 2016 - 15:21:27 +0200
    Resolved:
    Tue, 12 Aug 2014 - 18:34:21 +0200