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

NPE during creation of a property for a specific class #7546

Closed
PhantomYdn opened this issue Jul 13, 2017 · 6 comments
Closed

NPE during creation of a property for a specific class #7546

PhantomYdn opened this issue Jul 13, 2017 · 6 comments
Labels
Milestone

Comments

@PhantomYdn
Copy link
Contributor

PhantomYdn commented Jul 13, 2017

OrientDB Version: 2.2.22

Java Version: 7+

OS: linux

It seems that OrientDB doesn't like class with name "Report". After creation of such class there are lots of interesting stuff is happening. And the only one solution: rollback to previous backup.

Creation of a new property for class "Report" or attempt to retrieve newly created class lead to the NPE in the same place.

Creation of property:

java.lang.NullPointerException
     at com.orientechnologies.orient.core.storage.impl.local.paginated.OPaginatedCluster.getEntries(OPaginatedCluster.java:1425)
     at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.count(OAbstractPaginatedStorage.java:1158)
     at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.countClusterElements(ODatabaseDocumentTx.java:816)
     at com.orientechnologies.orient.core.iterator.ORecordIteratorClass.config(ORecordIteratorClass.java:141)
     at com.orientechnologies.orient.core.iterator.ORecordIteratorClass.<init>(ORecordIteratorClass.java:90)
     at com.orientechnologies.orient.core.iterator.ORecordIteratorClass.<init>(ORecordIteratorClass.java:68)
     at com.orientechnologies.orient.core.sql.OCommandExecutorSQLResultsetAbstract.searchInClasses(OCommandExecutorSQLResultsetAbstract.java:479)
     at com.orientechnologies.orient.core.sql.OCommandExecutorSQLResultsetAbstract.searchInClasses(OCommandExecutorSQLResultsetAbstract.java:468)
     at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.searchInClasses(OCommandExecutorSQLSelect.java:1004)
     at com.orientechnologies.orient.core.sql.OCommandExecutorSQLResultsetAbstract.assignTarget(OCommandExecutorSQLResultsetAbstract.java:209)
     at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.assignTarget(OCommandExecutorSQLSelect.java:530)
     at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.executeSearch(OCommandExecutorSQLSelect.java:512)
     at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.execute(OCommandExecutorSQLSelect.java:488)
     at com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.execute(OCommandExecutorSQLDelegate.java:74)
     at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.executeCommand(OAbstractPaginatedStorage.java:3200)
     at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.command(OAbstractPaginatedStorage.java:3138)
     at com.orientechnologies.orient.core.command.OCommandRequestTextAbstract.execute(OCommandRequestTextAbstract.java:69)
     at com.orientechnologies.orient.core.metadata.schema.OClassImpl.checkPersistentPropertyType(OClassImpl.java:2186)
     at com.orientechnologies.orient.core.metadata.schema.OClassImpl.addPropertyInternal(OClassImpl.java:1812)
     at com.orientechnologies.orient.core.metadata.schema.OClassImpl$6.call(OClassImpl.java:2606)
     at com.orientechnologies.orient.core.metadata.schema.OClassImpl$6.call(OClassImpl.java:2603)
     at com.orientechnologies.orient.core.db.OScenarioThreadLocal.executeAsDistributed(OScenarioThreadLocal.java:70)
     at com.orientechnologies.orient.core.metadata.schema.OClassImpl.addProperty(OClassImpl.java:2603)
     at com.orientechnologies.orient.core.metadata.schema.OClassImpl.createProperty(OClassImpl.java:807)

Count of documents for a class:

Caused by: java.lang.NullPointerException
	at com.orientechnologies.orient.core.storage.impl.local.paginated.OPaginatedCluster.getEntries(OPaginatedCluster.java:1425)
	at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.count(OAbstractPaginatedStorage.java:1158)
	at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.countClusterElements(ODatabaseDocumentTx.java:816)
	at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.countClusterElements(ODatabaseDocumentTx.java:770)
	at com.orientechnologies.orient.core.metadata.schema.OClassImpl.count(OClassImpl.java:1510)
	at com.orientechnologies.orient.core.metadata.schema.OClassImpl.count(OClassImpl.java:1503)

If "Report" is so specific - please make it a keyword.

@andrii0lomakin
Copy link
Member

@PhantomYdn just to clarify is it 2.2.2 version?

@PhantomYdn
Copy link
Contributor Author

I'm sorry - you are right. I meant 2.2.22

@andrii0lomakin
Copy link
Member

@PhantomYdn do you have broken database, which you are talking about? Do you have logs from this database? Preferably since the creation of a class Report? That is very important.

@PhantomYdn
Copy link
Contributor Author

Backup was provided through Skype.

@andrii0lomakin
Copy link
Member

Fixed. @santo-it description for release notes "In early versions of OrientDB deleted files did not preserve their ids correctly, as result after upgrade to latest version and creation of the cluster with the same name all cluster files are assigned the same id, so one file overwrites another file in file system and created cluster contains incomplete information about its state. "

@PhantomYdn
Copy link
Contributor Author

@Laa , thank you a lot!

@santo-it santo-it added this to the 2.2.24 milestone Jul 20, 2017
@santo-it santo-it removed this from the 2.2.x (next hotfix) milestone Jul 20, 2017
tglman pushed a commit that referenced this issue Jul 28, 2017
tglman pushed a commit that referenced this issue Jul 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

4 participants