Warning: MySQL server has gone away query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\";s:945:\"MySQL server has gone away\nquery: UPDATE cache_mollom SET data = 'a:9:{s:10:\\"session_id\\";s:18:\\"10080157f9ab996bad\\";s:7:\\"form_id\\";s:12:\\"comment_form\\";s:16:\\"require_analysis\\";b:0;s:15:\\"require_captcha\\";b:1;s:14:\\"passed_captcha\\";b:0;s:6:\\"entity\\";s:7:\\"comment\\";s:14:\\"enabled_fields\\";a:0:{}s:7:\\"mapping\\";a:5:{s:7:\\"post_id\\";s:3:\\"cid\\";s:10:\\"post_title\\";s:7:\\"subject in /home/during/public_html/rahulsingla.com/includes/database.mysql.inc on line 128

Warning: MySQL server has gone away query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\";s:121:\"MySQL server has gone away\nquery: SELECT info FROM system WHERE type = 'theme' AND name = 'marinelli'\";s:5:\"%file\";s:69:\"/home/during/public_html/rahulsingla.com/modules/system/system.module\";s:5:\"%line\";i:965;}', 3, '', 'http://www.rahulsingla.com/blog/sms-application-jme-application-sending-smses', '', '38.107.191.114', 1280637586) in /home/during/public_html/rahulsingla.com/includes/database.mysql.inc on line 128

Warning: MySQL server has gone away query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:7:\"warning\";s:8:\"%message\";s:97:\"array_map() [<a href=\'function.array-map\'>function.array-map</a>]: Argument #2 should be an array\";s:5:\"%file\";s:69:\"/home/during/public_html/rahulsingla.com/modules/system/system.module\";s:5:\"%line\";i:966;}', 3, '', 'http://www.rahulsingla.com/blog/sms-application-jme-application-sending-smses', '', '38.107.191.114', 1280637586) in /home/during/public_html/rahulsingla.com/includes/database.mysql.inc on line 128

Warning: MySQL server has gone away query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:7:\"warning\";s:8:\"%message\";s:107:\"array_keys() [<a href=\'function.array-keys\'>function.array-keys</a>]: The first argument should be an array\";s:5:\"%file\";s:59:\"/home/during/public_html/rahulsingla.com/includes/theme.inc\";s:5:\"%line\";i:1771;}', 3, '', 'http://www.rahulsingla.com/blog/sms-application-jme-application-sending-smses', '', '38.107.191.114', 1280637586) in /home/during/public_html/rahulsingla.com/includes/database.mysql.inc on line 128

Warning: MySQL server has gone away query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:7:\"warning\";s:8:\"%message\";s:39:\"Invalid argument supplied for foreach()\";s:5:\"%file\";s:59:\"/home/during/public_html/rahulsingla.com/includes/theme.inc\";s:5:\"%line\";i:1771;}', 3, '', 'http://www.rahulsingla.com/blog/sms-application-jme-application-sending-smses', '', '38.107.191.114', 1280637586) in /home/during/public_html/rahulsingla.com/includes/database.mysql.inc on line 128

Warning: MySQL server has gone away query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\";s:118:\"MySQL server has gone away\nquery: SELECT * FROM menu_router WHERE tab_root = &#039;node/%&#039; ORDER BY weight, title\";s:5:\"%file\";s:58:\"/home/during/public_html/rahulsingla.com/includes/menu.inc\";s:5:\"%line\";i:1324;}', 3, '', 'http://www.rahulsingla.com/blog/sms-application-jme-application-sending-smses', '', '38.107.191.114', 1280637586) in /home/during/public_html/rahulsingla.com/includes/database.mysql.inc on line 128

Warning: MySQL server has gone away query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\";s:175:\"MySQL server has gone away\nquery: SELECT dst FROM url_alias WHERE src = &#039;admin/settings/actions&#039; AND language IN(&#039;en&#039;, &#039;&#039;) ORDER BY language DESC\";s:5:\"%file\";s:58:\"/home/during/public_html/rahulsingla.com/includes/path.inc\";s:5:\"%line\";i:69;}', 3, '', 'http://www.rahulsingla.com/blog/sms-application-jme-application-sending-smses', '', '38.107.191.114', 1280637586) in /home/during/public_html/rahulsingla.com/includes/database.mysql.inc on line 128

Warning: MySQL server has gone away query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\";s:162:\"MySQL server has gone away\nquery: SELECT data, created, headers, expire, serialized FROM cache_menu WHERE cid = &#039;links:primary-links:page-cid:node/27:1&#039;\";s:5:\"%file\";s:59:\"/home/during/public_html/rahulsingla.com/includes/cache.inc\";s:5:\"%line\";i:26;}', 3, '', 'http://www.rahulsingla.com/blog/sms-application-jme-application-sending-smses', '', '38.107.191.114', 1280637586) in /home/during/public_html/rahulsingla.com/includes/database.mysql.inc on line 128

Warning: MySQL server has gone away query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\";s:170:\"MySQL server has gone away\nquery: SELECT p1, p2, p3, p4, p5, p6, p7, p8 FROM menu_links WHERE menu_name = &#039;primary-links&#039; AND link_path IN (&#039;node/27&#039;)\";s:5:\"%file\";s:58:\"/home/during/public_html/rahulsingla.com/includes/menu.inc\";s:5:\"%line\";i:897;}', 3, '', 'http://www.rahulsingla.com/blog/sms-application-jme-application-sending-smses', '', '38.107.191.114', 1280637586) in /home/during/public_html/rahulsingla.com/includes/database.mysql.inc on line 128

Warning: MySQL server has gone away query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\";s:166:\"MySQL server has gone away\nquery: SELECT p1, p2, p3, p4, p5, p6, p7, p8 FROM menu_links WHERE menu_name = &#039;primary-links&#039; AND link_path = &#039;node/%&#039;\";s:5:\"%file\";s:58:\"/home/during/public_html/rahulsingla.com/includes/menu.inc\";s:5:\"%line\";i:902;}', 3, '', 'http://www.rahulsingla.com/blog/sms-application-jme-application-sending-smses', '', '38.107.191.114', 1280637586) in /home/during/public_html/rahulsingla.com/includes/database.mysql.inc on line 128

Warning: MySQL server has gone away query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\";s:179:\"MySQL server has gone away\nquery: SELECT mlid FROM menu_links WHERE menu_name = &#039;primary-links&#039; AND expanded = 1 AND has_children = 1 AND plid IN (0) AND mlid NOT IN (0)\";s:5:\"%file\";s:58:\"/home/during/public_html/rahulsingla.com/includes/menu.inc\";s:5:\"%line\";i:916;}', 3, '', 'http://www.rahulsingla.com/blog/sms-application-jme-application-sending-smses', '', '38.107.191.114', 1280637586) in /home/during/public_html/rahulsingla.com/includes/database.mysql.inc on line 128

Warning: MySQL server has gone away query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\";s:483:\"MySQL server has gone away\nquery: \n SELECT m.load_functions, m.to_arg_functions, m.access_callback, m.access_arguments, m.page_callback, m.page_arguments, m.title, m.title_callback, m.title_arguments, m.type, m.description, ml.*\n FROM menu_links ml LEFT JOIN menu_router m ON m.path = ml.router_path\n WHERE ml.menu_name = &#039;primary-links&#039; AND ml.plid IN (0)\n ORDER BY p1 ASC, p2 ASC, p3 ASC, p4 ASC, p5 ASC, p6 ASC, p7 ASC, p8 ASC, p9 ASC\";s:5:\"%file\";s:58:\"/home/during/public_html/rahulsingla.com/includes/menu.inc\";s:5:\"%line\";i:940;}', 3, '', 'http://www.rahulsin in /home/during/public_html/rahulsingla.com/includes/database.mysql.inc on line 128

Warning: MySQL server has gone away query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\";s:186:\"MySQL server has gone away\nquery: SELECT data, created, headers, expire, serialized FROM cache_menu WHERE cid = &#039;links:primary-links:tree-data:5d6d3aaaaef5fba302ce62698fa37bbe&#039;\";s:5:\"%file\";s:59:\"/home/during/public_html/rahulsingla.com/includes/cache.inc\";s:5:\"%line\";i:26;}', 3, '', 'http://www.rahulsingla.com/blog/sms-application-jme-application-sending-smses', '', '38.107.191.114', 1280637586) in /home/during/public_html/rahulsingla.com/includes/database.mysql.inc on line 128

Warning: MySQL server has gone away query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\";s:307:\"MySQL server has gone away\nquery: UPDATE cache_menu SET data = &#039;a:2:{s:4:\\&quot;tree\\&quot;;a:0:{}s:10:\\&quot;node_links\\&quot;;a:0:{}}&#039;, created = 1280637586, expire = 0, headers = &#039;&#039;, serialized = 1 WHERE cid = &#039;links:primary-links:tree-data:5d6d3aaaaef5fba302ce62698fa37bbe&#039;\";s:5:\"%file\";s:59:\"/home/during/public_html/rahulsingla.com/includes/cache.inc\";s:5:\"%line\";i:109;}', 3, '', 'http://www.rahulsingla.com/blog/sms-application-jme-application-sending-smses', '', '38.107.191.114', 1280637586) in /home/during/public_html/rahulsingla.com/includes/database.mysql.inc on line 128

Warning: MySQL server has gone away query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\";s:274:\"MySQL server has gone away\nquery: UPDATE cache_menu SET data = &#039;links:primary-links:tree-data:5d6d3aaaaef5fba302ce62698fa37bbe&#039;, created = 1280637586, expire = 0, headers = &#039;&#039;, serialized = 0 WHERE cid = &#039;links:primary-links:page-cid:node/27:1&#039;\";s:5:\"%file\";s:59:\"/home/during/public_html/rahulsingla.com/includes/cache.inc\";s:5:\"%line\";i:109;}', 3, '', 'http://www.rahulsingla.com/blog/sms-application-jme-application-sending-smses', '', '38.107.191.114', 1280637586) in /home/during/public_html/rahulsingla.com/includes/database.mysql.inc on line 128

Warning: MySQL server has gone away query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\";s:164:\"MySQL server has gone away\nquery: SELECT data, created, headers, expire, serialized FROM cache_menu WHERE cid = &#039;links:secondary-links:page-cid:node/27:1&#039;\";s:5:\"%file\";s:59:\"/home/during/public_html/rahulsingla.com/includes/cache.inc\";s:5:\"%line\";i:26;}', 3, '', 'http://www.rahulsingla.com/blog/sms-application-jme-application-sending-smses', '', '38.107.191.114', 1280637586) in /home/during/public_html/rahulsingla.com/includes/database.mysql.inc on line 128

Warning: MySQL server has gone away query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\";s:172:\"MySQL server has gone away\nquery: SELECT p1, p2, p3, p4, p5, p6, p7, p8 FROM menu_links WHERE menu_name = &#039;secondary-links&#039; AND link_path IN (&#039;node/27&#039;)\";s:5:\"%file\";s:58:\"/home/during/public_html/rahulsingla.com/includes/menu.inc\";s:5:\"%line\";i:897;}', 3, '', 'http://www.rahulsingla.com/blog/sms-application-jme-application-sending-smses', '', '38.107.191.114', 1280637586) in /home/during/public_html/rahulsingla.com/includes/database.mysql.inc on line 128

Warning: MySQL server has gone away query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\";s:168:\"MySQL server has gone away\nquery: SELECT p1, p2, p3, p4, p5, p6, p7, p8 FROM menu_links WHERE menu_name = &#039;secondary-links&#039; AND link_path = &#039;node/%&#039;\";s:5:\"%file\";s:58:\"/home/during/public_html/rahulsingla.com/includes/menu.inc\";s:5:\"%line\";i:902;}', 3, '', 'http://www.rahulsingla.com/blog/sms-application-jme-application-sending-smses', '', '38.107.191.114', 1280637586) in /home/during/public_html/rahulsingla.com/includes/database.mysql.inc on line 128

Warning: MySQL server has gone away query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\";s:485:\"MySQL server has gone away\nquery: \n SELECT m.load_functions, m.to_arg_functions, m.access_callback, m.access_arguments, m.page_callback, m.page_arguments, m.title, m.title_callback, m.title_arguments, m.type, m.description, ml.*\n FROM menu_links ml LEFT JOIN menu_router m ON m.path = ml.router_path\n WHERE ml.menu_name = &#039;secondary-links&#039; AND ml.plid IN (0)\n ORDER BY p1 ASC, p2 ASC, p3 ASC, p4 ASC, p5 ASC, p6 ASC, p7 ASC, p8 ASC, p9 ASC\";s:5:\"%file\";s:58:\"/home/during/public_html/rahulsingla.com/includes/menu.inc\";s:5:\"%line\";i:940;}', 3, '', 'http://www.rahuls in /home/during/public_html/rahulsingla.com/includes/database.mysql.inc on line 128

Warning: MySQL server has gone away query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\";s:188:\"MySQL server has gone away\nquery: SELECT data, created, headers, expire, serialized FROM cache_menu WHERE cid = &#039;links:secondary-links:tree-data:5d6d3aaaaef5fba302ce62698fa37bbe&#039;\";s:5:\"%file\";s:59:\"/home/during/public_html/rahulsingla.com/includes/cache.inc\";s:5:\"%line\";i:26;}', 3, '', 'http://www.rahulsingla.com/blog/sms-application-jme-application-sending-smses', '', '38.107.191.114', 1280637586) in /home/during/public_html/rahulsingla.com/includes/database.mysql.inc on line 128

Warning: MySQL server has gone away query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\";s:309:\"MySQL server has gone away\nquery: UPDATE cache_menu SET data = &#039;a:2:{s:4:\\&quot;tree\\&quot;;a:0:{}s:10:\\&quot;node_links\\&quot;;a:0:{}}&#039;, created = 1280637586, expire = 0, headers = &#039;&#039;, serialized = 1 WHERE cid = &#039;links:secondary-links:tree-data:5d6d3aaaaef5fba302ce62698fa37bbe&#039;\";s:5:\"%file\";s:59:\"/home/during/public_html/rahulsingla.com/includes/cache.inc\";s:5:\"%line\";i:109;}', 3, '', 'http://www.rahulsingla.com/blog/sms-application-jme-application-sending-smses', '', '38.107.191.114', 1280637586) in /home/during/public_html/rahulsingla.com/includes/database.mysql.inc on line 128

Warning: MySQL server has gone away query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\";s:278:\"MySQL server has gone away\nquery: UPDATE cache_menu SET data = &#039;links:secondary-links:tree-data:5d6d3aaaaef5fba302ce62698fa37bbe&#039;, created = 1280637586, expire = 0, headers = &#039;&#039;, serialized = 0 WHERE cid = &#039;links:secondary-links:page-cid:node/27:1&#039;\";s:5:\"%file\";s:59:\"/home/during/public_html/rahulsingla.com/includes/cache.inc\";s:5:\"%line\";i:109;}', 3, '', 'http://www.rahulsingla.com/blog/sms-application-jme-application-sending-smses', '', '38.107.191.114', 1280637586) in /home/during/public_html/rahulsingla.com/includes/database.mysql.inc on line 128
SMS Application - a JME application for sending SMSes | rahulsingla.com

You are hereBlogs / rahul's blog / SMS Application - a JME application for sending SMSes

SMS Application - a JME application for sending SMSes


rahul's picture

By rahul - Posted on 04 November 2009

I recently finished work on my first Java ME application. It was basically a prototyping application for my client based in Italy, to see how fast can we send SMSes from his service provider.

The application (whose jad & jar files are attached below), basically sends a SMS to a list of entered mobile numbers and records the time taken for sending the SMSes. This time is presented after all the SMSes have been sent successfully in the format:

Total x SMS sent in y milliseconds
Avg. Time: z

Here x,y and z would be substituted with actual data. The client targets to achieve something sround 20-.40 SMSes per second (which I sincerely believe is not possible. Such throughput can only be achieved via SMS gateways in my opinion). This application was built for timing the maximum rate at which we can send SMSes from the client's service provider. If we succeed in anything close to that, we would take this application forward from there.

I have used the WMA 2.0 optional package on top of CLDC with MIDP. The code was comparatively easier to write. The major problem I faced was regarding the selection of tools.

JME SDK 3.0 is the current version of the JME SDK. However, its IDE lacks even basic debugging support. I tried with multiple Nokia SDKs. However, none worked on my Windows 7 machine.

After considerable pain, I succeeded with NetBeans 6.7.1 with Mobility pack installed, and JME SDK 3.0 and got all the regular coding, debugging, profiling support. I also succeeded in achieving the same with Nokia's all-in-one SDK 5.0 v1. However, I must say, Nokia's emulator is a lot slower & takes quite a bit of time to load up.

To use this application, simply copy it to your JME enabled mobile (both the .jad & .jar files). Then open .jad file. The application should start installation.

While sending the SMS, the mobile may prompt you to allow this app to send SMS. Click Ok to give this permission to this app. To avoid having to give this prmission each time, you can configure the same in your mobile's Application Manager.

AttachmentSize
SMSApp.jad227 bytes
SMSApp.jar2.06 KB
Tags

I need yor java net beans code i'm makin a mobile application in which i need o recieve and send the sms on a specific number only 

im making the application with LWUIT ,please help me in this regard thank you 

rahul's picture

Hi Haris, the code for sending SMSes is as below. Please take care that you would need WMA 2.0 optional package on the target device for the code to work.

 

import javax.wireless.messaging.MessageConnection;
import javax.wireless.messaging.TextMessage;

MessageConnection con = (MessageConnection) Connector.open("sms://" + num);
TextMessage msg = (TextMessage) con.newMessage(MessageConnection.TEXT_MESSAGE);
msg.setPayloadText(message);
con.send(msg);
con.close();

Let me know, if you face problem in getting the above code to work.

 

Post new comment

The content of this field is kept private and will not be shown publicly.

Mollom CAPTCHA (play audio CAPTCHA)
Type the characters you see in the picture above; if you can't read them, submit the form and a new image will be generated. Not case sensitive.

Warning: MySQL server has gone away query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\";s:391:\"MySQL server has gone away\nquery: UPDATE sessions SET uid = 0, cache = 0, hostname = &#039;38.107.191.114&#039;, session = &#039;mollom_sessions|a:3:{s:18:\\&quot;10080158943cb8d4bf\\&quot;;i:1280637536;s:18:\\&quot;100801ed504eb3bdb0\\&quot;;i:1280637564;s:18:\\&quot;10080157f9ab996bad\\&quot;;i:1280637586;}&#039;, timestamp = 1280637586 WHERE sid = &#039;a9f311abdaaed1cfda2b4aefd8853d17&#039;\";s:5:\"%file\";s:61:\"/home/during/public_html/rahulsingla.com/includes/session.inc\";s:5:\"%line\";i:68;}', 3, '', 'http://www.rahulsingla.com/blog/sms-application-jme-application-sen in /home/during/public_html/rahulsingla.com/includes/database.mysql.inc on line 128