I just started looking at Play and am running into a couple errors
trying to bootstrap the Jobboard example.
FWIW: I've gone through the tutorial and thought it would be good to
load the fixture used for testing on the Jobboard - like what is done
in the tutorial. It seemed like a simple thing.
I copied the data.yml from test into conf/ and renamed it initial-
data.yml. I then created a Bootstrap.java that looks like:
@OnApplicationStart
public class Bootstrap extends Job {
public void doJob() {
// Check if the database is empty
if(Company.count() == 0) {
Fixtures.load("initial-data.yml");
}
}
}
The problem is I get a NullPointerException in
play.db.jpa.JPASupport.edit (line 118) because, I believe, there is no
entry for 'logo' in the yml file for the companies.
I tried adding a blank line, but then I get a NullPointerException in
play.test.Fixtures.serialize (line 167). I THINK this is again because
'logo' is null and there is no check in serialize() for null values.
Loading the fixture works when running in test mode so why wouldn't it
work in dev mode?
Thanks
John
> I tried adding a blank line, but then I get a NullPointerException in
> play.test.Fixtures.serialize (line 167). I THINK this is again because
> 'logo' is null and there is no check in serialize() for null values.
Yes you're right. I've fixed this in the trunk before.
About the other bug I've found the root cause. I've fixed it as well
in the trunk.
So both problems are now fixed in the trunk since 1.0-759
Thank again for your report.
++
> --
>
> You received this message because you are subscribed to the Google Groups "play-framework" group.
> To post to this group, send email to play-fr...@googlegroups.com.
> To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.
>
>
>
On Dec 22, 4:04 pm, Guillaume Bort <guillaume.b...@gmail.com> wrote:
> Hi,
>
> > I tried adding a blank line, but then I get a NullPointerException in
> > play.test.Fixtures.serialize (line 167). I THINK this is again because
> > 'logo' is null and there is no check in serialize() for null values.
>
> Yes you're right. I've fixed this in the trunk before.
>
> About the other bug I've found the root cause. I've fixed it as well
> in the trunk.
>
> So both problems are now fixed in the trunk since 1.0-759
>
> Thank again for your report.
>
> ++
>