Bug 777932 (SOA-461) - Property substitution in (action def in jboss-esb.xml) not working for NotifyFiles notification as for NotifyFTP
Summary: Property substitution in (action def in jboss-esb.xml) not working for Notify...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: SOA-461
Product: JBoss Enterprise SOA Platform 4
Classification: JBoss
Component: JBossESB
Version: 4.2 GA
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.2 CP02
Assignee: Len DiMaggio
QA Contact:
URL: http://jira.jboss.org/jira/browse/SOA...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-03-08 00:49 UTC by Len DiMaggio
Modified: 2008-06-11 18:53 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
/opt/GA/soa-4.2.0.GA.zip /opt/GA/standalone-soa-4.2.0.GA.zip
Last Closed: 2008-06-11 18:53:30 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker SOA-461 0 None None None Never

Description Len DiMaggio 2008-03-08 00:49:41 UTC
Date of First Response: 2008-03-08 16:07:17
project_key: SOA

The FTP notifier supports message property resolution in the names of files generated by the notification:

<target class="NotifyFTP">
    <ftp URL="ftp://jboss:jboss@localhost/remote/dir" filename="{jbossesb.message.id}.txt"/>
</target>

Results in an example file name of:  ID:JBM-16515.txt

The file notifier - with this syntax: 

<target class="NotifyFiles">
    <file append="false" URI="file:///remote/dir/{jbossesb.message.id}.txt"/>
</target>

Results in a file of:  jbossesb.message.id.txt

Comment 1 Len DiMaggio 2008-03-08 01:13:13 UTC
Link: Added: This issue is a dependency of JBESB-1588


Comment 2 Kevin Conner 2008-03-08 21:07:17 UTC
This is only supported by the FTP notifier at present, the work appears to have been done in isolation.

We really need a task to replace this code with the ObjectMapper and use this through out.

Comment 3 Kevin Conner 2008-03-08 22:06:20 UTC
Link: Added: This issue depends JBESB-1589


Comment 4 Len DiMaggio 2008-03-10 01:01:17 UTC
Footnote to this JIRA.

This syntax creates the file:
<file URI="/remote/dir/{jbossesb.message.id}.txt" append="false"/>

This syntax creates the file - and raises the exception listed below:
<file URI="file:///remote/dir/{jbossesb.message.id}.txt" append="false"/>

20:44:17,841 ERROR [STDERR] java.lang.reflect.InvocationTargetException
20:44:17,842 ERROR [STDERR]     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
20:44:17,842 ERROR [STDERR]     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
20:44:17,842 ERROR [STDERR]     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
20:44:17,842 ERROR [STDERR]     at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
20:44:17,842 ERROR [STDERR]     at org.jboss.soa.esb.notification.NotificationTarget.fromParams(NotificationTarget.java:144)
20:44:17,842 ERROR [STDERR]     at org.jboss.soa.esb.notification.NotificationList.notifyAll(NotificationList.java:162)
20:44:17,842 ERROR [STDERR]     at org.jboss.soa.esb.actions.Notifier.notifyOK(Notifier.java:93)
20:44:17,842 ERROR [STDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
20:44:17,842 ERROR [STDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
20:44:17,843 ERROR [STDERR]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
20:44:17,843 ERROR [STDERR]     at java.lang.reflect.Method.invoke(Method.java:585)
20:44:17,843 ERROR [STDERR]     at org.jboss.soa.esb.listeners.message.ActionProcessorMethodInfo.processSuccess(ActionProcessorMethodInfo.java:165)
20:44:17,843 ERROR [STDERR]     at org.jboss.soa.esb.listeners.message.OverriddenActionLifecycleProcessor.processSuccess(OverriddenActionLifecycleProcessor.java:108)
20:44:17,843 ERROR [STDERR]     at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.notifySuccess(ActionProcessingPipeline.java:610)
20:44:17,843 ERROR [STDERR]     at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.process(ActionProcessingPipeline.java:384)
20:44:17,843 ERROR [STDERR]     at org.jboss.soa.esb.listeners.message.MessageAwareListener$TransactionalRunner.run(MessageAwareListener.java:566)
20:44:17,843 ERROR [STDERR]     at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
20:44:17,843 ERROR [STDERR]     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
20:44:17,843 ERROR [STDERR]     at java.lang.Thread.run(Thread.java:595)
20:44:17,844 ERROR [STDERR] Caused by: java.lang.IllegalArgumentException: Bad File Notification Configuration: Parent folder for file [/opt/GA/jboss-soa-p-standalone.4.2.0/jboss-as/bin/file:/remote/dir/{jbossesb.message.id}.txt] doesn't exist.
20:44:17,844 ERROR [STDERR]     at org.jboss.soa.esb.notification.NotifyFiles.setFiles(NotifyFiles.java:147)
20:44:17,844 ERROR [STDERR]     at org.jboss.soa.esb.notification.NotifyFiles.<init>(NotifyFiles.java:94)
20:44:17,844 ERROR [STDERR]     ... 19 more
20:44:17,847 ERROR [NotificationList] Can't instantiate target <target class="NotifyFiles">
                         <file URI="file:///remote/dir/{jbossesb.message.id}.txt" append="false"/>
                       </target>
org.jboss.soa.esb.ConfigurationException: NotifyFiles  does not extend NotificationTarget
        at org.jboss.soa.esb.notification.NotificationTarget.fromParams(NotificationTarget.java:151)
        at org.jboss.soa.esb.notification.NotificationList.notifyAll(NotificationList.java:162)
        at org.jboss.soa.esb.actions.Notifier.notifyOK(Notifier.java:93)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.jboss.soa.esb.listeners.message.ActionProcessorMethodInfo.processSuccess(ActionProcessorMethodInfo.java:165)
        at org.jboss.soa.esb.listeners.message.OverriddenActionLifecycleProcessor.processSuccess(OverriddenActionLifecycleProcessor.java:108)
        at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.notifySuccess(ActionProcessingPipeline.java:610)
        at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.process(ActionProcessingPipeline.java:384)
        at org.jboss.soa.esb.listeners.message.MessageAwareListener$TransactionalRunner.run(MessageAwareListener.java:566)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
        at java.lang.Thread.run(Thread.java:595)


Comment 5 Len DiMaggio 2008-06-11 18:53:30 UTC
Verified fixed in CP02 build CR1:

ll /remote/dir/
-rw-r--r-- 1 jboss jboss 33 Jun 11 14:13 ID:JBM-8864d094-efd9-4645-b73e-e4f0ce32448a.txt
-rw-r--r-- 1 jboss jboss 33 Jun 11 14:10 ID:JBM-e6c241b8-2c3a-4b71-b5de-f845b5de5443.txt
-rw-r--r-- 1 jboss jboss 33 Jun 11 14:26 ID:JBM-ffe8507f-6417-4a2c-a73f-5c740db6b5fa.txt

One new question

http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4157479#4157479

Are we intentionally writing the files to system root and not the designated user's home dir?




Note You need to log in before you can comment on or make changes to this bug.