> An IDE doesnt load a class...
I know, I specified the icqlib.jar in my CLASSPATH. This is the debug output, but the message is still not sent / not arrived:
Received 1 - 3
--> JOscarLib.Packet.Received.ServerReady1_3 loaded
Received 1 - 24
--> JOscarLib.Packet.Received.ServerFamilies1_24 loaded
Received 1 - 19
--> JOscarLib.Packet.Received.Motd1_19 loaded
Received 1 - 7
--> JOscarLib.Packet.Received.RateReply1_7 loaded
Received 2 - 3
--> JOscarLib.Packet.Received.LocationRightsReply2_3 loaded
Received 1 - 15
--> JOscarLib.Packet.Received.OnlineInfoResp1_15 loaded
Received 3 - 3
--> JOscarLib.Packet.Received.BuddyListRightsReply3_3 loaded
Received 4 - 5
--> JOscarLib.Packet.Received.ICBMParametersReply4_5 loaded
Received 9 - 3
--> JOscarLib.Packet.Received.BosRightReply9_3 loaded
Message sent
Received 1 - 15
--> JOscarLib.Packet.Received.OnlineInfoResp1_15 loaded
Received 11 - 2
Report interval : 1200h
--> JOscarLib.Packet.Received.MinReportInterval11_2 loaded
Received 4 - 7
--> JOscarLib.Packet.Received.IncomingMessage4_7 loaded
Received 4 - 12
--> JOscarLib.Packet.Received.MessageAck__4_12 loaded
Any ideas?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Please could you explain what is the procedure you followed ?
The current lib implementation responds to 1-3 with ClientFamilies (1-23) and the server should reply with 1-24.
9-3 is BosRightReply which is the server answer to BosRightsRequest (9-2).
So, it seems your log is truncated or there is a serious problem in messages sequence. So i need to know precisely how you obtain this log.
Here is an exemple of a healthy log :
Received 1 - 3
--> JOscarLib.Packet.Received.ServerReady1_3 loaded
Received 1 - 24
--> JOscarLib.Packet.Received.ServerFamilies1_24 loaded
Received 1 - 19
--> JOscarLib.Packet.Received.Motd1_19 loaded
Received 1 - 7
--> JOscarLib.Packet.Received.RateReply1_7 loaded
Received 2 - 3
--> JOscarLib.Packet.Received.LocationRightsReply2_3 loaded
Received 1 - 15
--> JOscarLib.Packet.Received.OnlineInfoResp1_15 loaded
Received 3 - 3
--> JOscarLib.Packet.Received.BuddyListRightsReply3_3 loaded
Received 4 - 5
--> JOscarLib.Packet.Received.ICBMParametersReply4_5 loaded
Received 9 - 3
--> JOscarLib.Packet.Received.BosRightReply__9_3 loaded
...
BTW, are the messages recieved correctly marshalled ? You have to correctly initialize the JarClassLoader, here is an exemple :
connexion = new OscarConnection(server, port, uin, pass);
connexion.getPacketAnalyser().getJarClassLoader().setPath("./dist/lib/JOscarLib-0.4alpha.jar");
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I tried to run the docs/samples/SendMessage.java.
I did not use getJarClassLoader(), because i expected Eclipse would load the right class from current workspace.
I will do more tests in the next week.
Thank you in advance!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
JarClassLoader is a custom ClassLoader that loads the appropriate class for an incoming message.
An IDE doesnt load a class. It's just a source-file editor with some added features. What loads class when you execute a java application is one of the ClassLoaders of the JRE and of the java application that's running.
The JRE ClassLoaders can only load classes that are excplicitely named and that can be found in the CLASSPATH or in built-in named folders (like rt.jar and lib/ext/ of the JAVA_HOME.
Here, message handler classes are not explicitely named and are resolved only with the "__X_Y" part of their name. That's why the JarClassLoader is required.
The message handler classes are to be located in a jar file that you specify to the JarClassLoader through "setPath(String)" (the path is relative to te working dir).
By default, the OscarPacketAnalyser sets the path to "JOscarLib.jar".
The SampleSendMessage file is not well designed. A warning sould be at least written in the sources or the path should be set by default to a location where a jar file should be expected...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello Boys, I got the message code 9 - 3 back from ICQ server.
The message is obviously not sent. Do you have an idea where the problem is?
Debug output:
Received 1 - 3
Received 9 - 3
> An IDE doesnt load a class...
I know, I specified the icqlib.jar in my CLASSPATH. This is the debug output, but the message is still not sent / not arrived:
Received 1 - 3
--> JOscarLib.Packet.Received.ServerReady1_3 loaded
Received 1 - 24
--> JOscarLib.Packet.Received.ServerFamilies1_24 loaded
Received 1 - 19
--> JOscarLib.Packet.Received.Motd1_19 loaded
Received 1 - 7
--> JOscarLib.Packet.Received.RateReply1_7 loaded
Received 2 - 3
--> JOscarLib.Packet.Received.LocationRightsReply2_3 loaded
Received 1 - 15
--> JOscarLib.Packet.Received.OnlineInfoResp1_15 loaded
Received 3 - 3
--> JOscarLib.Packet.Received.BuddyListRightsReply3_3 loaded
Received 4 - 5
--> JOscarLib.Packet.Received.ICBMParametersReply4_5 loaded
Received 9 - 3
--> JOscarLib.Packet.Received.BosRightReply9_3 loaded
Message sent
Received 1 - 15
--> JOscarLib.Packet.Received.OnlineInfoResp1_15 loaded
Received 11 - 2
Report interval : 1200h
--> JOscarLib.Packet.Received.MinReportInterval11_2 loaded
Received 4 - 7
--> JOscarLib.Packet.Received.IncomingMessage4_7 loaded
Received 4 - 12
--> JOscarLib.Packet.Received.MessageAck__4_12 loaded
Any ideas?
You're welcome ! ;o)
Please could you explain what is the procedure you followed ?
The current lib implementation responds to 1-3 with ClientFamilies (1-23) and the server should reply with 1-24.
9-3 is BosRightReply which is the server answer to BosRightsRequest (9-2).
So, it seems your log is truncated or there is a serious problem in messages sequence. So i need to know precisely how you obtain this log.
Here is an exemple of a healthy log :
Received 1 - 3
--> JOscarLib.Packet.Received.ServerReady1_3 loaded
Received 1 - 24
--> JOscarLib.Packet.Received.ServerFamilies1_24 loaded
Received 1 - 19
--> JOscarLib.Packet.Received.Motd1_19 loaded
Received 1 - 7
--> JOscarLib.Packet.Received.RateReply1_7 loaded
Received 2 - 3
--> JOscarLib.Packet.Received.LocationRightsReply2_3 loaded
Received 1 - 15
--> JOscarLib.Packet.Received.OnlineInfoResp1_15 loaded
Received 3 - 3
--> JOscarLib.Packet.Received.BuddyListRightsReply3_3 loaded
Received 4 - 5
--> JOscarLib.Packet.Received.ICBMParametersReply4_5 loaded
Received 9 - 3
--> JOscarLib.Packet.Received.BosRightReply__9_3 loaded
...
BTW, are the messages recieved correctly marshalled ? You have to correctly initialize the JarClassLoader, here is an exemple :
connexion = new OscarConnection(server, port, uin, pass);
connexion.getPacketAnalyser().getJarClassLoader().setPath("./dist/lib/JOscarLib-0.4alpha.jar");
And alos, please call :
connexion.getPacketAnalyser().setDebug(true);
I tried to run the docs/samples/SendMessage.java.
I did not use getJarClassLoader(), because i expected Eclipse would load the right class from current workspace.
I will do more tests in the next week.
Thank you in advance!
JarClassLoader is a custom ClassLoader that loads the appropriate class for an incoming message.
An IDE doesnt load a class. It's just a source-file editor with some added features. What loads class when you execute a java application is one of the ClassLoaders of the JRE and of the java application that's running.
The JRE ClassLoaders can only load classes that are excplicitely named and that can be found in the CLASSPATH or in built-in named folders (like rt.jar and lib/ext/ of the JAVA_HOME.
Here, message handler classes are not explicitely named and are resolved only with the "__X_Y" part of their name. That's why the JarClassLoader is required.
The message handler classes are to be located in a jar file that you specify to the JarClassLoader through "setPath(String)" (the path is relative to te working dir).
By default, the OscarPacketAnalyser sets the path to "JOscarLib.jar".
The SampleSendMessage file is not well designed. A warning sould be at least written in the sources or the path should be set by default to a location where a jar file should be expected...
It was my fault - it works now.
Please close the thread and thank you for your help.
Nice job dude :)