1

I am trying to build an app that establishes P2P connection between two wifi enabled android device. I have added JXTA 2.5 library into android 2.2, but don't know where i am going wrong. Ending up with run-time exception: No Class found error and Instance not found error.

Is there anything else to be done apart from just including .jar file into android project ? Any configuration to be written ? If yes, please let know how i can write configuration file and employ it in my project ? I am working on final year project, so please let me know if you have any pointers regarding this ?

Thanks in advance !

Here is the Log :

04-24 22:41:47.429: I/dalvikvm(556): Could not find method org.apache.log4j.Logger.getLogger, referenced from method net.jxta.peergroup.PeerGroupFactory.<clinit>
04-24 22:41:47.429: W/dalvikvm(556): VFY: unable to resolve static method 8971: Lorg/apache/log4j/Logger;.getLogger (Ljava/lang/String;)Lorg/apache/log4j/Logger;
04-24 22:41:47.441: D/dalvikvm(556): VFY: replacing opcode 0x77 at 0x0010
04-24 22:41:47.461: W/dalvikvm(556): VFY: unable to resolve static field 4047 (ERROR) in Lorg/apache/log4j/Level;
04-24 22:41:47.461: D/dalvikvm(556): VFY: replacing opcode 0x62 at 0x0012
04-24 22:41:47.461: W/dalvikvm(556): VFY: unable to resolve static field 4050 (WARN) in Lorg/apache/log4j/Level;
04-24 22:41:47.461: D/dalvikvm(556): VFY: replacing opcode 0x62 at 0x000c
04-24 22:41:47.469: W/dalvikvm(556): VFY: unable to resolve static field 4048 (FATAL) in Lorg/apache/log4j/Level;
04-24 22:41:47.469: D/dalvikvm(556): VFY: replacing opcode 0x62 at 0x001a
04-24 22:41:47.469: W/dalvikvm(556): VFY: unable to resolve static field 4048 (FATAL) in Lorg/apache/log4j/Level;
04-24 22:41:47.480: D/dalvikvm(556): VFY: replacing opcode 0x62 at 0x0045
Ibad Khan
  • 109
  • 1
  • 15

1 Answers1

1

JXTA 2.5 is buggy. Just forget it. I lead release 2.6 and 2.7. We have corrected many issues. I have published a book about it called Practical JXTA II and you can read it online at scribd. It contains examples.

You will probably need a central super peer, unless you only use adhoc connections (broadcasting).

Jérôme Verstrynge
  • 57,710
  • 92
  • 283
  • 453
  • Is it supported by android 2.2, do i have to employ some changes to make it work on android 2.2 ? Let know, if something have to be done. – Ibad Khan Apr 25 '12 at 06:37
  • Hello, i tried to work by adding JXTA 2.7 into android 2.2 project. But ended up with this error: `04-25 07:50:40.950: W/System.err(368): java.util.NoSuchElementException: key 'jxta:HTTPTransportAdvertisement' not registered. 04-25 07:50:40.950: W/System.err(368): at net.jxta.util.ClassFactory.getInstantiator(ClassFactory.java:355) 04-25 07:50:40.950: W/System.err(368): at net.jxta.document.AdvertisementFactory.newAdvertisement(AdvertisementFactory.java:249)` – Ibad Khan Apr 25 '12 at 07:56