hasan's blog (বল্গ)

work for fun!!!

Archive for the ‘Fix’ Category

internet explorer expected identifier, string or number

with 6 comments

huh, IE is one of those curses which came down to earth from the hell.
anyway if you face such problem you should check the following stuffs -

1. this guy described about the first problem
2. here is what i have faced and resolved,

i had a javascript code like this -

var element = new Element(“a”, {class: “keyboard_option_link”, href: “javascript: void(0)”});

so IE minds, because i have used “class” the fix i have used -

var element = new Element(“a”, {“class”: “keyboard_option_link”, href: “javascript: void(0)”});

this things now working fine,
best wishes,

Written by nhm tanveer hossain khan

May 25, 2008 at 11:14 pm

Performance issue with tomcat 5.x.x series

with one comment

one of our escenic colleagues (Simen L. Haagenrud) just noticed a bottleneck with tomcat 5.x.x series containers. so we had a details digging to let find the reason.

as he mentioned it was because of recurring invocation of “getAttribute”, and tomcat 5.x.x series is using synchornization block inside “getAttribute” method, where lock is kept on “attributes” variable.
so i had a quick look on the source code of the 3 recent series -

1. 5.0.28
http://svn.apache.org/repos/asf/tomcat/container/tags/tc5.0.x/TOMCAT_5_0_28/catalina/src/share/org/apache/catalina/core/ApplicationContext.java

2. 5.5.24 (the last version from 5.5.x series)
http://svn.apache.org/repos/asf/tomcat/container/tags/tc5.5.x/TOMCAT_5_5_24/catalina/src/share/org/apache/catalina/core/ApplicationContext.java

3. 6.0.x (trunk)
http://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/ApplicationContext.java

so the code says 6.0.x series came with the fixes, the fix is the replacement of HashMap with ConcurrentHashMap.

in his case, recurring invocation of “getAttribute” was nearly reduced 50% server request handling capability.
best wishes,

Written by nhm tanveer hossain khan

August 6, 2007 at 8:36 am

Posted in Fix, Java, java ee, server, tomcat

Firefox 1.5 with ajax sync request.

with one comment

This post is to remind myself about a bug on Firefox 1.5.

bug details:

Http ajax request doesn’t invoke “onstatechange” handler if ajax request type is set to sync.

how to resolve this problem:

invoke “onstatechange” function manually.

Written by nhm tanveer hossain khan

April 26, 2007 at 2:15 am

RSSOwl on Ubuntu (mozilla browser component)

without comments

RSSOwl is my favorite RSS feed reader, recently i have setup mozilla browser component. here is simple extention for run.sh ( it could be found under %RSSOWL_DIR%/run.bat ).

#!/bin/sh
export MOZILLA_FIVE_HOME=’/usr/lib/mozilla-firefox/’
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$MOZILLA_FIVE_HOME
java -Xmx96m -Djava.library.path=$RSSOWL_DIR -jar $RSSOWL_DIR/rssowl.jar

thats’s it. now open RSS Owl, now it will display feed content using Mozilla browser component…

Written by nhm tanveer hossain khan

October 26, 2006 at 8:17 pm

Posted in Fix

Every time I try to access my repository, the process just hangs

without comments

one of our repositories was hanging while user was trying to checkout. to resolve this problem i found the following lines from svn FAQ. Now it has been fixed.

Your repository is not corrupt, nor is your data lost. If your process accesses the repository directly (mod_dav_svn, svnlook, svnadmin, or if you access a `file://’ URL), then it’s using Berkeley DB to access your data. Berkeley DB is a journaling system, meaning that it logs everything it is about to do before it does so. If your process is interrupted (Control-C, or segfault), then a lockfile is left behind, along with a logfile describing unfinished business. Any other process that attempts to access the database will just hang, waiting for the lockfile to disappear. To awaken your repository, you need to ask Berkeley DB to either finish the work, or rewind the database to a previous state that is known to be consistent.

collected from – http://subversion.tigris.org/faq.html#bdb-recovery
just apply “svnadmin recover /path/to/your/repository”

Written by nhm tanveer hossain khan

October 19, 2006 at 3:35 am

Posted in Fix