Operation "Refresh" failed ?
Hey folks. I've run across this problem before but it's come up again in an interesting place. In the past I've seen this error coming from a JSP where I used Java within the JSP to call out to a webject. This is the solution that I used for this issue before:
<jsp:usebean id="wtcontext" class="wt.httpgw.WTContextBean" scope="request"/">
<jsp:usebean id="loginBean" class="com.ptc.netmarkets.util.beans.NmLoginBean" scope="session"/"><%
// later in JSP
wtcontext.setRequest(request);
loginBean.setRemoteUser(request.getRemoteUser());
%>
However, now I am seeing this issue in a servlet which I am calling via Ajax from a browser connected to our Windchill instance. I've tried adding this to the top of my doGet() method in the servlet but it doesn't help:
WTContextBean wtcontext = (WTContextBean) request.getAttribute("wtcontext");
if(wtcontext == null) {
wtcontext = new WTContextBean();
}NmLoginBean loginBean = (NmLoginBean) request.getSession(true).getAttribute("loginBean");
if(loginBean == null) {
loginBean = new NmLoginBean();
}wtcontext.setRequest(request);
try { loginBean.setRemoteUser(request.getRemoteUser()); }
catch (WTException e1) {
e1.printStackTrace();
throw new ServletException(e1);
}
Does anyone have any other advice how to correct or work around this issue? Thanks for your time!
-Thomas R. Busch

