cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with chain scripts is spaces

lblancher
Champ in-the-making
Champ in-the-making
Hello,
  I have two scripts, that when run independently work fine.  But when one triggers the other, i get an error.  Here is what is happening.

Space layout.
/Company Home/DropBox
/Company Home/Client/Client Files
/Company Home/Client/Changed Files.xml
/Company Home/Client/Changed Files.html

The first script run whenever a file is loaded into the client files space.  It opens the xml file, added some information about the file that was just added, and saves it.  Then it a it applies a freemarker template to the xml file and creates and saves the html file.  This script works fine when i just drop a file into Client files space, the every thing gets updated fine.

The second script is a routing script.  Based on the file name of the file dropped into the DropBox, the file gets routed to the right client files space.  This script works fine, and moves the files around, as long as script 1 is deleted.

The problems happens when both scripts are enabled.  The second script runs fine and moves the files to the clients files space, and then the first script get executed.  But it fails with the following error this time


freemarker.core.InvalidReferenceException: Error on line 8, column 17 in string://fixed
document.xmlNodeModel is undefined.
It cannot be assigned to dom
        at freemarker.core.Assignment.accept(Assignment.java:111)
        at freemarker.core.Environment.visit(Environment.java:196)
        at freemarker.core.MixedContent.accept(MixedContent.java:92)
        at freemarker.core.Environment.visit(Environment.java:196)
        at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:79)
        at freemarker.core.Environment.visit(Environment.java:196)


are there any known problems with chaining scripts like this?

Thanks,
Lucas
1 REPLY 1

lblancher
Champ in-the-making
Champ in-the-making
Hello,
   I found my problem, it was due to an xml encoding problem.  The file i was dropping into to the dropbox had an & in the file name.

Thanks,
Lucas