This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Struts and the fly likes Struts 2 & DateTimePicker: Works fine but throws Exception. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts 2 & DateTimePicker: Works fine but throws Exception." Watch "Struts 2 & DateTimePicker: Works fine but throws Exception." New topic

Struts 2 & DateTimePicker: Works fine but throws Exception.

Alia Huss
Ranch Hand

Joined: Feb 13, 2009
Posts: 63
So, I have a DateTimePicker, which is used to set the date of a booking.
It works just fine, my actionclass can collect the date and call an insert on my database with the value.
But everytime I press my Save button I get this exception:

ognl.OgnlException: target is null for setProperty(null, "date", [Ljava.lang.String;@ae48dc)
at ognl.OgnlRuntime.setProperty(
at ognl.ASTProperty.setValueBody(
at ognl.SimpleNode.evaluateSetValueBody(
at ognl.SimpleNode.setValue(
at ognl.ASTChain.setValueBody(
at ognl.SimpleNode.evaluateSetValueBody(
at ognl.SimpleNode.setValue(
at ognl.Ognl.setValue(
at com.opensymphony.xwork2.ognl.OgnlUtil.setValue(
at com.opensymphony.xwork2.ognl.OgnlValueStack.setValue(
at com.opensymphony.xwork2.ognl.OgnlValueStack.setValue(
at com.opensymphony.xwork2.interceptor.ParametersInterceptor.setParameters(
at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(
at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(
at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(
at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(
at org.apache.struts2.impl.StrutsActionProxy.execute(
at org.apache.struts2.dispatcher.Dispatcher.serviceAction(
at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
at org.apache.catalina.core.StandardWrapperValve.invoke(
at org.apache.catalina.core.StandardContextValve.invoke(
at org.apache.catalina.core.StandardHostValve.invoke(
at org.apache.catalina.valves.ErrorReportValve.invoke(
at org.apache.catalina.core.StandardEngineValve.invoke(
at org.apache.catalina.connector.CoyoteAdapter.service(
at org.apache.coyote.http11.Http11Processor.process(
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(
at Source)
expr: val: [Ljava.lang.String;@ae48dc context: ognl.OgnlContext@f521badf root:[roombooking.action.CreateReservationAction@317d82, com.opensymphony.xwork2.DefaultTextProvider@1270aef] value: [Ljava.lang.String;@ae48dc

It doesn't interfere with anything, the date is still inserted into the db, but I can't help but wonder what it's all about.
Any ideas?

Thanks in advance,
I agree. Here's the link:
subject: Struts 2 & DateTimePicker: Works fine but throws Exception.
It's not a secret anymore!