Posts

Showing posts from January, 2013

Suppressing JExcel warnings

JExcelAPI(Jxl) which is a Java library for parsing Excel files does not have any configuration to use a custom logger at deployment time. JExcel decides logger class at build time and to use any other logger like Log4J, one must build Jxl jar file after configuring JExcel build.properties to use a custom logger. This is not a practical solution for many as they have to go through the hassles of building a custom jar with every new release of JExcel. It is common that parsing an Excel file will have many warnings and one will not be interested in seeing those. Also this invokes curiousity of testers and they will create bug for the warning. One such warning is Warning:  Cannot read name ranges for GROUP5 - setting to empty To suppress such warnings, JExcel provides a system property jxl.nowarnings which can be set to disable warnings. This can be passed as a startup argument to JVM or can be set in a class. To pass it as argument to JVM add -Djxl.nowarnings=true This wil...

Handy collection of SQL's for Oracle

This is a collection of Oracle SQL’s that will come handy when you are in trouble. This includes finding who locked a record, finding SQL which is still executing, getting full SQL executed by application, find long running jobs, get time when the table was created, finding uptime of database. This is gathered from various blogs and stackoverflow.com answers. All these SQL uses V$ views and one will need SELECT_CATALOG_ROLE role to run these queries. Find sessions that blocks each other Find locks on records that are caused by two update operations on same record in different sessions. This often happens when one person updates a record using a SQL client and does not commit the change and the application/batch job tries to updates the same record. Then the second application waits forever hoping to acquire the lock. select s1.username || '@' || s1.machine     || ' ( SID=' || s1.sid || ' )   is blocking '     || s2.usernam...