Public instance variables - opt 1 (update app) or 2 (determine dependency for project problem)
Started
1
1
Skills

Overview
- The original developer for Golio made the decision to use public instance variables in the models and references them everywhere; however, I'm pretty sure that Play (w/ EBean...not sure if this is an EBean-specific thing or a Play-specific thing) generates getters and setters as needed, or at least used to in the original setup of the app. Either that or the original setup allowed for the use of public instance variables and used them as directed.
- It would seem that, now, Play/EBean won't allow this and treats any such references as returning null. The only way to fix this is to add getters (and setters, for the sake of being complete) to the models and change any and all references to the corresponding instance variables to use the getters (or setters as needed). I believe you experienced this the last time we enlisted your help.
- In order to get Golio working locally, I had to modify the dependencies and libraries that Golio used as several of them either didn't exist at the specified location any more, have been removed all together, or are in some other remote repository that I could note find. It's entirely possible that in doing so, despite having the same version of Play, EBean and Scala running, one of the dependencies is different enough to enact the behaviour above.

The issue can be seen when you try to click into various parts of the staging site (or even locally in Docker), e.g. viewing projects. I verified the "fix" above by fixing the "view task" route/view. When you do encounter the error, you'll see NPEs in the stack traces printed in the log.

So, there are really two ways to address this. (I'll paste them again here so you don't have to go digging through the thread.)

1. Go in everywhere that the app makes use of public instance variables and update it to follow proper practice, including references in Java and in the view templates; or,
2. See if you can determine which dependency is the one that the original dev was reliant upon to use public instance variables and then see if you can't track it down for download into the project. 

Producer

Ian Nichol - Golio Founder

Toronto, Ontario, Canada

Image

  Image $$$ Hrs
Producer 96 $10k+ 2,712
Collaborator 0 $500+ 126

Contributor

Nick Orr

Boise, Idaho, USA

Image

  Image $$$ Hrs
Producer 0 $0 0
Collaborator 0 $0 0

Remote
Kudos
5
Sep 19, 2022
Sep 19, 2022