[Building Sakai] Quartz

Steve Swinsburg steve.swinsburg at gmail.com
Wed Apr 10 07:32:36 PDT 2013


Yeah we are going to need to see the code before we can help more I think. Can you upload it somewhere? 

Sent from my iPhone

On 10/04/2013, at 22:36, David Adams <da1 at vt.edu> wrote:

> Antonio,
> The method that works best for me to extract myself from these types of problems is to start completely over with a new Tomcat and new project, make sure they run by themselves, then gradually add bits and pieces of the work I did in the original project, compiling and testing as I go, until I get to where I want to be. At this point, I think even if you did get it to work, you'd have something of a mess on your hands to deal with later.
> 
> Good luck.
> 
> -dave
> 
> David Adams
> Director, Systems Integration and Support
> Virginia Tech Learning Technologies
> 
> 
> On Wed, Apr 10, 2013 at 4:09 AM, Antonio muñoz alonso <antoniovalenciaspain at hotmail.com> wrote:
>> This trace was using SakaiPRoxy2.
>> 
>> - I created a function in Sakai Proxy2 that returns a String = "HELLO WORLD". return ERROR
>> -I created a normal class (without interface) in sakai.project.logic, which returns "Hello World", NO returns error.
>> ----------
>> Deleted ArchiveSites and commented bean.
>> In the list for a new job and does not appear,but running the existing work.
>> same error but without the line Archive Site
>> 
>> Trace:
>> java.lang.NullPointerException
>> 
>>     at org.sakaiproject.component.app.scheduler.jobs.SpringJobBeanWrapper.execute(SpringJobBeanWrapper.java:70)
>>     at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
>>     at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:534)
>> 2013-04-10 11:04:13,520 ERROR QuartzScheduler_Worker-1 org.quartz.core.ErrorLogger - Job (DEFAULT.Hola threw an exception.
>> 
>> org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: java.lang.NullPointerException]
>>     at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
>>     at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:534)
>> Caused by: java.lang.NullPointerException
>>     at org.sakaiproject.component.app.scheduler.jobs.SpringJobBeanWrapper.execute(SpringJobBeanWrapper.java:70)
>>     at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
>> 
>> CC: sakai-dev at collab.sakaiproject.org
>> From: steve.swinsburg at gmail.com
>> Subject: Re: [Building Sakai] Quartz
>> Date: Wed, 10 Apr 2013 12:30:28 +1000
>> To: antoniovalenciaspain at hotmail.com
>> 
>> 
>> That first line of the trace shows that archive sites is still loaded. Clean out tomcat and redeploy. 
>> 
>> Sent from my iPhone
>> 
>> On 10/04/2013, at 8:40, Antonio muñoz alonso <antoniovalenciaspain at hotmail.com> wrote:
>> 
>> I tried to delete archive sites and I've also created sakaiProxy2 and sakaiProxy2impl.
>> still shows the same error. :    (
>> 
>> The application is refreshed correctly.
>> 
>> java.lang.NullPointerException
>>     at org.sakaiproject.msub.alliance.jobs.ArchiveSites.execute(ArchiveSites.java:121)
>>     at org.sakaiproject.component.app.scheduler.jobs.SpringJobBeanWrapper.execute(SpringJobBeanWrapper.java:70)
>>     at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
>>     at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:534)
>> 2013-04-10 00:36:05,359 ERROR QuartzScheduler_Worker-1 org.quartz.core.ErrorLogger - Job (DEFAULT.m threw an exception.
>> org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: java.lang.NullPointerException]
>>     at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
>>     at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:534)
>> Caused by: java.lang.NullPointerException
>>     at org.sakaiproject.msub.alliance.jobs.ArchiveSites.execute(ArchiveSites.java:121)
>>     at org.sakaiproject.component.app.scheduler.jobs.SpringJobBeanWrapper.execute(SpringJobBeanWrapper.java:70)
>>     at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
>> 
>> 
>> Subject: Re: [Building Sakai] Quartz
>> From: steve.swinsburg at gmail.com
>> Date: Wed, 10 Apr 2013 07:12:05 +1000
>> CC: sakai-dev at collab.sakaiproject.org
>> To: antoniovalenciaspain at hotmail.com
>> 
>> It's probably that there are now two beans called sakaiProxy since both the quartz app and the main app have one each.
>> 
>> Again, delete the archive sites class (you will be writing your own) and comment out the stuff in components.xml for it,  get it all working, then add it back in and see where the failure is. Remove that dependency, not sure where you got that from. Make sure you are reading the current programmer manual.
>> 
>> 
>> On 10/04/2013, at 4:06 AM, Antonio muñoz alonso <antoniovalenciaspain at hotmail.com> wrote:
>> 
>> 
>> modified
>> This is the project structure:
>> 
>> -API->SakaiProxy,ProjectLogic...
>> -IMPL->SakaiProxyImpl,ProjectLogicImpl
>> -PACK-->Compoments.xml
>> -TOOL->BAsePAge,FirtsPAge,....
>> -QUARTZ->ArchiveSites.
>> 
>> From BasePage if accessible to sakai Proxy and Project Logic.
>> From ArchivesSite, all methods of sakaiPRoxy me back NPE.
>> 
>> In TOOL/POM and QUARTZ/POM, included:
>>     <dependency>
>>               <groupId>org.sakaiproject</groupId>
>>               <artifactId>app-api</artifactId>
>>      </dependency>
>> 
>> I see nothing different in the POM and componentes.xml
>> 
>> Any ideas?
>> 
>> From: antoniovalenciaspain at hotmail.com
>> To: steve.swinsburg at gmail.com
>> Date: Tue, 9 Apr 2013 12:38:33 +0200
>> CC: sakai-dev at collab.sakaiproject.org
>> Subject: Re: [Building Sakai] Quartz
>> 
>> My project:
>> 
>> -API
>> -IMPL
>> -PACK
>> -TOOL-->ArchivesSite,BasePage,FirstPage,......
>> 
>> From BasePage if accessible to sakai Proxy and Project Logic.
>> From ArchivesSite, all methods of sakaiPRoxy me back NPE.
>> It has the same POM, and okay componentes.xml
>> 
>> CC: sakai-dev at collab.sakaiproject.org
>> From: steve.swinsburg at gmail.com
>> Subject: Re: Quartz
>> Date: Tue, 9 Apr 2013 18:58:38 +1000
>> To: antoniovalenciaspain at hotmail.com
>> 
>> I'm telling you how to fix it :)
>> 
>> Sakai proxy and the dao is in the API and impl folders. You need those. You mentioned offline that you don't need a tool so you can delete that folder. Now add in the quartz parts and combine them. Note there is spring wiring required for both modules, so you need to combine them into one components.xml file. 
>> 
>> But in order to understand how to do it, you really need to read those pages I sent. Stick them into google and you'll find the pages. 
>> 
>> Cheers
>> Steve
>> 
>> 
>> Sent from my iPhone
>> 
>> On 09/04/2013, at 18:42, Antonio muñoz alonso <antoniovalenciaspain at hotmail.com> wrote:
>> 
>> Well I need to access functions that I have implemented in sakai proxy and theninsert data into the database.
>> 
>> No need to delete anything, I use it all.
>> 
>> not how to fix
>> CC: sakai-dev at collab.sakaiproject.org
>> From: steve.swinsburg at gmail.com
>> Subject: Re: Quartz
>> Date: Tue, 9 Apr 2013 09:00:38 +1000
>> To: antoniovalenciaspain at hotmail.com
>> 
>> Archive sites iS the quartz job class that I wrote, which you have now incorporated into your tool. I'm pretty sure it's not what you want, so delete just that one class, and write your own and adjust the components.xml to point to that one. 
>> 
>> Also, if you don't want the tool portion, delete that entire directory from the archetype. You said earlier you don't need the tool part b
>> 
>> Basepage etc is from the tool. You are
>> mixing up completely different things here. 
>> 
>> I suggest you read the following things, separately:
>> 
>> Sakai programmers manual
>> How to do quartz in Sakai
>> 
>> Thanks
>> Steve
>> 
>> Sent from my iPhone
>> 
>> On 09/04/2013, at 8:15, Antonio muñoz alonso <antoniovalenciaspain at hotmail.com> wrote:
>> 
>> Delete what class??
>> Do not understand why it does not work sakaiProxy in ArchiveSites.
>> any ideas??
>> Could it be because BasePage implements IHeaderContributor andextends webpage?.
>> 
>> thanks
>> 
>> CC: sakai-dev at collab.sakaiproject.org
>> From: steve.swinsburg at gmail.com
>> Subject: Re: Quartz
>> Date: Sat, 6 Apr 2013 23:00:58 +1100
>> To: antoniovalenciaspain at hotmail.com
>> 
>> Delete that class, write your own. Change packages to suit yourself.
>> 
>> Cheers 
>> 
>> Sent from my iPad
>> 
>> On 05/04/2013, at 21:53, Antonio muñoz alonso <antoniovalenciaspain at hotmail.com> wrote:
>> 
>> OK.
>> 
>> Error SakaiProxy in ArchiveSites.
>> 
>> @SpringBean(name="org.sakaiproject.logic.SakaiProxy")
>>     protected SakaiProxy sakaiProxy;
>> 
>> --Public void Excute----------
>> //get admin session
>>         establishSession();
>>         System.out.println(sakaiProxy.getCurrentUserId());
>> 
>> 
>> Trace:
>> 
>> java.lang.NullPointerExceptio
>>     at org.sakaiproject.msub.alliance.jobs.ArchiveSites.execute(ArchiveSites.java:120)
>>     at org.sakaiproject.component.app.scheduler.jobs.SpringJobBeanWrapper.execute(SpringJobBeanWrapper.java:70)
>>     at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
>>     at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:534)
>> 2013-04-05 12:50:49,791 ERROR QuartzScheduler_Worker-1 org.quartz.core.ErrorLogger - Job (DEFAULT.Hola threw an exception.
>> org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: java.lang.NullPointerException]
>>     at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
>>     at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:534)
>> Caused by: java.lang.NullPointerException
>>     at org.sakaiproject.msub.alliance.jobs.ArchiveSites.execute(ArchiveSites.java:120)
>>     at org.sakaiproject.component.app.scheduler.jobs.SpringJobBeanWrapper.execute(SpringJobBeanWrapper.java:70)
>>     at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
>> 
>> any ideas?.
>> 
>> Date: Wed, 3 Apr 2013 11:58:55 +1100
>> Subject: Re: Quartz
>> From: steve.swinsburg at gmail.com
>> To: antoniovalenciaspain at hotmail.com
>> CC: sakai-dev at collab.sakaiproject.org
>> 
>> Do it the other way around.
>> 
>> 1. Create project using archetype. Compile and run.
>> 2. Check out the quartz example. Compile and run.
>> 3. Move quartz code into project created in 1.
>> 
>> This way you only need to move one class a bit of XML. The other way you need to move multiple classes, API's and spring wiring.
>> 
>> 
>> 
>> On Wed, Apr 3, 2013 at 10:18 AM, Antonio muñoz alonso<antoniovalenciaspain at hotmail.com> wrote:
>> First Create and Compile this project : svn cohttps://source.sakaiproject.org/contrib/swinsburg/quartz-example/
>> Run Ok in tomcat.
>> 
>> After copy api and impl(SakaiProxy and SakaiLogic) of a project Sakai Maven Archetype.
>> No run in tomcat. 
>> CC: sakai-dev at collab.sakaiproject.org
>> From: steve.swinsburg at gmail.com
>> Subject: Re: Quartz
>> Date: Wed, 3 Apr 2013 09:16:57 +1100
>> To: antoniovalenciaspain at hotmail.com
>> 
>> 
>> If you do a brand new archetype project, then build and deploy, does it have the same error?
>> 
>> Try a fresh tomcat. 
>> 
>> Cheers
>> 
>> 
>> Sent from my iPhone
>> 
>> On 03/04/2013, at 8:32, Antonio muñoz alonso <antoniovalenciaspain at hotmail.com> wrote:
>> 
>> I still have the same error, I have the same dependencies in sakai  Maven archetype . :(
>> 
>> Subject: Re: Quartz
>> From: steve.swinsburg at gmail.com
>> Date: Tue, 2 Apr 2013 22:41:44 +1100
>> CC: sakai-dev at collab.sakaiproject.org
>> To:antoniovalenciaspain at hotmail.com
>> 
>> Yes.
>> 
>> java.lang.NoClassDefFoundError: org/apache/commons/configuration/ConfigurationException
>> 
>> IIRC you need to bundle commons configuration inside the component pack, so list that dependency as compile scope in the pom. 
>> 
>> It would be much easier for you if you used the archetype to generate a working app, then added the quartz class and fe lines of wiring XML to it, rather than adding multiple classes and wiring to a quartz project. Pull out the tool module if you don't need it.
>> 
>> 
>> On 02/04/2013, at 11:47 AM, Antonio muñoz alonso <antoniovalenciaspain at hotmail.com> wrote:
>> 
>> any ideas??
>> 
>> org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.sakaiproject.msub.logic.ProjectLogic' defined in file [/opt/tomcat/components/alliance-quartz-pack/WEB-INF/components.xml]: Cannot resolve reference to bean 'org.sakaiproject.msub.dao.ProjectDao' while setting bean property 'dao'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.sakaiproject.msub.dao.ProjectDao' defined in file [/opt/tomcat/components/alliance-quartz-pack/WEB-INF/components.xml]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: org/apache/commons/configuration/ConfigurationException
>> 	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:275)
>> 	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)
>> 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)
>> 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
>> 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
>> 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
>> 	at java.security.AccessController.doPrivileged(Native Method)
>> 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
>> 	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
>> 	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
>> 	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
>> 	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
>> 	at org.sakaiproject.util.NoisierDefaultListableBeanFactory.getBean(NoisierDefaultListableBeanFactory.java:114)
>> 	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
>> 	at org.sakaiproject.util.NoisierDefaultListableBeanFactory.preInstantiateSingletons(NoisierDefaultListableBeanFactory.java:73)
>> 	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
>> 	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
>> 	at org.sakaiproject.component.impl.SpringCompMgr.init(SpringCompMgr.java:154)
>> 	at org.sakaiproject.component.cover.ComponentManager.getInstance(ComponentManager.java:98)
>> 	at org.sakaiproject.component.impl.ContextLoader.loadParentContext(ContextLoader.java:107)
>> 	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:195)
>> 	at org.sakaiproject.component.impl.ContextLoader.initWebApplicationContext(ContextLoader.java:64)
>> 	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
>> 	at org.sakaiproject.util.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:56)
>> 	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3795)
>> 	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4252)
>> 	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
>> 	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
>> 	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
>> 	at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:634)
>> 	at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:561)
>> 	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:496)
>> 	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1203)
>> 	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:319)
>> 	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
>> 	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
>> 	at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
>> 	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
>> 	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
>> 	at org.apache.catalina.core.StandardService.start(StandardService.java:448)
>> 	at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
>> 	at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
>> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>> 	at java.lang.reflect.Method.invoke(Method.java
>> 
>> _______________________________________________ sakai-dev mailing list sakai-dev at collab.sakaiproject.org http://collab.sakaiproject.org/mailman/listinfo/sakai-dev TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"
>> 
>> 
>> _______________________________________________
>> sakai-dev mailing list
>> sakai-dev at collab.sakaiproject.org
>> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>> 
>> TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20130411/820f2cc3/attachment.html 


More information about the sakai-dev mailing list