- This topic has 8 replies, 2 voices, and was last updated 14 years, 3 months ago by Heflin Hogan.
-
AuthorPosts
-
Greg SoulsbyMemberI have a couple of tables which, once generated, are having problems.
Firstly, when selected from the menu the table on their form is not showing, including the table headers. Pehaps the table build has crashed without the exception showing?
Secondly, am getting the exception below when trying to view a record of one of their child entities.
When I null out the column in these tables that has XML in it the forms work fine. The XML fields are long text in a MySQL InnoDB table.
Examples of the xml are
<?xml version=’1.0′ encoding=’ISO-8859-1′?><body><table>0910_mining</table><if_true>policies_current > 0</if_true><where>min_first_ledger_YYYY_MM > “2005-12″</where></body>
Any thoughts?
Regards
Greg Soulsby
The exception is from the child viewing form is:
HTTP Status 500 –
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: An exception occurred processing JSP page /WEB-INF/pages/panprocsteps/viewPanProcSteps.jsp at line 49
46: <div class=”clear”> </div>
47: <div class=”spacer”> </div>
48: <h1><fmt:message key=”panprocedures.title”/></h1>
49: <c:if test=’${panprocsteps.panprocedures != null}’>
50: <table cellpadding=”0″ cellspacing=”0″ id=”viewTable”>
51: <tbody>
52: <tr>Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:524)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:435)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:238)
org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250)
org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1060)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:798)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:647)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:552)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
com.opensymphony.sitemesh.webapp.SiteMeshFilter.obtainContent(SiteMeshFilter.java:129)
com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java:77)
org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:113)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)root cause
javax.el.PropertyNotFoundException: Property ‘panprocedures’ not found on type pan.domain.PanProcSteps
javax.el.BeanELResolver$BeanProperties.get(BeanELResolver.java:193)
javax.el.BeanELResolver.property(BeanELResolver.java:267)
javax.el.BeanELResolver.getValue(BeanELResolver.java:60)
javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
org.apache.el.parser.AstValue.getValue(AstValue.java:97)
org.apache.el.parser.AstNotEqual.getValue(AstNotEqual.java:21)
org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:923)
org.apache.jsp.WEB_002dINF.pages.panprocsteps.viewPanProcSteps_jsp._jspx_meth_c_005fif_005f0(viewPanProcSteps_jsp.java:517)
org.apache.jsp.WEB_002dINF.pages.panprocsteps.viewPanProcSteps_jsp._jspService(viewPanProcSteps_jsp.java:172)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:238)
org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250)
org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1060)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:798)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:647)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:552)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
com.opensymphony.sitemesh.webapp.SiteMeshFilter.obtainContent(SiteMeshFilter.java:129)
com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java:77)
org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:113)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)note The full stack trace of the root cause is available in the Apache Tomcat/6.0.13 logs.
Apache Tomcat/6.0.13
Heflin HoganMemberWell, the stack trace indicates that the app can’t find something called “panprocedures” to map to from the JSP page. If you removed something on the backend while troubleshooting, that could have caused the error.
Your actual use case is that you have a parent-child relationship where the child record has XML data stored in a long text column in your MySQL DB, which you need to display and edit, is that correct?
Regards,
Heflin
Greg SoulsbyMemberRe your points:
– “panprocedures” I presume comes from “pan” the name of the package, and “procedures” the name of the table.
– Promise, I have not touched the code.
– Yes, the Use Case is to keep some XML for each “procedure” record, so have a long text field for that.I dont understand the error being something missing on the JSP page, certainly as a root cause – the error goes away when I null the field or change it to a blob. Also, the page that lists “procedures” is missing its table, including the heading row.
Regards,
Greg
Heflin HoganMemberInteresting. I wonder if the browser is trying to parse the XML, gumming up the works in the process? I’ll have to try a few things out and see if I can get a similar result.
By the way, touching the code is expected. 🙂
Regards,
Heflin
Heflin HoganMemberA few more questions to narrow the scope a bit. When the scaffolded application fails, you are displaying the parent records, then clicking on one to view the child records? Is the relationship one-to-one, or one-to-many? Is there more than the key and column with the XML data in it in the child?
Also, if you have the chance, could you substitute simple text data in the XML column, with no mark up, rather than null?
Regards,
Heflin
Greg SoulsbyMemberWhen the scaffolded application fails, you are displaying the parent records, then clicking on one to view the child records?
No, it fails with the above trace message when I go to the list of child records and try to view one of these. Presumably at this point it is looking up the parent and that causes the exception paisted above. When I list the parent records, which holds the XML, I get the listing page, but it is missing the table of records.
Is the relationship one-to-one, or one-to-many?
One Parent has zero, one or more Children. The Child must have a Parent. i.e the foreign key on the child is mandatory.
Is there more than the key and column with the XML data in it in the child?
Yes. Both parent and child have other LongText and BigInt id fields. They also have Enums.
The field that is causing the problem is the last one on the table.
Heflin HoganMemberOK, after further investigation, we’ve concluded that the <body> tag in the the XML snippet you provided is causing SiteMesh to choke. Unfortunately, there isn’t a simple solution for this, and what you end up doing is going to be particular to your use case. I suspect you’ll need to add some transformation code prior to the data being displayed, turning tags to something like <tag> for display purposes. That will end up being rendered properly in the browser. You can see what I mean by doing a view source on this forum thread and looking for the word “tagexample”, for this: <tagexample>.
Regards,
Heflin
Greg SoulsbyMemberOh, interesting, although a pain.
From what you have said a short term fix would also be to change the tag names to something away from <body>? So are we also talking about other HTML tag names, like <head> and <html>?
Thanks
Heflin HoganMemberChanging the tag names would work as a short term solution. It is possible that SiteMesh would have problems with other tags, but I haven’t gone though and checked specific ones.
Regards,
Heflin -
AuthorPosts