<!-- --><style type="text/css">@import url(https://www.blogger.com/static/v1/v-css/navbar/3334278262-classic.css); div.b-mobile {display:none;} </style> </head><body><script type="text/javascript"> function setAttributeOnload(object, attribute, val) { if(window.addEventListener) { window.addEventListener('load', function(){ object[attribute] = val; }, false); } else { window.attachEvent('onload', function(){ object[attribute] = val; }); } } </script> <div id="navbar-iframe-container"></div> <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script> <script type="text/javascript"> gapi.load("gapi.iframes:gapi.iframes.style.bubble", function() { if (gapi.iframes && gapi.iframes.getContext) { gapi.iframes.getContext().openChild({ url: 'https://www.blogger.com/navbar.g?targetBlogID\x3d7256432\x26blogName\x3dThe+Frustrated+Programmer\x26publishMode\x3dPUBLISH_MODE_BLOGSPOT\x26navbarType\x3dBLACK\x26layoutType\x3dCLASSIC\x26searchRoot\x3dhttp://frustratedprogrammer.blogspot.com/search\x26blogLocale\x3den_US\x26v\x3d2\x26homepageUrl\x3dhttp://frustratedprogrammer.blogspot.com/\x26vt\x3d5012862196962223429', where: document.getElementById("navbar-iframe-container"), id: "navbar-iframe" }); } }); </script>
| Tuesday, August 03, 2004

This blog entry talked about some great issues with session scoped struts forms. I found another one the hard way today:

When I added some properties to my session scope form in struts today, I modified my action to pass those properties to the business logic, recompiled, redeployed. But I ended up with:

StandardWrapperValve[action]: Servlet.service() for servlet action threw exception
java.lang.NoSuchMethodException: Unknown property 'foo'

I checked and rechecked things, but I still got the same error.

It turned out that because I was using a DynaBean for my ActionForm, combined with Tomcat 5's Restart Persistence. The old configuration for my form was still cached in the session. The solution was either delete $CATALINA_HOME/work/Catalina to remove the cached session or just logoff and login again.

Normally I love the fact that I don't need to re-login after restarting, but this was a pain.