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: patch-diff.githubusercontent.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:3d593fd0-cf8a-d9f8-02d0-52463c30ebe9 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E03C:3B14FD:78BF8F:A19125:697CF8B6 |
| html-safe-nonce | 15193ee636dabf5c59bd1e6d6c1a7001b15764cae6c5a2310df6b29c045219d3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMDNDOjNCMTRGRDo3OEJGOEY6QTE5MTI1OjY5N0NGOEI2IiwidmlzaXRvcl9pZCI6IjIxMDMyNzc4MjM0Mjk3NjkzOTkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 1911ccbdbd4020dc7797ad1c5a1f2f296c2a5bb38bc29b6faaf7396985ff69b9 |
| 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 | f881497c2da7944950a5bb453d011e0fcc22d452c6305316a31d8ee9ea4449b3 |
| 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 | 04aa8f9ec799fb01abd96ff759aec742f97c517e |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width