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

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

Running a custom class file from windchill shell (SSO) getting "wt.method.AuthenticationException"

ND_102012
5-Regular Member

Running a custom class file from windchill shell (SSO) getting "wt.method.AuthenticationException"

I am getting following error while running a custom class file as described in CS353022. Windchill is configured with SSO + OpenDJ.

What could be the possible issue?  .. Could CS294361 be causing it?

 

Custom class has following for auth and invoking a method within class, error is coming at invoke. 

RemoteMethodServer rms = RemoteMethodServer.getDefault();

rms.setUserName("wcadmin");

rms.setPassword("wcadmin");         

rms.invoke("Login1","ext.participant.Login",null,null,null);

 

 

Running windchill wt.auth.Authentication also returns error

 

wt.util.WTRemoteException: Unable to invoke remote method; nested exception is:

        wt.method.AuthenticationException

        at wt.method.RemoteMethodServer.invoke(RemoteMethodServer.java:918)

        at ext.siemens.pvp.Login.main(Login.java:36)

 

 

ACCEPTED SOLUTION

Accepted Solutions
HelesicPetr
22-Sapphire I
(To:ND_102012)

Hi @ND_102012 

the issue is the SSO, method from windchill shell can not Authenticate . 

you need set that http server do not use the SSO for that function from the windchill shell

 

someone else can have a solution.

 

I would recommend an another method to run then windchill shell 

 try this method to run from a browser url address

 

package cz.custom.HELTest1;
public class Test1 implements RemoteAccess
{
		// http link to run this function
		// http://server.com/Windchill/servlet/WindchillAuthGW/cz.custom.HELTest1.Test1/runOwnMethod
		
	public static void runOwnMethod(HTTPRequest req, HTTPResponse resp) throws WTException, PropertyVetoException, IOException
	{
	//... your code
	}
}

 

PetrH

View solution in original post

5 REPLIES 5
HelesicPetr
22-Sapphire I
(To:ND_102012)

Hi @ND_102012 

the issue is the SSO, method from windchill shell can not Authenticate . 

you need set that http server do not use the SSO for that function from the windchill shell

 

someone else can have a solution.

 

I would recommend an another method to run then windchill shell 

 try this method to run from a browser url address

 

package cz.custom.HELTest1;
public class Test1 implements RemoteAccess
{
		// http link to run this function
		// http://server.com/Windchill/servlet/WindchillAuthGW/cz.custom.HELTest1.Test1/runOwnMethod
		
	public static void runOwnMethod(HTTPRequest req, HTTPResponse resp) throws WTException, PropertyVetoException, IOException
	{
	//... your code
	}
}

 

PetrH

You need to add an extra parameter

windchill --javaargs=-Dwt.auth.trustedAuth.username=<username> <package.java_class_name> <param1> <param2>...

 See also:

https://www.ptc.com/en/support/article/CS353022

Hi @BjoernRueegg 

Oh this is the SSO login bypass 😄 good to know 😄

PetrH

In addition to this for SSO commands, if your Windchill is behind a alb/reverse proxy, the reverse proxy also needs to be a trusted host. If you are considering implementing this (or already have it in place) send me a private message for some information.

ND_102012
5-Regular Member
(To:jbailey)

I had already tried CS353022 and trustedhost but it was failing with same error. This turned out to be issue described in CS294361.
Thanks for your response! Closing this thread,

Announcements

Top Tags