Tuesday 7 May 2013

Hibernate - java.lang.ExceptionInInitializerError


root cause
java.lang.ExceptionInInitializerError
 com.maybank.auto.dp.utils.HibernateUtil.<clinit>(HibernateUtil.java:14)
 com.maybank.auto.dp.daos.LoginDao.getUserByUserid(LoginDao.java:61)
 com.maybank.auto.dp.actions.LoginAction.execute(LoginAction.java:56)
 org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58)
 org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67)
 org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
 org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
 org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
 org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
 org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
 org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
 org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
root cause
java.lang.NumberFormatException: For input string: ""
 java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
 java.lang.Integer.parseInt(Integer.java:470)
 java.lang.Integer.parseInt(Integer.java:499)
 org.hibernate.cfg.HbmBinder.bindColumn(HbmBinder.java:1676)
 org.hibernate.cfg.HbmBinder.bindColumns(HbmBinder.java:1044)
 org.hibernate.cfg.HbmBinder.bindColumnsOrFormula(HbmBinder.java:1547)
 org.hibernate.cfg.HbmBinder.bindSimpleValue(HbmBinder.java:1143)
 org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:2102)
 org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:2060)
 org.hibernate.cfg.HbmBinder.bindRootPersistentClassCommonValues(HbmBinder.java:381)
 org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:295)
 org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:166)
 org.hibernate.cfg.Configuration.add(Configuration.java:716)
 org.hibernate.cfg.Configuration.addInputStream(Configuration.java:551)
 org.hibernate.cfg.Configuration.addResource(Configuration.java:613)
 org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1635)
 org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1603)
 org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1582)
 org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1556)
 org.hibernate.cfg.Configuration.configure(Configuration.java:1476)
 org.hibernate.cfg.Configuration.configure(Configuration.java:1462)
 com.maybank.auto.dp.utils.HibernateUtil.<clinit>(HibernateUtil.java:9)
 com.maybank.auto.dp.daos.LoginDao.getUserByUserid(LoginDao.java:61)
 com.maybank.auto.dp.actions.LoginAction.execute(LoginAction.java:56)
 org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58)
 org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67)
 org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
 org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
 org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
 org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
 org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
 org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
 org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

1 comment:

  1. Make sure that the Hibernate Mapping file and their attribute are properly initialize.

    ReplyDelete