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

Jon Gorrono jpgorrono at ucdavis.edu
Wed Jun 2 19:55:52 PDT 2010


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
>



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