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?
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
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
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
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.
Monday, July 6, 2009
Wednesday, June 17, 2009
OpenSymphony Quartz clustering issue
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
Thursday, June 4, 2009
Friday, May 29, 2009
JDE Plug-in for Eclipse Installation
2.) download JDE Plug-in for Eclipse, http://na.blackberry.com/eng/developers/javaappdev/javaeclipseplug.jsp
2.1) click "Download the Full Installer"
2.2) fill out the form
2.3) download eJDE1.0.0.67_With_CP4.5.0.16.zip
3.) download JDE Compent Pack, http://na.blackberry.com/eng/developers/javaappdev/javaeclipseplug.jsp
3.1) click "Download the Eclipse Software Update for the BlackBerry JDE v4.7 Component Pack"
3.2) fill out the form
3.3) download eJDE-4_7_0_46_Component.zip
4.) extract eclipse-java-ganymede-SR2-win32.zip
4.1) start eclipse.exe
4.2) select a new workspace, i.e. c:\bb_workspace
5.) click Help->Software Update->Available Software
5.1) click "Manage Sites..."
6.) there could be several checkboxes already checked
6.1) uncheck all the checkbox
6.2) click "OK"
7.) it should prompt the screen with an empty software list
7.1) click "Add Site..."
7.2) click "Archive"
7.3) point to eJDE1.0.0.67_With_CP4.5.0.16.zip
7.4) click "Add Site..."
7.5) click "Archive"
7.6) point to eJDE-4_7_0_46_Component.zip
8.) shown:
8.1) check "BlackBerry JDE Plug-in for Eclipse"
8.2) uncheck "BlackBerry Component Pack 4.5.0"
8.3) check "BlackBerry Component Pack 4.7.0"
9.) shown:
9.1) click "Next"
10.) shown:
10.1) click "Finish"
11.) shown:
11.1) click "Yes"
Thursday, May 7, 2009
Loaded Nextel 8350i 4.6.1.204 on a Telus 8350i
from BlackBerry download for Nextel
to
make sure to remove the Vendor.xml at
C:\Program Files\Common Files\Research In Motion\AppLoader
Friday, March 13, 2009
InterruptedException, URISyntaxException: Illegal character in path ... at Axis2 Codegen Wizard
Thursday, March 12, 2009
java.lang.reflect.InvocationTargetException at Axis2 Codegen Wizard
1. An exception is thrown:
2. Identify the errors by
2.1 workspace/.metadata/.log OR
2.2 turn the console log on if there is no file at the above path by running "eclipse -consoleLog"
3. in my case, one of many exceptions is:
...
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
... 60 more
4. Find the missing jars at Axis2_Codegen_Wizard_1.3.0\plugin.xml
5. Mines include:
backport-util-concurrent-3.1.jar
jibx-bind-1.1.5.jar
jibx-run-1.1.5.jar
neethi-2.0.4.jar
woden-1.0M8.jar can't be found anywhere, needs to download the interface and implementations separately and add them to the plugin.xml.
woden-api-1.0M8.jar
woden-impl-dom-1.0M8.jar
woden-impl-om-1.0M8.jar
6. run "eclipse -clean"
7. Voila!
Tuesday, March 10, 2009
A fatal error has occurred while upgrading your device's software. Device communications error encountered.
Upgrading the handset OS with Desktop Manager via USB connection, and it crashed.
Then it became unusable: Reload software: 507
Solution(for my case): Don't run anything on the serial/communication ports while upgrading, seems like the RIM software wants to talk to these ports and because they are occupeid, it threw exception.
P.S.: It takes more than 20 minutes for my OS to reboot afterward, be patient!
Friday, February 27, 2009
HTTP Header Field: BlackBerry Browser VS Opera Mini
GET / HTTP/1.0
Host: (host ip:port)
User-Agent: BlackBerry8830/4.5.0.77 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/126
Accept: application/vnd.rim.html,text/html,application/xhtml+xml,application/vnd.wap.xhtml+xml,text/vnd.sun.j2me.app-descriptor,image/vnd.rim.png,image/jpeg,application/x-vnd.rim.pme.b,image/gif;anim=1,application/vnd.wap.wmlc;q=0.9,application/vnd.wap.wmlscriptc;q=0.7,text/vnd.wap.wml;q=0.7,*/*;q=0.5
Accept-Language: en-US,en;q=0.5
Accept-Charset: ISO-8859-1,UTF-8,US-ASCII,UTF-16BE,windows-1252,UTF-16LE,windows-1250
Connection: keep-alive
profile: http://www.blackberry.net/go/mobile/profiles/uaprof/8830/4.5.0.rdf
Via: BISB_3.4.0.45, 1.1 pmds67.bisb1.blackberry:3128 (squid/2.5.STABLE12)
Cache-Control: max-age=259200
x-wap-profile: "http://www.blackberry.net/go/mobile/profiles/uaprof/8830/4.5.0.rdf"
X-Forwarded-For: unknown
Opera Mini:
GET / HTTP/1.1
Host: (host ip:port)
User-Agent: Opera/9.60 (J2ME/MIDP; Opera Mini/4.2.13337/670; U; en) Presto/2.2.0
Accept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1
Accept-Language: en,en;q=0.9
Accept-Charset: iso-8859-1, utf-8, utf-16, *;q=0.1
Accept-Encoding: deflate, gzip, x-gzip, identity, *;q=0
Connection: Keep-Alive
X-OperaMini-Features: advanced, file_system, folding
X-OperaMini-Phone-UA: BlackBerry
X-OperaMini-Phone: RIM #
x-forwarded-for: (some ip)
Tuesday, February 17, 2009
Java Serial Port Communication(javacomm) in 4 steps
1.) download javacomm20-win32.zip
2.) extract comm.jar to ..\jre\lib\ext
3.) extract javax.comm.properties to ..\jre\lib folder
4.) extract win32comm.dll to c:\windows
import java.util.Enumeration;
import javax.comm.CommPortIdentifier;
public class JavaCommTest {
public static void main(String[] ap) {
Enumeration pList = CommPortIdentifier.getPortIdentifiers();
while (pList.hasMoreElements()) {
CommPortIdentifier cpi = (CommPortIdentifier) pList.nextElement();
System.out.print("Port " + cpi.getName() + " ");
if (cpi.getPortType() == CommPortIdentifier.PORT_SERIAL) {
System.out.println("is a Serial Port: " + cpi);
} else if (cpi.getPortType() == CommPortIdentifier.PORT_PARALLEL) {
System.out.println("is a Parallel Port: " + cpi);
} else {
System.out.println("is an Unknown Port: " + cpi);
}
}
}
}
Here are the outputs of the above snippet if missing:
win32comm.dll - Error loading win32com: java.lang.UnsatisfiedLinkError: no win32com in java.library.path
javax.comm.properties - pList would return false at hasMoreElements()
Friday, January 23, 2009
DeploymentException, ArrayIndexOutOfBoundsException, OutOfMemoryError casued by Parlay X with Axis2
Problem:Using Axis2 client to make a webservice call to Parlay X service, might cause the following exceptions, eventually OutOfMemoryError.
2009-01-15 07:32:18,947 ERROR [org.apache.axis2.deployment.ModuleDeployer]
The mex-1.4.jar module, which is not valid, caused null
org.apache.axis2.deployment.DeploymentException
at org.apache.axis2.deployment.repository.util.ArchiveReader.readModuleArchive(ArchiveReader.java:531)
at org.apache.axis2.deployment.ModuleDeployer.deploy(ModuleDeployer.java:71)
at org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:136)
at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:597)
at org.apache.axis2.deployment.RepositoryListener.loadClassPathModules(RepositoryListener.java:195)
at org.apache.axis2.deployment.RepositoryListener.init2(RepositoryListener.java:70)
at org.apache.axis2.deployment.RepositoryListener.(RepositoryListener.java:63)
at org.apache.axis2.deployment.DeploymentEngine.loadFromClassPath(DeploymentEngine.java:164)
at org.apache.axis2.deployment.FileSystemConfigurator.getAxisConfiguration(FileSystemConfigurator.java:135)
at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:68)
at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem(ConfigurationContextFactory.java:184)
at org.apache.axis2.client.ServiceClient.configureServiceClient(ServiceClient.java:150)
at org.apache.axis2.client.ServiceClient.(ServiceClient.java:143)
at org.csapi.www.wsdl.parlayx.terminal_location.v2_0.service.TerminalLocationServiceStub.(TerminalLocationServiceStub.java:139)
at org.csapi.www.wsdl.parlayx.terminal_location.v2_0.service.TerminalLocationServiceStub.(TerminalLocationServiceStub.java:125)
at org.csapi.www.wsdl.parlayx.terminal_location.v2_0.service.TerminalLocationServiceStub.(TerminalLocationServiceStub.java:173)
at org.csapi.www.wsdl.parlayx.terminal_location.v2_0.service.TerminalLocationServiceStub.(TerminalLocationServiceStub.java:165)
.
.
.
Caused by: org.apache.axiom.om.OMException
at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:243)
at org.apache.axiom.om.impl.llom.OMDocumentImpl.getOMDocumentElement(OMDocumentImpl.java:132)
at org.apache.axiom.om.impl.builder.StAXOMBuilder.getDocumentElement(StAXOMBuilder.java:411)
at org.apache.axis2.util.XMLUtils.toOM(XMLUtils.java:602)
at org.apache.axis2.util.XMLUtils.toOM(XMLUtils.java:581)
at org.apache.axis2.deployment.DescriptionBuilder.buildOM(DescriptionBuilder.java:97)
at org.apache.axis2.deployment.ModuleBuilder.populateModule(ModuleBuilder.java:90)
at org.apache.axis2.deployment.repository.util.ArchiveReader.readModuleArchive(ArchiveReader.java:518)
... 26 more
2009-01-05 00:57:01,845 ERROR [org.apache.axis2.deployment.ModuleDeployer]
The mex-1.4.jar module, which is not valid, caused java.lang.ArrayIndexOutOfBoundsException: -1
org.apache.axis2.deployment.DeploymentException: java.lang.ArrayIndexOutOfBoundsException: -1
at org.apache.axis2.deployment.repository.util.ArchiveReader.readModuleArchive(ArchiveReader.java:531)
at org.apache.axis2.deployment.ModuleDeployer.deploy(ModuleDeployer.java:71)
at org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:136)
at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:597)
at org.apache.axis2.deployment.RepositoryListener.loadClassPathModules(RepositoryListener.java:195)
at org.apache.axis2.deployment.RepositoryListener.init2(RepositoryListener.java:70)
at org.apache.axis2.deployment.RepositoryListener.(RepositoryListener.java:63)
at org.apache.axis2.deployment.DeploymentEngine.loadFromClassPath(DeploymentEngine.java:164)
at org.apache.axis2.deployment.FileSystemConfigurator.getAxisConfiguration(FileSystemConfigurator.java:135)
at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:68)
at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem(ConfigurationContextFactory.java:184)
at org.apache.axis2.client.ServiceClient.configureServiceClient(ServiceClient.java:150)
at org.apache.axis2.client.ServiceClient.(ServiceClient.java:143)
at org.csapi.www.wsdl.parlayx.terminal_location.v2_0.service.TerminalLocationServiceStub.(TerminalLocationServiceStub.java:139)
at org.csapi.www.wsdl.parlayx.terminal_location.v2_0.service.TerminalLocationServiceStub.(TerminalLocationServiceStub.java:125)
at org.csapi.www.wsdl.parlayx.terminal_location.v2_0.service.TerminalLocationServiceStub.(TerminalLocationServiceStub.java:173)
at org.csapi.www.wsdl.parlayx.terminal_location.v2_0.service.TerminalLocationServiceStub.(TerminalLocationServiceStub.java:165)
.
.
.
Caused by: org.apache.axiom.om.OMException: java.lang.ArrayIndexOutOfBoundsException: -1
at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:249)
at org.apache.axiom.om.impl.llom.OMDocumentImpl.getOMDocumentElement(OMDocumentImpl.java:132)
at org.apache.axiom.om.impl.builder.StAXOMBuilder.getDocumentElement(StAXOMBuilder.java:411)
at org.apache.axis2.util.XMLUtils.toOM(XMLUtils.java:602)
at org.apache.axis2.util.XMLUtils.toOM(XMLUtils.java:581)
at org.apache.axis2.deployment.DescriptionBuilder.buildOM(DescriptionBuilder.java:97)
at org.apache.axis2.deployment.ModuleBuilder.populateModule(ModuleBuilder.java:90)
at org.apache.axis2.deployment.repository.util.ArchiveReader.readModuleArchive(ArchiveReader.java:518)
... 26 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
at com.sun.xml.stream.xerces.util.NamespaceSupport.pushContext(NamespaceSupport.java:178)
at com.sun.xml.stream.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:240)
at com.sun.xml.stream.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2599)
at com.sun.xml.stream.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:857)
at com.sun.xml.stream.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:330)
at com.sun.xml.stream.XMLReaderImpl.next(XMLReaderImpl.java:502)
at org.apache.axiom.om.impl.builder.StAXOMBuilder.parserNext(StAXOMBuilder.java:506)
at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:161)
... 33 more
Solution:
Do not instantiate the object of the class that extends org.apache.axis2.client.Stub more than once per application, else it will keep loading the class mex-1.4.jar.
If it needs to be instantiated more than once, then make sure the instantiation method is synchronized. Beware that whenever the mex-1.4.jar is loaded, it will make a copy at the /tmp/ folder, make sure there is enough space to hold all those temp mex-1.4.jar
p.s. possibly related to this
Friday, January 16, 2009
Axis2 connection retry setting
- I/O exception (java.net.ConnectException) caught when processing request: Connection refused
- Retrying request
- I/O exception (java.net.ConnectException) caught when processing request: Connection refused
- Retrying request
- I/O exception (java.net.ConnectException) caught when processing request: Connection refused
- Retrying request
- Unable to sendViaPost to url[http://somehost.com:80/someservice]
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:519)
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 org.apache.commons.httpclient.protocol.ReflectionSocketFactory.createSocket(ReflectionSocketFactory.java:140)
at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:125)
at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:542)
at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:189)
at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:364)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:208)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:448)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:401)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
.
.
.
at java.lang.Thread.run(Thread.java:619)
Connection refused
MultiThreadedHttpConnectionManager manager = new MultiThreadedHttpConnectionManager();
HttpMethodRetryHandler retry_handler = new DefaultHttpMethodRetryHandler(0, false);
HttpClientParams params = new HttpClientParams();
params.setParameter(HttpMethodParams.RETRY_HANDLER, retry_handler);
options.setProperty(HTTPConstants.CACHED_HTTP_CLIENT, new HttpClient(params, manager));
options.setProperty(HTTPConstants.REUSE_HTTP_CLIENT, true);