I created a cloudconnector following the https://docs.appdynamics.com/display/PRO40/Connector+Development+Guide, but that didn't work.
The exception I get is as follows..
Caused by: java.lang.ClassCastException: com.appdynamics.connectors.SoftLayerConnector cannot be cast to com.singularity.ee.connectors.api.IConnector
at com.singularity.ee.controller.connectors.ConnectorFactory.getConnector(ConnectorFactory.java:159)
... 156 more
What is the reason ?
Pls. find the server.log (as failure.txt) attached.
Thanks for your replies.
Hi ,
Can you check the existing of files at path in refernce to below error:
Caused by: java.io.FileNotFoundException: /opt/AppDynamics/Controller/appserver/glassfish/../.././lib/connectors/.classpath/image-repository-types.xml (Not a directory)
Regarding the below error can you check whether the class SoftLayerConnector is an instancOf Or implements IConnector in jar file /opt/AppDynamics/Controller/appserver/glassfish/../.././lib/connectors/SoftLayer/connector.jar
Caused by: java.lang.RuntimeException: java.lang.ClassCastException: com.appdynamics.connectors.SoftLayerConnector cannot be cast to com.singularity.ee.connectors.api.IConnector
Regards,
Arun
Hi Arun,
I removed ".classpath" from AppDynamics "lib/connectors" folder. Now I don't see the FileNotFoundException.
But I don't understand why ClassCastException is still reported in logs.
I implemented the interface com.singularity.ee.connectors.api.IConnector from <AppDynamics_home>/appserver/glassfish/domains/domain1/applications/controller/lib/connector-api.jar.
pfa, screenshot of my implementation class (SoftLayerConnector_1.png) & server.log as (failure.txt)
Thanks for your replies
Raj
Hi Raj,
Can you attach the jar and source code of the connector jar deployed so that i will replicate in local as we see you are using self service trial account you do not have permissions to raise help ticket so we need jar file so that helps me to assist you better by simulating in local, keep us posted the details requested
Hi Arun,
Thanks for your reply.
I'll send the project zip directly to your mail address.
Thanks
Raj
Hi Raj,
I will try to replicate in local using the attachement and will keep you posted my observations
Hi Arun,
Any updates on this problem ?
Thank you
Raj
Hi Raj,
Can you clarify when classcastexception error raises in server.log, is it raise when you do any specific operation in controller UI under Images or compute clouds?
I deployed in local controller and could not see the error:
=============================================
[#|2015-04-23T13:49:18.988+0000|INFO|glassfish3.1.2|com.singularity.ee.controller.connectors.ConnectorFactory|_ThreadID=1;_ThreadName=Thread-5;|Adding connector jar to isolated classloader /mnt/AppDynamics/Controller/appserver/glassfish/../.././lib/connectors/SoftLayer/connector.jar|#]
[#|2015-04-23T13:49:18.993+0000|INFO|glassfish3.1.2|com.singularity.ee.controller.connectors.ConnectorFactory|_ThreadID=1;_ThreadName=Thread-5;|Adding connector jar supporting libraries to isolated classloader: /mnt/AppDynamics/Controller/appserver/glassfish/../.././lib/connectors/SoftLayer/lib|#]
[#|2015-04-23T13:49:19.846+0000|INFO|glassfish3.1.2|com.singularity.ee.controller.connectors.ConnectorFactory|_ThreadID=1;_ThreadName=Thread-5;|Connector [com.appdynamics.connectors.SoftLayerConnector] registered with controller|#]
[#|2015-04-23T13:49:20.176+0000|INFO|glassfish3.1.2|com.singularity.ee.controller.servlet.ConnectorLoader|_ThreadID=1;_ThreadName=Thread-5;|ComputeCenterTypes:|#]
[#|2015-04-23T13:49:20.183+0000|INFO|glassfish3.1.2|com.singularity.ee.controller.servlet.ConnectorLoader|_ThreadID=1;_ThreadName=Thread-5;|SoftLayer...|#]
[#|2015-04-23T13:49:20.284+0000|INFO|glassfish3.1.2|com.singularity.ee.controller.servlet.ConnectorLoader|_ThreadID=1;_ThreadName=Thread-5;|ImageTypes:|#]
[#|2015-04-23T13:49:20.289+0000|INFO|glassfish3.1.2|com.singularity.ee.controller.servlet.ConnectorLoader|_ThreadID=1;_ThreadName=Thread-5;|SoftLayer Image...|#]
[#|2015-04-23T13:49:20.400+0000|INFO|glassfish3.1.2|com.singularity.ee.controller.servlet.ConnectorLoader|_ThreadID=1;_ThreadName=Thread-5;|Finished loading pluggable connectors|#]
[#|2015-04-23T13:49:20.726+0000|INFO|glassfish3.1.2|com.singularity.ee.controller.servlet.StartupContextListener|_ThreadID=1;_ThreadName=Thread-5;|Initializing blitz registration manager|#]
=============================================
Regards,
Arun
Hi Arun,
I've been restarting the controller process after adding the connector ZIP file in "connectors" folder.
After restart of controller, when I try to 'Register Compute Cloud', I get the ClassCastException
PFA, the screenshot of the web page (Register_ComputeCloud.png) where this exception is being reported..
Thank you
Raj