Title: Show better error message when Model class isn't abstract · Issue #56 · JavaWebStack/orm · GitHub
Open Graph Title: Show better error message when Model class isn't abstract · Issue #56 · JavaWebStack/orm
X Title: Show better error message when Model class isn't abstract · Issue #56 · JavaWebStack/orm
Description: Describe the Bug When you extend the ORM Model to your own Model and forget to set it to abstract, you get an Exception saying Exception in thread "main" java.lang.NullPointerException: Cannot invoke "java.lang.reflect.Field.getType()" b...
Open Graph Description: Describe the Bug When you extend the ORM Model to your own Model and forget to set it to abstract, you get an Exception saying Exception in thread "main" java.lang.NullPointerException: Cannot invo...
X Description: Describe the Bug When you extend the ORM Model to your own Model and forget to set it to abstract, you get an Exception saying Exception in thread "main" java.lang.NullPointerException: C...
Opengraph URL: https://github.com/JavaWebStack/orm/issues/56
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Show better error message when Model class isn't abstract","articleBody":"**Describe the Bug**\r\nWhen you extend the ORM Model to your own Model and forget to set it to abstract, you get an Exception saying\r\n```\r\nException in thread \"main\" java.lang.NullPointerException: Cannot invoke \"java.lang.reflect.Field.getType()\" because the return value of \"org.javawebstack.orm.TableInfo.getField(String)\" is null\r\n\tat org.javawebstack.orm.TableInfo.getIdType(TableInfo.java:282)\r\n\tat org.javawebstack.orm.TableInfo.analyzeTable(TableInfo.java:95)\r\n\tat org.javawebstack.orm.TableInfo.constructInfo(TableInfo.java:61)\r\n\tat org.javawebstack.orm.TableInfo.\u003cinit\u003e(TableInfo.java:56)\r\n\tat org.javawebstack.orm.Repo.\u003cinit\u003e(Repo.java:35)\r\n\tat org.javawebstack.orm.ORM.register(ORM.java:25)\r\n\tat org.javawebstack.orm.ORM.register(ORM.java:37)\r\n\r\n```\r\n**To Reproduce**\r\nSteps to reproduce the behavior:\r\n1. Forget to set your model class to abstract\r\n\r\n**Expected behavior**\r\nMaybe show some better error message which indicates that your base model isn't abstract yet.\r\n\r\n**Environment Information:**\r\n - Java Language Level 21\r\n- ORM Version 1.0.3-SNAPSHOT\r\n\r\n","author":{"url":"https://github.com/maherp1","@type":"Person","name":"maherp1"},"datePublished":"2024-05-27T18:29:24.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/56/orm/issues/56"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:70b5aae0-7acc-2003-2a62-8c7ce9f8b159 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CF48:3B14FD:200BF4B:2A73722:697D3B0E |
| html-safe-nonce | 8c30275a69493b9ef76f6a8c6fd4c5da59fc5a62befc7ea162ef3a41529ddb68 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRjQ4OjNCMTRGRDoyMDBCRjRCOjJBNzM3MjI6Njk3RDNCMEUiLCJ2aXNpdG9yX2lkIjoiNTgyODQzODUyNTU5ODMxNzMyNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 12529e6bea5dde61a28134946e62ab3cfb2503d3cb4320ff90eaae62537066fb |
| hovercard-subject-tag | issue:2319622471 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/JavaWebStack/orm/56/issue_layout |
| twitter:image | https://opengraph.githubassets.com/14576daefbdf38bb2219a20a3e85d4f741cada79519e05c3ae5f34822443edac/JavaWebStack/orm/issues/56 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/14576daefbdf38bb2219a20a3e85d4f741cada79519e05c3ae5f34822443edac/JavaWebStack/orm/issues/56 |
| og:image:alt | Describe the Bug When you extend the ORM Model to your own Model and forget to set it to abstract, you get an Exception saying Exception in thread "main" java.lang.NullPointerException: Cannot invo... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | maherp1 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 60279d4097367e16897439d16d6bbe4180663db828c666eeed2656988ffe59f6 |
| turbo-cache-control | no-preview |
| go-import | github.com/JavaWebStack/orm git https://github.com/JavaWebStack/orm.git |
| octolytics-dimension-user_id | 73674659 |
| octolytics-dimension-user_login | JavaWebStack |
| octolytics-dimension-repository_id | 308479502 |
| octolytics-dimension-repository_nwo | JavaWebStack/orm |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 308479502 |
| octolytics-dimension-repository_network_root_nwo | JavaWebStack/orm |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | c2b1f969137add620c89ee43eff21bca11243467 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width