Author Message
sudarsananMahendiran
Joined: May 14, 2012
Messages: 0
Offline
The sample application is working for me. when I try to get connected to session using Serviceprovider similar to the sample application code, I am receiving this error
java.lang.NoSuchMethodError: org/exolab/castor/xml/Marshaller.setCstaXSDEdition(I)V
I have all the jar imported to the application but still I am getting this error.
In the logs i could see the below line printed and then the error is thrown.
[5/21/12 10:43:31:257 CDT] 00000026 RemoteService I CMAPI SERVER IP=bo-pbx00-aes00: CMAPI SERVER PORT=4722

It would be great if you can help us in resolving this issue
JohnBiggs
Joined: Jun 20, 2005
Messages: 1141
Location: Rural, Virginia
Offline
My understanding o fyour question is that you are using the DMCC Java SDK, and when you do your first DMCC request (startApplicationSession) java throws an exception

java.lang.NoSuchMethodError: org/exolab/castor/xml/Marshaller.setCstaXSDEdition(I)V


you also indicate that the 'sample application' is working for you... there are actually a number of sample applications in this particular Java SDK.

This would imply that your classpath is missing a reference to a particular JAR (castor-*.jar)

Have you read throught this thread?
https://devconnect.avaya.com/public/forum/d_forum_3.jsp?t=9212&f=23

what are the differences in how you are launching your application versus how you are launching the sample code? Have you examined the behavior of ant in regard to how the sample code is launched versus your application?
sudarsananMahendiran
Joined: May 14, 2012
Messages: 0
Offline
Thanks for your quick response.
I am using RAD7.5 for my application and WAS 7 server is where the application is running.
here is the classpath of the jars and order
   <classpathentry exported="true" kind="lib" path="/CSPNet/lib/api.jar"/>
   <classpathentry exported="true" kind="lib" path="/CSPNet/lib/proxy.jar"/>
   <classpathentry exported="true" kind="lib" path="/CSPNet/lib/castor-1.0-xml.jar"/>
   <classpathentry exported="true" kind="lib" path="/CSPNet/lib/avaya-castor-override.jar"/>
   <classpathentry exported="true" kind="lib" path="/CSPNet/lib/avaya-common.jar"/>

I launch the softphone app as run as Java Application.

I tried reordering the jars as it was given in this thread.
https://devconnect.avaya.com/public/forum/d_forum_3.jsp?t=9696&f=27
MartinFlynn
Joined: Nov 30, 2009
Messages: 1922
Offline
Hi Sudarsanan ,

Make sure that avaya-castor-override.jar comes before castor-1.0-xml.jar in your classpath.

avaya-castor-override.jar includes an updated version of Marshaller.class which has the method setCstaXSDEdition(). By putting avaya-castor-override.jar first, you ensure that the VM picks the correct version.

Martin
sudarsananMahendiran
Joined: May 14, 2012
Messages: 0
Offline
Hi Martin,

Thanks for the response.

Our application is calling castor-1.0-xml.jar before we get to the avaya function for mapping functions. So this castor-1.0-xml.jar is already in use before avaya-castor-overdire.jar. Even though I specify the avaya-castor-overdire.jar before castor-1.0-xml.jar i am getting same error. So is there any other way to resolve it? Can you rename your package in avaya-castor-overdire.jar?
GwilymEvans
Joined: Feb 12, 2007
Messages: 1
Offline
Sundarsanan,

Here is the order of the jar-files in the CLASSPATH used by the sample applications in the SDK:

activation.jar
mail.jar
api.jar
avaya-castor-override.jar
avaya-common.jar
caastor-1.0-xml.jar
client-media-stack.jar
commons-logging.jar
jakarta-regexp-1.1.jar
proxy.jar
xerces-J_2.9.1.jar

Please try this order and see if you still get the same error.
GwilymEvans
Joined: Feb 12, 2007
Messages: 1
Offline
Additionally, I noticed, in your last post, that you tended to mis-spell "avaya-castor-override.jar". Please check the spelling in your classpath.

Speaking of mis-spellings, I see that I put one too many "a"s in "castor-1.0-xml.jar" in my post.
Go to:   
Mobile view