[gradebook2-dev] need to restart sakai whenever I make a code change to gradebook2

Jon Gorrono jpgorrono at ucdavis.edu
Mon Jun 7 18:05:32 PDT 2010


I just followed these steps in trunk and got no errors in the logs....


so if there was any trouble in the code it is gone now...not sure what
version to test in svn... are you referring to the 1.2.0 tag?

in the svn directory for the source, what is the output of the 'svn
info' command?

On Mon, Jun 7, 2010 at 8:55 AM, Thomas Amsler <tpamsler at ucdavis.edu> wrote:
> Kim,
> Please create a JIRA for this so that we can log any related information in
> the JIRA.
> Thank you.
> -- Thomas
>
> On Mon, Jun 7, 2010 at 6:12 AM, Kim Huang <kimhuang at oit.rutgers.edu> wrote:
>>
>> Jon,
>>
>> I just reproduced the same problem on the gradebook2 vendor code
>> (version 1.2) about few minutes ago.  You should be able to reproduce it
>> very easily by yourself. (for example, insert a debugging
>> statement(System.out.print) in Gradebook2ComponentServiceImpl.java, then
>> rebuild the gradebook2 directory(mvn clean install sakai:deploy) while
>> sakai is running. You will see the error message from catalina.out.
>>
>> I will file a jira on it.
>>
>> p.s. I don't need to make any change to the init() method of
>> Gradebook2ComponentServiceImpl for my local changes.
>>
>> Regards,
>> -Kim
>>
>> Jon Gorrono wrote:
>> > Gradebook2 doesn't depend on ItemService ... so something you are
>> > doing must be introducing the dependency... are you modifying the
>> > init() method of the GB2ComponentServiceImpl ?
>> >
>> > On Thu, Jun 3, 2010 at 10:01 AM, Kim Huang <kimhuang at oit.rutgers.edu>
>> > wrote:
>> >
>> >> Good suggestion, but I want to understand why
>> >> Gradebook2ComponentService
>> >> need the ItemService from sample-tool-jsf. I know I don't use it.
>> >> I think it is a bug.
>> >>
>> >> Thanks,
>> >> -Kim
>> >> Jon Gorrono wrote:
>> >>
>> >>> Hi, Kim.
>> >>>
>> >>> Looks like you *might* be trying to inject the ItemService into the
>> >>> Gradebook2ComponentService bean via Spring and spring cannot find the
>> >>> implementation... and I suspect it cannot find the api either.
>> >>>
>> >>> The ItemService is part of the sample jsf tools in sakai and the api
>> >>> there is not actually deployed to the tomcat /shared/lib directory nor
>> >>> is a sakai component created.
>> >>>
>> >>> You might be able to accomplish what want by modifying the pom.xml in
>> >>> the samples/sample-tool-jsf to deploy the api class to share/lib
>> >>>
>> >>> So
>> >>>  - build sakai with -Pexperimental to include the samples code
>> >>>  - declare the bean id to be the same as api packaged name:
>> >>> org.sakaiproject.sample.tool.ItemService
>> >>>  - make sure the api class (interface class) is deployed to
>> >>> /shared/lib
>> >>>
>> >>>
>> >>>
>> >>>
>> >>> On Wed, Jun 2, 2010 at 10:40 AM, Kim Huang <kimhuang at oit.rutgers.edu>
>> >>> wrote:
>> >>>
>> >>>
>> >>>> hi, folks,
>> >>>> Please help,
>> >>>>
>> >>>> It is painful to restart sakai whenever I make a code change to
>> >>>> gradebook2, otherwise it throws:
>> >>>>
>> >>>> org.springframework.beans.factory.BeanCreationException: Error
>> >>>> creating
>> >>>> bean with name
>> >>>> 'org.sakaiproject.gradebook.gwt.sakai.Gradebook2ComponentService'
>> >>>> defined in ServletContext resource [/WEB-INF/gbServices.xml]:
>> >>>> Invocation
>> >>>> of init method failed; nested exception is
>> >>>> org.springframework.beans.factory.CannotLoadBeanClassException:
>> >>>> Cannot
>> >>>> find class [org.sakaiproject.sample.tool.ItemServiceImpl] for bean
>> >>>> with
>> >>>> name 'org.sakaiproject.sample.tool.ItemService' defined in
>> >>>> ServletContext resource [/WEB-INF/components.xml]; nested exception
>> >>>> is
>> >>>> java.lang.ClassNotFoundException:
>> >>>> org.sakaiproject.sample.tool.ItemServiceImpl
>> >>>>   at
>> >>>>
>> >>>>
>> >>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338)
>> >>>>   at
>> >>>>
>> >>>>
>> >>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
>> >>>>   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.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
>> >>>>   at
>> >>>>
>> >>>>
>> >>>> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
>> >>>>   at
>> >>>>
>> >>>>
>> >>>> org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
>> >>>>   at
>> >>>>
>> >>>>
>> >>>> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
>> >>>>   at
>> >>>>
>> >>>>
>> >>>> org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
>> >>>>   at
>> >>>>
>> >>>>
>> >>>> org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
>> >>>>   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:3764)
>> >>>>   at
>> >>>>
>> >>>> org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
>> >>>>   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.deployWAR(HostConfig.java:831)
>> >>>>   at
>> >>>>
>> >>>> org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:720)
>> >>>>   at
>> >>>>
>> >>>> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)
>> >>>>   at
>> >>>> org.apache.catalina.startup.HostConfig.check(HostConfig.java:1218)
>> >>>>   at
>> >>>>
>> >>>>
>> >>>> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:293)
>> >>>>   at
>> >>>>
>> >>>>
>> >>>> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
>> >>>>   at
>> >>>>
>> >>>>
>> >>>> org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1306)
>> >>>>   at
>> >>>>
>> >>>>
>> >>>> org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1570)
>> >>>>   at
>> >>>>
>> >>>>
>> >>>> org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1579)
>> >>>>   at
>> >>>>
>> >>>>
>> >>>> org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1559)
>> >>>>   at java.lang.Thread.run(Thread.java:637)
>> >>>> Caused by:
>> >>>> org.springframework.beans.factory.CannotLoadBeanClassException:
>> >>>> Cannot
>> >>>> find class [org.sakaiproject.sample.tool.ItemServiceImpl] for bean
>> >>>> with
>> >>>> name 'org.sakaiproject.sample.tool.ItemService' defined in
>> >>>> ServletContext resource [/WEB-INF/components.xml]; nested exception
>> >>>> is
>> >>>> java.lang.ClassNotFoundException:
>> >>>> org.sakaiproject.sample.tool.ItemServiceImpl
>> >>>>   at
>> >>>>
>> >>>>
>> >>>> org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1141)
>> >>>>   at
>> >>>>
>> >>>>
>> >>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:524)
>> >>>>   at
>> >>>>
>> >>>>
>> >>>> org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1177)
>> >>>>   at
>> >>>>
>> >>>>
>> >>>> org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:222)
>> >>>>   at
>> >>>>
>> >>>>
>> >>>> org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:202)
>> >>>>   at
>> >>>>
>> >>>>
>> >>>> org.springframework.context.support.AbstractApplicationContext.getBeanNamesForType(AbstractApplicationContext.java:933)
>> >>>>   at
>> >>>>
>> >>>>
>> >>>> org.sakaiproject.gradebook.gwt.sakai.Gradebook2ComponentServiceImpl.init(Gradebook2ComponentServiceImpl.java:1698)
>> >>>>   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:597)
>> >>>>   at org.springframework.beans.factory.support.AbstractAutowir
>> >>>> _______________________________________________
>> >>>> gradebook2-dev mailing list
>> >>>> gradebook2-dev at collab.sakaiproject.org
>> >>>> http://collab.sakaiproject.org/mailman/listinfo/gradebook2-dev
>> >>>>
>> >>>>
>> >>>>
>> >>>
>> >>>
>> >>>
>> >>
>> >
>> >
>> >
>> >
>>
>> _______________________________________________
>> gradebook2-dev mailing list
>> gradebook2-dev at collab.sakaiproject.org
>> http://collab.sakaiproject.org/mailman/listinfo/gradebook2-dev
>
>



-- 
Jon Gorrono
PGP Key: 0x5434509D -
http{pgp.mit.edu:11371/pks/lookup?search=0x5434509D&op=index}
GSWoT Introducer - {GSWoT:US75 5434509D Jon P. Gorrono <jpgorrono - gswot.org>}
http{ats.ucdavis.edu}


More information about the gradebook2-dev mailing list