Announcement Announcement Module
Collapse
No announcement yet.
Error creating bean Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • indraneels
    started a topic Error creating bean

    Error creating bean

    Hi, while deploying my app on Tomcat I get this error. I do have the class refered by the bean under class path.. Does anyone have any suggessions on how to resolve this.thanks

    ERROR org.springframework.web.context.ContextLoader ContextLoader.java(initWebApplicationContext:172) 12.11.2008 08:45:36 Context initialization failed
    org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'skillSetsPrototypeManager' defined in class path resource [applicationContext.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: null
    java.lang.NoClassDefFoundError
    at com.mycompany.skills.dao.SkillDescriptionDAO.getAl l(SkillDescriptionDAO.java:32)
    at com.mycompany.skills.SkillDescription.loadCache(Sk illDescription.java:58)
    at com.mycompany.skills.SkillDescription.getSkillDesc riptionFromCode(SkillDescription.java:67)
    at com.mycompany.skills.Skill.setCode(Skill.java:121)
    at com.mycompany.skills.Skill.<init>(Skill.java:22)
    at com.mycompany.skills.CompositeSkill.<init>(Composi teSkill.java:24)
    at com.mycompany.skills.SkillSetsPrototypeManagerImpl .buildSkillsTree(SkillSetsPrototypeManagerImpl.jav a:149)
    at com.mycompany.skills.SkillSetsPrototypeManagerImpl .loadSkillSetsTemplateFromXML(SkillSetsPrototypeMa nagerImpl.java:123)
    at com.mycompany.skills.SkillSetsPrototypeManagerImpl .init(SkillSetsPrototypeManagerImpl.java:111)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.invokeCustomInitMethod( AbstractAutowireCapableBeanFactory.java:1109)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.invokeInitMethods(Abstr actAutowireCapableBeanFactory.java:1079)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:349)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:257)
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:222)
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:146)
    at org.springframework.beans.factory.support.DefaultL istableBeanFactory.preInstantiateSingletons(Defaul tListableBeanFactory.java:291)
    at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:317)
    at org.springframework.web.context.support.AbstractRe freshableWebApplicationContext.refresh(AbstractRef reshableWebApplicationContext.java:131)
    at org.springframework.web.context.ContextLoader.crea teWebApplicationContext(ContextLoader.java:224)
    at org.springframework.web.context.ContextLoader.init WebApplicationContext(ContextLoader.java:150)
    at org.springframework.web.context.ContextLoaderListe ner.contextInitialized(ContextLoaderListener.java: 48)
    at org.apache.catalina.core.StandardContext.listenerS tart(StandardContext.java:3692)
    at org.apache.catalina.core.StandardContext.start(Sta ndardContext.java:4127)
    at org.apache.catalina.core.ContainerBase.addChildInt ernal(ContainerBase.java:759)
    at org.apache.catalina.core.ContainerBase.addChild(Co ntainerBase.java:739)
    at org.apache.catalina.core.StandardHost.addChild(Sta ndardHost.java:524)
    at org.apache.catalina.startup.HostConfig.deployWAR(H ostConfig.java:804)
    at org.apache.catalina.startup.HostConfig.deployWARs( HostConfig.java:693)
    at org.apache.catalina.startup.HostConfig.deployApps( HostConfig.java:472)
    at org.apache.catalina.startup.HostConfig.start(HostC onfig.java:1118)
    at org.apache.catalina.startup.HostConfig.lifecycleEv ent(HostConfig.java:310)
    at org.apache.catalina.util.LifecycleSupport.fireLife cycleEvent(LifecycleSupport.java:119)
    at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1020)
    at org.apache.catalina.core.StandardHost.start(Standa rdHost.java:718)
    at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1012)
    at org.apache.catalina.core.StandardEngine.start(Stan dardEngine.java:442)
    at org.apache.catalina.core.StandardService.start(Sta ndardService.java:450)
    at org.apache.catalina.core.StandardServer.start(Stan dardServer.java:680)
    at org.apache.catalina.startup.Catalina.start(Catalin a.java:536)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.apache.catalina.startup.Bootstrap.start(Bootst rap.java:275)
    at org.apache.catalina.startup.Bootstrap.main(Bootstr ap.java:413)

  • indraneels
    replied
    SkillDescriptionDAO class

    public class SkillDescriptionDAO {

    public List getAll(){
    Session session = null;
    List results = null;

    try {
    session = HibernateUtil.currentSession();
    results = session.find("from SkillDescription");
    } catch (HibernateException e) {
    log.info("Error while getting skills description");
    e.printStackTrace();
    } finally {
    try {
    HibernateUtil.closeSession(); /* line 32 */
    } catch(HibernateException e) {
    log.log(Level.SEVERE, "Error closing hibernate connection", e);
    }
    }

    return results;
    }
    private static Logger log = Logger.getLogger("com.mycompany.skills");
    }

    and also I have HibernateUtil class under classpath

    Leave a comment:


  • NubKnacker
    replied
    Post line 32 of SkillDescriptionDAO.java.

    Leave a comment:

Working...
X