Timeout in Axis2 Web Services Client

•November 3, 2009 • Leave a Comment

This is how we set timeout when we call a web services.

public static void main(String[] args) {
MyTimeoutSampleMainmain = new MyTimeoutSampleMain();
try {
MyTimeoutSampleStub stub = new MyTimeoutSampleStub(“http://xxxxx/webservices”);
long soTimeout = 2 * 60 * 1000; //2 minutes
soTimeout = 2 * 1000;

stub._getServiceClient().getOptions().setTimeOutInMilliSeconds(soTimeout);

getResponseFromWebServices(stub);
}
catch (AxisFault ex) {
ex.printStackTrace();
}

}

How do I find the largest top 10 files and directories on a Linux / UNIX / BSD filesystem?

•September 17, 2009 • Leave a Comment

Thanks to http://www.cyberciti.biz/faq/how-do-i-find-the-largest-filesdirectories-on-a-linuxunixbsd-filesystem/

for X in $(du -s * | sort -nr | cut -f 2); do du -hs $X ; done

My kitchen cabinet is now ready for use

•August 26, 2009 • Leave a Comment

Apache and backing up access log

•July 24, 2009 • 2 Comments

I’ve search the www and at last i found a tool to rotate my Apache access.log and error.log
I use
Cronolog from http://cronolog.org/ , it is a free tool to use and easy to setup.

This cronolog is tested and run on Windows

  • download the installer from http://cronolog.org/download/cronolog-1.6.1-win32.zip
  • extract it to somewhere , mine is C:/cronolog/ and you can find
    • cronolog.exe
    • other stuffs
  • Go to your Apache conf httpd.conf and find your access logfile , you will see CustomLog C:/apache/logs/access.log common
  • Turn off the line and add this line TransferLog “|C:/cronolog/cronlog.exe C:/apache/logs/access.%Y%m%d.log”
  • Restart apache and your new access.log file will be created with access.20090709.log
  • Next step, you can backup your access log for old logs.

Oh no, Redmine produce error when try to start

•July 15, 2009 • Leave a Comment

Some of developers out there especially JAVAians , don’t know the existence of Redmine .
” It is an open source Project Management tool, that runs on Ruby with Rails ” . My daily programming using Java does not interest this software. This software running on Ruby..

After struggling installing ruby , rails on linux … these errors came out

/opt/ruby/redmine/vendor/rails/railties/lib/initializer.rb:1:in `require’: no such file to load — logger (LoadError)
from /opt/ruby/redmine/vendor/rails/railties/lib/initializer.rb:1
from ./script/../config/boot.rb:45:in `require’
from ./script/../config/boot.rb:45:in `load_initializer’
from ./script/../config/boot.rb:38:in `run’
from ./script/../config/boot.rb:11:in `boot!’
from ./script/../config/boot.rb:109
from script/server:2:in `require’
from script/server:2

AFter some tuning these error came out

/opt/ruby/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:510:in `require’: no such file to load — test/unit/error (MissingSourceFile)
from /opt/ruby/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:510:in `block in require’
from /opt/ruby/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:355:in `new_constants_in’
from /opt/ruby/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:510:in `require’
from /opt/ruby/redmine/vendor/rails/activesupport/lib/active_support/deprecation.rb:204:in `<top (required)>’
from /opt/ruby/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:510:in `require’
from /opt/ruby/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:510:in `block in require’
from /opt/ruby/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:355:in `new_constants_in’
from /opt/ruby/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:510:in `require’
from /opt/ruby/redmine/vendor/rails/activesupport/lib/active_support.rb:40:in `<top (required)>’
from /opt/ruby/redmine/vendor/rails/railties/lib/commands/server.rb:1:in `require’
from /opt/ruby/redmine/vendor/rails/railties/lib/commands/server.rb:1:in `<top (required)>’
from script/server:3:in `require’
from script/server:3:in `<main>’

I recommend to install Ruby 1.8.7 … I just installed Ruby 1.9 but uninstalled it. :)

Ruby + Linux (Redhat 9) + Rails + Redmine success

•July 15, 2009 • Leave a Comment

I have a very old server running on Redhat 9. I prefer Redhat 9 for my internal development server since it provides the stability, and I managed to get 99% server uptime for my year end review.
This server has been installed :

1. Apache 2.2 2. Jdk 1.6 3. Tomcat 5 4. Php 5 , with latest libxml

I manage to install the latest Ruby 1.8.6 and Rails. I will share the step by step to install it.

For info, i have installed Ruby 1.9 in the server but it cannot support Redmine. Therefore i have to uninstall it the hard way.

I will share the steps soon.

Ruby + Rails + Windows + Installation

•July 14, 2009 • 2 Comments

Some of you out there may find installing ruby and rails are easy. But not some of us like me.Currently I installed ruby on my TOSHIBA laptop running on Windows XP, and to access the internet I have to use proxy.

Thanks to Michael Wales http://www.michaelwales.com/ruby-on-rails/installing-ruby-on-rails-on-windows-vista for providing very good step by step tutorial. My part here is just to explain more

Continue reading ‘Ruby + Rails + Windows + Installation’

My new house is ready …

•June 30, 2009 • 1 Comment

Half baked red brick

How to check Linux version

•June 30, 2009 • Leave a Comment
[root@siodb mysql]# cat /proc/version
Linux version 2.4.20-20.9smp (bhcompile@stripples.devel.redhat.com) (gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)) #1 SMP Mon Aug 18 11:32:15 EDT 2003
[root@siodb mysql]#

[root@siodb mysql]# cat /proc/version

Linux version 2.4.20-20.9smp (bhcompile@stripples.devel.redhat.com) (gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)) #1 SMP Mon Aug 18 11:32:15 EDT 2003

[root@siodb mysql]#

How to check Linux OS type

•June 30, 2009 • 1 Comment
[root@siodb mysql]# cat /etc/issue
Red Hat Linux release 9 (Shrike)
Kernel \r on an \m
[root@siodb mysql]#

[root@siodb mysql]# cat /etc/issue

Red Hat Linux release 9 (Shrike)

Kernel \r on an \m

[root@siodb mysql]#