Saturday, December 22, 2012

Sql Developer - Unable to create instance of java virtual machine

When trying to open SQL Developer IDE, you will get the following exception poped up
unable to create instance of java virtual machine sql developer
SQL Developer is created uisng JAVA, it needs the Java Virtual Machine to run the IDE, sometime the memory allocated to kick start doesn't have enough, then you will see the above exception. To fix, we need to increase the memory allocated to the JVM.

Just AddVMOption -Xmx512M in sqldeveloper\ide\bin\ide.conf. This will resolve the issue.

Happy Programming...!!!

Sunday, December 9, 2012

Hibernate Error : java.lang.NoClassDefFoundError: antlr/ANTLRException

When you are working with the Hibernate Query, you will get the following error
java.lang.NoClassDefFoundError: antlr/ANTLRException
 org.hibernate.hql.ast.ASTQueryTranslatorFactory.createQueryTranslator(ASTQueryTranslatorFactory.java:35)
 org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:74)
 org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:56)
 org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:72)
 org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:133)
 org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:112)
 org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1623)
All you need is to download the latest version of antlr jar. You can download this from here antlr-2.7.7.jar, and put it under your web lib folder.

Happy Programming...!!!