struts2 检索 property=parameters 的通用属性类时出错

发布于 2024-10-06 04:42:27 字数 3658 浏览 1 评论 0原文

我收到以下异常。关于发生原因的任何输入都会有帮助

DEBUG [http-8081-1] (CommonsLogger.java:72) - 检索 property=parameters 的通用属性类时出错 java.lang.NullPointerException 在 com.opensymphony.xwork2.conversion.impl.DefaultObjectTypeDeterminer.getClass(DefaultObjectTypeDeterminer.java:314) 在 com.opensymphony.xwork2.conversion.impl.DefaultObjectTypeDeterminer.getKeyClass(DefaultObjectTypeDeterminer.java:93) 在 com.opensymphony.xwork2.ognl.accessor.XWorkMapPropertyAccessor.getProperty(XWorkMapPropertyAccessor.java:93) 在 ognl.OgnlRuntime.getProperty(OgnlRuntime.java:2230) 在 ognl.ASTProperty.getValueBody(ASTProperty.java:114) 在 ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212) 在 ognl.SimpleNode.getValue(SimpleNode.java:258) 在 ognl.ASTChain.getValueBody(ASTChain.java:141) 在ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212) 在 ognl.SimpleNode.getValue(SimpleNode.java:258) 在 ognl.Ognl.getValue(Ognl.java:494) 在 com.opensymphony.xwork2.ognl.OgnlUtil.getValue(OgnlUtil.java:217) 在 com.opensymphony.xwork2.ognl.OgnlValueStack.getValue(OgnlValueStack.java:342) 在 com.opensymphony.xwork2.ognl.OgnlValueStack.tryFindValue(OgnlValueStack.java:331) 在 com.opensymphony.xwork2.ognl.OgnlValueStack.tryFindValueWhenExpressionIsNotNull(OgnlValueStack.java:307) 在 com.opensymphony.xwork2.ognl.OgnlValueStack.findValue(OgnlValueStack.java:293) 在 org.apache.struts2.components.Property.start(Property.java:162) 在 org.apache.struts2.views.freemarker.tags.CallbackWriter.onStart(CallbackWriter.java:73) 在 freemarker.core.Environment.visit(Environment.java:296) 在 freemarker.core.UnifiedCall.accept(UnifiedCall.java:130) 在 freemarker.core.Environment.visit(Environment.java:210) 在 freemarker.core.MixedContent.accept(MixedContent.java:92) 在 freemarker.core.Environment.visit(Environment.java:210) 在 freemarker.core.IfBlock.accept(IfBlock.java:82) 在 freemarker.core.Environment.visit(Environment.java:210) 在 freemarker.core.MixedContent.accept(MixedContent.java:92) 在 freemarker.core.Environment.visit(Environment.java:210) 在 freemarker.core.IfBlock.accept(IfBlock.java:82) 在 freemarker.core.Environment.visit(Environment.java:210) 在 freemarker.core.MixedContent.accept(MixedContent.java:92) 在 freemarker.core.Environment.visit(Environment.java:210) 在 freemarker.core.Environment.process(Environment.java:190) 在 freemarker.template.Template.process(Template.java:237) 在org.apache.struts2.components.template.FreemarkerTemplateEngine.renderTemplate(FreemarkerTemplateEngine.java:157) 在org.apache.struts2.components.UIBean.mergeTemplate(UIBean.java:559) 在 org.apache.struts2.components.ClosingUIBean.start(ClosingUIBean.java:59) 在 org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(ComponentTagSupport.java:53) 在org.apache.jsp.pages.THDPaymentMethod_jsp._jspx_meth_s_005fsubmit_005f1(THDPaymentMethod_jsp.java:6665) 在org.apache.jsp.pages.THDPaymentMethod_jsp._jspx_meth_s_005fform_005f0(THDPaymentMethod_jsp.java:2363) 在org.apache.jsp.pages.THDPaymentMethod_jsp._jspService(THDPaymentMethod_jsp.java:347) 在 org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) 在 javax.servlet.http.HttpServlet.service(HttpServlet.java:717) 在org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377) 在 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) 在 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) 在 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)

I am getting the below exception. Any input on why is occurs would be helpful

DEBUG [http-8081-1] (CommonsLogger.java:72) - Error while retrieving generic property class for property=parameters
java.lang.NullPointerException
at com.opensymphony.xwork2.conversion.impl.DefaultObjectTypeDeterminer.getClass(DefaultObjectTypeDeterminer.java:314)
at com.opensymphony.xwork2.conversion.impl.DefaultObjectTypeDeterminer.getKeyClass(DefaultObjectTypeDeterminer.java:93)
at com.opensymphony.xwork2.ognl.accessor.XWorkMapPropertyAccessor.getProperty(XWorkMapPropertyAccessor.java:93)
at ognl.OgnlRuntime.getProperty(OgnlRuntime.java:2230)
at ognl.ASTProperty.getValueBody(ASTProperty.java:114)
at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212)
at ognl.SimpleNode.getValue(SimpleNode.java:258)
at ognl.ASTChain.getValueBody(ASTChain.java:141)
at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212)
at ognl.SimpleNode.getValue(SimpleNode.java:258)
at ognl.Ognl.getValue(Ognl.java:494)
at com.opensymphony.xwork2.ognl.OgnlUtil.getValue(OgnlUtil.java:217)
at com.opensymphony.xwork2.ognl.OgnlValueStack.getValue(OgnlValueStack.java:342)
at com.opensymphony.xwork2.ognl.OgnlValueStack.tryFindValue(OgnlValueStack.java:331)
at com.opensymphony.xwork2.ognl.OgnlValueStack.tryFindValueWhenExpressionIsNotNull(OgnlValueStack.java:307)
at com.opensymphony.xwork2.ognl.OgnlValueStack.findValue(OgnlValueStack.java:293)
at org.apache.struts2.components.Property.start(Property.java:162)
at org.apache.struts2.views.freemarker.tags.CallbackWriter.onStart(CallbackWriter.java:73)
at freemarker.core.Environment.visit(Environment.java:296)
at freemarker.core.UnifiedCall.accept(UnifiedCall.java:130)
at freemarker.core.Environment.visit(Environment.java:210)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:210)
at freemarker.core.IfBlock.accept(IfBlock.java:82)
at freemarker.core.Environment.visit(Environment.java:210)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:210)
at freemarker.core.IfBlock.accept(IfBlock.java:82)
at freemarker.core.Environment.visit(Environment.java:210)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:210)
at freemarker.core.Environment.process(Environment.java:190)
at freemarker.template.Template.process(Template.java:237)
at org.apache.struts2.components.template.FreemarkerTemplateEngine.renderTemplate(FreemarkerTemplateEngine.java:157)
at org.apache.struts2.components.UIBean.mergeTemplate(UIBean.java:559)
at org.apache.struts2.components.ClosingUIBean.start(ClosingUIBean.java:59)
at org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(ComponentTagSupport.java:53)
at org.apache.jsp.pages.THDPaymentMethod_jsp._jspx_meth_s_005fsubmit_005f1(THDPaymentMethod_jsp.java:6665)
at org.apache.jsp.pages.THDPaymentMethod_jsp._jspx_meth_s_005fform_005f0(THDPaymentMethod_jsp.java:2363)
at org.apache.jsp.pages.THDPaymentMethod_jsp._jspService(THDPaymentMethod_jsp.java:347)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

羅雙樹 2024-10-13 04:42:27

当我使用图像类型的提交标签库时,我也会遇到同样的问题。
此外,我下载了添加到 struts2-showcase-2.2.1/conversion/enterPersonsInfo.jsp 表单的 struts2 示例 2.2.1

,它生成了前面描述的错误。

您能告诉我您是否可以使用 struts2-showcase 示例重现它吗?

在Jonas4.10.3上用struts2.2.1测试

Same issue for me when I use a submit taglib of type image.
Moreover, I downloaded the struts2 samples 2.2.1

I added to the struts2-showcase-2.2.1/conversion/enterPersonsInfo.jsp form and it generates the error previously describe.

Could you tell me if it's reproducable on your side with the struts2-showcase sample?

Tested with struts2.2.1 on Jonas4.10.3

城歌 2024-10-13 04:42:27

显然您有一个 NullPointer,因为您没有设置参数属性。也许您只是忘记公开此属性,但如果您只是发布堆栈跟踪,我们可以为您提供的所有帮助就是向您读出消息。

You obviously have a NullPointer because you didn't set the parameters property. Maybe you just forgot to make this property public, but all help we can give you if you just post a stacktrace is reading out the message to you.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文