Wednesday, May 20, 2009

Tomcat auto-configure Issue: The specified module could not be found

Problem:
httpd.exe: Syntax error on line 484 of C:/Apache/Apache2.2/conf/httpd.conf:
Syntax error on line 4 of C:/Apache/Tomcat6.0/conf/jk/mod_jk.conf-auto: Cannot load
C:/Apache/Apache2.2/modules/mod_jk-apache-2.2.3.so into server:
The specified module could not be found.

Solution:
The module file I copied was mod_jk-1.2.28-httpd-2.2.3.so, I forgot to rename it.
What the #$%@...
Rename it to mod_jk-apache-2.2.3.so and it fixed the issue.

Click the link for more information about how to install Apache 2.2 and Tomcat 6....

Apache 2.2 + Tomcat 6 Installation and Configuration on Windows XP SP2

This summary is not available. Please click here to view the post.

Monday, May 18, 2009

Tomcat 6 ServiceStart returned 3 Error

Problem:
After downloading TomCat 6.0 and installing the .exe, everything was smooth and i left most of the settings as default. I'm having problems starting my tomcat 6.0 service in "Configure" on my windows XP sp2. It was unable to start the service after install. And, it gave me the following errors in the jakarta_service_20090518.log.


[2009-05-18 16:25:00] [443 javajni.c] [error]
FindClass org/apache/catalina/startup/Bootstrap failed
[2009-05-18 16:25:00] [1005 prunsrv.c] [error]
Failed loading main
org/apache/catalina/startup/Bootstrap class
C:\Program Files\Apache Software Foundation\Tomcat 6.0\bin\bootstrap.jar
[2009-05-18 16:25:00] [1269 prunsrv.c] [error]
ServiceStart returned 3


Solution:
I found that there are more than one java jre installed on my windows XP, one is located on
C:\java\jre1.5.0_16
and the other is located on
C:\Program Files\Java\jdk1.5.0_16\jre
. When re-installing Tomcat 6, I changed the default
C:\java\jre1.5.0_16
to
C:\Program Files\Java\jdk1.5.0_16\jre
, and it fixed those errrors.

Monday, April 20, 2009

date Function

add 5 years/months/days/hours/minutes/seconds to current date/time

$ date +%Y%m%d%H%M%S; date --date "now +5 years" +%Y%m%d%H%M%S
20090420161628
20140420161628
$ date +%Y%m%d%H%M%S; date --date "now +5 months" +%Y%m%d%H%M%S
20090420161639
20090920161639
$ date +%Y%m%d%H%M%S; date --date "now +5 days" +%Y%m%d%H%M%S
20090420161646
20090425161646
$ date +%Y%m%d%H%M%S; date --date "now +5 hours" +%Y%m%d%H%M%S
20090420161654
20090420211654
$ date +%Y%m%d%H%M%S; date --date "now +5 minutes" +%Y%m%d%H%M%S
20090420161659
20090420162159
$ date +%Y%m%d%H%M%S; date --date "now +5 seconds" +%Y%m%d%H%M%S


subtract xxx to current date/time

$ date +%Y%m%d%H%M%S; date --date "now -5 years" +%Y%m%d%H%M%S
20090420161922
20240420161922

$ date +%Y%m%d%H%M%S; 
date --date "now -5 years -1 months" +"%Y/%m/%d %H:%M:%S"
20090420162122
2004/03/20 16:21:22

Friday, February 13, 2009

Java.SQL.Exception The Network Adapter could not establish the connection

1. The port number can be 1526 or 1521. Confirm with tnsnames.ora on the Oracle Server.
2. If that is all right, then use the IP address of the Oracle host, rather than the name.