This is a PDF version of Article CS79047 and may be out of date. For the latest version click here
Article - CS79047

Invoking a remote method server with "RemoteMethodServer.getDefault()" fails with an exception in Windchill

Created: 02-Aug-2012   |   Modified: 20-Oct-2017   

Applies To

  • Windchill PDMLink 8.0 to 10.2
  • Windchill ProjectLink 8.0 to 10.2
  • Pro/INTRALINK 8.x + 8.0 to 10.2
  • Windchill PDM Essentials 8.0 to 10.2
  • Arbortext Content Manager 8.0 to 10.2

Description

  • How to invoke a remote method server call in a server that runs only background method server?
  • How to invoke a remote MethodServer call in a server with a host name alias?
  • Invoking a remote method server with RemoteMethodServer.getDefault() fails with an exception
  • When calling
RemoteMethodServer.getDefault().invoke( "<method_name>", "<class_name>", null, argType, argValue);
  • The following errors can be seen in the Windchill logs
wt.util.WTRemoteException: Unable to invoke remote method; nested exception is:
wt.util.WTRemoteException: Unable to locate method server; nested exception is:
java.lang.ArrayIndexOutOfBoundsException: 0
at wt.method.RemoteMethodServer.getCurrentMethodServer(RemoteMethodServer.java:1066)
at wt.method.RemoteMethodServer.getMethodServer(RemoteMethodServer.java:1009)
at wt.method.RemoteMethodServer.invoke(RemoteMethodServer.java:621)

 
wt.util.WTRemoteException: Unable to locate method server; nested exception is:
wt.util.WTRemoteException: Unable to get server; nested exception is:
wt.util.WTRemoteException: Unable to locate server manager; nested exception is:
java.rmi.ConnectException: Connection refused to host: xxxx.xxxx.xxxx; nested exception is:
java.net.ConnectException: Connection refused
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:601)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:198)