Friday, September 18, 2009

Java mistakes by me-part 1 (A new venture...)

I was trying to establish a connection with an Oracle server for database connection using JDBC with the following syntaxes:
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection con=DriverManager.getConnection("jdbc.oracle.thin:@ip:port:",
"username","password");

I got the following errors during runtime after various stages and combinations of syntaxes:
1) noclassdeffounderror
2) unsupportedclassversionerror
3) sqlException
After breaking my head for nearly 5 hours I found that the solution is very simple.
What was missing is that the in the jre folder of the java sdk installation the classes12.jar file was not defined which defines the OracleDriver class.

Solution:

just get the classes12.jar file from the oracle folder. For me it was in a folder like:
"C:\oracle\product\10.2.0\db_1\jdbc\lib"
just copy it from the folder defined similarly in your computer and paste it in the folder like:
"C:\JDK\j2sdk1.4.2_13\jre\lib\ext"
and then execute your java program and access your database.

Also i found that we can declare the driver class also as below:
Class.forName("oracle.jdbc.OracleDriver");

It runs just fine :).

Tuesday, January 20, 2009

My Day

Pre-breakfast: 12 rounds of swimming pool; 7 breaststroke 5 freestyle; totally 600 meters

Breakfast:~2 cups of sprouted dal, 15 slices of cucumber, ~1/2 cup of chopped tomato, 4 slices of white bread,2 teaspoons butter, 1 glass of milk

Post breakfast- 6 chapters of the Novel by David Davidar-"The House of Blue Mangoes"( my first attempt at reading a 300+ pages novel)

Lunch: 4 rotis, 1 cup of chopped and fried beetroot, 2 cups of kadi with pakodas, 1 cup of yoghurt,1 cup of yellow split pea

post lunch: disappointing meeting with the professor

Evening: 1 glass of milk

Late evening: Jog through Institute- starting at Tapti Hostel following the road leading to playing grounds then tracing Biotechnology Department, the CAD desgin block, the Rarefied Gas Dynamics Laboratory, an abandoned 1 seat flying craft, the Campus Cafe, the Institute hospital, Kendra Vidyalaya, NSS water tank, Vana Vani, the border wall of Guindy National Park, the iconic IIT Main Gate, the Jalakanteswarar Temple, the Ladies Club, the Sree Durga Peeli Amman Temple, the Director's Residence, the Institute Stadium, the SAC centre, the Institute Gym( 5 pull ups, 6 pushups) and from the gym a walk back to the tapti hostel tracing along the way Sindhu, Institute Swimming Pool, Godavari Hostel, a view of Himalaya Mess, Basera, Side View of Saraswathi and finally back to Tapti Hostel.

Dinner: 7 pooris, 2 cups of aloo curry, 1 cup of yellow pulses, 1 cup of buttermilk, 1 banana

post dinner: A sudden rush of nostalgia. 5 years at IIT!

Sunday, November 09, 2008

Keeping it simple

The thoughts have piled up. They have crossed the danger level. It is time to flush them out, once more! Alas! These thoughts always choke the mind as they need words to support them and giving words to these thoughts is one of the major challenges I face. Of course, it is easy for every novelist to pour the thoughts out. After all, their mind is an ocean of words with thoughts floating in them and breeding more thoughts. Ah!" Mind is an ocean"- where have I heard that before?

fsssssssssssssssssssssshhhhhhhhh

Monday, September 08, 2008

Mind over matter

Let me try to explain my state of mind. I feel totally confused. I guess there are too many things to worry about and my mind is unable to sort out my tasks and suggest courses of actions. The only way to clear up my mind is to prioritize my tasks and complete them as soon as possible. When I tried to do that, thoughts of other tasks and deadlines kept creeping into my mind as a negative feedback. That lead to stress and tension. Worrying about the things to be done , I couldn't complete the task on hand and started other tasks simultaneously. That meant I had to worry about all the tasks at once and that lead to even more tension. I feel pathetic. Sometimes the burden of work seems so daunting that I just sit around and do nothing, letting the mind wander in abyss as if it had no purpose.

People who are good at multitasking are more successful and efficient in terms of productivity. Multitasking may either involve usage of more than one of the senses at a time or it may involve solving different problems at the same time.A person who drinks a cup of coffee while reading a newspaper and listening to a song from a mp3 player and simultaneously walking down a street is an example of the former type of multitasking. Another example is that of a hawker who winds up a toy while he walks around shouting about the things he sells. The cumulative effect of different pleasure giving or energy consuming tasks either add up or nullify each other so that we feel either very joyous or tired or just about normal. Multitasking is supposed to keep the mind alert, as we seek to complete the tasks in our terms. A manager is supposed to be very good at multitasking. After all, he has to handle different problems at the same time and is responsible for solutions of all the problems. This requires the mind to be in the alert state most of the time to perform all the tasks efficiently. The stress which the mind has to overcome is enormous and it increases with environmental factors like reputation of the company and manager. Often experience comes in handy to reduce the stress and that is why managers are often old and experienced people.

It is quite humbling to see many great people solving many great problems simultaneously around me, while I keep worrying about my state of mind. Another sentence that undermines my mind unfortunately. While the body driven by my soul writes this last line with little inputs from my mind, I feel a more relaxed person now and understand my mind much better.

Monday, July 07, 2008

Must see movies(8)


This 1977 documentary style film, beautifully captures the less appreciated sport of Bodybuilding. If nothing else, it is worth seeing for the muscles alone, which is surely to embarrass and inspire today's slothful and indolent population. Arnold Schwarzenegger is the cynosure of all eyes in the movie. We see "muscles" building up real time, as the movie gradually unfolds with the realization of the hard work and perseverance the bodybuilders have to put up with, as a part of their daily routine. It is mind-boggling to see these bodybuilders cooking themselves up to create sinewy delicacies. Bodybuilders, though from different backgrounds, having different emotional aspects and different driving forces, they all share the love and passion for being the best when it comes to bodybuilding.The charisma of Arnold and narration of the story bolsters the movie. Arnold's whole take on bodybuilding is highly informative, inspiring and at times prankish. The jocose rivalry between Arnold and Louis Ferrigno is shown in a very intense yet entertaining manner. Mike Katz and Franco create a great impact in their short screen time. It is a great movie and is sure to invigorate your sleepy muscles.

Tuesday, June 17, 2008

Prevention is better than cure!

Me: May I come in?
Doctor: Yes please. What is your problem?

Me:I have throat infection.
Doctor: Since?

Me: For the past 4 days.
Doctor: Did you have symptoms like fever, cough, phelgm, headache?

Me: yes!
Doctor: Ok! Open your mouth and say 'Aaaa'

Me: With my tongue out?
Doctor: oh yes please.

Me: Aaaa!
(Doctor laughs gently as if there was no need for exclamation
Doctor directs the torch into my mouth.)
Doctor: Hmm ok! Now turn to your back.

(Doctor places the stethoscope over different parts of my back and checks the body sounds and then prescribes some medicines along with the dosages.)
Me: Thank you doctor!



Hopefully the medicines will cure me!! But what should I do to prevent it in the future. By knowing the potential sources of infection( that includes water, food, sanitation, lifestyle) I can at least try to minimize my chances of getting the infection. Asking the doctor about it post diagnosis is a good idea. I only regret not asking about it.



Monday, May 26, 2008

Arcane Apologist's Argots

Advocate Arriyappa's abode aquisition story is quite apocryphal, albeit august. The advocate, an avid reader, audacious speaker and an abysmal singer was astute and also full of avarice. People had ambivalent feelings towards him. As the story goes, on a fine azure day, the advocate admonished his adjutants in an acerbic tone to be more careful in handling his appurtenance, when one of them broke his new apothecary table. It seems, he knew at that moment that a change of abode was the need of the hour. The adventitious incident was followed by an aggrandized search for a new abode. Nobody could allay or assuage him. Though people tried to allude him, it only led to increased asperity and from then on things went awry. The advocate searched and searched for days non-stop making him look asinine and his subordinates took to avocation during his house-hunt. During the ten days he spent on the lookout, he wore an atavistic and abjected look. When he finally found his dream abode, he averred to his subordinates with alacrity. The abode had an amazing arboretum and some antiquated, antediluvian antiques. The advocated avowed to hold an aria every year in his new abode with him being the singer. His antics were adverted to but never affronted. People grew fond of him and the amity accrued.