Friday, December 19, 2008

Catalina.out gets to big = Server crashes

Usually the programmer used the System.out.print("Something") for debug. And tomcat, by default put it on Catalina.out.
Many System.out.print, made Catalina.out increase the size.
And One day all my report (using JNLP) can't show in. And the worst, all user can't login or made the transaction.
After I delete all logs, and restart again my tomcat, all report can be viewed again. Can login and made the transaction.
The Problem in here, The Catalina out is too big (almost 1 Giga the size ) cuase the system implemented since 2006.
The Solution is the catalina.out must be rotated.
I Used the apache tomcat 5.5.17, And for the rotation :
1. download catalina-5.5.23.jar, commons-digester-1.8.jar tomcat-util-5.5.23.jar
and then put it in common/classes on your tomcat folder.
2. Edit your server.xml, put the XML like this :

<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">

<Logger className="org.apache.catalina.logger.FileLogger"
directory="logs" prefix="localhost_log." suffix=".txt"
timestamp="true"/>
<DefaultContext reloadable="false" crossContext="true" swallowOutput="true"/>
<Context path="/app_run" docBase="app_run" crossContext="true" swallowOutput="true"></Context>
<Context path="/app_dev" docBase="app_dev" crossContext="true" swallowOutput="true"></Context>
<Context path="/app_demo" docBase="app_demo" crossContext="true" swallowOutput="true"></Context>
</Host>

And The logs folder become like this :
-rw-r--r-- 1 dev users 0 2008-12-18 18:46 admin.2008-12-18.log

-rw-r--r-- 1 dev users 0 2008-12-19 13:46 admin.2008-12-19.log
-rw-r--r-- 1 dev users 1912 2008-12-18 21:33 catalina.2008-12-18.log
-rw-r--r-- 1 dev users 1438 2008-12-19 13:46 catalina.2008-12-19.log
-rw-r--r-- 1 dev users 3350 2008-12-19 13:46 catalina.out
-rw-r--r-- 1 dev users 0 2008-12-18 18:46 host-manager.2008-12-18.log
-rw-r--r-- 1 dev users 0 2008-12-19 13:46 host-manager.2008-12-19.log
-rw-r--r-- 1 dev users 149134 2008-12-18 21:33 localhost.2008-12-18.log
-rw-r--r-- 1 dev users 12007 2008-12-19 13:48 localhost.2008-12-19.log
-rw-r--r-- 1 dev users 0 2008-12-18 18:46 manager.2008-12-18.log
-rw-r--r-- 1 dev users 0 2008-12-19 13:46 manager.2008-12-19.log


The Catalina.out will be updated only when tomcat start or stop.
And All logs like System.out.println will put on file localhost.yyyy-mm-dd.log, with yyyy-mm-dd is current date.
For More information for tomcat-logging you can visit http://wiki.apache.org/tomcat/FAQ/Logging#Q4



 

Thursday, December 18, 2008

My Serial Number

At End Of Year, the airlines company introduce to the public the newest aircraft.
This aircraft used hi-tech equipment like artificial intelligence with using super computer
that can made decision by self, bullet proof, satalit communication and many ....
And very amazing is ....No need pilots to fly it !!!. All Controlled by super computer.
Just need a flight mechanic to view all situation from the control panel.
And One day at first time flight ....
Auto-Pilot : Welcome all passengers, This your auto-pilot speaking. for a few minutes will take off.
Please fasten your seat belt and no smoking until no smoking light turn off....
In 10 minutes later ...

Auto-Pilot : All passengers. Now we fly on 2 times speed of sound or 2 match with 30,000 feet hight from                    sea level. Enjoy your flight...flight...flight...flight...flight...flight...flight...flight...flight...
                   flight...flight...flight...flight...flight...flight...flight...flight...flight...flight...

Flight Mechanic : ......(Ask to self), why the sound repeated many times ???.
                           Ah, No problem i will make correction on this problem. I've trained it already ...
                           (with type something on keyboard) then On Screen showing :
                                   "Welcome Control Center"
                           "You are First Time Using This System"
                         "Please Enter The Serial Number On The textbox Below"

Tuesday, December 16, 2008

The Low Budget Project

The Story become when i involved in a project, When i become a leader, Programmer, Tester, System analyst and Trainer..
The Projects location at out of town so far from the office. And at one day the chief on a department contact me by a phone ....
Chief : Can we discuss for implementation tomorrow?
Me : Sorry sir, Can't
Chief : why ?
Me : Cause, tomorrow i will go to office the headquarters.
Chief : it's ok, i just want to talk to programmer. Can your programmer do that ?
Me : Sorry, Can not also. Cause Must go to the office headquarters tomorrow.
Chief : mmmm, so your system analyst, Can do that ?
Me : Sorry, Can not also. Cause Must go to the office headquarters tomorrow.
Chief : And How your leader, can your leader do that ?,
This is very important. Cause we want to implement this application on next month !!!
Me : So very sorry sir, Can not also. Cause Must go to the office headquarters tomorrow.
Chief : Actually who all Of Them ?!!!, Why all can't make a discuss tomorrow ?
Me : Cause of all of them is me. And tomorrow i must go the office headquarters.
My boss called me, he want to also discuss about progress on this Project.
Chief : ????(silent for a moment), so.. never mind... we can talk this after public holiday.
Me : ok, Thank you. So see you after public holiday. Have a nice day.

Friday, December 12, 2008

There some Ideas Today

Just Enjoy for the crowded, so many thing to do. if Not feel crowded any more, it is mean no life, is't ?
Programmer, yeah the programmers, The Craft of Coding alias. Is that cool job, cool work or work that boring ?

If seen, a programmer's cool taste (Like in the movies ...)
But, the reality is not like any movies in. As my experience up to now.
As a programmer at a software house, I feel that what is done only for support the career of one or several people.

Frequent system analysts only produce the requirements, Without analyzing the impact to the modules that has been there, or make solution for to reduce it.
Frequent also business rules wishes to change, but the system has long time ago implemented (in two years )
it strange, cause new in the know now. And the impact of the programmer must convert the all data, error evaluations and it is not working 10 minutes. 
And from all the change requested, there is an impression of "try and error," and the system analysts think only for the demo but actually it the running system !!!. 

Yeah, Just do it all, Cause i need the money for to pay all my bill.
And also this "work" only not a career. Tha Career Only For System Analysts.

And..., back again to my coding. That only 5 feedback must be done.Once seen, examined, and were in the works with an in-depth, carefully and with full love, It is finished. all !!.
Only for upload now, but the internet connection too slow (Cause some of person download the movies).
It Ok slow but working. in few minutes wil be finished.
Now, Go back Home cause very sleepy, in 3 days i don't have enough time for get some sleep.

Good Night..

Tuesday, December 9, 2008

No Ideas Today

 

Theres No Idea out from my Head.

This began office internet connection today is very slow, but i must update some things on one server.

Air Conn in office dead, as would the heat in the 'sauna'. come to my PC often automatically shutdown because of the overheat .... hehehehehee

Update data, must done. Because users wongly fill in The Master Data.
But there are some transactions, it is strange. why they continue to make transaction but actually it wrong ?.
Start with wrong keyed in a measurement, converstion factor and the worst the code of Item, (Naudzubillah, So many transaction involved and depend on it)

Plus add in more Requerment always changing ... that is incompatible with conscience
(it is incompatible with the database normalization !!! ).

Yah ... My system analyst just think logical requirment without analyze impact to other modules,
Many testing just Click and I yeaaaaah does not appear error.

And finally .... Developing, testing, all maintenance is done by a programmer it self.

Yeah that is All

And finally I wrote this blog