I have been trying to deploy my Jar file in the Sun SPOT for Peer to Peer Communication.These were the things i did.
1. I packaged my Class files into a jar file.Should i write my own Manifest File (Manifest.MF) in order for it to successfully deploy on SPOT?.When i jar my files it creates an Manifest file with Just minimal information
2. When I "Deploy the Midlet Bundle" I get ClassFormatError for all the classes i have packaged in the Jar file.I couldn't figure out what the error this pertains to.Please help me regarding this.
3. Further it shows that the" Midlet class specified was not found".However I verified it in the Midlet 1: in Manifest.MF which was exactly correct.This problem was already specified in a forum in Sunspot https://www.sunspotworld.com/forums/viewtopic.php?f=25&t=2327
and the solution provided was to use ant jar-app which produced "Build Sucessful" However i face the same problem on deployment which did not resolve the issue
Here is the stack trace which i Obtained
Thanks
Sree aurovindh
-do-run-solarium:
Java Runtime Environment version: 1.6.0_07
No basestation available!
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.LookupPlatform
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
NoClassDefFoundError: AliceSpot.AliceSpotClientAgentPlatform
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
NoClassDefFoundError: AliceSpot.AliceSpotClientlet
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
IO error while loading: class javax.microedition.lcdui.CommandListener
javax.microedition.io.ConnectionNotFoundException: javax/microedition/lcdui/CommandListener.class
at com.sun.squawk.io.j2me.classpath.Protocol.openInputStream(Protocol.java:162)
at com.sun.squawk.translator.ci.ClassFileLoader.load(ClassFileLoader.java:139)
at com.sun.squawk.translator.Translator$1.run(Translator.java:664)
at com.sun.squawk.util.ComputationTimer.execute(ComputationTimer.java:125)
at com.sun.squawk.util.ComputationTimer.time(ComputationTimer.java:159)
at com.sun.squawk.translator.Translator.load(Translator.java:662)
at com.sun.squawk.translator.Translator.load(Translator.java:356)
at com.sun.squawk.translator.ci.ConstantPool.getResolvedClass(ConstantPool.java:788)
at com.sun.squawk.translator.ci.ClassFileLoader.loadInterfaces(ClassFileLoader.java:437)
at com.sun.squawk.translator.ci.ClassFileLoader.load(ClassFileLoader.java:210)
at com.sun.squawk.translator.ci.ClassFileLoader.load(ClassFileLoader.java:140)
at com.sun.squawk.translator.Translator$1.run(Translator.java:664)
at com.sun.squawk.util.ComputationTimer.execute(ComputationTimer.java:125)
at com.sun.squawk.util.ComputationTimer.time(ComputationTimer.java:159)
at com.sun.squawk.translator.Translator.load(Translator.java:662)
at com.sun.squawk.translator.Translator.load(Translator.java:356)
at com.sun.squawk.translator.Translator.computeClosure(Translator.java:681)
at com.sun.squawk.translator.Translator.close(Translator.java:428)
at com.sun.squawk.Romizer.translate(Romizer.java:718)
at com.sun.squawk.Romizer.access$000(Romizer.java:44)
at com.sun.squawk.Romizer$1.run(Romizer.java:380)
at com.sun.squawk.util.ComputationTimer.execute(ComputationTimer.java:127)
at com.sun.squawk.util.ComputationTimer.time(ComputationTimer.java:177)
at com.sun.squawk.Romizer.run(Romizer.java:378)
at com.sun.squawk.Romizer.main(Romizer.java:338)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.squawk.romizer.EmbeddedSquawkClassLoader.runMain(EmbeddedSquawkClassLoader.java:49)
at com.sun.spot.solarium.spotworld.participants.EmulatedSunSPOT.doSuite(EmulatedSunSPOT.java:751)
at com.sun.spot.solarium.spotworld.participants.EmulatedSunSPOT.doDeploy(EmulatedSunSPOT.java:859)
at com.sun.spot.solarium.spotworld.participants.EmulatedSunSPOT$5.run(EmulatedSunSPOT.java:487)
at com.sun.spot.solarium.spotworld.common.UICommand.runWrapper(UICommand.java:173)
at com.sun.spot.solarium.spotworld.participants.CommandQueue$1.run(CommandQueue.java:46)
NoClassDefFoundError: javax.microedition.lcdui.CommandListener
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
NoClassDefFoundError: com.agentfactory.cldc.MIDletRunnable
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.DiscoverySpotServer
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
**ClassFormatError: com.agentfactory.cldc.mts.p2pspot.DiscoverySpotServer$SpotDiscoveryTask**
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
**ClassFormatError: com.agentfactory.cldc.mts.p2pspot.DiscoverySpotServer$SpotDiscoveryThread**
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.DualIDActuator
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.DualInform
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.DualMTSPerceptor
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.DualRequest
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
**ClassFormatError: com.agentfactory.cldc.mts.p2pspot.HelloPacketException**
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.LookupWhitePage
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.LookupYellowPage
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
**ClassFormatError: com.agentfactory.cldc.mts.p2pspot.P2PConstant**
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.P2PInform
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.P2PRequest
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.P2PSpotTask
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.PeerToPeerSpotMTS
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.PeerToPeerSpotMTS$1
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.PeerToPeerSpotMTS$2
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.PeerToPeerSpotMTS$PeerThread
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.RegisterYellowPages
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.RegisterYellowPages$RegTask
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
Romizer processed 74 classes and generated these files:
C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00.sym
C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00.suite
C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00.suite.metadata
C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00.suite.api
Uncaught exception in Thread.run():
on thread AliceSpot.AliceSpotClientlet - main
** java.lang.IllegalArgumentException: MIDlet class specified, AliceSpot.AliceSpotClientlet, was not found**
at java.lang.Throwable.<init>(bci=16)
at java.lang.Throwable.<init>(bci=5)
at java.lang.Exception.<init>(bci=6)
at java.lang.RuntimeException.<init>(bci=6)
at java.lang.IllegalArgumentException.<init>(bci=6)
at com.sun.squawk.imp.MIDletMainWrapper.main(bci=272)
in virtual method #95 of com.sun.squawk.Klass(bci=32)
at com.sun.squawk.Isolate.run(bci=414)
at java.lang.Thread.run(bci=17)
in virtual method #47 of com.sun.squawk.VMThread(bci=42)
in static method #3 of com.sun.squawk.VM(bci=6)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The main problem regarding the deployment of my application is that I have written a few classes and packaged it into a jar file and I ran the application .The major issue is **ClassFormatError**(I don't understand what this error signifies) and **IllegalArgumentException** which at this context signifies that the particular Midlet was not found.although i verified the Manifest.MF file and found it correct for the packaging structure.If i remove all the files which i wrote and packaged it runs perfectly.
As i highlighted before this problem was mentioned in the forum and the solution provided was ant jar-app which did not resolve the issue
Hope i was clear this time
Regards
Sree
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sorry for late reply.But i tried your suggestion and I rectified that error.The following are my doubts.
After I write the DiscoverySpotServer and its associated white and yellow page services How should I jar the file.Should I do it in the normal way?Any specific way of Manifest.MF file is required
I Packaged my complete Classes into a jar file `jar cvf classes.jar com/`
Then i deployed in the Sun SPOT /Solarium.I got ClassFormatError
How should i add the jar file to my application.Please help me in this regard
Thanks
Sree Aurovindh
Here is the stack trace of the application
-do-find-spots:
-do-run-solarium:
Java Runtime Environment version: 1.6.0_07
No basestation available!
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.LookupPlatform
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
NoClassDefFoundError: AliceSpot.AliceSpotClientAgentPlatform
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
NoClassDefFoundError: AliceSpot.AliceSpotClientlet
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.DiscoverySpotServer
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.DiscoverySpotServer$SpotDiscoveryTask
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.DiscoverySpotServer$SpotDiscoveryThread
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.DualIDActuator
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.DualInform
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.DualMTSPerceptor
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.DualRequest
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.HelloPacketException
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.LookupWhitePage
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.LookupYellowPage
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.P2PConstant
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.P2PInform
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.P2PRequest
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.P2PSpotTask
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.PeerToPeerSpotMTS
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.PeerToPeerSpotMTS$1
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.PeerToPeerSpotMTS$2
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.PeerToPeerSpotMTS$PeerThread
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.RegisterYellowPages
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.RegisterYellowPages$RegTask
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
Romizer processed 74 classes and generated these files:
C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00.sym
C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00.suite
C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00.suite.metadata
C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00.suite.api
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
As per your instructions i have packaged the Jar file.But i still get the same error while deploying the file.I am not sure if there is any other cause of this error.
Further When i preverify the classes i get the following errors.However using ant jar-app leads to build sucessful.Please help me regarding how to fix the ClassFormatError
Thanks and Regards
Sree aurovindh.V
E:\lib\afmeno>preverify -d detn -classpath C:\SunSPOT\sdk\lib\squawk_device.jar;
E:\lib\afme_verified_3.jar:detn src
Error preverifying class com.agentfactory.cldc.mts.p2pspot.DiscoverySpotServer$S
potDiscoveryTask
VERIFIER ERROR com/agentfactory/cldc/mts/p2pspot/DiscoverySpotServer$SpotDis
coveryTask.<init>(Lcom/agentfactory/cldc/mts/p2pspot/DiscoverySpotServer;Lcom/su
n/spot/io/j2me/radiostream/RadiostreamConnection;)V:
Expecting to find object/array on stack
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Further the package name is com.agentfactory.cldc.mts.p2pspot and I packaged the classes by
jar -cvf SpotServer.jar .
i was in E:/projects/AliceSpotClient/Build>
Where the build contains com folder and its contents.Hope I have packaged it correctly.In case of any errors please help me to correct the same
Thanks and Regards
Sree aurovindh
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Is it still lookfing for the CommandListener of lcdui. If so, you need to find out where it is referenced. Additionally, make sure that you are using the nointer AFME jar files.
C.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
No the code does not look for CommandListener.I have included Nointer AFME jar files.and it does not show that now..For the past 15 days i couldn't figure out what "ClassFormatError' refers to.When i refereed to java documentation it shows that it is thrown when the Java Virtual Machine attempts to read a class file and determines that the file is malformed or otherwise cannot be interpreted as a class file.
I couldn't figure out where exactly the problem lies .I tried all possible combinations but it results are not supportive.
For each and every class that i have written this error is thrown.I don
t understand why it couldn't understand why the class which could compile and build sucessfully ..including the ant jar-app which shows build sucessful could not run.Please help me in this regard
Thanks
Sree Aurovindh.V
I have added the stack trace below..
-do-run-solarium:
Java Runtime Environment version: 1.6.0_07
No basestation available!
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.LookupPlatform
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
NoClassDefFoundError: AliceSpot.AliceSpotClientAgentPlatform
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
NoClassDefFoundError: AliceSpot.AliceSpotClientlet
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.DiscoverySpotServer
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.PeerToPeerSpotMTS$1
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.PeerToPeerSpotMTS$2
[translating suite C:\Users\SREEAU~1\AppData\Local
`\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.PeerToPeerSpotMTS$PeerThread
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.RegisterYellowPages
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.RegisterYellowPages$RegTask
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have a doubt regarding compilation and packaging of classes.Is the below process described for it is correct or is there any other thing that i need to do.
1) I wrote Java files which use classes(or has dependencies) in afme_nointer3_3.jar. And I add the afme_nointer3_3.jar to its classpath and compile the file.
2) Then i package the obtained class files and make a jar file
3) I have added the jar file to the classpath of my Sun SPOT sample applicaiton (AliceSpotClient) and add
user.classpath and utility.jars to the above compiled jar file and the afme_nointer3_3.jar
4.Then i build the files and also perform ant jar-app
5.Then i deploy the Midlet Bundle to the Sun Spot.
My doubt is that when we write the java files which has dependencies on afme_nointer3_3.jar other than adding it to the classpath do we need to perform any other additional steps.
Is it necessary that i have to unjar all files in afme_nointer3_3.jar and add it to the src files and compile and then package it…
Please help me
Thanks and Regards
Sree aurovindh.V
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Does the application run in the emulator? You may need to include the migration_nointer3_3.jar Jar file as well. You will also need radiomig3_3.jar and radiogram3_3.jar.
Yes, try putting all the classes into a single Jar. In terms of the process, just follow the same process you did for creating the initial AFME Sun SPOT application.
hope this helps,
Conor
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for your reply.I have a few more doubts regarding the instructions that you have mentioned in the above post.
1) I have written a package named com.agentfactory.cldc.p2pspotmts which resembles com.agentfactory.cldc.p2pmts package except for the radiogram and radiostream connectivity instead of socket connection
2) Further i have initally made a handshake between spots using Radiogram and then performed white and yellow page services using radiostream.
3) I have removed the factory classes which supports migration in between SPOTs temporarily as i thought that this could be taken care at a later stage
4) Do i need to package the migration3_3.jar and radiomigration3_3 jar files ( that is I would like to know if they have any dependencies for p2pmts package)
Thanks
Sree aurovindh.V
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
sounds good. no, p2pmts does not have dependencies on them. if you are using p2pmts, you will need to make sure that all of the referenced classes are supported on the Sun SPOTs, as it was not designed for them.
C.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Mr. Conor Muldoon,
I have tried to execute the HelloWorld example following the AFME Programmers Guide. What i did is listed below:
1. I have downloaded the related jar files from "http://sourceforge.net/projects/agentfactory". (afme3_3.jar, comp3_3.jar, etc.).
2. I have added these Jar files to the classpath through the use of the CLASSPATH environment variable.
3. I have created a new folder called "helloworld". Using a text editor, i have created "agent platform script" and "agent design file " and saved them as "HelloWorld.af" and "HelloAgent.sh", respectively. Then i have placed them in the "helloworld" folder.
4. Using a text editor, i have created the actuator file named "HelloAct.java" and saved it in the "helloworld" folder.
5. I have compiled the "HelloAct.java" from the command prompt.
6. I have executed the "java com.agentfactory.cldc.compiler.Main helloworld/HelloWorld.af" command and i have obtained "HelloWorldlet.java" and "HelloWorldAgentPlatform.java" files.
At this point, i am confused. I dont know how to run the Midlet.
Would you please help me. Thanks a lot.
Sincerely,
Hakan.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You will need to use the Sun Wireless toolkit to execute the code. Once the MIDlet has been generated using the AFME compiler and then compiled, run it using the toolkit emulator.
Hope this helps,
Conor
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have been trying to deploy my Jar file in the Sun SPOT for Peer to Peer Communication.These were the things i did.
1. I packaged my Class files into a jar file.Should i write my own Manifest File (Manifest.MF) in order for it to successfully deploy on SPOT?.When i jar my files it creates an Manifest file with Just minimal information
2. When I "Deploy the Midlet Bundle" I get ClassFormatError for all the classes i have packaged in the Jar file.I couldn't figure out what the error this pertains to.Please help me regarding this.
3. Further it shows that the" Midlet class specified was not found".However I verified it in the Midlet 1: in Manifest.MF which was exactly correct.This problem was already specified in a forum in Sunspot https://www.sunspotworld.com/forums/viewtopic.php?f=25&t=2327
and the solution provided was to use ant jar-app which produced "Build Sucessful" However i face the same problem on deployment which did not resolve the issue
Here is the stack trace which i Obtained
Thanks
Sree aurovindh
-do-run-solarium:
Java Runtime Environment version: 1.6.0_07
No basestation available!
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.LookupPlatform
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
NoClassDefFoundError: AliceSpot.AliceSpotClientAgentPlatform
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
NoClassDefFoundError: AliceSpot.AliceSpotClientlet
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
IO error while loading: class javax.microedition.lcdui.CommandListener
javax.microedition.io.ConnectionNotFoundException: javax/microedition/lcdui/CommandListener.class
at com.sun.squawk.io.j2me.classpath.Protocol.openInputStream(Protocol.java:162)
at com.sun.squawk.translator.ci.ClassFileLoader.load(ClassFileLoader.java:139)
at com.sun.squawk.translator.Translator$1.run(Translator.java:664)
at com.sun.squawk.util.ComputationTimer.execute(ComputationTimer.java:125)
at com.sun.squawk.util.ComputationTimer.time(ComputationTimer.java:159)
at com.sun.squawk.translator.Translator.load(Translator.java:662)
at com.sun.squawk.translator.Translator.load(Translator.java:356)
at com.sun.squawk.translator.ci.ConstantPool.getResolvedClass(ConstantPool.java:788)
at com.sun.squawk.translator.ci.ClassFileLoader.loadInterfaces(ClassFileLoader.java:437)
at com.sun.squawk.translator.ci.ClassFileLoader.load(ClassFileLoader.java:210)
at com.sun.squawk.translator.ci.ClassFileLoader.load(ClassFileLoader.java:140)
at com.sun.squawk.translator.Translator$1.run(Translator.java:664)
at com.sun.squawk.util.ComputationTimer.execute(ComputationTimer.java:125)
at com.sun.squawk.util.ComputationTimer.time(ComputationTimer.java:159)
at com.sun.squawk.translator.Translator.load(Translator.java:662)
at com.sun.squawk.translator.Translator.load(Translator.java:356)
at com.sun.squawk.translator.Translator.computeClosure(Translator.java:681)
at com.sun.squawk.translator.Translator.close(Translator.java:428)
at com.sun.squawk.Romizer.translate(Romizer.java:718)
at com.sun.squawk.Romizer.access$000(Romizer.java:44)
at com.sun.squawk.Romizer$1.run(Romizer.java:380)
at com.sun.squawk.util.ComputationTimer.execute(ComputationTimer.java:127)
at com.sun.squawk.util.ComputationTimer.time(ComputationTimer.java:177)
at com.sun.squawk.Romizer.run(Romizer.java:378)
at com.sun.squawk.Romizer.main(Romizer.java:338)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.squawk.romizer.EmbeddedSquawkClassLoader.runMain(EmbeddedSquawkClassLoader.java:49)
at com.sun.spot.solarium.spotworld.participants.EmulatedSunSPOT.doSuite(EmulatedSunSPOT.java:751)
at com.sun.spot.solarium.spotworld.participants.EmulatedSunSPOT.doDeploy(EmulatedSunSPOT.java:859)
at com.sun.spot.solarium.spotworld.participants.EmulatedSunSPOT$5.run(EmulatedSunSPOT.java:487)
at com.sun.spot.solarium.spotworld.common.UICommand.runWrapper(UICommand.java:173)
at com.sun.spot.solarium.spotworld.participants.CommandQueue$1.run(CommandQueue.java:46)
NoClassDefFoundError: javax.microedition.lcdui.CommandListener
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
NoClassDefFoundError: com.agentfactory.cldc.MIDletRunnable
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.DiscoverySpotServer
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
**ClassFormatError: com.agentfactory.cldc.mts.p2pspot.DiscoverySpotServer$SpotDiscoveryTask**
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
**ClassFormatError: com.agentfactory.cldc.mts.p2pspot.DiscoverySpotServer$SpotDiscoveryThread**
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.DualIDActuator
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.DualInform
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.DualMTSPerceptor
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.DualRequest
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
**ClassFormatError: com.agentfactory.cldc.mts.p2pspot.HelloPacketException**
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.LookupWhitePage
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.LookupYellowPage
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
**ClassFormatError: com.agentfactory.cldc.mts.p2pspot.P2PConstant**
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.P2PInform
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.P2PRequest
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.P2PSpotTask
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.PeerToPeerSpotMTS
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.PeerToPeerSpotMTS$1
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.PeerToPeerSpotMTS$2
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.PeerToPeerSpotMTS$PeerThread
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.RegisterYellowPages
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.RegisterYellowPages$RegTask
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
Romizer processed 74 classes and generated these files:
C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00.sym
C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00.suite
C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00.suite.metadata
C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00.suite.api
Uncaught exception in Thread.run():
on thread AliceSpot.AliceSpotClientlet - main
** java.lang.IllegalArgumentException: MIDlet class specified, AliceSpot.AliceSpotClientlet, was not found**
at java.lang.Throwable.<init>(bci=16)
at java.lang.Throwable.<init>(bci=5)
at java.lang.Exception.<init>(bci=6)
at java.lang.RuntimeException.<init>(bci=6)
at java.lang.IllegalArgumentException.<init>(bci=6)
at com.sun.squawk.imp.MIDletMainWrapper.main(bci=272)
in virtual method #95 of com.sun.squawk.Klass(bci=32)
at com.sun.squawk.Isolate.run(bci=414)
at java.lang.Thread.run(bci=17)
in virtual method #47 of com.sun.squawk.VMThread(bci=42)
in static method #3 of com.sun.squawk.VM(bci=6)
hi,
Make sure that you are using afme_nointer3_3.jar and migration_nointer3_3.jar. The problem is caused because javax.microedition.lcdui.CommandListener is not supported on the Sun SPOT. Additionally, take a look at the following thread: https://sourceforge.net/projects/agentfactory/forums/forum/861621/topic/3401082
hope this helps
Dear Dr.Conor,
The main problem regarding the deployment of my application is that I have written a few classes and packaged it into a jar file and I ran the application .The major issue is **ClassFormatError**(I don't understand what this error signifies) and **IllegalArgumentException** which at this context signifies that the particular Midlet was not found.although i verified the Manifest.MF file and found it correct for the packaging structure.If i remove all the files which i wrote and packaged it runs perfectly.
As i highlighted before this problem was mentioned in the forum and the solution provided was ant jar-app which did not resolve the issue
Hope i was clear this time
Regards
Sree
Hi Sree,
From you previous post, the system seems to be getting the following error: error while loading: class javax.microedition.lcdui.CommandListener
Your code must be trying to import or use this class somewhere.
C.
Sorry for late reply.But i tried your suggestion and I rectified that error.The following are my doubts.
After I write the DiscoverySpotServer and its associated white and yellow page services How should I jar the file.Should I do it in the normal way?Any specific way of Manifest.MF file is required
I Packaged my complete Classes into a jar file `jar cvf classes.jar com/`
Then i deployed in the Sun SPOT /Solarium.I got ClassFormatError
How should i add the jar file to my application.Please help me in this regard
Thanks
Sree Aurovindh
Here is the stack trace of the application
-do-find-spots:
-do-run-solarium:
Java Runtime Environment version: 1.6.0_07
No basestation available!
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.LookupPlatform
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
NoClassDefFoundError: AliceSpot.AliceSpotClientAgentPlatform
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
NoClassDefFoundError: AliceSpot.AliceSpotClientlet
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.DiscoverySpotServer
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.DiscoverySpotServer$SpotDiscoveryTask
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.DiscoverySpotServer$SpotDiscoveryThread
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.DualIDActuator
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.DualInform
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.DualMTSPerceptor
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.DualRequest
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.HelloPacketException
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.LookupWhitePage
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.LookupYellowPage
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.P2PConstant
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.P2PInform
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.P2PRequest
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.P2PSpotTask
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.PeerToPeerSpotMTS
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.PeerToPeerSpotMTS$1
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.PeerToPeerSpotMTS$2
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.PeerToPeerSpotMTS$PeerThread
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.RegisterYellowPages
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.RegisterYellowPages$RegTask
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
Romizer processed 74 classes and generated these files:
C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00.sym
C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00.suite
C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00.suite.metadata
C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00.suite.api
Hi Sree,
What is the name of the package that your classes are in? If you are in the root of the source folder, try issueing the following command:
jar -cvf myclasses.jar .
That is, use . rather than /com
Dear Dr.Conor,
As per your instructions i have packaged the Jar file.But i still get the same error while deploying the file.I am not sure if there is any other cause of this error.
Further When i preverify the classes i get the following errors.However using ant jar-app leads to build sucessful.Please help me regarding how to fix the ClassFormatError
Thanks and Regards
Sree aurovindh.V
E:\lib\afmeno>preverify -d detn -classpath C:\SunSPOT\sdk\lib\squawk_device.jar;
E:\lib\afme_verified_3.jar:detn src
Error preverifying class com.agentfactory.cldc.mts.p2pspot.DiscoverySpotServer$S
potDiscoveryTask
VERIFIER ERROR com/agentfactory/cldc/mts/p2pspot/DiscoverySpotServer$SpotDis
coveryTask.<init>(Lcom/agentfactory/cldc/mts/p2pspot/DiscoverySpotServer;Lcom/su
n/spot/io/j2me/radiostream/RadiostreamConnection;)V:
Expecting to find object/array on stack
Further the package name is com.agentfactory.cldc.mts.p2pspot and I packaged the classes by
jar -cvf SpotServer.jar .
i was in E:/projects/AliceSpotClient/Build>
Where the build contains com folder and its contents.Hope I have packaged it correctly.In case of any errors please help me to correct the same
Thanks and Regards
Sree aurovindh
hi Sree,
Is it still lookfing for the CommandListener of lcdui. If so, you need to find out where it is referenced. Additionally, make sure that you are using the nointer AFME jar files.
C.
Dear Dr.Conor ,
No the code does not look for CommandListener.I have included Nointer AFME jar files.and it does not show that now..For the past 15 days i couldn't figure out what "ClassFormatError' refers to.When i refereed to java documentation it shows that it is thrown when the Java Virtual Machine attempts to read a class file and determines that the file is malformed or otherwise cannot be interpreted as a class file.
I couldn't figure out where exactly the problem lies .I tried all possible combinations but it results are not supportive.
For each and every class that i have written this error is thrown.I don
t understand why it couldn't understand why the class which could compile and build sucessfully ..including the ant jar-app which shows build sucessful could not run.Please help me in this regard
Thanks
Sree Aurovindh.V
I have added the stack trace below..
-do-run-solarium:
Java Runtime Environment version: 1.6.0_07
No basestation available!
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.LookupPlatform
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
NoClassDefFoundError: AliceSpot.AliceSpotClientAgentPlatform
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
NoClassDefFoundError: AliceSpot.AliceSpotClientlet
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.DiscoverySpotServer
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.DiscoverySpotServer$SpotDiscoveryTask
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.DiscoverySpotServer$SpotDiscoveryThread
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.DualIDActuator
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.DualInform
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.DualMTSPerceptor
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.DualRequest
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.HelloPacketException
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.LookupWhitePage
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.LookupYellowPage
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.P2PConstant
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.P2PInform
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.P2PRequest
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.P2PSpotTask
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.PeerToPeerSpotMTS
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.PeerToPeerSpotMTS$1
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.PeerToPeerSpotMTS$2
[translating suite C:\Users\SREEAU~1\AppData\Local
`\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.PeerToPeerSpotMTS$PeerThread
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.RegisterYellowPages
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
ClassFormatError: com.agentfactory.cldc.mts.p2pspot.RegisterYellowPages$RegTask
[translating suite C:\Users\SREEAU~1\AppData\Local\Temp\AliceSpotClient_1.0.00 …]
Dear Dr.Conor,
I have a doubt regarding compilation and packaging of classes.Is the below process described for it is correct or is there any other thing that i need to do.
1) I wrote Java files which use classes(or has dependencies) in afme_nointer3_3.jar. And I add the afme_nointer3_3.jar to its classpath and compile the file.
2) Then i package the obtained class files and make a jar file
3) I have added the jar file to the classpath of my Sun SPOT sample applicaiton (AliceSpotClient) and add
user.classpath and utility.jars to the above compiled jar file and the afme_nointer3_3.jar
4.Then i build the files and also perform ant jar-app
5.Then i deploy the Midlet Bundle to the Sun Spot.
My doubt is that when we write the java files which has dependencies on afme_nointer3_3.jar other than adding it to the classpath do we need to perform any other additional steps.
Is it necessary that i have to unjar all files in afme_nointer3_3.jar and add it to the src files and compile and then package it…
Please help me
Thanks and Regards
Sree aurovindh.V
Hi Sree,
Does the application run in the emulator? You may need to include the migration_nointer3_3.jar Jar file as well. You will also need radiomig3_3.jar and radiogram3_3.jar.
Yes, try putting all the classes into a single Jar. In terms of the process, just follow the same process you did for creating the initial AFME Sun SPOT application.
hope this helps,
Conor
Additionally, take a look at the following thread:
https://sourceforge.net/projects/agentfactory/forums/forum/861621/topic/3401082
Dear Dr.Conor ,
Thanks for your reply.I have a few more doubts regarding the instructions that you have mentioned in the above post.
1) I have written a package named com.agentfactory.cldc.p2pspotmts which resembles com.agentfactory.cldc.p2pmts package except for the radiogram and radiostream connectivity instead of socket connection
2) Further i have initally made a handshake between spots using Radiogram and then performed white and yellow page services using radiostream.
3) I have removed the factory classes which supports migration in between SPOTs temporarily as i thought that this could be taken care at a later stage
4) Do i need to package the migration3_3.jar and radiomigration3_3 jar files ( that is I would like to know if they have any dependencies for p2pmts package)
Thanks
Sree aurovindh.V
Hi Sree,
sounds good. no, p2pmts does not have dependencies on them. if you are using p2pmts, you will need to make sure that all of the referenced classes are supported on the Sun SPOTs, as it was not designed for them.
C.
Hi Mr. Conor Muldoon,
I have tried to execute the HelloWorld example following the AFME Programmers Guide. What i did is listed below:
1. I have downloaded the related jar files from "http://sourceforge.net/projects/agentfactory". (afme3_3.jar, comp3_3.jar, etc.).
2. I have added these Jar files to the classpath through the use of the CLASSPATH environment variable.
3. I have created a new folder called "helloworld". Using a text editor, i have created "agent platform script" and "agent design file " and saved them as "HelloWorld.af" and "HelloAgent.sh", respectively. Then i have placed them in the "helloworld" folder.
4. Using a text editor, i have created the actuator file named "HelloAct.java" and saved it in the "helloworld" folder.
5. I have compiled the "HelloAct.java" from the command prompt.
6. I have executed the "java com.agentfactory.cldc.compiler.Main helloworld/HelloWorld.af" command and i have obtained "HelloWorldlet.java" and "HelloWorldAgentPlatform.java" files.
At this point, i am confused. I dont know how to run the Midlet.
Would you please help me. Thanks a lot.
Sincerely,
Hakan.
Hi Hakan,
You will need to use the Sun Wireless toolkit to execute the code. Once the MIDlet has been generated using the AFME compiler and then compiled, run it using the toolkit emulator.
Hope this helps,
Conor