{"action":"closed","issue":{"url":"https://api.github.com/repos/sualeh/SchemaCrawler/issues/71","repository_url":"https://api.github.com/repos/sualeh/SchemaCrawler","labels_url":"https://api.github.com/repos/sualeh/SchemaCrawler/issues/71/labels{/name}","comments_url":"https://api.github.com/repos/sualeh/SchemaCrawler/issues/71/comments","events_url":"https://api.github.com/repos/sualeh/SchemaCrawler/issues/71/events","html_url":"https://github.com/sualeh/SchemaCrawler/issues/71","id":156261439,"number":71,"title":"IndexOutOfBoundsException for foreign key ","user":{"login":"eoinsha","id":868390,"avatar_url":"https://avatars.githubusercontent.com/u/868390?v=3","gravatar_id":"","url":"https://api.github.com/users/eoinsha","html_url":"https://github.com/eoinsha","followers_url":"https://api.github.com/users/eoinsha/followers","following_url":"https://api.github.com/users/eoinsha/following{/other_user}","gists_url":"https://api.github.com/users/eoinsha/gists{/gist_id}","starred_url":"https://api.github.com/users/eoinsha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eoinsha/subscriptions","organizations_url":"https://api.github.com/users/eoinsha/orgs","repos_url":"https://api.github.com/users/eoinsha/repos","events_url":"https://api.github.com/users/eoinsha/events{/privacy}","received_events_url":"https://api.github.com/users/eoinsha/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/sualeh/SchemaCrawler/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/sualeh/SchemaCrawler/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":{"login":"sualeh","id":58572,"avatar_url":"https://avatars.githubusercontent.com/u/58572?v=3","gravatar_id":"","url":"https://api.github.com/users/sualeh","html_url":"https://github.com/sualeh","followers_url":"https://api.github.com/users/sualeh/followers","following_url":"https://api.github.com/users/sualeh/following{/other_user}","gists_url":"https://api.github.com/users/sualeh/gists{/gist_id}","starred_url":"https://api.github.com/users/sualeh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sualeh/subscriptions","organizations_url":"https://api.github.com/users/sualeh/orgs","repos_url":"https://api.github.com/users/sualeh/repos","events_url":"https://api.github.com/users/sualeh/events{/privacy}","received_events_url":"https://api.github.com/users/sualeh/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/sualeh/SchemaCrawler/milestones/2","html_url":"https://github.com/sualeh/SchemaCrawler/milestones/v14.08.04","labels_url":"https://api.github.com/repos/sualeh/SchemaCrawler/milestones/2/labels","id":1783317,"number":2,"title":"v14.08.04","description":null,"creator":{"login":"sualeh","id":58572,"avatar_url":"https://avatars.githubusercontent.com/u/58572?v=3","gravatar_id":"","url":"https://api.github.com/users/sualeh","html_url":"https://github.com/sualeh","followers_url":"https://api.github.com/users/sualeh/followers","following_url":"https://api.github.com/users/sualeh/following{/other_user}","gists_url":"https://api.github.com/users/sualeh/gists{/gist_id}","starred_url":"https://api.github.com/users/sualeh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sualeh/subscriptions","organizations_url":"https://api.github.com/users/sualeh/orgs","repos_url":"https://api.github.com/users/sualeh/repos","events_url":"https://api.github.com/users/sualeh/events{/privacy}","received_events_url":"https://api.github.com/users/sualeh/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":1,"state":"open","created_at":"2016-05-23T17:51:28Z","updated_at":"2016-05-24T00:38:02Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2016-05-23T11:44:04Z","updated_at":"2016-05-24T00:38:02Z","closed_at":"2016-05-24T00:38:02Z","body":"I came across this exception when crawling a database to generate a graph using `14.08.01-main`.\r\n\r\n```\r\nSEVERE: Index: 0, Size: 0\r\n\tjava.lang.IndexOutOfBoundsException: Index: 0, Size: 0\r\n\tat java.util.ArrayList.rangeCheck(ArrayList.java:653)\r\n\tat java.util.ArrayList.get(ArrayList.java:429)\r\n\tat schemacrawler.utility.MetaDataUtility.isForeignKeyUnique(MetaDataUtility.java:174)\r\n\tat schemacrawler.utility.MetaDataUtility.findForeignKeyCardinality(MetaDataUtility.java:132)\r\n\tat schemacrawler.tools.text.schema.SchemaDotFormatter.printForeignKeys(SchemaDotFormatter.java:377)\r\n\tat schemacrawler.tools.text.schema.SchemaDotFormatter.printForeignKeys(SchemaDotFormatter.java:369)\r\n\tat schemacrawler.tools.text.schema.SchemaDotFormatter.handle(SchemaDotFormatter.java:192)\r\n\tat schemacrawler.tools.traversal.SchemaTraverser.traverse(SchemaTraverser.java:129)\r\n\tat schemacrawler.tools.integration.graph.GraphExecutable.executeOn(GraphExecutable.java:124)\r\n\tat schemacrawler.tools.executable.SchemaCrawlerExecutable.executeOn(SchemaCrawlerExecutable.java:118)\r\n\tat schemacrawler.tools.executable.BaseStagedExecutable.execute(BaseStagedExecutable.java:94)\r\n\tat schemacrawler.tools.commandline.SchemaCrawlerCommandLine.execute(SchemaCrawlerCommandLine.java:133)\r\nat schemacrawler.Main.main(Main.java:88)\r\n```\r\n\r\nIt's SQL Server using the jTDS driver. The culprit in this case was a PK column which is a FK referencing itself (apparently this is possible!). \r\n\r\n"}}
{"actor":{"display_login":"sualeh"}}