0

I developed a Spring-Webflow based JSF application using primefaces UI component library. I have a spring bean to store events. It has a Date and a String field. There is a UI, where users can create events, by selecting the date, and typing the name of the holiday.

If I start the application with mvn tomcat7:run everything works fine, but if I deploy the war package on Tomcat7, I got a serious error. If a user wants to create an event, selects the date, types the name and then submits it, the value of the String variable will be "false", but the Date is ok. It seems, somehow the value is not getting transmitted to backing bean or changing somewhere to "false".

I'm using the default tomcat configuration, except the memory. I allocated 2GB memory for tomcat.

Originally the scope of the bean was session, then I tried to change it to request, but didn't solve the problem.

I think, this is some kind of tomcat configuration related problem, but I'm not sure.

Does anyone faced some kind of issue like this?

  • Does this behavior occur all the time or intermittent? Do you have a custom conversion service for your bean? My suspicion is a conversion service somewhere is altering your values. You should turn on 'debug' log level for all org.springframework packages and try to see if any converters get are running. – Selwyn May 05 '15 at 23:40
  • Hi @Airduster! The strange thing is, that in mode mvn tomcat7:run it works fine, every property of the bean are all right. I have converters for some beans, which are used for example in combo boxes, and those are working fine. The string value only corrupts if the artifact is deployed on tomcat server from Tomcat's manager application. Do you have any other idea? – superwoodoo May 06 '15 at 07:25
  • I don't think you have enough evidence to make that conclusion yet. You should run Integration test for this specific bean for all deployment environments to really get to the bottom of this. It is unlikely that the container is the modifying the value and if you are using spring webflow you should implement your own FlowExecutionListenerAdapater to tap into webflow's life cycle events evaluating the bean at each step. http://stackoverflow.com/questions/29901635/catch-dead-session-in-spring-webflow/29924424#29924424 – Selwyn May 06 '15 at 13:30
  • @Airduster: I don't have a custom converter service. I have a controller (not MVC) for handling holiday data. It has a `public void onSave` method, which is doing the persisting actions. – superwoodoo May 09 '15 at 15:13
  • tap into the spring webflow life cycle events via FlowExecutionListenerAdapater http://docs.spring.io/spring-webflow/docs/current/api/org/springframework/webflow/execution/FlowExecutionListenerAdapter.html and log all the attributes of the beans through each step. Try to isolate during which step the "false" value is occurring. – Selwyn May 09 '15 at 17:45

0 Answers0