Calculation works while testing, but result cannot be written to database
Hi,
I have a general problem with calculations in Calc: Even if the calculation runs smoothly when I test it, I get an error in step 3 when running the calculation chain. Obviously the results are not written to the database. I also see that the plot area is not written to the tree view (even if correct).
My simple example calculation is:
tree$tree_basalarea <- pi/4*(tree$tree_dbh/100)^2
I am using a test case with only some trees.
The error I get is:
Error in 'tree basal area'
org.openforis.calc.r.RException: R error while evaluating tree basal area
at org.openforis.calc.engine.CalcRTask.execute(CalcRTask.java:58)
at org.openforis.calc.engine.Worker.run(Worker.java:75)
at org.openforis.calc.engine.Job.execute(Job.java:103)
at org.openforis.calc.engine.Worker.run(Worker.java:75)
at org.openforis.calc.engine.Job.run(Job.java:89)
at org.openforis.calc.engine.TaskManager$1.run(TaskManager.java:232)
at org.springframework.core.task.SimpleAsyncTaskExecutor$ConcurrencyThrottlingRunnable.run(SimpleAsyncTaskExecutor.java:230)
at java.lang.Thread.run(Thread.java:745)
Error in `$<-.data.frame`(`*tmp*`, "tree_basalarea_per_ha", value = numeric(0)) :
Ersetzung hat 0 Zeilen, Daten haben 3
Error in checkError(result, connection) :
Error in `$<-.data.frame`(`*tmp*`, "tree_basalarea_per_ha", value = numeric(0)) :
Ersetzung hat 0 Zeilen, Daten haben 3