History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: SAK-10730
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Venkatesh Subramanian
Reporter: Sean Keesler
Votes: 4
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
Sakai

Null Pointer when adding Guidance to matrix cell

Created: 13-Jul-2007 08:54   Updated: 23-Oct-2008 08:36
Component/s: OSP: Wizards - Matrix
Affects Version/s: trunk [DO NOT USE]
Fix Version/s: 2.5.0

Time Tracking:
Not Specified

File Attachments: 1. Text File matrix_exception.txt (14 kb)


2.4.x Status: None
2.5.x Status: None
2.6.x Status: None


 Description  « Hide
After adding guidance to a matrix cell and attempting to save the matrix, a Null Pointer Exception occurs:

java.lang.NullPointerException
        at com.mysql.jdbc.ResultSet.findColumn(ResultSet.java:946)
        at com.mysql.jdbc.ResultSet.getString(ResultSet.java:4826)
        at org.apache.commons.dbcp.DelegatingResultSet.getString(DelegatingResultSet.java:224)
        at org.sakaiproject.metaobj.shared.IdType.nullSafeGet(IdType.java:74)
        at org.hibernate.type.CustomType.nullSafeGet(CustomType.java:104)


 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Mark Breuker - 23-Jul-2007 01:06
Does this only happen when you're not the owner of the matrix? We encountered similar behaviour. Taking ownership of the matrix (ie.open edit matrixstructure screen and save) fixes the problem.

Chris Maurer - 26-Jul-2007 12:58
I can reproduce when the user creates it and also adds the guidance.

Beth Kirschner - 15-Aug-2007 12:48
I did a little debugging, and came up with nothing, but here are some notes:

Right before crashing:
Breakpoint hit: "thread=http-8080-Processor24", org.sakaiproject.metaobj.shared.IdType.nullSafeGet(), line=74 bci=0

http-8080-Processor24[1] dump names[0]
 names[0] = "style7_19_2_"

http-8080-Processor24[1] dump rs.getString("style7_19_2_")
Exception in expression: java.lang.NullPointerException
 rs.getString("style7_19_2_") = null

  http-8080-Processor25[1] step up
Step completed: "thread=http-8080-Processor25", org.hibernate.loader.Loader.doQuery(), line=714 bci=356

 sql = "select scaffoldin0_.scaffolding_id as scaffold4_5_, scaffoldin0_.id as id5_, scaffoldin0_.id as id17_4_, scaffoldin0_.rootcriterion_id as rootcrit2_17_4_, scaffoldin0_.level_id as level3_17_4_, scaffoldin0_.scaffolding_id as scaffold4_17_4_, scaffoldin0_.wiz_page_def_id as wiz5_17_4_, criterion1_.id as id13_0_, criterion1_.description as descript3_13_0_, criterion1_.color as color13_0_, criterion1_.textColor as textColor13_0_, level2_.id as id13_1_, level2_.description as descript3_13_1_, level2_.color as color13_1_, level2_.textColor as textColor13_1_, wizardpage3_.id as id18_2_, wizardpage3_1_.reflection_device_id as reflection2_18_2_, wizardpage3_1_.reflection_device_type as reflection3_18_2_, wizardpage3_1_.evaluation_device_id as evaluation4_18_2_, wizardpage3_1_.evaluation_device_type as evaluation5_18_2_, wizardpage3_1_.review_device_id as review6_18_2_, wizardpage3_1_.review_device_type as review7_18_2_, wizardpage3_.initialStatus as initialS2_19_2_, wizardpage3_.name as name19_2_, wizardpage3_.description as descript4_19_2_, wizardpage3_.site_id as site5_19_2_, wizardpage3_.guidance_id as guidance6_19_2_, wizardpage3_.style_id as style7_19_2_, style4_.id as id7_3_, style4_.name as name7_3_, style4_.description as descript3_7_3_, style4_.globalState as globalSt4_7_3_, style4_.owner_id as owner5_7_3_, style4_.style_file_id as style6_7_3_, style4_.site_id as site7_7_3_, style4_.created as created7_3_, style4_.modified as modified7_3_, style4_.style_hash as style10_7_3_ from osp_scaffolding_cell scaffoldin0_ left outer join osp_matrix_label criterion1_ on scaffoldin0_.rootcriterion_id=criterion1_.id left outer join osp_matrix_label level2_ on scaffoldin0_.level_id=level2_.id left outer join osp_wizard_page_def wizardpage3_ on scaffoldin0_.wiz_page_def_id=wizardpage3_.id left outer join osp_workflow_parent wizardpage3_1_ on wizardpage3_.id=wizardpage3_1_.id left outer join osp_style style4_ on wizardpage3_.style_id=style4_.id where scaffoldin0_.scaffolding_id=?"

Chris Maurer - 17-Aug-2007 07:14
Matrix_exceptions.txt is the full error thrown when editing a matrix. There's a similar error when trying to view, but it only has a different code path, same result.

Chris Maurer - 17-Aug-2007 08:47
r34097
Seems that hibernate doesn't like fetching cells/scaffoldingCells this way when there is guidance anymore. Not sure why. So, just working around the problem by getting the collections from the db instead of the parent object.

Chris Maurer - 23-Aug-2007 12:11
There's still a problem when going back to the main matrix properties screen.

Chris Maurer - 30-Aug-2007 06:43
And exporting.

Chris Maurer - 30-Aug-2007 07:38
Actually, I think the exporting problem may be related to the new Assignments stuff (SAK-10832).

Chris Maurer - 30-Aug-2007 07:39
r34564
Fixing up the hibernate collection errors when editing a matrix scaffolding

Lynn E. Ward - 31-Aug-2007 12:25
This still appears to be a problem on nightly. I wad actually writing a test script for another Jira issue, and I discoverd I could no longer edit the copy of the UL matrix I had been working on (kept getting an error message). So, then I created a brand new matrix and it worked fine. SAo, I added another copy of the PUL matrix and it was well-behaved. Then I remembered reading about this error, so I added som guidance to the fresh copy of the PUL matrix. Immediately after, I was unable to edit the properties of the matrix and the only cell I could edit was the one containing the guidance. I verified with a newly created mtatrix. Completely editable until guidance is added. Then trying to edit any cell except the one containing guidance generates the error. Here's the most recent error message:

org.sakaiproject.tool.api.ToolException: Request processing failed; nested exception is java.lang.NullPointerException
    at org.sakaiproject.portal.charon.CharonPortal.forwardTool(CharonPortal.java:1608)
caused by: org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.NullPointerException
    at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:430)
caused by: java.lang.NullPointerException


user: f3926a24-fdcf-472f-0014-e7d510eb34c6

usage-session: 51eeda22-f6d0-47ea-004d-0aebc86c183d

time: Aug 31, 2007 15:20:17

Chris Maurer - 04-Sep-2007 10:22
r34665
Needed to fix up one more hibernate collection error.

Lynn E. Ward - 14-Sep-2007 13:09
I've been working extensively with guidance today and the problem has not surfaced again. Can I close this issue based on testing on nightly, or do I need to wait until the first 2.5 tag is available.

Chris Maurer - 14-Sep-2007 18:28
Good to close as far as I'm concerned!

Lynn E. Ward - 20-Sep-2007 19:08
verified on Sakai QA Network qa2-osp (svn tags/sakai_2-5-0_QA_001_GMT) using Oracle - Built: 09/19/07 10:41