June 14, 2005

IntelliJ IDEA with any JVM

As usual even though I tell my self do not upgrade if it works, I decided to update all plugins in my IDEA IDE today. After restart I noticed that JUnit plugin disappeared. WTF?! It's in the list of installed plugins but none of the shortcuts work and the configuration menu in project tab disappeared. So venturing into the ~/.IntelliJIDEA/system/log discovered that apparently the plugin was compiled using 1.5 JDK because of the following error:
java.lang.UnsupportedClassVersionError: org/intellij/plugins/junit/actions/ToggleTestCaseTestedClassAction (Unsupported major.minor version 49.0)
        at java.lang.ClassLoader.defineClass0(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:448)
        at com.intellij.ide.plugins.a.a.a(a.java:13)
        at com.intellij.ide.plugins.a.a.findClass(a.java:18)
        at com.intellij.ide.plugins.a.b.loadClass(b.java:24)
...
So to solve this problem you would go to the latest 1.5 JDK and run Idea using that. Not that fast though, if you modify the idea.lax file and have the lax.nl.current.vm point to the "java" from 1.5 JDK the Idea won't start telling you "please use supplied JRE". There is a workaround for this, open idea.lax again and locate the lax.nl.java.option.additional line, and add following to the end: -Didea.no.jdk.check=true That will disable the JDK check and will let you run IDEA just fine.
Posted by igor at 02:42 PM | Comments (0)

May 07, 2005

Installing p4web behind Apache 2

Perforce is a great SCM, to tell you the truth I think it's the best SCM out there. Anyhow today I had to help one of my friends to setup the the p4web server that would be accessible by from public internet for viewing through Apache. Heh, when I started I said it's going to take exactly 30 seconds to finish, but aparently it wasn't so....

Continue reading "Installing p4web behind Apache 2 "
Posted by igor at 12:55 PM | Comments (0)

March 12, 2005

Setting up ssh public key auth

This article is addressed to the people who have to work with number (a big number) of *nix machines via SSH remote access. I know it's very annoying to have to type all those different passwords every time you have to ssh from your laptop or desktop to a remote location. Continue reading "Setting up ssh public key auth"
Posted by igor at 05:30 PM | Comments (0)

January 13, 2005

Email and long links

Some of you probably already know that sometimes when you send email with long link your recipients complain that they can't click on it because it's wrapped etc. Or how many times did you receive an email with link wrapped on multiple lines? I do recieve those often. Of course there are places like tinyurl.com but again who is going to go there every time you need to send a link. So there is a solution, in order to prevent mail from being wrapped you should enclose link into <> characters, i.e. if you need to email link to Yahoo news page all you do is
<http://story.news.yahoo.com/news?tmpl=story&e=1&u=/ap/20050113/ap_on_re_as/tsunami> 
and it will not get wrapped and in fact it will appear like this to the reader of your email:
<http://story.news.yahoo.com/news?tmpl=story&e=1&u=/ap/20050113/ap_on_re_as/tsunami>
Enjoy!
Posted by igor at 02:52 PM | Comments (1)

January 01, 2005

Again about IBM PC business

Apparently according to yahoo news IBM managed to loose over a billion! on PC manufacturing. This is crazy! Read for your self here. Or simply get the scoop from my favorite tech news blog here. As they said, and I quote: Obviously Lenovo must have known what they were getting into when they bought IBM’s PC business last month, but it’s a little more clear now why IBM was so eager to sell in the first place: they were losing money like crazy. According to a recent quarterly filing with the Securities and Exchange Commission, IBM managed to lose nearly a billion dollars selling personal computers over the last 3 1/2 years. Not that we didn’t think it’d been a rough past few years or anything, and at the end of the day IBM simply wasn’t willing (or able, but probably just not willing) to take the steps needed to turn things around. CRAZY!
Posted by igor at 03:41 PM | Comments (0)

December 16, 2004

PSI Jabber messenger client keeps conversation history forever!

I have been using Jabber server for a while now and my favorite client messenger is PSI (the one from here). One of these days I went to clean up my home folder on my desktop and I noticed a small tiny ".psi" directory. So descending into that directory uncovered that I have conversations history for all conversations that I've ever had since I installed the thing. Sometime of course this can be usefull, but most of the time this is rather disturbing that I can read all conversations starting with June 2003... rm -rf .... But now thinking about going forward, how do I make sure that those entries are not even being created? Well being on linux box just make the "history" folder point to the "black hole", i.e. :
bash-2.05a$ pwd
/home/home01/ifedulov/.psi/profiles/ifedulov
bash-2.05a$ ls -l history
lrwxrwxrwx    1 ifedulov ifedulov        9 Dec 16 09:50 history -> /dev/null
And that's it :)
Posted by igor at 09:47 AM | Comments (3)

December 07, 2004

IBM is selling their PC business to China

Don't know about you but my favorite laptop was and will be IBM Thinkpad, and it's very interesting to read news like this to find out that IBM is selling entire PC division to China based company, more interesting is what they will do next with the brand....
Posted by igor at 10:01 PM | Comments (1)

November 16, 2004

Can't find translation?

Recently I had a word that I needed to translate from russian into english and I can't seem to find any translator online that would do that for me. The word is скурпулёзность which in english means "accuracy to the smallest detail" but nowhere online I can find this to be translated. If somebody know how to translate into a sharp english phrase please post in comments section. Thanks!
Posted by igor at 10:52 AM | Comments (0)

October 28, 2004

Ant and "usage" target

I'm doing a little research into open source J2EE frameworks now and I had to download a lot of different code from all over the place to see what it does and etc. Apparently I notice that most of the users who provide an ant "build.xml" file with their code do have a "usage" target, i.e. you run it and get something like this:
[igor@hyperion jpetstore]$ ant usage
Buildfile: build.xml
 
usage:
 
     [echo] Spring JPetStore build file
     [echo] ------------------------------------------------------
 
     [echo] Available targets are:
 
     [echo] clean    --> Clean output dirs
     [echo] build    --> Compile main Java sources and copy libraries
     [echo] warfile  --> Build the web application archive
     [echo] all      --> Clean, build, warfile
 
 
BUILD SUCCESSFUL
Total time: 0 seconds
[igor@hyperion jpetstore]$
I'm asking my self why would you want to maintain another task in your build file when you can simply do this:
[igor@hyperion jpetstore]$ ant -projecthelp
Buildfile: build.xml
 
Main targets:
 
 all      Clean,build,warfile
 build    Compile main source tree java files into class files, generate jar files
 clean    Clean output dirs (build, weblib, dist)
 warfile  Build the web application archive
Default target: usage
[igor@hyperion jpetstore]$
and print out what targets are available. Notice that you get the same information, but on top of that if you add more targets down the line you don't have to modify your "usage" target to print upto date information. Simply fill in the "description" tag for the target and that's it.
Posted by igor at 01:44 PM | Comments (0)

October 26, 2004

Another great example on how to NOT use log4j

This note is related to the project that was handed over to another team in the beginning of this summer. Project in subject is a high availability runtime transaction processing system with about 200 to 400 concurrent users during normal load. Basically the system was running fine in production for all this time no problems reported. One day, about two weeks ago I get a call from one of the managers at this second company telling me that apparently after deployment to production of new release things started to get ugly, server can't stay up for more then 4 hours and becomes incredibly slow after that. First thought that is coming to mind that new team did something to the code to make it unusable which will require extensive code review etc. But before I went that route I decided to check obvious stuff first, maybe there is a configuration problem like it happens in 50% of the new deployment cases. So I jump right in as I like challenges. First thing I notice is that new developers are overusing the "log.info()" statements when using log4j logging capabilities. Literally application log file that is set to rotate at 5 megs barely has 20 minutes of application activity because there is a log.info statement printout every half a second! Wow, that is way wrong I'm telling my self. This causes a huge overhead on system and it's probably equal to enabling DEBUG for every category in log4j.properties! The "INFO" meant to be used for SHORT informative printout of data that is useful for audit purposes, not for debugging! Not to bore you with full gory details on how one has to prove that this extensive log activity IS the problem, just going to describe it in short. Basically to emulate the production load you either need that many users (about 200 concurrent users) or need to decrease number of execute threads to emulate request queuing. The latter was done, after half an hour of extensive system usage by about 10 users server came to a grinding halt. Adjusting log4j.properties and disabling stdout output and setting treshhold to ERROR basically allowed for this deployment to continue until code problems are fixed. Moral? Simple, if you want to use technology that you don't know how works invest in time to learn or ask your peers, because otherwise you will end up receiving a page at 3am and spend your weekend trying to figure out what went wrong. Again live moves on...
Posted by igor at 05:21 PM | Comments (0)