Author Message
AjithJose
Joined: Apr 11, 2011
Messages: 0
Offline
I am trying to get a service provider using the following code.

ServiceProvider servProv = ServiceProvider
               .getServiceProvider(properties);

However, I am getting the following error

java.lang.NoSuchMethodError: org.exolab.castor.xml.Marshaller.setCstaXSDEdition(I)V
   at com.avaya.mvcs.proxy.CstaMarshaller.marshal(CstaMarshaller.java:146)
   at com.avaya.mvcs.proxy.CstaMarshallerNode$CstaMarshallerThread.run(CstaMarshallerNode.java:187)
   at com.avaya.mvcs.proxy.CstaMarshallerNode.processPacket(CstaMarshallerNode.java:112)
   at com.avaya.mvcs.proxy.AbstractPipelineNode.process(AbstractPipelineNode.java:130)
   at com.avaya.mvcs.proxy.Pipeline$PipelineSubscriber.inform(Pipeline.java:427)
   at com.avaya.common.eventservice.UnfilteredSubscription.notify(UnfilteredSubscription.java:70)
   at com.avaya.common.multicaster.Multicaster.notify(Multicaster.java:386)
   at com.avaya.common.channel.Channel.publish(Channel.java:115)
   at com.avaya.common.eventservice.EventService.publish(EventService.java:123)
   at com.avaya.common.eventservice.EventServiceManager.publish(EventServiceManager.java:156)
   at com.avaya.common.eventservice.Publisher.publish(Publisher.java:110)
   at com.avaya.mvcs.proxy.XmlGatewayClient.handleRequest(XmlGatewayClient.java:175)
   at com.avaya.mvcs.proxy.Pipeline.handleRequest(Pipeline.java:346)
   at com.avaya.mvcs.proxy.ClientProxy.routeRequest(ClientProxy.java:612)
   at com.avaya.mvcs.proxy.CstaSessionManagementServiceProxy.routeRequest(CstaSessionManagementServiceProxy.java:57)
   at com.avaya.mvcs.proxy.CstaSessionManagementServiceProxy.startApplicationSession(CstaSessionManagementServiceProxy.java:103)
   at com.avaya.mvcs.proxy.SessionManagementServiceProxy.startApplicationSession(SessionManagementServiceProxy.java:229)
   at com.avaya.mvcs.proxy.SessionManagementServiceProxy.startApplicationSession(SessionManagementServiceProxy.java:184)
   at com.avaya.mvcs.proxy.ClientProxy.sessionStart(ClientProxy.java:359)
   at com.avaya.mvcs.proxy.ClientProxy.<init>(ClientProxy.java:271)
   at com.avaya.mvap.svcproxy.prov.RemoteServiceProvider.initServiceProviderImpl(RemoteServiceProvider.java:197)
   at com.avaya.mvap.svcproxy.prov.ServiceProviderBuilder.getCmapiServiceProvider(ServiceProviderBuilder.java:192)
   at com.avaya.mvap.svcproxy.prov.ServiceProviderBuilder.getServiceProviderType(ServiceProviderBuilder.java:177)
   at com.avaya.mvap.svcproxy.prov.ServiceProviderBuilder.getServiceProviderImpl(ServiceProviderBuilder.java:112)
   at com.avaya.cmapi.ServiceProvider.getCmapiServiceProvider(ServiceProvider.java:404)
   at com.avaya.cmapi.ServiceProvider.getServiceProvider(ServiceProvider.java:390)

On further analysis I found that the method doesn't exist as per the API. See here
http://www.castor.org/1.3/javadoc/org/exolab/castor/xml/Marshaller.html

Please let me know if anyone has encountered this while getting the service provider. How do you resolve this?

Thanks,
Ajith
GwilymEvans
Joined: Feb 12, 2007
Messages: 1
Offline
The "org.exolab.castor.xml.Marshaller" class is included in the "castor-1.0-xml.jar", while the "com.avaya.mvcs.proxy.CstaMarshaller" class is included in the "proxy.jar". Both of these jar-files are included as part of the CMAPI SDK. Please ensure that these jar-files are included in your class-path.
AjithJose
Joined: Apr 11, 2011
Messages: 0
Offline
Hi Gwilym,

Yes, I have included both the jars in my classpath. Does the order of the jar files matter?

I found from the Castor API that there doesn't exist a org.exolab.castor.xml.Marshaller.setCstaXSDEdition() method, which is referred inside com.avaya.mvcs.proxy.CstaMarshaller.marshal() method.

Appreciate your help on this.

Thanks,
Ajith
GwilymEvans
Joined: Feb 12, 2007
Messages: 1
Offline
No, I don't believe that the order of the jar-files in the classpath matters.

The "setCstaXSDEdition(int edition)" method in the Marshaller class was added by AES in order to differentiate between, and correctly handle, CSTA Edition-2 and Edition-3 namespaces in the XML.
AjithJose
Joined: Apr 11, 2011
Messages: 0
Offline
Hi Gwilym,

It may sound strange but the exception doesn't occur after I re-ordered the jars. The avaya-castor-override.jar was placed after castor-1.0-xml.jar.

However, I am now getting the below exception. What causes this?

com.avaya.mvcs.proxy.DisconnectByClientException: Request: session[null] ch.ecma.csta.binding.start.StartApplicationSession@1895df8 canceled by client
   at com.avaya.mvcs.proxy.XmlGatewayClient.clearOutstandingRequests(XmlGatewayClient.java:140)
   at com.avaya.mvcs.proxy.Pipeline.clearOutstandingRequests(Pipeline.java:369)
   at com.avaya.mvcs.proxy.ClientProxy.stop(ClientProxy.java:586)
   at com.avaya.mvcs.proxy.ClientProxy.process(ClientProxy.java:728)
   at com.avaya.mvcs.proxy.Pipeline$PipelineSubscriber.inform(Pipeline.java:427)
   at com.avaya.common.eventservice.UnfilteredSubscription.notify(UnfilteredSubscription.java:70)
   at com.avaya.common.multicaster.Multicaster.notify(Multicaster.java:386)
   at com.avaya.common.channel.Channel.publish(Channel.java:115)
   at com.avaya.common.eventservice.EventService.publish(EventService.java:123)
   at com.avaya.common.eventservice.EventServiceManager.publish(EventServiceManager.java:156)
   at com.avaya.common.eventservice.Publisher.publish(Publisher.java:110)
   at com.avaya.mvcs.proxy.ExceptionEventHandlerNode$ExceptionProcessor.run(ExceptionEventHandlerNode.java:197)
   at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

Thanks,
Ajith
GwilymEvans
Joined: Feb 12, 2007
Messages: 1
Offline
Unfortunately, you didn't list enough of the log to tell what the issue is. From the fragment that you gave, I would guess that there was a problem with the socket between your application and AES. However, I can't tell what the problem was.
JohnBiggs
Joined: Jun 20, 2005
Messages: 1141
Location: Rural, Virginia
Offline
Ajith,
Are you starting your learning by utilizing the sample applications that are bundled with the SDK? If not, I encourage you to step back and use them to your advantage. Enough of a framework is provided that these apps should start and run without the exceptions you are seeing if you follow the instructions for running them Once you can run them using ant from the command line, you can use tutorials (look at the Training link to the left) that are on this site for incorporating them into Eclipse IDE if you wish. Once you have the working sample apps, you can copy the framework, gut the code and start rebuilding your application.
AjithJose
Joined: Apr 11, 2011
Messages: 0
Offline
Thanks John/Gwilym.

I am going through the example applications right now.
Go to:   
Mobile view