« Back to Cisco JTAPI Questions

RE: java.lang.ClassCastException: com.cisco.jtapi.ProviderImpl cannot be ca

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
hm, looks like i stumbled to an unusual problem:
 
i'm writing a web-app which runs within spring framework(v3.0.0) and Jetty(v6.1.25) and has a component that has to connect to CUCM via JTapi(Cisco JTAPI 6.1(4.1200)-2 Release). 
 
The component runs fine within standard Java app (ran from .main() method) but when i run the component from Jetty+Spring container a ClassCastException happens on the following line of code: 
CiscoProvider cProvider = (CiscoProvider) peer.getProvider ("10.0.0.102;login=user;passwd=pass");
 

Exception log: java.lang.ClassCastException: com.cisco.jtapi.ProviderImpl cannot be cast to com.cisco.jtapi.extensions.CiscoProvider

 
I don't know what could be the reason for this behavior.
 
Does anybody have any info or has witnessed/solved this "phenomenon"?

i''ve found the problem, two classLoaders(jettys and web-apps) were clashing in Jetty. Solution was to set Jettys classLoader as primary and everything worked normally.