cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

Operation "Refresh" failed ?

tbusch
1-Newbie

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

1 REPLY 1
tbusch
1-Newbie
(To:tbusch)

Here is the relevent part of the stack trace for the error:

wt.util.WTRuntimeException: The operation: "refresh" failed.
Nested exception is: wt.util.WTRemoteException: Unable to invoke remote method
Nested exception is: wt.method.AuthenticationException; nested exception is:
(wt.fc.fcResource/0) wt.util.WTException: The operation: "refresh" failed.
Nested exception is: wt.util.WTRemoteException: Unable to invoke remote method; nested exception is:
wt.method.AuthenticationException
wt.fc.ObjectReference.getObject(ObjectReference.java:750)
com.infoengine.compiledTasks.file.d$3a.ptc.Windchill.tasks.stryker.getlatestpart$2exml.invoke(getlatestpart$2exml.java:67)
com.infoengine.SAK.Task.invoke(Task.java:1718)

-Thomas R. Busch

Announcements

Top Tags