Hi!
I have a transformation that have a javascript step, in it I am creating the full path and filename of the file to move and the destination path with the new filename.
Then I am calling the move file method in the following way:
moveFile(src, documentFilename, '');
src is the source for example:
/mnt/pentaho_dev/DEV/Technology/Temporal/MOL/AcctStmts/8762000418_201206_07052012_1121_00000000000000009129.pdf
documentFilename is the destination for example:
/mnt/ndm_dev/PBI/MOL/Output/JPMX.JPMPDF.MEX.JPMOLP.2012186.001570.ARD.out
It is working good in windows but in linux I am having the following error:
ERROR 30-05 11:40:56,050 - Modified Java Script Value 2 - org.pentaho.di.core.exception.KettleValueException:
Javascript error:
org.mozilla.javascript.EvaluatorException: The function call moveFile throw an error : org.apache.commons.vfs.FileSystemException: Could not rename "file:///mnt/pentaho_dev/DEV/Technology/Temporal/MOL/AcctStmts/8762000418_201206_07052012_1121_00000000000000009129.pdf" to "file:///mnt/ndm_dev/PBI/MOL/Output/JPMX.JPMPDF.MEX.JPMOLP.2012186.001570.ARD.out". (script#36) (script#36)
at org.pentaho.di.trans.steps.scriptvalues_mod.ScriptValuesMod.addValues(ScriptValuesMod.java:457)
at org.pentaho.di.trans.steps.scriptvalues_mod.ScriptValuesMod.processRow(ScriptValuesMod.java:688)
at org.pentaho.di.trans.step.RunThread.run(RunThread.java:40)
at java.lang.Thread.run(Thread.java:636)
Caused by: org.mozilla.javascript.EvaluatorException: org.mozilla.javascript.EvaluatorException: The function call moveFile throw an error : org.apache.commons.vfs.FileSystemException: Could not rename "file:///mnt/pentaho_dev/DEV/Technology/Temporal/MOL/AcctStmts/8762000418_201206_07052012_1121_00000000000000009129.pdf" to "file:///mnt/ndm_dev/PBI/MOL/Output/JPMX.JPMPDF.MEX.JPMOLP.2012186.001570.ARD.out". (script#36) (script#36)
at org.mozilla.javascript.DefaultErrorReporter.runtimeError(DefaultErrorReporter.java:109)
at org.mozilla.javascript.Context.reportRuntimeError(Context.java:938)
at org.mozilla.javascript.Context.reportRuntimeError(Context.java:994)
at org.pentaho.di.trans.steps.scriptvalues_mod.ScriptValuesAddedFunctions.moveFile(ScriptValuesAddedFunctions.java:2215)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:161)
at org.mozilla.javascript.FunctionObject.call(FunctionObject.java:413)
at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:97)
at org.mozilla.javascript.gen.c270._c0(script:36)
at org.mozilla.javascript.gen.c270.call(script)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:398)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3065)
at org.mozilla.javascript.gen.c270.call(script)
at org.mozilla.javascript.gen.c270.exec(script)
at org.pentaho.di.trans.steps.scriptvalues_mod.ScriptValuesMod.addValues(ScriptValuesMod.java:376)
... 3 more
INFO 30-05 11:40:56,050 - Modified Java Script Value 2 - Finished processing (I=0, O=0, R=1, W=0, U=0, E=1)
Can anyone help/guide me please?
Thanks!
I have a transformation that have a javascript step, in it I am creating the full path and filename of the file to move and the destination path with the new filename.
Then I am calling the move file method in the following way:
moveFile(src, documentFilename, '');
src is the source for example:
/mnt/pentaho_dev/DEV/Technology/Temporal/MOL/AcctStmts/8762000418_201206_07052012_1121_00000000000000009129.pdf
documentFilename is the destination for example:
/mnt/ndm_dev/PBI/MOL/Output/JPMX.JPMPDF.MEX.JPMOLP.2012186.001570.ARD.out
It is working good in windows but in linux I am having the following error:
ERROR 30-05 11:40:56,050 - Modified Java Script Value 2 - org.pentaho.di.core.exception.KettleValueException:
Javascript error:
org.mozilla.javascript.EvaluatorException: The function call moveFile throw an error : org.apache.commons.vfs.FileSystemException: Could not rename "file:///mnt/pentaho_dev/DEV/Technology/Temporal/MOL/AcctStmts/8762000418_201206_07052012_1121_00000000000000009129.pdf" to "file:///mnt/ndm_dev/PBI/MOL/Output/JPMX.JPMPDF.MEX.JPMOLP.2012186.001570.ARD.out". (script#36) (script#36)
at org.pentaho.di.trans.steps.scriptvalues_mod.ScriptValuesMod.addValues(ScriptValuesMod.java:457)
at org.pentaho.di.trans.steps.scriptvalues_mod.ScriptValuesMod.processRow(ScriptValuesMod.java:688)
at org.pentaho.di.trans.step.RunThread.run(RunThread.java:40)
at java.lang.Thread.run(Thread.java:636)
Caused by: org.mozilla.javascript.EvaluatorException: org.mozilla.javascript.EvaluatorException: The function call moveFile throw an error : org.apache.commons.vfs.FileSystemException: Could not rename "file:///mnt/pentaho_dev/DEV/Technology/Temporal/MOL/AcctStmts/8762000418_201206_07052012_1121_00000000000000009129.pdf" to "file:///mnt/ndm_dev/PBI/MOL/Output/JPMX.JPMPDF.MEX.JPMOLP.2012186.001570.ARD.out". (script#36) (script#36)
at org.mozilla.javascript.DefaultErrorReporter.runtimeError(DefaultErrorReporter.java:109)
at org.mozilla.javascript.Context.reportRuntimeError(Context.java:938)
at org.mozilla.javascript.Context.reportRuntimeError(Context.java:994)
at org.pentaho.di.trans.steps.scriptvalues_mod.ScriptValuesAddedFunctions.moveFile(ScriptValuesAddedFunctions.java:2215)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:161)
at org.mozilla.javascript.FunctionObject.call(FunctionObject.java:413)
at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:97)
at org.mozilla.javascript.gen.c270._c0(script:36)
at org.mozilla.javascript.gen.c270.call(script)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:398)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3065)
at org.mozilla.javascript.gen.c270.call(script)
at org.mozilla.javascript.gen.c270.exec(script)
at org.pentaho.di.trans.steps.scriptvalues_mod.ScriptValuesMod.addValues(ScriptValuesMod.java:376)
... 3 more
INFO 30-05 11:40:56,050 - Modified Java Script Value 2 - Finished processing (I=0, O=0, R=1, W=0, U=0, E=1)
Can anyone help/guide me please?
Thanks!