Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

database.ocf (Access is denied) when creating schema #10204

Open
robert-andrei opened this issue Mar 29, 2024 · 0 comments
Open

database.ocf (Access is denied) when creating schema #10204

robert-andrei opened this issue Mar 29, 2024 · 0 comments

Comments

@robert-andrei
Copy link

OrientDB Version: 2.2.37

Java Version: 11.0.13 OpenJDK

OS: Windows server 2019

I have a Java program which is creating the database schema executing the following commands from a script:

create class Uses extends E
create class UsesInternal extends Uses CLUSTERS 1
create class UsesSub extends UsesInternal CLUSTERS 1

Execution is like this:

graph.command(new OCommandScript("sql", scriptContent)).execute();

Expected behavior

Successfully create the schema every single time.

Actual behavior

Sometimes, a command execution fails with the following error:

com.orientechnologies.orient.core.exception.OPaginatedClusterException: Error during creation of cluster with name usesinternal
[...]
	at com.orientechnologies.orient.core.storage.impl.local.paginated.OPaginatedCluster.create(OPaginatedCluster.java:196) ~
Caused by: com.orientechnologies.orient.core.exception.OSerializationException: Error on update storage configuration
[...]
com.orientechnologies.orient.core.storage.impl.local.OStorageConfigurationSegment.update(OStorageConfigurationSegment.java:232)
Caused by: java.io.FileNotFoundException: C:\Program Files\Local Test\data\tmp\gdb\gdb-test\database.ocf (Access is denied)
	at java.io.RandomAccessFile.open0(Native Method) ~[?:?]
	at java.io.RandomAccessFile.open(Unknown Source) ~[?:?]
	at java.io.RandomAccessFile.<init>(Unknown Source) ~[?:?]
	at java.io.RandomAccessFile.<init>(Unknown Source) ~[?:?]
	at com.orientechnologies.orient.core.storage.impl.local.OStorageConfigurationSegment.update(OStorageConfigurationSegment.java:220)

Steps to reproduce

The issue is very inconsistent and only shows up from time to time. Didn't manage to pick up on a specific scenario. I'm not sure how the database.ocf file is used in Orient DB, is there something locking it?

@tglman tglman added this to the 2.2.x (next hotfix) milestone May 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants