Skip to main content
1-Visitor
June 20, 2018
Question

AuthenticationException - Please Help

  • June 20, 2018
  • 1 reply
  • 1941 views

I'm trying to run the following code

public class QueryGroup {
 public static void main(String args[]) throws WTException {
 QuerySpec qs = new QuerySpec(WTGroup.class);
 SearchCondition sc1 = new SearchCondition(WTGroup.class, WTGroup.INTERNAL, SearchCondition.IS_FALSE);
 qs.appendWhere(sc1);
 QueryResult qr = PersistenceHelper.manager.find((StatementSpec) qs);
 }
}

and getting the following error. Please help.

D:\ptc\Windchill>windchill sh.QueryGroup
Exception in thread "main" (wt.fc.fcResource/0) wt.util.WTException: The operation: "find" failed.
Nested exception is: wt.util.WTRemoteException: Unable to invoke remote method;
nested exception is:
 wt.method.AuthenticationException
 at wt.method.RemoteMethodServer.invoke(RemoteMethodServer.java:810)
 at wt.services.ServiceFactory$ClientInvocationHandler.invoke(ServiceFactory.java:349)
 at com.sun.proxy.$Proxy1.find(Unknown Source)
 at sh.QueryGroup.main(QueryGroup.java:18)

1 reply

1-Visitor
June 25, 2018

Try running the code directly on a method server. The link bellow has all the details for RMI setup.

 

https://www.ptc.com/en/support/article?n=CS254321