NullpointerException when decorator content is processed
-------------------------------------------------------- Key: OFBIZ-4323 URL: https://issues.apache.org/jira/browse/OFBIZ-4323 Project: OFBiz Issue Type: Bug Components: framework Affects Versions: SVN trunk Reporter: Javier Orrantia Hi Everybody, I am deploying my application from trunk version: 768631 to version: 1134255 and I am get a nullpointer exception when I try to run my web application as shown below. I have traced this problem and found that this is happening when the the decorator data-resource is processed. My website has a content with a content decorator assigned. It seems that when the decorator content is processed, the DOM parser does not set the following userData (setUserData method): startColumn, startLine. I have made a temporary fix by changing the ModelWidget.java and ignoring the startColumn and startLine userData from the processed DOM object. Can somebody take a look at this? Thanks, Javier Orrantia Message: Error rendering screen [component://ecommerce/webapp/realstate/widget/CommonScreens.xml#main]: java.lang.NullPointerException (null) ---- cause --------------------------------------------------------------------- Exception: java.lang.NullPointerException Message: null ---- stack trace --------------------------------------------------------------- java.lang.NullPointerException org.ofbiz.widget.ModelWidget.<init>(ModelWidget.java:69) org.ofbiz.widget.screen.ModelScreen.<init>(ModelScreen.java:66) org.ofbiz.widget.screen.ScreenFactory.readScreenDocument(ScreenFactory.java:176) org.ofbiz.content.data.DataResourceWorker.renderDataResourceAsText(DataResourceWorker.java:726) org.ofbiz.content.content.ContentWorker.renderContentAsText(ContentWorker.java:316) org.ofbiz.content.content.ContentWorker.renderContentAsText(ContentWorker.java:331) org.ofbiz.content.content.ContentWorker.renderContentAsText(ContentWorker.java:324) org.ofbiz.content.content.ContentWorker.renderContentAsTextExt(ContentWorker.java:105) org.ofbiz.widget.screen.MacroScreenRenderer.renderContentBody(MacroScreenRenderer.java:393) org.ofbiz.widget.screen.ModelScreenWidget$Content.renderWidgetString(ModelScreenWidget.java:1097) org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:104) org.ofbiz.widget.screen.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:191) org.ofbiz.widget.screen.ModelScreen.renderScreenString(ModelScreen.java:396) org.ofbiz.widget.screen.ScreenRenderer.render(ScreenRenderer.java:135) org.ofbiz.widget.screen.ScreenRenderer.render(ScreenRenderer.java:97) org.ofbiz.widget.screen.MacroScreenViewHandler.render(MacroScreenViewHandler.java:104) org.ofbiz.webapp.control.RequestHandler.renderView(RequestHandler.java:848) org.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:565) org.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:224) javax.servlet.http.HttpServlet.service(HttpServlet.java:617) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) org.ofbiz.webapp.control.ContextFilter.doFilter(ContextFilter.java:337) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:554) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859) org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) java.lang.Thread.run(Thread.java:637) line 57 in ModelWidget.java private int startColumn = 1; private int startLine = 1; protected ModelWidget() {} /** * Derived classes must call this constructor. * @param widgetElement The XML Element for the widget */ public ModelWidget(Element widgetElement) { this.name = widgetElement.getAttribute("name"); this.systemId = (String) widgetElement.getUserData("systemId"); if ( widgetElement.getUserData("startColumn") != null ) this.startColumn = ((Integer) widgetElement.getUserData("startColumn")).intValue(); if ( widgetElement.getUserData("startLine") != null) this.startLine = ((Integer) widgetElement.getUserData("startLine")).intValue(); } -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira |
[ https://issues.apache.org/jira/browse/OFBIZ-4323?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Scott Gray reassigned OFBIZ-4323: --------------------------------- Assignee: Scott Gray > NullpointerException when decorator content is processed > -------------------------------------------------------- > > Key: OFBIZ-4323 > URL: https://issues.apache.org/jira/browse/OFBIZ-4323 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: SVN trunk > Reporter: Javier Orrantia > Assignee: Scott Gray > > Hi Everybody, > I am deploying my application from trunk version: 768631 to version: 1134255 > and I am get a nullpointer exception when I try to run my web application as shown below. > I have traced this problem and found that this is happening when the the decorator data-resource is processed. My website has a content with a content decorator assigned. It seems that when the decorator content is processed, the DOM parser does not set the following userData (setUserData method): startColumn, startLine. I have made a temporary fix by changing the ModelWidget.java and ignoring the startColumn and startLine userData from the processed DOM object. > Can somebody take a look at this? > Thanks, > Javier Orrantia > Message: Error rendering screen [component://ecommerce/webapp/realstate/widget/CommonScreens.xml#main]: java.lang.NullPointerException (null) > ---- cause --------------------------------------------------------------------- > Exception: java.lang.NullPointerException > Message: null > ---- stack trace --------------------------------------------------------------- > java.lang.NullPointerException > org.ofbiz.widget.ModelWidget.<init>(ModelWidget.java:69) > org.ofbiz.widget.screen.ModelScreen.<init>(ModelScreen.java:66) > org.ofbiz.widget.screen.ScreenFactory.readScreenDocument(ScreenFactory.java:176) > org.ofbiz.content.data.DataResourceWorker.renderDataResourceAsText(DataResourceWorker.java:726) > org.ofbiz.content.content.ContentWorker.renderContentAsText(ContentWorker.java:316) > org.ofbiz.content.content.ContentWorker.renderContentAsText(ContentWorker.java:331) > org.ofbiz.content.content.ContentWorker.renderContentAsText(ContentWorker.java:324) > org.ofbiz.content.content.ContentWorker.renderContentAsTextExt(ContentWorker.java:105) > org.ofbiz.widget.screen.MacroScreenRenderer.renderContentBody(MacroScreenRenderer.java:393) > org.ofbiz.widget.screen.ModelScreenWidget$Content.renderWidgetString(ModelScreenWidget.java:1097) > org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:104) > org.ofbiz.widget.screen.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:191) > org.ofbiz.widget.screen.ModelScreen.renderScreenString(ModelScreen.java:396) > org.ofbiz.widget.screen.ScreenRenderer.render(ScreenRenderer.java:135) > org.ofbiz.widget.screen.ScreenRenderer.render(ScreenRenderer.java:97) > org.ofbiz.widget.screen.MacroScreenViewHandler.render(MacroScreenViewHandler.java:104) > org.ofbiz.webapp.control.RequestHandler.renderView(RequestHandler.java:848) > org.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:565) > org.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:224) > javax.servlet.http.HttpServlet.service(HttpServlet.java:617) > javax.servlet.http.HttpServlet.service(HttpServlet.java:717) > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) > org.ofbiz.webapp.control.ContextFilter.doFilter(ContextFilter.java:337) > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) > org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:554) > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) > org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859) > org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) > org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) > java.lang.Thread.run(Thread.java:637) > line 57 in ModelWidget.java > private int startColumn = 1; > private int startLine = 1; > protected ModelWidget() {} > /** > * Derived classes must call this constructor. > * @param widgetElement The XML Element for the widget > */ > public ModelWidget(Element widgetElement) { > this.name = widgetElement.getAttribute("name"); > this.systemId = (String) widgetElement.getUserData("systemId"); > if ( widgetElement.getUserData("startColumn") != null ) > this.startColumn = ((Integer) widgetElement.getUserData("startColumn")).intValue(); > if ( widgetElement.getUserData("startLine") != null) > this.startLine = ((Integer) widgetElement.getUserData("startLine")).intValue(); > } -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4323?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Scott Gray closed OFBIZ-4323. ----------------------------- Resolution: Fixed Fix Version/s: SVN trunk Thanks Javier, should be fixed in r1139504. I switched the code in DataResourceWorker to use a different UtilXml method to parse the screen document, the userData is now available when the widget is constructed. > NullpointerException when decorator content is processed > -------------------------------------------------------- > > Key: OFBIZ-4323 > URL: https://issues.apache.org/jira/browse/OFBIZ-4323 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: SVN trunk > Reporter: Javier Orrantia > Assignee: Scott Gray > Fix For: SVN trunk > > > Hi Everybody, > I am deploying my application from trunk version: 768631 to version: 1134255 > and I am get a nullpointer exception when I try to run my web application as shown below. > I have traced this problem and found that this is happening when the the decorator data-resource is processed. My website has a content with a content decorator assigned. It seems that when the decorator content is processed, the DOM parser does not set the following userData (setUserData method): startColumn, startLine. I have made a temporary fix by changing the ModelWidget.java and ignoring the startColumn and startLine userData from the processed DOM object. > Can somebody take a look at this? > Thanks, > Javier Orrantia > Message: Error rendering screen [component://ecommerce/webapp/realstate/widget/CommonScreens.xml#main]: java.lang.NullPointerException (null) > ---- cause --------------------------------------------------------------------- > Exception: java.lang.NullPointerException > Message: null > ---- stack trace --------------------------------------------------------------- > java.lang.NullPointerException > org.ofbiz.widget.ModelWidget.<init>(ModelWidget.java:69) > org.ofbiz.widget.screen.ModelScreen.<init>(ModelScreen.java:66) > org.ofbiz.widget.screen.ScreenFactory.readScreenDocument(ScreenFactory.java:176) > org.ofbiz.content.data.DataResourceWorker.renderDataResourceAsText(DataResourceWorker.java:726) > org.ofbiz.content.content.ContentWorker.renderContentAsText(ContentWorker.java:316) > org.ofbiz.content.content.ContentWorker.renderContentAsText(ContentWorker.java:331) > org.ofbiz.content.content.ContentWorker.renderContentAsText(ContentWorker.java:324) > org.ofbiz.content.content.ContentWorker.renderContentAsTextExt(ContentWorker.java:105) > org.ofbiz.widget.screen.MacroScreenRenderer.renderContentBody(MacroScreenRenderer.java:393) > org.ofbiz.widget.screen.ModelScreenWidget$Content.renderWidgetString(ModelScreenWidget.java:1097) > org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:104) > org.ofbiz.widget.screen.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:191) > org.ofbiz.widget.screen.ModelScreen.renderScreenString(ModelScreen.java:396) > org.ofbiz.widget.screen.ScreenRenderer.render(ScreenRenderer.java:135) > org.ofbiz.widget.screen.ScreenRenderer.render(ScreenRenderer.java:97) > org.ofbiz.widget.screen.MacroScreenViewHandler.render(MacroScreenViewHandler.java:104) > org.ofbiz.webapp.control.RequestHandler.renderView(RequestHandler.java:848) > org.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:565) > org.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:224) > javax.servlet.http.HttpServlet.service(HttpServlet.java:617) > javax.servlet.http.HttpServlet.service(HttpServlet.java:717) > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) > org.ofbiz.webapp.control.ContextFilter.doFilter(ContextFilter.java:337) > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) > org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:554) > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) > org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859) > org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) > org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) > java.lang.Thread.run(Thread.java:637) > line 57 in ModelWidget.java > private int startColumn = 1; > private int startLine = 1; > protected ModelWidget() {} > /** > * Derived classes must call this constructor. > * @param widgetElement The XML Element for the widget > */ > public ModelWidget(Element widgetElement) { > this.name = widgetElement.getAttribute("name"); > this.systemId = (String) widgetElement.getUserData("systemId"); > if ( widgetElement.getUserData("startColumn") != null ) > this.startColumn = ((Integer) widgetElement.getUserData("startColumn")).intValue(); > if ( widgetElement.getUserData("startLine") != null) > this.startLine = ((Integer) widgetElement.getUserData("startLine")).intValue(); > } -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4323?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacques Le Roux updated OFBIZ-4323: ----------------------------------- Fix Version/s: Release Branch 11.04 Release Branch 10.04 R11.04 at r1139757 R10.04 at r1139755 > NullpointerException when decorator content is processed > -------------------------------------------------------- > > Key: OFBIZ-4323 > URL: https://issues.apache.org/jira/browse/OFBIZ-4323 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: SVN trunk > Reporter: Javier Orrantia > Assignee: Scott Gray > Fix For: Release Branch 10.04, Release Branch 11.04, SVN trunk > > > Hi Everybody, > I am deploying my application from trunk version: 768631 to version: 1134255 > and I am get a nullpointer exception when I try to run my web application as shown below. > I have traced this problem and found that this is happening when the the decorator data-resource is processed. My website has a content with a content decorator assigned. It seems that when the decorator content is processed, the DOM parser does not set the following userData (setUserData method): startColumn, startLine. I have made a temporary fix by changing the ModelWidget.java and ignoring the startColumn and startLine userData from the processed DOM object. > Can somebody take a look at this? > Thanks, > Javier Orrantia > Message: Error rendering screen [component://ecommerce/webapp/realstate/widget/CommonScreens.xml#main]: java.lang.NullPointerException (null) > ---- cause --------------------------------------------------------------------- > Exception: java.lang.NullPointerException > Message: null > ---- stack trace --------------------------------------------------------------- > java.lang.NullPointerException > org.ofbiz.widget.ModelWidget.<init>(ModelWidget.java:69) > org.ofbiz.widget.screen.ModelScreen.<init>(ModelScreen.java:66) > org.ofbiz.widget.screen.ScreenFactory.readScreenDocument(ScreenFactory.java:176) > org.ofbiz.content.data.DataResourceWorker.renderDataResourceAsText(DataResourceWorker.java:726) > org.ofbiz.content.content.ContentWorker.renderContentAsText(ContentWorker.java:316) > org.ofbiz.content.content.ContentWorker.renderContentAsText(ContentWorker.java:331) > org.ofbiz.content.content.ContentWorker.renderContentAsText(ContentWorker.java:324) > org.ofbiz.content.content.ContentWorker.renderContentAsTextExt(ContentWorker.java:105) > org.ofbiz.widget.screen.MacroScreenRenderer.renderContentBody(MacroScreenRenderer.java:393) > org.ofbiz.widget.screen.ModelScreenWidget$Content.renderWidgetString(ModelScreenWidget.java:1097) > org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:104) > org.ofbiz.widget.screen.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:191) > org.ofbiz.widget.screen.ModelScreen.renderScreenString(ModelScreen.java:396) > org.ofbiz.widget.screen.ScreenRenderer.render(ScreenRenderer.java:135) > org.ofbiz.widget.screen.ScreenRenderer.render(ScreenRenderer.java:97) > org.ofbiz.widget.screen.MacroScreenViewHandler.render(MacroScreenViewHandler.java:104) > org.ofbiz.webapp.control.RequestHandler.renderView(RequestHandler.java:848) > org.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:565) > org.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:224) > javax.servlet.http.HttpServlet.service(HttpServlet.java:617) > javax.servlet.http.HttpServlet.service(HttpServlet.java:717) > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) > org.ofbiz.webapp.control.ContextFilter.doFilter(ContextFilter.java:337) > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) > org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:554) > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) > org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859) > org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) > org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) > java.lang.Thread.run(Thread.java:637) > line 57 in ModelWidget.java > private int startColumn = 1; > private int startLine = 1; > protected ModelWidget() {} > /** > * Derived classes must call this constructor. > * @param widgetElement The XML Element for the widget > */ > public ModelWidget(Element widgetElement) { > this.name = widgetElement.getAttribute("name"); > this.systemId = (String) widgetElement.getUserData("systemId"); > if ( widgetElement.getUserData("startColumn") != null ) > this.startColumn = ((Integer) widgetElement.getUserData("startColumn")).intValue(); > if ( widgetElement.getUserData("startLine") != null) > this.startLine = ((Integer) widgetElement.getUserData("startLine")).intValue(); > } -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira |
Free forum by Nabble | Edit this page |