{"action":"closed","issue":{"url":"https://api.github.com/repos/orientechnologies/orientdb/issues/3731","labels_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/3731/labels{/name}","comments_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/3731/comments","events_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/3731/events","html_url":"https://github.com/orientechnologies/orientdb/issues/3731","id":60234067,"number":3731,"title":"NullPointerException in OObjectProxyMethodHandler.getDocFieldValue","user":{"login":"aheintz","id":4854621,"avatar_url":"https://avatars.githubusercontent.com/u/4854621?v=3","gravatar_id":"","url":"https://api.github.com/users/aheintz","html_url":"https://github.com/aheintz","followers_url":"https://api.github.com/users/aheintz/followers","following_url":"https://api.github.com/users/aheintz/following{/other_user}","gists_url":"https://api.github.com/users/aheintz/gists{/gist_id}","starred_url":"https://api.github.com/users/aheintz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aheintz/subscriptions","organizations_url":"https://api.github.com/users/aheintz/orgs","repos_url":"https://api.github.com/users/aheintz/repos","events_url":"https://api.github.com/users/aheintz/events{/privacy}","received_events_url":"https://api.github.com/users/aheintz/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-08T00:40:48Z","updated_at":"2015-03-09T11:49:47Z","closed_at":"2015-03-09T11:49:47Z","body":"After upgrading from 1.7.10 to 2.0.4 I experience a few issues with OrientDB using the Object Database.\r\n\r\nIn addition to #3604, I get a NullPointerException in OObjectProxyMethodHandler.getDocFieldValue(final Object self, final String fieldName). The \"null\" is that ODocument.getSchemaClass() returns null.\r\n\r\nThe error is consistent in my application when I have a new clean database, but I haven't had the time to reproduce it in a test case. Here's what I've deduced from debugging the app.\r\n\r\nMy scenario (I'm aware it's a bit unorthodox, but I still think it should work).\r\n- I use multiple databases, one database per customer for easy separation of data.\r\n- Users are stored in a common database with a reference to that user's customer database name\r\n\r\nThe process:\r\n1. Read the user object from the common database. \r\n2. Opens the customer database (where there are no, and shouldn't be any such User objects as in the common database).\r\n3. Creates a new Object using information from the User object loaded from the common database.\r\n4. Results in a NullPointerException when invoking a get method on the common User object, probably due to the fact that there are no User objects in the customer-specific database. The class is a registered entity though.\r\n\r\nOne workaround that's probably possible is to read the properties from the common User object before opening the customer database."}}