Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X
Hi,
I am unable to import an extension. I am seeing this message in logs
Unable to create Authenticator instance in Authenticator
Any pointers appreciated
Thanks
Pavan
Solved! Go to Solution.
Got it. Thank you!
At first it looked like you were getting a ClassDefNotFound exception, but digging deeper it was actually an initialization error. Your Date format is not valid so when the UAAAuthenticator class was being initialized, that static piece was blowing up on you. Fix the format and it should import. Your extension is built properly, it's just the code that has issues.
Authenticators are somewhat of a special entity with special treatment. It would be very helpful if you can provide more detail of your problem.
Thanks Brian for the response.
Here are the details:
Environment:
==============
ThingWorx version: 7.0.0
OS: Ubuntu (x86_64 x86_64 x86_64 GNU/Linux)
Tomcat version: 8.0.24
Postgres version: 9.4
Extension details:
==============
We created a java extension for authenticator using the eclipse plugin.
The java class, as part of this extension, extends com.thingworx.security.authentication.CustomAuthenticator
The authenticate method just redirects the user to our SSO. This is only minimal code. We will add more code if the authenticator is successfully imported.
Below is the metadata.xml file. Made sure the class name, package name, jar file name exactly match.
Please let me know if you need any other information.
Thanks
Pavan
<Entities>
<ExtensionPackages>
<ExtensionPackage name="ge_uaa_authenticator"
description="Authentication against UAA"
vendor="GEIP"
packageVersion="1.0.0"
minimumThingWorxVersion="6.5.0">
<JarResources>
<FileResource type="JAR" file="thingworxsecurityext.jar" description="GE UAA Authenticator extension JAR file" />
</JarResources>
</ExtensionPackage>
</ExtensionPackages>
<Authenticators>
<Authenticator name="UAAAuthenticator"
className="com.ge.bm.ext.security.UAAAuthenticator"
description="Authenticator that connects to GE UAA"
aspect.isEditableExtensionObject="true">
</Authenticator>
</Authenticators>
</Entities>
Not sure if you can share your Java based Authenticator, but that would be helpful too.
Here are some general tips to keep in mind with custom Authenticators:
From that error message, you should triple check that your Authenticator's className property matches the fully qualified Java class of UAAAuthenticator. Also, triple check that your thingworxsecurityext.jar actually contains the UAAAuthenticator.class file.
Hi Brian,
Attached is the java class. Also the zip file used to import.
Thanks
Pavan
Got it. Thank you!
At first it looked like you were getting a ClassDefNotFound exception, but digging deeper it was actually an initialization error. Your Date format is not valid so when the UAAAuthenticator class was being initialized, that static piece was blowing up on you. Fix the format and it should import. Your extension is built properly, it's just the code that has issues.
Thank you very much Brian. Fixing the static part has resolved the issue.
Is there a way to troubleshoot this?
In general, if you experience issues you can't figure out, try to be as minimal as possible in your implementation. Even though the logic was simple in your Authenticator, it still had properties and logic that could cause runtime errors. So stripping out as much as possible can help hone in if you have a problem with the extension structure or the java file.