The error message is pretty clear, you're missing some classes in your
classpath. The compile time classpath and runtime classpath is usually
not the same. Make sure that you have the required jar files in your
runtime classpath.

Nils-H

On Tue, Apr 15, 2008 at 12:04 PM, Peter Theissen <[EMAIL PROTECTED]> wrote:
> Hi,
>
>  back again with my problem. The root cause is:
>  >>>
>  SCHWERWIEGEND: Exception sending context initialized event to listener
> instance of class org.springframework.web.context.ContextLoaderListener
>  org.springframework.beans.factory.BeanCreationException: Error creating
> bean with name 'personService': Injection of persistence methods failed;
> nested exception is
> org.springframework.beans.factory.CannotLoadBeanClassException: Error
> loading class [org.springframework.scheduling.quartz.SimpleTriggerBean] for
> bean with name 'simpleTrigger' defined in ServletContext resource
> [/WEB-INF/applicationContext.xml]: problem with class file or dependent
> class; nested exception is java.lang.NoClassDefFoundError:
> org/quartz/SimpleTrigger
>    at
> org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.postProcessPropertyValues(PersistenceAnnotationBeanPostProcessor.java:323)
>    at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:966)
>    at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:462)
>    at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:404)
>    at java.security.AccessController.doPrivileged(Native Method)
>    at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:375)
>    at
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:263)
>    at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:170)
>    at
> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:260)
>    at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:184)
>    at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:163)
>    at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:430)
>    at
> org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:729)
>    at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:381)
>    at
> org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:254)
>    at
> org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:198)
>    at
> org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
>    at
> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
>    at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4350)
>    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
>    at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
>    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
>    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
>    at
> org.apache.catalina.core.StandardService.start(StandardService.java:516)
>    at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
>    at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
>    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>    at java.lang.reflect.Method.invoke(Unknown Source)
>    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
>    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
>  Caused by: org.springframework.beans.factory.CannotLoadBeanClassException:
> Error loading class
> [org.springframework.scheduling.quartz.SimpleTriggerBean] for bean with name
> 'simpleTrigger' defined in ServletContext resource
> [/WEB-INF/applicationContext.xml]: problem with class file or dependent
> class; nested exception is java.lang.NoClassDefFoundError:
> org/quartz/SimpleTrigger
>    at
> org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1140)
>    at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:514)
>    at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:222)
>    at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:304)
>    at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:298)
>    at
> org.springframework.beans.factory.BeanFactoryUtils.beansOfTypeIncludingAncestors(BeanFactoryUtils.java:224)
>    at
> org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findDefaultEntityManagerFactory(PersistenceAnnotationBeanPostProcessor.java:501)
>    at
> org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findEntityManagerFactory(PersistenceAnnotationBeanPostProcessor.java:471)
>    at
> org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor$PersistenceElement.resolveEntityManager(PersistenceAnnotationBeanPostProcessor.java:596)
>    at
> org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor$PersistenceElement.getResourceToInject(PersistenceAnnotationBeanPostProcessor.java:567)
>    at
> org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:193)
>    at
> org.springframework.beans.factory.annotation.InjectionMetadata.injectMethods(InjectionMetadata.java:116)
>    at
> org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.postProcessPropertyValues(PersistenceAnnotationBeanPostProcessor.java:320)
>    ... 31 more
>  Caused by: java.lang.NoClassDefFoundError: org/quartz/SimpleTrigger
>    at java.lang.ClassLoader.defineClass1(Native Method)
>    at java.lang.ClassLoader.defineClass(Unknown Source)
>    at java.security.SecureClassLoader.defineClass(Unknown Source)
>    at
> org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1819)
>    at
> org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:872)
>    at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1327)
>    at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1206)
>    at org.springframework.util.ClassUtils.forName(ClassUtils.java:230)
>    at
> org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:381)
>    at
> org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1134)
>    ... 43 more
>  Caused by: java.lang.ClassNotFoundException: org.quartz.SimpleTrigger
>    at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1360)
>    at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1206)
>    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
>    ... 53 more
>  <<<
>
>  Best regards
>  Peter
>
>
>
>
> > Peter Theissen wrote:
> >
> > > Hi,
> > >
> > > the quartz scheduler from Spring seemed to be a quite nice solution for
> > > my DB clean up service. Thanks for that hint.
> > > Now I have a quite curios problem. If I, e.g. create a bean in
> > > applicationContext.xml as follows:
> > >  >>>
> > >   <bean id="simpleTrigger"
> class="org.springframework.scheduling.quartz.SimpleTriggerBean">
> > >
> > >     <!-- props are first commented out, since they are not important for
> this issue
> > >     <property name="jobDetail" ref="jobInvokation"/>
> > >     <property name="repeatInterval" value="10000"/>
> > >      -->
> > >
> > >   </bean>
> > > <<<
> > > I get a org.springframework.beans.factory.BeanCreationException:
> > > nested exception is
> org.springframework.beans.factory.CannotLoadBeanClassException:
> > > Error loading class
> [org.springframework.scheduling.quartz.SimpleTriggerBean]
> > >
> > > But anyhow, if I import the class using:
> > > import org.springframework.scheduling.quartz.SimpleTriggerBean;
> > > in some POJO in the project everything is fine.
> > >
> > > What am I missing?
> > >
> >
> > The 'root cause' section of the stack trace? That should tell you why
> Spring can't instantiate the bean.
> >
> > L.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to