ADR81SGP
New Creator

FSM Script Task: DataAccessException -> access denied

Jump to solution

Dear FirstSpirit Community,

we have an issue in an FSM script where the attached error occurs when executing on the server in a project in schedule entries.
Before the isolated-mode migration of the server it worked perfectly fine. No logical code changes happend in between.

The first few lines of the script are executed as I see a log message indicating the same, but after that, I get that error as attached. On what line the error is thrown, I am not sure of.

Have you experienced this kind of error and can give a hint where it may occur?
Are any code changes necessary for isolated-mode except module-isolated.xml and pom.xml?

Java version: 11
FirstSpirit version: 2020-05

I kindly ask for some insights from your end. Thank you!

12 Replies

Hi Felix,

good idea, I tried below. Output in line 3.

print(context.getElement().getFormData());

Output: de.espirit.firstspirit.store.access.DataWrappingFormData@a03f51a

I will send you an email. Thanks!

0 Kudos

Hi Felix,

I got some new insights after adding more logging messages to the method:

DEBUG 23.07.2021 07:43:48.550 (org.slf4j.Logger): Reading DataProvider with id 2893587

DEBUG 23.07.2021 07:43:51.619 (org.slf4j.Logger): Got FormData from DataProvider

DEBUG 23.07.2021 07:43:51.619 (org.slf4j.Logger): Got GomFormElements from DataProvider

DEBUG 23.07.2021 07:43:51.619 (org.slf4j.Logger): Added GomFormElements from DataProvider to Map

ERROR 23.07.2021 07:43:51.626{dNR=} (de.espirit.firstspirit.server.scheduler.ScriptTaskExecutor): error during script execution : java.lang.IllegalStateException: java.lang.IllegalStateException: Error loading revision (revisionId=57883) - de.espirit.storage.backend.BackendClosedException: Database error: com.sleepycat7.je.EnvironmentFailureException: (JE 7.5.11) /net/si0vm04828/fs0/wcms/fs/data/projects/project_2893322/repository/bdb7 fetchIN of 0xc9/0x346a5 parent IN=330 IN class="com".sleepycat7.je.tree.IN lastFullLsn=0xd1/0x61e079 lastLoggedLsn=0xd1/0x61e079 parent.getDirty()=false state=0 expires=never java.security.AccessControlException: access denied ("java.io.FilePermission" "/net/si0vm04828/fs0/wcms/fs/data/projects/project_2893322/repository/bdb7/000000c9.jdb" "read") LOG_INTEGRITY: Log information is incorrect, problem is likely persistent.

So practically the lambda expression executes completely for that one DataProvider that when deleting it from the project the exception does not occur anymore. So the lambda executes to the end of the iteration and then we get that exception in line 5.

0 Kudos

Hi Felix,

I figured out what the issue is here: as I used a parallelStream() lambda expression when iterating the DataProviders and the pages seem to be co-dependent it might so happen that I access a page from two different forks of the stream at the same time. Hence, we get the access denied exception. :smileysilly:

So I changed now the following

dataProviders.parallelStream().forEach(dataProvider -> { ... });

to

dataProviders.forEach(dataProvider -> { ... });

So much trouble, such a simple cause.

0 Kudos