• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NoClassDefFoundError

 
Fahad Aijaz
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Could any one plz explain me the following error I am receiving when trying to establish the so called UDP connection. I am using MIDP 2.0. I would really appreciate the response.

java.lang.NoClassDefFoundError: com/sun/midp/io/InternalConnector
at javax.microedition.io.Connector.open(Connector.java:158)
at javax.microedition.io.Connector.open(Connector.java:138)
at javax.microedition.io.Connector.open(Connector.java:120)
at org.ksoap.transport.UDPTransport.call(UDPTransport.java:216)
at org.ksoap.transport.UDPTransport.call(UDPTransport.java:286)
at TestClient.echoString(TestClient.java:60)
at TestClient.main(TestClient.java:31)
Exception in thread "main"

Thanx alot in advance.

Greetings,
--
Fahad Aijaz
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am confused about one thing


at TestClient.main(TestClient.java:31)
Exception in thread "main"


Thread Main? for MIDlets there isn't a "public static void main" method. Why would the exception be looking for a main?

Now, you class name TestClient, makes it sound like you are testing something in your MIDlet, but from a class outside of the MIDlet arena. Which to me would mean that MIDP 2.0 isn't in your classpath at that point.

Actually, I know it is a classpath issue simply from it being a NoClassDefFoundError.

So maybe some more information is needed.

Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic