Re: [OT] Scheduled DB clean up service with Spring

2008-04-16 Thread Peter Theissen

Hi,

many thanks to you! I was really making things more complicated
then it was neccessary: Adding the quartz.jar to the runtime classpath
was enough to fix the problem.

Have a nice day
Peter



Hi Peter,

Please try adding the quartz.jar or spring-quartz.jar to your classpath. You 
can check out http://www.springframework.org for the dependencies of the spring 
version you're using.

Pls don't add anymore jars at the moment. Also, I would suggest reverting your 
original classpath settings prior to testing the above, to isolate issues.

Reginald Javier

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 16, 2008 4:10 AM
To: Struts Users Mailing List
Subject: Re: [OT] Scheduled DB clean up service with Spring

Hi all,

sorry to continue with that OT thread, but its starting to get
really mad out here. But first of all, thanks for the hint that
the runtime classpath (rcp) has to be configured independently.
Well, I tried that but it ended up in a mess!

Of course, first thing I did was adding spring.jar to rcp of the
Apache... and I was awating the startup of my Webapp
joyfully. The joy ended quite soon with the following message
below (***)

Then I added servlet-api.jar to the rcp and another exception.
For every exception I got, I added a new (corresponding) jar
file. This ended up in a NullPointerEx. I guess thats because
the order of the jar files is also important.
However, to add those jars to the rcp, I added them in the
Run Dialog under Classpath, first I tried that under "User
Entries" and then under "Bootstrap Entries" in different permutations
and so on and so on. Happy trial and error.
But after some hours I have to admint: that doesnt make sense
any longer.

Can it be so difficult to use load class of the Spring Lib at runttime
and create it as a bean?
 >>>

<<<
If I omit this line, I have no problem to start the app at all!
In that case, my webApp works perfectly with default config:
Bootstrap Entries: JRE System Lib  jre_1.6.0_5
User Entries: bootstrap.jar

How can I find out what the required jar files are to add to the rcp
except Spring.jar and in which order do I have to provide them.
Which of them have to be in "Bootstrap Entries" and which one in
"User Entries"?

Could anybody point me to the rigth direction, please?
I have lost the rigth path ;-)

Thanks and best regards
Peter

PS: sorry if my question is not formulated professional,
Im quite new to all that JavaWebFramework stuff.

 >>>  (***)
java.lang.NoClassDefFoundError: javax/servlet/ServletContextListener
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
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
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1275)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1206)
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3786)
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: java.lang.ClassNotFoundException:
javax.servlet.ServletContextListener
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.ClassLo

RE: [OT] Scheduled DB clean up service with Spring

2008-04-15 Thread Reginald.Javier
Hi Peter,

Please try adding the quartz.jar or spring-quartz.jar to your classpath. You 
can check out http://www.springframework.org for the dependencies of the spring 
version you're using.

Pls don't add anymore jars at the moment. Also, I would suggest reverting your 
original classpath settings prior to testing the above, to isolate issues.

Reginald Javier

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 16, 2008 4:10 AM
To: Struts Users Mailing List
Subject: Re: [OT] Scheduled DB clean up service with Spring

Hi all,

sorry to continue with that OT thread, but its starting to get
really mad out here. But first of all, thanks for the hint that
the runtime classpath (rcp) has to be configured independently.
Well, I tried that but it ended up in a mess!

Of course, first thing I did was adding spring.jar to rcp of the
Apache... and I was awating the startup of my Webapp
joyfully. The joy ended quite soon with the following message
below (***)

Then I added servlet-api.jar to the rcp and another exception.
For every exception I got, I added a new (corresponding) jar
file. This ended up in a NullPointerEx. I guess thats because
the order of the jar files is also important.
However, to add those jars to the rcp, I added them in the
Run Dialog under Classpath, first I tried that under "User
Entries" and then under "Bootstrap Entries" in different permutations
and so on and so on. Happy trial and error.
But after some hours I have to admint: that doesnt make sense
any longer.

Can it be so difficult to use load class of the Spring Lib at runttime
and create it as a bean?
 >>>

<<<
If I omit this line, I have no problem to start the app at all!
In that case, my webApp works perfectly with default config:
Bootstrap Entries: JRE System Lib  jre_1.6.0_5
User Entries: bootstrap.jar

How can I find out what the required jar files are to add to the rcp
except Spring.jar and in which order do I have to provide them.
Which of them have to be in "Bootstrap Entries" and which one in
"User Entries"?

Could anybody point me to the rigth direction, please?
I have lost the rigth path ;-)

Thanks and best regards
Peter

PS: sorry if my question is not formulated professional,
Im quite new to all that JavaWebFramework stuff.

 >>>  (***)
java.lang.NoClassDefFoundError: javax/servlet/ServletContextListener
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
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
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1275)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1206)
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3786)
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: java.lang.ClassNotFoundException:
javax.servlet.ServletContextListener
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)
... 28 more
<<<


-
To un

Re: [OT] Scheduled DB clean up service with Spring

2008-04-15 Thread Gabriel Belingueres
As a basic rule of thumb, you shall _never_ add the servlet-api.jar or
servlet.jar to the WEB-INF/lib folder (if that's what you are doing)

Consider reading this:

http://tomcat.apache.org/tomcat-6.0-doc/appdev/deployment.html
http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html

If problems remains, consider then asking the right question to the
appropiate forum.

2008/4/15, Peter Theissen <[EMAIL PROTECTED]>:
> Hi all,
>
> sorry to continue with that OT thread, but its starting to get
> really mad out here. But first of all, thanks for the hint that
> the runtime classpath (rcp) has to be configured independently.
> Well, I tried that but it ended up in a mess!
>
> Of course, first thing I did was adding spring.jar to rcp of the
> Apache... and I was awating the startup of my Webapp
> joyfully. The joy ended quite soon with the following message
> below (***)
>
> Then I added servlet-api.jar to the rcp and another exception.
> For every exception I got, I added a new (corresponding) jar
> file. This ended up in a NullPointerEx. I guess thats because
> the order of the jar files is also important.
> However, to add those jars to the rcp, I added them in the
> Run Dialog under Classpath, first I tried that under "User
> Entries" and then under "Bootstrap Entries" in different permutations
> and so on and so on. Happy trial and error.
> But after some hours I have to admint: that doesnt make sense
> any longer.
>
> Can it be so difficult to use load class of the Spring Lib at runttime
> and create it as a bean?
> >>>
>  class="org.springframework.scheduling.quartz.SimpleTriggerBean"
> />
> <<<
> If I omit this line, I have no problem to start the app at all!
> In that case, my webApp works perfectly with default config:
> Bootstrap Entries: JRE System Lib  jre_1.6.0_5
> User Entries: bootstrap.jar
>
> How can I find out what the required jar files are to add to the rcp
> except Spring.jar and in which order do I have to provide them.
> Which of them have to be in "Bootstrap Entries" and which one in
> "User Entries"?
>
> Could anybody point me to the rigth direction, please?
> I have lost the rigth path ;-)
>
> Thanks and best regards
> Peter
>
> PS: sorry if my question is not formulated professional,
> Im quite new to all that JavaWebFramework stuff.
>
> >>>  (***)
> java.lang.NoClassDefFoundError:
> javax/servlet/ServletContextListener
>   at java.lang.ClassLoader.defineClass1(Native Method)
>   at java.lang.ClassLoader.defineClass(Unknown Source)
>   at java.security.SecureClassLoader.defineClass(Unknown
> Source)
>   at java.net.URLClassLoader.defineClass(Unknown Source)
>   at java.net.URLClassLoader.access$000(Unknown Source)
>   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
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1275)
>   at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1206)
>   at
> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3786)
>   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: java.lang.ClassNotFoundException:
> javax.servlet.ServletContextListener
>   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)
>   ... 28 more
>
> <<<
>
>
> -
> To unsubscribe, e-mail

Re: [OT] Scheduled DB clean up service with Spring

2008-04-15 Thread Haroon Rafique
On Today at 10:10pm, PT=>Peter Theissen <[EMAIL PROTECTED]> wrote:

PT> [..snip..]
PT> 
PT> Could anybody point me to the rigth direction, please?
PT> I have lost the rigth path ;-)
PT> 
PT> Thanks and best regards
PT> Peter
PT> 

Peter,

I am coming in a little cold into this thread, but I think when you 
originally posted your message the stack trace complained about not 
finding a class from the quartz package. This latest email, in my opinion, 
describes you getting into a completely different tanget compared to 
before. Revert your setup to what it was before and just try adding the 
quartz jar to the classpath. Spring was trying to initialize but it got 
stopped when it couldn't find the quartz jar. I would fix that problem 
first.

Later,
--
Haroon Rafique
<[EMAIL PROTECTED]>


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



Re: [OT] Scheduled DB clean up service with Spring

2008-04-15 Thread Peter Theissen

Hi all,

sorry to continue with that OT thread, but its starting to get
really mad out here. But first of all, thanks for the hint that
the runtime classpath (rcp) has to be configured independently.
Well, I tried that but it ended up in a mess!

Of course, first thing I did was adding spring.jar to rcp of the
Apache... and I was awating the startup of my Webapp
joyfully. The joy ended quite soon with the following message
below (***)

Then I added servlet-api.jar to the rcp and another exception.
For every exception I got, I added a new (corresponding) jar
file. This ended up in a NullPointerEx. I guess thats because
the order of the jar files is also important.
However, to add those jars to the rcp, I added them in the
Run Dialog under Classpath, first I tried that under "User
Entries" and then under "Bootstrap Entries" in different permutations
and so on and so on. Happy trial and error.
But after some hours I have to admint: that doesnt make sense
any longer.

Can it be so difficult to use load class of the Spring Lib at runttime
and create it as a bean?
>>>
class="org.springframework.scheduling.quartz.SimpleTriggerBean" />

<<<
If I omit this line, I have no problem to start the app at all!
In that case, my webApp works perfectly with default config:
Bootstrap Entries: JRE System Lib  jre_1.6.0_5
User Entries: bootstrap.jar

How can I find out what the required jar files are to add to the rcp
except Spring.jar and in which order do I have to provide them.
Which of them have to be in "Bootstrap Entries" and which one in
"User Entries"?

Could anybody point me to the rigth direction, please?
I have lost the rigth path ;-)

Thanks and best regards
Peter

PS: sorry if my question is not formulated professional,
Im quite new to all that JavaWebFramework stuff.

>>>  (***)
java.lang.NoClassDefFoundError: javax/servlet/ServletContextListener
   at java.lang.ClassLoader.defineClass1(Native Method)
   at java.lang.ClassLoader.defineClass(Unknown Source)
   at java.security.SecureClassLoader.defineClass(Unknown Source)
   at java.net.URLClassLoader.defineClass(Unknown Source)
   at java.net.URLClassLoader.access$000(Unknown Source)
   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 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1275)
   at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1206)
   at 
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3786)
   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: java.lang.ClassNotFoundException: 
javax.servlet.ServletContextListener

   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)
   ... 28 more
<<<


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



Re: [OT] Scheduled DB clean up service with Spring

2008-04-15 Thread Gabriel Belingueres
INF/applicationContext.xml]: problem with class file or dependent
class; nested exception is java.lang.NoClassDefFoundError:
org/quartz/SimpleTrigger

You missed some quartz jar file.

2008/4/15, Peter Theissen <[EMAIL PROTECTED]>:
> 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(DefaultListableBea

Re: [OT] Scheduled DB clean up service with Spring

2008-04-15 Thread Nils-Helge Garli Hegvik
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.springframew

Re: [OT] Scheduled DB clean up service with Spring

2008-04-15 Thread Peter Theissen

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.beansOfTyp

Re: [OT] Scheduled DB clean up service with Spring

2008-04-12 Thread Laurie Harper

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:
 >>>
   class="org.springframework.scheduling.quartz.SimpleTriggerBean">


 

   
<<<
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]



[OT] Scheduled DB clean up service with Spring

2008-04-12 Thread Peter Theissen

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:
>>>
   class="org.springframework.scheduling.quartz.SimpleTriggerBean">


 

   
<<<
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?

Thanks and best regards
Peter





I've been doing periodic tasks in my web app: I'm using Spring and
setting a periodic task to execute is kind of straightforward, but has
nothing to do with Struts 2.

2008/4/11, Peter Theissen <[EMAIL PROTECTED]>:
  

Hello,

I now searched a while to get an idea how to implement
a DB clean up service with Struts2. The best link I found
was the following one:
following
http://www.javabeat.net/javabeat/ejb3/articles/timer_services_api_in_ejb_3_0_2.php

What I dont understand is how to get the session context.
As described in the link Im using dependency injection:

@Resource

Private SessionContext s;
<<<
but unfortunately that doesnt work. Eclipse says that it
doesnt know the @Resource annotation.
However, the ejb3-persistence.jar is integrated in the
libs. Therefore, the annotation should be well known
to Eclipse?

What I also dont understand that - even when I got that
stuff with that timer working -  "who" starts the bean the
first time? Do I have to reconfigure something?
What happens if I restart the server?

Another more general question is:
is that the most suitable way to implement the
DB clean up service, assuing that further services
wont be added in the future (otherwise: scheduler as
far from what I've read)?

Thanks and best regards
Peter




-
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]