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

NullPointerException on index.getVersion() #6651

Closed
4 tasks
jamieb22 opened this issue Sep 2, 2016 · 7 comments
Closed
4 tasks

NullPointerException on index.getVersion() #6651

jamieb22 opened this issue Sep 2, 2016 · 7 comments
Assignees
Labels
Milestone

Comments

@jamieb22
Copy link

jamieb22 commented Sep 2, 2016

OrientDB Version, operating system, or hardware.

  • v2.2.8

Operating System

  • Linux
  • MacOSX
  • [ X] Windows
  • Other Unix
  • Other, name?

Expected behavior and actual behavior

2016-09-02 09:46:01 t.c.s.a.hr [ERROR] failed to drop old indexes:null
java.lang.NullPointerException: null
at com.orientechnologies.orient.core.index.OIndexAbstract.getVersion(OIndexAbstract.java:812)
at com.orientechnologies.orient.core.index.OIndexAbstractDelegate.getVersion(OIndexAbstractDelegate.java:275)
..
at com.stimulus.archiva.domain.bz$a.run(MailArchiva:169)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

Expecting not to get NullPtr

Steps to reproduce the problem

@andrii0lomakin
Copy link
Member

andrii0lomakin commented Sep 5, 2016

@jamieb22 this issue should be fixed. Could you try the latest version?

@jamieb22
Copy link
Author

I tried on the latest version 2.2.9 and it doesn't work.
2016-09-11 19:55:44 h.c.s.a.d.b.BluePrintDatabaseUtil [ERROR] failed to drop old indexes:null
java.lang.NullPointerException: null
at com.orientechnologies.orient.core.index.OIndexAbstract.getVersion(OIndexAbstract.java:787)
at com.orientechnologies.orient.core.index.OIndexAbstractDelegate.getVersion(OIndexAbstractDelegate.java:275)
at com.stimulus.archiva.database.blueprints.BluePrintDatabaseUtil.dropOldIndexes(BluePrintDatabaseUtil.java:121)
at com.stimulus.archiva.database.blueprints.BluePrintDatabaseUtil.initGraphFactory(BluePrintDatabaseUtil.java:327)
at com.stimulus.archiva.database.blueprints.BluePrintDatabase.connect(BluePrintDatabase.java:86)
at com.stimulus.archiva.database.DatabaseService.startup(DatabaseService.java:328)
at com.stimulus.archiva.domain.Services$ServiceStartup.run(Services.java:169)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

@jamieb22
Copy link
Author

This happens on v_statistic.subtype and v_blob.mgn

@andrii0lomakin
Copy link
Member

andrii0lomakin commented Sep 12, 2016

Hi @jamieb22 by latest I meant 2.2.10 which was in snapshot stage when I wrote it.
If you check OIndexAbstract#getVersion
you will see following code:

    final ODocument document = conf.getDocument();
    if (document == null)
      return -1;
    return document.field(OIndexInternal.INDEX_VERSION);

So NPE on a document should not happen. Could you try on 2.2.10 ?

@andrii0lomakin
Copy link
Member

Close issue because of no reply. If you reproduce given issue and have information which is requested in issue feel free to reopen it.

@jamieb22
Copy link
Author

database.zip
This bug is still happening in v2.2.14.

java.lang.NullPointerException: null
	at com.orientechnologies.orient.core.index.OIndexAbstract.getVersion(OIndexAbstract.java:787)
	at com.orientechnologies.orient.core.index.OIndexAbstractDelegate.getVersion(OIndexAbstractDelegate.java:275)
	at com.stimulus.archiva.database.blueprints.BluePrintDatabaseUtil.dropOldIndexes(BluePrintDatabaseUtil.java:124)

@andrii0lomakin
Copy link
Member

Fixed, sorry for inconvenience

@robfrank robfrank removed this from the 2.2.x (next hotfix) milestone Jan 16, 2017
@robfrank robfrank modified the milestones: 2.2.15, 2.2.x (next hotfix) Jan 16, 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