{"action":"created","issue":{"url":"https://api.github.com/repos/datanucleus/datanucleus-mongodb/issues/25","repository_url":"https://api.github.com/repos/datanucleus/datanucleus-mongodb","labels_url":"https://api.github.com/repos/datanucleus/datanucleus-mongodb/issues/25/labels{/name}","comments_url":"https://api.github.com/repos/datanucleus/datanucleus-mongodb/issues/25/comments","events_url":"https://api.github.com/repos/datanucleus/datanucleus-mongodb/issues/25/events","html_url":"https://github.com/datanucleus/datanucleus-mongodb/issues/25","id":162872834,"number":25,"title":"NPE when trying to find rootTable","user":{"login":"nonstans","id":19924629,"avatar_url":"https://avatars.githubusercontent.com/u/19924629?v=3","gravatar_id":"","url":"https://api.github.com/users/nonstans","html_url":"https://github.com/nonstans","followers_url":"https://api.github.com/users/nonstans/followers","following_url":"https://api.github.com/users/nonstans/following{/other_user}","gists_url":"https://api.github.com/users/nonstans/gists{/gist_id}","starred_url":"https://api.github.com/users/nonstans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nonstans/subscriptions","organizations_url":"https://api.github.com/users/nonstans/orgs","repos_url":"https://api.github.com/users/nonstans/repos","events_url":"https://api.github.com/users/nonstans/events{/privacy}","received_events_url":"https://api.github.com/users/nonstans/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/datanucleus/datanucleus-mongodb/labels/testcase_required","name":"testcase_required","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-06-29T08:52:22Z","updated_at":"2016-06-29T10:06:58Z","closed_at":null,"body":"In org.datanucleus.store.mongodb.MongoDBUtils.getClassNameForIdentity(Object, AbstractClassMetaData, ExecutionContext, ClassLoaderResolver) I get a NullPointerException when it is tried to retrieve the table for an abstract superclass.\r\n\r\nTable rootTable = storeMgr.getStoreDataForClass(rootCmd.getFullClassName()).getTable();\r\n\r\ngetStoreDataForClass comes back with NULL as result for an abstract superclass. I investigated the table of the storeDataManager and it contains only entries for concrete classes, am I doing something wrong in my annotation?\r\n\r\n`\r\n@PersistenceCapable(detachable = \"true\",\r\n                    identityType = IdentityType.APPLICATION,\r\n                    objectIdClass = Id.class)\r\n@Discriminator(strategy = DiscriminatorStrategy.CLASS_NAME)\r\n@Inheritance(strategy = InheritanceStrategy.COMPLETE_TABLE)\r\npublic abstract class SuperClass {\r\n..\r\n`"},"comment":{"url":"https://api.github.com/repos/datanucleus/datanucleus-mongodb/issues/comments/229314322","html_url":"https://github.com/datanucleus/datanucleus-mongodb/issues/25#issuecomment-229314322","issue_url":"https://api.github.com/repos/datanucleus/datanucleus-mongodb/issues/25","id":229314322,"user":{"login":"nonstans","id":19924629,"avatar_url":"https://avatars.githubusercontent.com/u/19924629?v=3","gravatar_id":"","url":"https://api.github.com/users/nonstans","html_url":"https://github.com/nonstans","followers_url":"https://api.github.com/users/nonstans/followers","following_url":"https://api.github.com/users/nonstans/following{/other_user}","gists_url":"https://api.github.com/users/nonstans/gists{/gist_id}","starred_url":"https://api.github.com/users/nonstans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nonstans/subscriptions","organizations_url":"https://api.github.com/users/nonstans/orgs","repos_url":"https://api.github.com/users/nonstans/repos","events_url":"https://api.github.com/users/nonstans/events{/privacy}","received_events_url":"https://api.github.com/users/nonstans/received_events","type":"User","site_admin":false},"created_at":"2016-06-29T10:06:58Z","updated_at":"2016-06-29T10:06:58Z","body":"I further investigated the problem. I noticed that problem vanishes as soon as I don't fetch a collection in one of the subclasses.\r\nSee my schema example:\r\n[Schema.zip](https://github.com/datanucleus/datanucleus-mongodb/files/338999/Schema.zip)\r\nAgain I'm not sure whether my annotations are right? To provide a running testcase requires more time. I could prepare something tomorrow, if you need it.\r\n\r\nStackTrace:\r\n\r\nCaused by: java.lang.NullPointerException\r\n\tat org.datanucleus.store.mongodb.MongoDBUtils.getClassNameForIdentity(MongoDBUtils.java:199)\r\n\tat org.datanucleus.store.mongodb.MongoDBStoreManager.getClassNameForObjectID(MongoDBStoreManager.java:132)\r\n\tat org.datanucleus.ExecutionContextImpl.getClassNameForObjectId(ExecutionContextImpl.java:3503)\r\n\tat org.datanucleus.ExecutionContextImpl.getClassDetailsForId(ExecutionContextImpl.java:3392)\r\n\tat org.datanucleus.ExecutionContextImpl.findObject(ExecutionContextImpl.java:3568)\r\n\tat org.datanucleus.identity.IdentityUtils.getObjectFromIdString(IdentityUtils.java:442)\r\n\tat org.datanucleus.store.mongodb.fieldmanager.FetchFieldManager.getValueForContainerRelationField(FetchFieldManager.java:970)\r\n\tat org.datanucleus.store.mongodb.fieldmanager.FetchFieldManager.fetchNonEmbeddedObjectField(FetchFieldManager.java:737)\r\n\tat org.datanucleus.store.mongodb.fieldmanager.FetchFieldManager.fetchObjectField(FetchFieldManager.java:685)\r\n\tat org.datanucleus.state.AbstractStateManager.replacingObjectField(AbstractStateManager.java:1588)\r\n\tat org.datanucleus.state.StateManagerImpl.replacingObjectField(StateManagerImpl.java:1)\r\n\tat de.mpg.ipp.codac.business.schema.teamwork.UserGroup.dnReplaceField(UserGroup.java)\r\n\tat de.mpg.ipp.codac.business.schema.common.W7XDbNamedObject.dnReplaceFields(W7XDbNamedObject.java)\r\n\tat org.datanucleus.state.StateManagerImpl.replaceFields(StateManagerImpl.java:3115)\r\n\tat org.datanucleus.state.StateManagerImpl.replaceFields(StateManagerImpl.java:3141)\r\n\tat org.datanucleus.store.mongodb.MongoDBUtils$1.fetchFields(MongoDBUtils.java:761)\r\n\tat org.datanucleus.state.StateManagerImpl.loadFieldValues(StateManagerImpl.java:2245)\r\n\tat org.datanucleus.state.StateManagerImpl.initialiseForHollow(StateManagerImpl.java:262)\r\n\tat org.datanucleus.state.ObjectProviderFactoryImpl.newForHollow(ObjectProviderFactoryImpl.java:112)\r\n\tat org.datanucleus.ExecutionContextImpl.findObject(ExecutionContextImpl.java:3098)\r\n\tat org.datanucleus.store.mongodb.MongoDBUtils.getObjectUsingApplicationIdForDBObject(MongoDBUtils.java:756)\r\n\tat org.datanucleus.store.mongodb.MongoDBUtils.getPojoForDBObjectForCandidate(MongoDBUtils.java:718)\r\n\tat org.datanucleus.store.mongodb.query.LazyLoadQueryResult.getNextObject(LazyLoadQueryResult.java:324)\r\n\tat org.datanucleus.store.mongodb.query.LazyLoadQueryResult$QueryResultIterator.next(LazyLoadQueryResult.java:449)\r\n\tat de.mpg.ipp.codac.persistence.DataNucleusProvider.doGetObjects(DataNucleusProvider.java:293)\r\n\t... 31 more"}}
{"actor":{"display_login":"nonstans"}}