Oct
07
2009
0

JBoss and Oracle connection failing with java.lang.NoSuchMethodError: oracle.sql.converter.CharacterConverters.toUnicodeChars

Ever saw some/none of the DB calls in jboss (4.2.3) and oracle (9i) failing with the following error. The exceptions can be all different types, but eventually caused by this following exception.

.
.
Caused by: java.lang.NoSuchMethodError: oracle.sql.converter.CharacterConverters.toUnicodeChars([BI[CII)I
.
.

This happened when I tried to switch databases this morning (both Oracle 9i) . Nothing fixed it till I replaced both the Driver jars(nls_charset12-10.2.0.jar, ojdbc14-10.2.0.jar) , preferrably from somwhere the connection is working, I took them from a colleague.  Or you can try and download the latest drivers as well. But make sure to delete your server work and temp directories.

Written by Kishore in: java |
Jul
02
2009
5

Refresh ID3 tags of entire music library in iTunes (Windows)

If you are like me and manage your ID3 tags outside iTunes for your music, this is how you force iTunes to refresh all ID3 info without having to recreate the entire library.

  1. Select all songs (Ctrl+A)
  2. Right click the selection, click on ‘Get info’
  3. Without entering any data, just click on ‘Ok’ this will force iTunes to refresh ID3 info.
    NOTE: Care full not to enter anything in the ‘Get info’ dialog when it is open. Because anything you enter will be applied to all songs.

Voila! that should do it.

Written by Kishore in: windows | Tags: , ,
Mar
17
2009
0

Google Chrome Offline Installer (From Google)

Having issues downloading/updating google chrome due to corporate proxies. Try the offline installer from Google it-self.

Download the offline installer from Google http://www.google.com/chrome/thankyou.html?standalone=1&hl=en

Google Chrome Proxy Issues

Written by Kishore in: browsers | Tags: ,
Mar
10
2009
0

Subversion proxy connection issues with Eclipse (In windows)

If you are having issues connecting to your subversion repositories from Eclipse (May be with Subversive/Subclipse). Try the following.

Enter proxy details into Subversion configuration:

Open servers file in the following location

Window XP
C:\Documents and Settings\MyUserId\Application Data\Subversion\servers
Windows Vista
C:\Users\Clientside\AppData\Roaming\Subversion\servers

Update following lines at the end of file

[global]
http-proxy-exceptions = yourproxy exceptions (e.g. dev.company.com.au)
http-proxy-host = yourproxyhost (e.g. proxy.company.com.au)
http-proxy-port = your proxy port (e.g. 8080)
http-proxy-username = proxyusername
http-proxy-password = proxypassword

This step might not be needed all the time

Update Eclipse Proxy settings

Windows > Preferences

Type ‘proxy‘ in the filter text box. Go to ‘Network Connections’ config page. Choose manual proxy configuration and Update the proxy details.

Written by Kishore in: eclipse, java | Tags: , , , ,
Dec
17
2008
2

How to install OpenOffice.org 3.0 in Linux Mint

This is pretty simple in the linux mint. (You usually already have OpenOffice.org 2.4 which comes by default, so this is more like an upgrade procedure)

You add the OpenOffice deb repository as this is not yet available from Ubuntu reps and do a mintUpdate which will quickly tell you what is ready to be updated. Here we go.

Step 1 – Add openoffice.org repository. To do this first open Synaptic Package Manger, Go to Setting>Repositories. Click new which will add new repository at the end of list. Add the following details as shown in screenshot for the new repository entry. Then press ok to save.

add-repository-mint1

Step 2: Open mintUpdate (Menu>Administration>mintUpdate) and click on Refresh, Which will now show all the updates for open office. Click installl updates

Written by Kishore in: Uncategorized | Tags: , , ,
Dec
01
2008
0

Filter email from spam sites which uses different email id’s every time (in Gmail)

There is a cheap trick being played by one of those social networking sites (Siliconindia.com , Siliconindia.net, Siliconindia etc.), which has even managed to avoid the very good spam filter google has in gmail.  They use different pictures of girls (mostly good looking), different from addresses. Opt out does nothing, and both ‘Yes’ and ‘No’ take you to the same page.

I tried opting out and even the powerful Spam button, some improvement… but no, not a full solution.

So this week when I saw the one more spam email from them, I had enough. I Just decided to put a ban on emails from this domain to my inbox using a simple filter. This is very simple in Gmail. But I’m pretty sure all the other mail providers have the same kind of facilities.

Step 1 – Create a filter

Step 2 – Enter your filter criteria, Make sure to delete ‘From email address’, so the filter is effective. In my case I just said stop anything from this site coming to me. I had enough of them.

Click on test search at the end to see if this working cool and then click ‘Next Step’

Step 3 – Then click Create Filter. Voila you are done. You will never see one more evil email like this. But as the spammers evolve we need to evolve too..


Written by Kishore in: Uncategorized, tech | Tags: ,
Sep
16
2008
0

Free Pattern/Stripe background tile image generator

Ever searched google for some nice background stripe tile images only to be stuck at god awful pattern sites with patterns like dead wood and rusty steel to pink flowers. I DID!! like a gazillion times.

Finally someone to the rescue.

http://www.stripgenrator.com/

Pick choose create and download your own stripes all for FREE. Pretty much on the lines of ajaxload.info. These guys are cool, they make the web a better place and web development an interesting job, with discoveries to be made every day.

And don’t forget to click on ‘Your Stripes‘ to get inspired.

Just go there and check out for your self.

Written by Kishore in: web development | Tags: ,
Jul
17
2008
0

Retrieve items from Browser Cache (Firefox, Opera, IE)

Have you ever had to work on a live site and while uploading the changes something goes bad with whatever and your live copy gets deleted and that’s the only copy you have at the moment. (This can happen easily if you are using those file manager tools provided by hosting accounts which edit files in browser)

Anyway the quickest solution would be to get the files from the browser cache. If you have been testing the site simultaneously. I had to do this recently and it saved me lot of time and embarrassment. So here is how you can do it ….

On Firefox 3 (My favourite browser)

Type about:cache in address bar and voila you get access to all the cache. The view is functional and easy to use.


On Opera 9.5(Increasingly competing for my favourite browser spot, can even do that with one plugin like Firebug)

Type opera:cache in address bar and voila you go.. the best cache browser in the industry. Opera has some more cool features like SpeedDial.. anyway you can discover all that yourself by downloading it.

On IE 7. This takes just a bit longer. Click on Tools>Internet Options>Browsing History>Settings>View Files.. pretty logical huh!

Anyway it does the job…

Written by Kishore in: browsers, web development | Tags: , , , , ,
Jul
13
2008
0

A particular session variable’s value disappearing from $_SESSION in PHP

A particular session variable’s value disappearing from $_SESSION in PHP… ??

Just check to make sure you DON’T have register_globals turned On. This took me a few hour’s to figure out..

Example scenario..
Form Bean class

class FormBean
{
public $email;
public $name;
}

page1.php

$form = new FormBean();
$form->email = "someone@something.com.au";
$_SESSION['form'] = serialize($form);
header("location:page2.php");

page2.php

$form =NULL;
if(isset($_SESSION['form']))
{
$form = unserialize($_SESSION['form']);
}
echo $form->email;

Expected to print “someone@something.com.au” right. Usually it does. If it doesn’t and you see that all other session variables are intact except ‘form’, then it’s time to look at your ‘register_globals’ setting. One of my client uses this pretty lax hosting which had this on what it has done is ….

page2.php

$form =NULL; //This sets the form bean to NULL.. wherever it is stored. Throughout the entire website. (Even IN $_SESSION)

if(isset($_SESSION['form']))
{
$form = unserialize($_SESSION['form']);
}
echo $form->email;

So the lesson learnt for me was… Just check to make sure register_globals is Off whenever you switch to new hosting.. coz that is pure EVIL.

How you can turn it off.. There are two different ways.

  1. ini_set
  2. .htaccess

This also makes me feel that PHP’s OOP implementation is either misleading , buggy or at least fundamentally different to other OOP languages like Java or C#.

Consider this in Java:
FormBean.java

class FormBean
{
public String email;
}

TestFormBean.java

class TestFormBean
{
public static void main(String[] args)
{
FormBean form1 = new FormBean(); //Create new form bean
form1.email = "someone@something.com.au"; //populate form bean

FormBean form2 = form1; //Assign created form bean object to another reference variable
form1 = null;

System.out.println(form2.email);

//would still print "someone@something.com.au"
//i.e. Just setting one reference to NULL won't kill its object instance.

}
}

I have tested similar code with PHP though… I have only realised register_globals seems to affect the ways objects and their references are handled. Like setting one reference of an object to NULL killing the object instance, which essentially renders all my other references useless.

Written by Kishore in: php, web development | Tags: , ,
Jun
20
2008
0

Eclipse/RAD debugger timing out before starting server

Is your RAD/Eclipse Java debugger timing out before starting the server?

Have a gazillion projects in RAD/Eclipse which all have to be deployed in server for debugging all the time like I do?

There is an easy way to increase RAD/Eclipse debugger timeout.

  1. Go to Windows > Preferences > Java > Debug
  2. Increase both “Debugger time-out” and “Launch time-out” value to be much larger. Try values like 180000/360000 respectively for time-out values of 3 and 6 mins.

Full article at IBM

http://www-1.ibm.com/support/docview.wss?rs=2042&context=SSRTLW&context=SSJM4G&context=SSSTY3&context=SSCGQ7C&context=SSDV2W&uid=swg21212755&loc=en_US&cs=UTF-8&lang=en

Written by Kishore in: eclipse, java | Tags: , ,

Powered by WordPress. Theme: TheBuckmaker