{"action":"opened","issue":{"url":"https://api.github.com/repos/orientechnologies/orientdb/issues/5738","repository_url":"https://api.github.com/repos/orientechnologies/orientdb","labels_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/5738/labels{/name}","comments_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/5738/comments","events_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/5738/events","html_url":"https://github.com/orientechnologies/orientdb/issues/5738","id":134152386,"number":5738,"title":"factory exist() check is returning true if the username password is wrong.","user":{"login":"smallik","id":766776,"avatar_url":"https://avatars.githubusercontent.com/u/766776?v=3","gravatar_id":"","url":"https://api.github.com/users/smallik","html_url":"https://github.com/smallik","followers_url":"https://api.github.com/users/smallik/followers","following_url":"https://api.github.com/users/smallik/following{/other_user}","gists_url":"https://api.github.com/users/smallik/gists{/gist_id}","starred_url":"https://api.github.com/users/smallik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smallik/subscriptions","organizations_url":"https://api.github.com/users/smallik/orgs","repos_url":"https://api.github.com/users/smallik/repos","events_url":"https://api.github.com/users/smallik/events{/privacy}","received_events_url":"https://api.github.com/users/smallik/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-02-17T01:51:12Z","updated_at":"2016-02-17T01:51:12Z","closed_at":null,"body":"Version: orientdb-community-2.1.9\r\n\r\nWhen the username / password is wrong while creating a factory the factory object is returned. also the exists method returns true. Subsequent database operations on the factory is failing.\r\n\r\nIf the user name / password is wrong then the factory should not be returned or the exist should return false. or there should be some way of telling that the login operation failed. \r\n\r\nbelow is the code example code that fails to report bad user name or password:\r\n\r\nOrientGraphFactory factory = new OrientGraphFactory(\"plocal:\"c:/databasefiles/domain,\"steve\",\"wrongpass\").setupPool(1, 1);\r\nif(factory.exists()) {\r\n  return factory;\r\n}\r\n\r\n\r\nbelow is the Workaround:\r\n\r\nOrientGraphFactory factory = new OrientGraphFactory(\"plocal:\"c:/databasefiles/domain,\"steve\",\"wrongpass\").setupPool(1, 1);\r\nif(factory.exists()) {\r\n try{\r\n  OrientGraph graph=factory.getTx();\r\n  graph.commit();\r\n } catch (Exception ex) {\r\n   // user name password was not valid\r\n    return null;\r\n}\r\n  return factory;\r\n}\r\n"}}