Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem saving volunteer sessions #38

Closed
hart404 opened this issue Aug 10, 2014 · 1 comment
Closed

Problem saving volunteer sessions #38

hart404 opened this issue Aug 10, 2014 · 1 comment
Labels

Comments

@hart404
Copy link
Owner

hart404 commented Aug 10, 2014

When saving a single volunteer session, I see the following stack trace:

[area:north, action:pinsForArea, controller:trailSection]
[area:north, action:pinsForArea, controller:trailSection]
[area:north, action:pinsForArea, controller:trailSection]
21:09:09 [org.codehaus.groovy.grails.plugins.springsecurity.GrailsUser@c3c9c0bb: Username: phil.hartley@mcdowellsonoran.org; Password: [PROTECTED]; Enabled: true; AccountNonExpired: true; credentialsNonExpired: true; AccountNonLocked: true; Granted Authorities: ROLE_ADMIN,ROLE_LEADER,ROLE_STEWARD,volunteerSession.saveVolunteerSessions: params:[action:saveVolunteerSessions, controller:volunteerSession],request:2027563502,session:7457028] util.JDBCExceptionReporter Field 'comment' doesn't have a default value
21:09:10 [org.codehaus.groovy.grails.plugins.springsecurity.GrailsUser@c3c9c0bb: Username: phil.hartley@mcdowellsonoran.org; Password: [PROTECTED]; Enabled: true; AccountNonExpired: true; credentialsNonExpired: true; AccountNonLocked: true; Granted Authorities: ROLE_ADMIN,ROLE_LEADER,ROLE_STEWARD,volunteerSession.saveVolunteerSessions: params:[action:saveVolunteerSessions, controller:volunteerSession],request:2027563502,session:7457028] errors.GrailsExceptionResolver SQLException occurred when processing request: [POST] /volunteerSession/saveVolunteerSessions
Field 'comment' doesn't have a default value. Stacktrace follows:
java.sql.SQLException: Field 'comment' doesn't have a default value
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1073)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4098)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4030)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2490)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2651)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2677)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2134)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2434)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2352)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2337)
at org.mcdowellsonoran.trailreporting.TrailReportingService.$tt__saveTrailReport(TrailReportingService.groovy:23)
at org.mcdowellsonoran.volunteersession.VolunteerSessionService.$tt__saveVolunteerSession(VolunteerSessionService.groovy:43)
at org.mcdowellsonoran.volunteersession.VolunteerSessionService.$tt__saveVolunteerSessions(VolunteerSessionService.groovy:23)
at org.mcdowellsonoran.volunteersession.web.VolunteerSessionController.saveVolunteerSessions(VolunteerSessionController.groovy:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:679)
21:09:38 [org.codehaus.groovy.grails.plugins.springsecurity.GrailsUser@c3c9c0bb: Username: phil.hartley@mcdowellsonoran.org; Password: [PROTECTED]; Enabled: true; AccountNonExpired: true; credentialsNonExpired: true; AccountNonLocked: true; Granted Authorities: ROLE_ADMIN,ROLE_LEADER,ROLE_STEWARD,volunteerSession.saveVolunteerSessions: params:[action:saveVolunteerSessions, controller:volunteerSession],request:666972767,session:7457028] errors.GrailsExceptionResolver NullPointerException occurred when processing request: [POST] /volunteerSession/saveVolunteerSessions
Stacktrace follows:
java.lang.NullPointerException
at org.mcdowellsonoran.volunteersession.web.VolunteerSessionController.buildVolunteerSessions(VolunteerSessionController.groovy:95)
at org.mcdowellsonoran.volunteersession.web.VolunteerSessionController.saveVolunteerSessions(VolunteerSessionController.groovy:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:679)

@hart404 hart404 added the bug label Aug 10, 2014
@JacobASeverson
Copy link
Contributor

Phil added default values to the database, but the domain objects will still enforce non-null values for the comment and code of trail reports.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants