?
Solved

java - noSuchMethod exception

Posted on 2007-08-06
6
Medium Priority
?
316 Views
Last Modified: 2013-12-29
Hi Experts

I get very strange noSuchMethod exception.
I am using jainSip. the code works fine on my windows machine.
when I ran it on my linux machine, I'm getting this exception
java.lang.NoSuchMethodError: gov.nist.javax.sip.message.SIPMessage.getContactHeader()Lgov/nist/javax/sip/header/Contact;

it is important to mention that another methods on the same class are working in linux and windows (I checked that getMethod method are working).
but this specific method - noSuchMethod , is not working...
does any one know why ?
0
Comment
Question by:aquasw
5 Comments
 
LVL 14

Accepted Solution

by:
CPColin earned 1000 total points
ID: 19640148
That error usually happens when the library you were using when you compiled your code is a different version than the library that you use when you run your code. Check to make sure that the JAR containing the gov.nist.javax.sip.message.SIPMessage class is the same version on both machines. If they aren't, and you can't make them the same, you'll have to try to find a different method to call that'll have the same effect, if you can.
0
 
LVL 26

Assisted Solution

by:ksivananth
ksivananth earned 1000 total points
ID: 19643359
try copying the jar file from windows to the linux.  Also make sure the CLASSPATH var in Linux has this jar preceding other jar files!
0
 
LVL 26

Expert Comment

by:ksivananth
ID: 19643364
basically the problem could be incorrect version of the library in CLASSPATH as said by CPColin!
0
 
LVL 1

Expert Comment

by:Computer101
ID: 20212876
Forced accept.

Computer101
EE Admin
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Suggested Courses
Course of the Month14 days, 12 hours left to enroll

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question