Monday, February 22, 2010

BlackBerry API - SMS - DatagramConnection.send() hangs/freezes

Problem:


public void SendSMS(String input){
try {
DatagramConnection dgConn;
dgConn = (DatagramConnection)Connector.open("sms://15195555555");
byte[] data = input.getBytes();
Datagram dg = dgConn.newDatagram(dgConn.getMaximumLength());
dg.setData(data, 0, data.length);
dgConn.send(dg); <------ hangs right here!!!! and no Throwable was ever thrown!!!
} catch (Throwable t) {
t.printStackTrace();
}
}


Solution:
Check the length of the message, in my case, it hangs when the message is >160 in length.

Thursday, December 24, 2009

Server Tomcat v6.0 Server at localhost was unable to start within 45 seconds. What if the server requires more time?

Problem: Debugging a web app on Tomcat within Eclipse that takes more than 45 seconds to start-up, which prompts the following message:

Server Tomcat v6.0 Server at localhost was unable to start within 45 seconds. If the server requires more time, try increasing the timeout in the server editor.

Solution: I'm not sure where the server editor is located, but changing the start-timeout="45" in workspace\.metadata\.plugins\org.eclipse.wst.server.core\server.xml would help, make sure restart eclipse after the change.

Monday, August 31, 2009

VMWare connects at 10Mbps

Problem: After the weekend, my VMWare's XP(AMD PCNET Family PCI Ethernet Adapter) connects to the network at 10Mbps, while it was connecting at 1Gbps before the weekend.


Solution: Check the VMWare's MAC address, let your administrator know if the address has been updated. Secondly, reinstall/repair VMWare Tools.

Thursday, August 13, 2009

Disabling hotmail ads

Problem; Hotmail's ads on the side sometimes has the semi-porn like graphics, which isn't very appropriate at work, especially when the supervisor just walked by and thought the employee is surfing porn sites.

Solution: edit the \windows\system32\drivers\etc\hosts file, add the following lines(or whatever domains that host the ads)

127.0.0.1 ads1.live.com
127.0.0.1 rad.live.com
127.0.0.1 live.rads.live.com
127.0.0.1 ads1.msn.com
127.0.0.1 rad.msn.com
127.0.0.1 live.rads.msn.com
127.0.0.1 view.atdmt.com

Tuesday, July 28, 2009

Caused by: java.util.MissingResourceException: Can't find resource for bundle java.util.PropertyResourceBundle

Problem: keeps getting exception of a missing key from ResouceBundle

Caused by: java.util.MissingResourceException: Can't find resource for bundle java.util.PropertyResourceBundle, key low_battery_notification

Solution: Check the spelling and make sure the key is case-sensitive.
Turns out that low_battery_notification wasn't there, but low_Battery_notification was.

Wednesday, June 17, 2009

OpenSymphony Quartz clustering issue

Problem:
Starting up another node causes the following warning:

Jun 17, 2009 10:56:10 AM org.quartz.impl.jdbcjobstore.JobStoreSupport findFailedInstances
WARNING: This scheduler instance (node-1) is still active but was recovered by another instance in the cluster. This may cause inconsistent behavior.

Jun 17, 2009 10:56:30 AM org.quartz.impl.jdbcjobstore.JobStoreSupport logWarnIfNonZero
INFO: ClusterManager: detected 1 failed or restarted instances.

Jun 17, 2009 10:56:30 AM org.quartz.impl.jdbcjobstore.JobStoreSupport clusterRecover
INFO: ClusterManager: Scanning for instance "node-2"'s failed in-progress jobs.

Jun 17, 2009 10:56:30 AM org.quartz.impl.jdbcjobstore.JobStoreSupport logWarnIfNonZero
INFO: ClusterManager: ......Freed 1 acquired trigger(s).

Solution: Synchronize the clock on both nodes