Feeds:
Posts
Comments

Telephone bill

The phone bill was exceptionally high and the man of the house called for meeting… on a Sunday morning… after breakfast…

Dad: People this is unacceptable. OK I do not use this phone, I use the one at the office But You too have to limit the use of the phone.

Mum: Same here, I hardly use this home telephone as I use my work telephone.

Son: Me too, I never use the home phone. I always use my company mobile.

All of them now in a state of shock and together they look at their maid who until now is patiently listening to them.

Maid (un baffled): So – what is the problem? We all use our work telephone.

Moral: Sometimes we do something and never realize that its wrong, until someone does the same to us.

When there are lot of classes to be loaded, we may come across this error;

Solution is simple;

Open \jboss-4.2.0.GA\bin\run.conf and update as follows;

if [ "x$JAVA_OPTS" = "x" ]; then
JAVA_OPTS=”-Xms256m -Xmx1024m -XX:MaxPermSize=512m -Dorg.jboss.resolver.warning=true

-Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000″
fi

That will fix the issue.

SQL> begin
     dbms_xdb.sethttpport(’8090′);
     dbms_xdb.setftpport(’2100′);
   end;

SQL> select dbms_xdb.gethttpport as “HTTP-Port”
            , dbms_xdb.getftpport as “FTP-Port” from dual;

HTTP-Port   FTP-Port
———- ———-
8090       2100

All Done.

Server JBoss/Tomcat at localhost was unable to start within .. seconds. If the server requires more time, try increasing the timeout in the server editor

If you find the above error;  open eclipse and double click on the server in “server tab”.

In the options screen edit the “Timeout field” to the required one.

1. Make sure you have defined result name input in your struts.xml file.

<action name=”tes” method=”testPhase”>
<result name=”input”>/Project.jsp</result>
</action>

2. Give fully qualified name under the tag class=”" in struts.xml for the particular action.

 

I got the following error while trying sqldeveloper though I have the jvm.dll file in the required location. All I had to do was to install 32 bit jdk and all went well.

Looks like sqldeveloper has issue with 64 bit jdk.

—————————
Oracle SQL Developer
—————————
Unable to launch the Java Virtual Machine
Located at path:
C:\Program Files\Java\jdk1.7.0_02\jre\bin\server\jvm.dll
—————————

If you see the error;

Error: no `server’ JVM at `C:\Program Files\Java\jre1.6.0\bin\server\jvm.dll’

There is a little trick to get the server JVM up and running:

Copy ‘server’ folder from the JDK’s JRE’s bin folder (example: C:\Program Files\Java\jdk1.6.0\jre\bin\server) and Paste the ‘server’ folder to JRE’s bin folder(example: C:\Program Files\Java\jre1.6.0\bin)

Done!

1. Constructor cannot return a value.
2. Interface cannot have constructor.
3. “A constructor cannot be abstract, static, final, native, strictfp, or synchronized”.
4. A constructor can be private.
5. Abstract class can have constructor.
6. A constructor can be overloaded.
7. Constructors are not members of a class. For this reason, constructors cannot be inherited; but can be accessed by a subclass. What does it mean? Constructors cannot be called with objects like d1.display(). To access a constructor create an object or access with subclass constructor (explicitly with super()).
8. Constructors are not inherited; only members (variables and methods) are inherited. So declaring a constructor final does not have any meaning as constructors cannot be overridden.
9. If a constructor is abstract, it cannot be implemented (cannot have body or no code). A constructor should have a body as constructor gives properties to an object at the time of creation itself.
10. Constructors are called when an object is created but cannot be called like a method (like d1.show()) with an object; so no necessity for a constructors to be static.
11. A constructor should not be synchronized as it locks the object in creation and thereby, as long as the object is not created no other object can be instantiated .
12. The methods which cannot be executed by JVM alone and depends on the underlying OS are known as native methods. Native methods execution is slow and for this reason many native methods throw a checked exception. Declaring a constructor native is unnecessarily inviting trouble and also a subclass constructor cannot call super class constructor easily.

A static initializer block will execute when a class is initialized — right after the class is loaded. This will happen (basically) the first time the class is referenced in the program. No instances need to be created. The static block will only be executed once (or in any case, only once each time the class is loaded.)

A constructor executes when, and only when, the “new” operator is used, or the Class.newInstance() or Constructor.newInstance() methods are called.

Moreover,

static block will execute first irrespective of if constructor is written or not.

order will always be static first and then constructor or any method.

Happy Thought

If you see someone without a smile, remember to give them one of yours!

Older Posts »