java.lang.NoClassDefFoundError: bsh/TargetError

Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in file [F:\jBPM-WorkSpace\jBPM-ssh\WebRoot\WEB-INF\applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: bsh/TargetError

Caused by: java.lang.NoClassDefFoundError: bsh/TargetError

    at java.lang.Class.getDeclaredMethods0(Native Method)

    at java.lang.Class.privateGetDeclaredMethods(Unknown Source)

    at java.lang.Class.getDeclaredMethods(Unknown Source)

    at org.hibernate.property.BasicPropertyAccessor.getterMethod(BasicPropertyAccessor.java:317)

    at org.hibernate.property.BasicPropertyAccessor.getGetterOrNull(BasicPropertyAccessor.java:297)

    at org.hibernate.property.BasicPropertyAccessor.createGetter(BasicPropertyAccessor.java:280)

    at org.hibernate.property.BasicPropertyAccessor.getGetter(BasicPropertyAccessor.java:275)

    at org.hibernate.util.ReflectHelper.getter(ReflectHelper.java:86)

    at org.hibernate.util.ReflectHelper.reflectedPropertyClass(ReflectHelper.java:77)

    at org.hibernate.mapping.SimpleValue.setTypeUsingReflection(SimpleValue.java:276)

    at org.hibernate.cfg.HbmBinder.createProperty(HbmBinder.java:2138)

    at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:2115)

    at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:2005)

    at org.hibernate.cfg.HbmBinder.bindSubclass(HbmBinder.java:830)

    at org.hibernate.cfg.HbmBinder.handleSubclass(HbmBinder.java:2184)

    at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:161)

    at org.hibernate.cfg.Configuration.add(Configuration.java:386)

    at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:427)

    at org.hibernate.cfg.Configuration.addResource(Configuration.java:482)

    at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1465)

    at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1433)

    at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1414)

    at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1390)

    at org.hibernate.cfg.Configuration.configure(Configuration.java:1325)

    at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:634)

    at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:134)

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1198)

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1167)

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:427)

    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)

    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)

    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)

    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)

    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:285)

    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)

    at org.springframework.context.support.FileSystemXmlApplicationContext.(FileSystemXmlApplicationContext.java:124)

    at org.springframework.context.support.FileSystemXmlApplicationContext.(FileSystemXmlApplicationContext.java:68)

    at org.test.Datatest.main(Datatest.java:21)

Caused by: java.lang.ClassNotFoundException: bsh.TargetError

    at java.net.URLClassLoader$1.run(Unknown Source)

    at java.security.AccessController.doPrivileged(Native Method)

    at java.net.URLClassLoader.findClass(Unknown Source)

    at java.lang.ClassLoader.loadClass(Unknown Source)

    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)

    at java.lang.ClassLoader.loadClass(Unknown Source)

    at java.lang.ClassLoader.loadClassInternal(Unknown Source)

    ... 38 more



网上下在一个bsh-xxx.jar,添加,OK!

你可能感兴趣的:(java,Hibernate,orm,jbpm,ssh)