Skip to main content


Showing posts from 2008

Accessing a windows form controls from another class

Answer is in this page:

In case its not accessible

If we have two classes like these
testclass.cs:using System;
using System.Collections.Generic;
using System.Text;namespace clTestProg
public class testClass
{ public void InitControls(System.Windows.Forms.GroupBox gbx)
System.Windows.Forms.Button buttonODelete = new System.Windows.Forms.Button();
System.Windows.Forms.Button buttonOUpdate = new System.Windows.Forms.Button();
System.Windows.Forms.Button buttonOAdd = new System.Windows.Forms.Button();
// buttonODelete
buttonODelete.Location = new System.Drawing.Point(251, 324);
buttonODelete.Name = "buttonODelete";
buttonODelete.Size = new System.Drawing.Size(75, 23);
buttonODelete.TabIndex = 0;
buttonODelete.Text = "&Delete";

Attempted a bean operation on a null object

We might get this error when we try to use a bean somewhere in our JSP! In such a case you can:
You could have such error when using jsp:setProperty or jsp:getProperty on a bean which does not exist. For example, if the "name" attribute does not match the "id" attribute of

Thus check the bean name and id you are using in different places...may be you are not using the same name everywhere!

How to connect to an oracle server on your network

I have an oracle server on my network! I have the client installed on my machine! If I want to connect to the server then I will have to do the following:
Copy the TNS file from Girish system (He has the server) to your systemTNS file is located in the following pathsourcedrive:\oracle\ora92\network\adminNow connect using Oracle SQL*Plus client using the login credentialsNow you can also find the hostname to be used using the TNS file:RDBDB = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = PAR1RDBDB)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = RDB) ))If the above pasted code is the content of the TNS file then you can connect to the sever using the hostname RDBDB!

Not able to add a servlet to the project in Eclipse

When you are not able to add a servlet to the current project in eclipse:
Check that when you want to add the servlet, on the Create Servlet window, you have the folder field populated automatically! If its not then the most possible reason is that somehow your JRE was deleted from your classpath!
Just add it using
1. Right Click Project you are working on from Package Explorer-
2. Go to Properties-
3. Go to Java Build Path from the right tree structure-
4. Go to Libraries Tab-
5. Choose Add Library Button-
6. Select JRE System Library-
7. Hit Next, the Radio button will prompt the Workspace default JRE, and let it be that way-
8. Hit Finish

Done now you can add your servlet!

Error when opening Eclipse Application

Issue: Normally when I first install eclipse, it gives me a popup window to choose my workspace but once I select the workspace and say that it is the default one...Eclipse doesn't show that window again...This window is the "Workspace Launcher" If at all in the future I want to change the workspace I used to do so after opening eclipse and then choosing "Switch Workspace" in the File menu...This restarts eclipse and opens it again in the new workspace! It was when I got this error while opening the application.

The default workspace is stored in the configuration\config.ini file, usually found where you installed Eclipse. If there isn't a default there (it's called osgi.instance.area) then it will prompt. If you have previously selected one, and clicked 'make this the default', then I believe it updates it in the config.ini file; if not, look in configuration\.settings\org.eclipse.ui.ide.prefs.
This files looks like this:

1--- #Sat May 31…

This project needs to migrate WTP data!

This stupid error kept coming when I changed the location of my project and tried to import it again...
This error didn't go away till I built the project using eclipse but once I used ANT to build my project! All I did was to igore the error! :) There was no effect of it on the project so I just happily ignored it :D

The preferences for the xdoclet runtime does not point to a valid installation

When importing a project I was getting this error "The preferences for the xdoclet runtime does not point to a valid installation" Followed the following procedure:
1. I tried to download the xdoclet jar file
2. Copy it somewhere in the hard disk
3. Point it to the jar file on eclipse

Java Build Path Errors

This is one bugging problem which occurs when you try to import an existing project into your current workspace...When this happens in eclipse take a quick look on the .classpath file in your project root folder!

Check all the references you are making in the .classpath file. Set the environment variables properly
Check the project references you have in here:

Java Exception: The type java.lang.Object cannot be resolved

Exeption Text: The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files
There can be two solutions to this problem when it occurs in Eclipse
Eclipse doesn’t know where the J2EE jar file is present. To give the path:
- Right Click Project you are working on from Package Explorer- Go to Properties- Go to Java Build Path from the right tree structure- Go to Libraries Tab- Choose Add External Jars Button- Select J2EE.jar file normally in C:\Sun\AppServer\lib folder.- Hit Finish

In Eclipse, the cause of this problem is that you somehow deleted the SYSTEM JRE LIBRARY associated with your project. Simple fix in Eclipse:-Right Click Project you are working on from Package Explorer-Go to Properties-Go to Java Build Path from the right tree structure-Go to Libraries Tab-Choose Add Library Button-Select JRE System Library-Hit Next, the Radio button will prompt the Workspace default JRE, and let it be that way-Hit Finish