{"action":"created","issue":{"url":"https://api.github.com/repos/orientechnologies/orientdb/issues/6171","repository_url":"https://api.github.com/repos/orientechnologies/orientdb","labels_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/6171/labels{/name}","comments_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/6171/comments","events_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/6171/events","html_url":"https://github.com/orientechnologies/orientdb/issues/6171","id":155918877,"number":6171,"title":"Clearing OrientDB 2.2.0-rc1 for tests leads to NPE's","user":{"login":"Jotschi","id":326605,"avatar_url":"https://avatars.githubusercontent.com/u/326605?v=3","gravatar_id":"","url":"https://api.github.com/users/Jotschi","html_url":"https://github.com/Jotschi","followers_url":"https://api.github.com/users/Jotschi/followers","following_url":"https://api.github.com/users/Jotschi/following{/other_user}","gists_url":"https://api.github.com/users/Jotschi/gists{/gist_id}","starred_url":"https://api.github.com/users/Jotschi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jotschi/subscriptions","organizations_url":"https://api.github.com/users/Jotschi/orgs","repos_url":"https://api.github.com/users/Jotschi/repos","events_url":"https://api.github.com/users/Jotschi/events{/privacy}","received_events_url":"https://api.github.com/users/Jotschi/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/orientechnologies/orientdb/labels/bug","name":"bug","color":"ededed"}],"state":"closed","locked":false,"assignee":{"login":"lvca","id":312606,"avatar_url":"https://avatars.githubusercontent.com/u/312606?v=3","gravatar_id":"","url":"https://api.github.com/users/lvca","html_url":"https://github.com/lvca","followers_url":"https://api.github.com/users/lvca/followers","following_url":"https://api.github.com/users/lvca/following{/other_user}","gists_url":"https://api.github.com/users/lvca/gists{/gist_id}","starred_url":"https://api.github.com/users/lvca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lvca/subscriptions","organizations_url":"https://api.github.com/users/lvca/orgs","repos_url":"https://api.github.com/users/lvca/repos","events_url":"https://api.github.com/users/lvca/events{/privacy}","received_events_url":"https://api.github.com/users/lvca/received_events","type":"User","site_admin":false},"milestone":null,"comments":3,"created_at":"2016-05-20T09:10:11Z","updated_at":"2016-05-22T11:15:17Z","closed_at":"2016-05-22T11:15:17Z","body":"## Expected behavior and actual behavior\r\n\r\nWe are currently clearing our OrientDB 2.1.7 embedded in-memory db for unit tests using OrientGraphNoTx#drop(). \r\n\r\nIn 2.2.0-rc1 this is now effectively closing the internal OrientDB storage and thus setting all storage references to null. Further calls (using 2.2.0-rc1) would now cause NPE's since \"storage\" is null.\r\n\r\n\r\n```\r\nSEVERE: Error during context close for db null\r\njava.lang.NullPointerException\r\n\tat com.orientechnologies.orient.core.db.OPartitionedDatabasePool$DatabaseDocumentTxPolled.close(OPartitionedDatabasePool.java:160)\r\n\tat com.tinkerpop.blueprints.impls.orient.OrientBaseGraph.shutdown(OrientBaseGraph.java:1160)\r\n\tat com.tinkerpop.blueprints.impls.orient.OrientBaseGraph.shutdown(OrientBaseGraph.java:1132)\r\n\tat com.tinkerpop.blueprints.impls.orient.OrientBaseGraph.shutdown(OrientBaseGraph.java:1125)\r\n\tat com.gentics.mesh.graphdb.orientdb.OrientDBDropTest.cleanup(OrientDBDropTest.java:21)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:497)\r\n\tat org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)\r\n\tat org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)\r\n\tat org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)\r\n\tat org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:33)\r\n\tat org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)\r\n\tat org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)\r\n\tat org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)\r\n\tat org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)\r\n\tat org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)\r\n\tat org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)\r\n\tat org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)\r\n\tat org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)\r\n\tat org.junit.runners.ParentRunner.run(ParentRunner.java:363)\r\n\tat org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)\r\n\tat org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)\r\n\tat org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)\r\n\tat org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)\r\n\tat org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)\r\n\tat org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)\r\n```\r\n\r\n## Steps to reproduce the problem\r\n\r\n```\r\nimport static org.junit.Assert.assertEquals;\r\n\r\nimport org.junit.After;\r\nimport org.junit.Test;\r\n\r\nimport com.tinkerpop.blueprints.impls.orient.OrientGraphFactory;\r\nimport com.tinkerpop.blueprints.impls.orient.OrientGraphNoTx;\r\n\r\npublic class OrientDBDropTest {\r\n\r\n\tOrientGraphFactory factory = new OrientGraphFactory(\"memory:tinkerpop\");\r\n\r\n\t@After\r\n\tpublic void cleanup() {\r\n\t\tOrientGraphNoTx noTx = factory.getNoTx();\r\n\t\ttry {\r\n\t\t\tnoTx.drop();\r\n\t\t} finally {\r\n\t\t\tnoTx.shutdown();\r\n\t\t}\r\n\t}\r\n\r\n\t@Test\r\n\tpublic void testOne() {\r\n\t\tassertCleanup();\r\n\t}\r\n\r\n\t@Test\r\n\tpublic void testTwo() {\r\n\t\tassertCleanup();\r\n\t}\r\n\r\n\tprivate void assertCleanup() {\r\n\t\tOrientGraphNoTx noTx = factory.getNoTx();\r\n\t\ttry {\r\n\t\t\tnoTx.addVertex(null);\r\n\t\t\tassertEquals(1, noTx.countVertices());\r\n\t\t} finally {\r\n\t\t\tnoTx.shutdown();\r\n\t\t}\r\n\t}\r\n}\r\n```\r\n\r\n\r\n## Important Questions\r\n\r\n### Runninng Mode\r\n- [ x] Embedded, using MEMORY access mode\r\n\r\n### OrientDB Version\r\n- [x ] v2.2.0-rc1 \r\n\r\n### Operating System\r\n- [x ] Linux\r\n\r\n### Java Version\r\n- [x ] 8\r\n"},"comment":{"url":"https://api.github.com/repos/orientechnologies/orientdb/issues/comments/220826889","html_url":"https://github.com/orientechnologies/orientdb/issues/6171#issuecomment-220826889","issue_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/6171","id":220826889,"user":{"login":"lvca","id":312606,"avatar_url":"https://avatars.githubusercontent.com/u/312606?v=3","gravatar_id":"","url":"https://api.github.com/users/lvca","html_url":"https://github.com/lvca","followers_url":"https://api.github.com/users/lvca/followers","following_url":"https://api.github.com/users/lvca/following{/other_user}","gists_url":"https://api.github.com/users/lvca/gists{/gist_id}","starred_url":"https://api.github.com/users/lvca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lvca/subscriptions","organizations_url":"https://api.github.com/users/lvca/orgs","repos_url":"https://api.github.com/users/lvca/repos","events_url":"https://api.github.com/users/lvca/events{/privacy}","received_events_url":"https://api.github.com/users/lvca/received_events","type":"User","site_admin":false},"created_at":"2016-05-22T11:15:17Z","updated_at":"2016-05-22T11:15:17Z","body":"Found, fixed in develop branch."}}
{"actor":{"display_login":"lvca"}}