[gradebook2-dev] Altering GB2 Learner model

Jon Gorrono jpgorrono at ucdavis.edu
Fri Sep 21 17:16:23 PDT 2012


interesting.... so could be bad packaging or a bug in GWT's handling
of stuff in dev mode.

A general question to the list: Should we put these in subversion for
now?... of course 'for now' may mean 'forever', since we will most
likely forget why we put it in there ")

On Fri, Sep 21, 2012 at 1:07 PM, Gross,Christopher <ufchrisg at ufl.edu> wrote:
> I found what I had to do:
>
> Put slf4j-api.jar and slf4j-log4j12.jar in ./war/WEB-INF/lib - I used version 1.5.8 of both as that is what is listed as required by ehcache-core 1.7.2.
>
> -Chris
>
> -----Original Message-----
> From: Gross,Christopher
> Sent: Thursday, September 20, 2012 4:00 PM
> To: 'Jon Gorrono'
> Cc: Thomas Amsler; Constance Fuller; gradebook2-dev at collab.sakaiproject.org
> Subject: RE: Altering GB2 Learner model
>
> I am back to looking at this again and I have one question:
>
> Caused by: java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
>         at net.sf.ehcache.CacheManager.<clinit>(CacheManager.java:83)
>         at org.hibernate.cache.EhCacheProvider.start(EhCacheProvider.java:124)
>
> This is the very last "caused by" in the errors and I am wondering if ehcache being mentioned here is of any significance.  The error I was getting before this one was because .classpath set a var to look for ehcache 1.6.1 in the repo but Sakai (trunk, and 2.8+) now use ehcache-core 1.7.2.  I changed .classpath to look for ehcache-core 1.7.2 instead, refreshed the workspace, and now am seeing those loggerfactory errors.  I believe this change in ehcache's artifactid/version was relatively recent, as in less than a year.
>
> -Chris
>
> -----Original Message-----
> From: Jon Gorrono [mailto:jpgorrono at ucdavis.edu]
> Sent: Thursday, September 06, 2012 1:37 PM
> To: Gross,Christopher
> Cc: Thomas Amsler; Constance Fuller; gradebook2-dev at collab.sakaiproject.org
> Subject: Re: Altering GB2 Learner model
>
> Yes, I am seeing this, too. It looks like a conflict in versions among transient dependencies.... I haven't been able to work it out yet. I just wanted confirm your version of reality :)
>
> Did you find the solution?
>
> On Wed, Aug 29, 2012 at 6:20 AM, Gross,Christopher <ufchrisg at ufl.edu> wrote:
>> Changing the classpath entry below did get me beyond that point... to this one!
>>
>> [WARN] Nested in
>> org.springframework.beans.factory.BeanCreationException: Error
>> creating bean with name 'DevelopmentModeBean' defined in
>> ServletContext resource [/WEB-INF/gbServices-hosted.xml]: Cannot
>> resolve reference to bean
>> 'org.sakaiproject.gradebook.gwt.sakai.Gradebook2ComponentService'
>> while setting bean property 'service';
>>
>> ... removed ...
>>
>> nested exception is java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory:
>> java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
>>
>>
>> slf4j was one of the missing jars I ran into originally but was able to import it into my maven repository manually and that probably wasn't the correct way of fixing that as something else must be missing.  Sakai grabs 1.4.2 (both 2.8 and trunk) so this isn't something that could have been "resolved" by building Sakai trunk.
>>
>> -Chris
>>
>> -----Original Message-----
>> From: Gross,Christopher
>> Sent: Tuesday, August 28, 2012 6:15 PM
>> To: 'Jon Gorrono'
>> Cc: Thomas Amsler; Constance Fuller
>> Subject: RE: Altering GB2 Learner model
>>
>> Could this be the reason:
>>
>> https://source.sakaiproject.org/contrib/gradebook2/tags/1.8.0/.classpath  - the tag we are using contains...
>>
>>         <classpathentry kind="var"
>> path="M2_REPO/net/sf/ehcache/ehcache/1.6.1/ehcache-1.6.1.jar"/>
>>
>> Our Sakai build is using ehcache-core-1.7.2 - for 1.7 I believe ehcache was either renamed or Sakai switched to using ehcache-core over ehcache.
>>
>> -Chris
>>
>> -----Original Message-----
>> From: Jon Gorrono [mailto:jpgorrono at ucdavis.edu]
>> Sent: Tuesday, August 28, 2012 5:10 PM
>> To: Gross,Christopher
>> Cc: Thomas Amsler; Constance Fuller
>> Subject: Re: Altering GB2 Learner model
>>
>> Looks you are building in an environment (sakai build) where a version
>> of ehcache prior to 1.7.0 was referenced... that method was introduced
>> in 1.7.0
>>
>> On Tue, Aug 28, 2012 at 1:02 PM, Thomas Amsler <tpamsler at ucdavis.edu> wrote:
>>> Looping in the team for feedback ...
>>>
>>> -- Thomas
>>>
>>> On Tue, Aug 28, 2012 at 12:02 PM, Gross,Christopher <ufchrisg at ufl.edu> wrote:
>>>> Ok, then as far as I can tell I have done everything correct:
>>>>
>>>> 1. Mvn clean install of Sakai trunk
>>>> 2. Import gradebook2 into eclipse as a maven project 3. Right click
>>>> gradebook2-base and select run as > Web application
>>>>
>>>> This fails with the error below.  Now, I also go back and modify the web application configuration that is automatically created and add in the VM arguments you mentioned, with some slight modifications for Windows (i.e. the /tmp/gb2 path) but that has the same result.
>>>>
>>>>
>>>> ERROR 14:55:44.416 [main           ] [ContextLoader            ] Context initialization failed
>>>> org.springframework.beans.factory.BeanCreationException: Error
>>>> creating bean with name
>>>> 'org.sakaiproject.gradebook.gwt.sakai.rest.resource.EntityArchiveTes
>>>> t er#0' defined in ServletContext resource
>>>> [/WEB-INF/rest-hosted.xml]:
>>>> Cannot resolve reference to bean
>>>> 'org.sakaiproject.archive.api.ArchiveService' while setting bean
>>>> property 'archiveService'; nested exception is
>>>> org.springframework.beans.factory.BeanCreationException: Error
>>>> creating bean with name 'org.sakaiproject.archive.api.ArchiveService'
>>>> defined in ServletContext resource
>>>> [/WEB-INF/applicationContext-hosted.xml]: Cannot resolve reference
>>>> to bean 'org.sakaiproject.time.api.TimeService' while setting bean
>>>> property 'timeService'; nested exception is
>>>> org.springframework.beans.factory.BeanCreationException: Error
>>>> creating bean with name 'org.sakaiproject.time.api.TimeService'
>>>> defined in ServletContext resource
>>>> [/WEB-INF/applicationContext-hosted.xml]: Invocation of init method
>>>> failed; nested exception is java.lang.NoSuchMethodError:
>>>> net.sf.ehcache.Ehcache.setStatisticsEnabled(Z)V
>>>>
>>>>
>>>> This is just the first of many similar errors that appear from this point on.  They all have a nested exception of "java.lang.NoSuchMethodError: net.sf.ehcache.Ehcache.setStatisticsEnabled(Z)V".
>>>>
>>>> -Chris
>>>>
>>>> -----Original Message-----
>>>> From: Thomas Amsler [mailto:tpamsler at ucdavis.edu]
>>>> Sent: Tuesday, August 28, 2012 12:13 PM
>>>> To: Gross,Christopher
>>>> Cc: Jon Gorrono; Constance Fuller
>>>> Subject: Re: Altering GB2 Learner model
>>>>
>>>> No you don't. When you build Sakai trunk, it will copy the built JARs into your local maven repository.  When you run GB2 in Eclipse's GWT development mode, it just loads the needed JARS from your local maven repository.
>>>>
>>>> So when you look at the Eclipse .classpath [1] file, you will see that all the JAR references are prefixed with M2_REPO. As long as you have built Sakai trunk, and have defined the M2_REPO variable in Eclipse, it should find all the references.
>>>>
>>>> Best,
>>>> -- Thomas
>>>>
>>>> [1]
>>>> https://source.sakaiproject.org/contrib/gradebook2/trunk/.classpath
>>>>
>>>> On Tue, Aug 28, 2012 at 8:52 AM, Gross,Christopher <ufchrisg at ufl.edu> wrote:
>>>>> Do I need to deploy the Sakai trunk code to anywhere in particular, such as the war directory for gb2, or is just installing them to local repo all that is needed?
>>>>>
>>>>> -Chris
>>>>>
>>>>>
>>>>>
>>>>> -----Original Message-----
>>>>> From: Thomas Amsler [mailto:tpamsler at ucdavis.edu]
>>>>> Sent: Monday, August 27, 2012 12:46 PM
>>>>> To: Gross,Christopher
>>>>> Cc: Constance Fuller; Jon Gorrono
>>>>> Subject: Re: Altering GB2 Learner model
>>>>>
>>>>> Chris,
>>>>>
>>>>> How did you configure the Web Application (GradebookApplication.html) "VM arguments"?
>>>>>
>>>>> On Mac OS X, I am using:
>>>>>
>>>>> -XstartOnFirstThread -Xmx1028m -XX:PermSize=256m
>>>>> -XX:MaxPermSize=256m -Dgb2.mode=hosted -Dgb2.role=admin
>>>>> -Dgb2.enable.scaled.extra.credit=true
>>>>> -Dgb2.gradable.role.names=Student,access
>>>>> -Dgb2.enabled.grade.types=POINT,PERCENT,LETTER
>>>>> -Dgb2.dev.mockItems=false -Dgb2.import.delete.missing.grades=true
>>>>> -Dgb2.security.enabled=true -DportalPath= -Dsakai.security=/tmp/gb2
>>>>> -Dsakai.home=/tmp/gb2
>>>>> -Dgb2.enable.final.grade.submission.check=true
>>>>> -Dgb2.enable.statistics.cache=true
>>>>> -Dgb2.statistics.cache.time.to.idle.seconds=40
>>>>> -Dgb2.statistics.cache.time.to.live.seconds=40
>>>>> -Dgb2.enable.final.grade.submission=true
>>>>>
>>>>> -- Thomas
>>>>>
>>>>> On Mon, Aug 27, 2012 at 8:22 AM, Gross,Christopher <ufchrisg at ufl.edu> wrote:
>>>>>> Got beyond all the jars and now this error pops up in the console when trying to run the configuration:
>>>>>>
>>>>>> Error: Could not find or load main class (optional)
>>>>>>
>>>>>> I read some posts about this possibly being caused by using 64-bit java, so I installed a 32-bit version however that did not resolve it.
>>>>>>
>>>>>> -----Original Message-----
>>>>>> From: Thomas Amsler [mailto:tpamsler at ucdavis.edu]
>>>>>> Sent: Friday, August 24, 2012 1:45 PM
>>>>>> To: Gross,Christopher
>>>>>> Cc: Constance Fuller; Jon Gorrono
>>>>>> Subject: Re: Altering GB2 Learner model
>>>>>>
>>>>>> Chris,
>>>>>>
>>>>>> If you are using the latest trunk, you have to manually install
>>>>>> GWT
>>>>>> v2.5.0-rc1 and link against that install library. Here is the URL
>>>>>> for downloading GWT v2.5.0-rc1
>>>>>>
>>>>>> Download: https://developers.google.com/web-toolkit/download
>>>>>>
>>>>>> Note: This step is not needed once Google releases an updated Eclipse GWT plugin containing v2.5.0.
>>>>>>
>>>>>> Best,
>>>>>> -- Thomas
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Thu, Aug 23, 2012 at 5:42 PM, Gross,Christopher <ufchrisg at ufl.edu> wrote:
>>>>>>> That took care of the Sakai-related dependencies but not the GWT ones. I figured, maybe I need to do the same thing with gb2 trunk, however the first jar that is missing is an older version than is already in my local maven repository (all previous problem jars were looking for newer versions).
>>>>>>>
>>>>>>> -Chris
>>>>>>>
>>>>>>> -----Original Message-----
>>>>>>> From: Thomas Amsler [mailto:tpamsler at ucdavis.edu]
>>>>>>> Sent: Thursday, August 23, 2012 4:38 PM
>>>>>>> To: Gross,Christopher
>>>>>>> Cc: Jon Gorrono; Constance Fuller
>>>>>>> Subject: Re: Altering GB2 Learner model
>>>>>>>
>>>>>>> Chris,
>>>>>>>
>>>>>>> Running GB2 in DEV mode uses a "minimal" Sakai mock environment. The mock "dependencies" are managed in the .classpath file. So before you run GB2 in Eclipses DEV mode for the first time, you have to build Sakai (trunk) first, so that the build populates the maven repository with all the necessary artifacts.
>>>>>>>
>>>>>>> Best,
>>>>>>> -- Thomas
>>>>>>>
>>>>>>> On Thu, Aug 23, 2012 at 12:55 PM, Gross,Christopher <ufchrisg at ufl.edu> wrote:
>>>>>>>> Thomas,
>>>>>>>>
>>>>>>>> I am trying to use Eclipse to debug gb2, however when I set up the run configuration I am noticing that, after selecting gradebook2-client as the project, it is placing jars in the classpath (found on classpath tab) from the m2repo that are 1) not present and 2) not the correct versions listed in the poms.  For example, when I try to run the configuration eclipse errors saying that archive-api-1.3-SNAPSHOT.jar is missing when that is expected because that jar isn't in my m2repo since it is nowhere in the gb2 poms - at least, for the gb2 code we have.  This goes for other dependencies as well.
>>>>>>>>
>>>>>>>> Any thoughts?
>>>>>>>>
>>>>>>>> -Chris
>>>>>>>>
>>>>>>>> -----Original Message-----
>>>>>>>> From: Thomas Amsler [mailto:tpamsler at ucdavis.edu]
>>>>>>>> Sent: Friday, August 10, 2012 12:01 PM
>>>>>>>> To: Gross,Christopher
>>>>>>>> Subject: Re: Altering GB2 Learner model
>>>>>>>>
>>>>>>>> Chris,
>>>>>>>>
>>>>>>>> Please create a GRBK JIRA ticket [1], where you can document your addition. This way the community can benefits from this information.
>>>>>>>>
>>>>>>>> Best,
>>>>>>>> Thomas
>>>>>>>>
>>>>>>>> [1] https://jira.sakaiproject.org/browse/GRBK
>>>>>>>>
>>>>>>>>
>>>>>>>> On Fri, Aug 10, 2012 at 7:36 AM, Gross,Christopher <ufchrisg at ufl.edu> wrote:
>>>>>>>>> Hello!
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> First, thank you again for quickly identifying that work-around
>>>>>>>>> for us with the grade scale sorting issue.  I have been
>>>>>>>>> assigned the task of adding in an extra column to the default
>>>>>>>>> GB2 instructor view, preferably a column that does not scroll
>>>>>>>>> like the student's name.  I have identified where to add in
>>>>>>>>> this new property to the learner model, but could use some
>>>>>>>>> assistance finding where this information is pulled from Sakai
>>>>>>>>> by GB2.  We are storing this additional piece of information in the user object created by the user directory provider, which we have also customized.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> -Chris
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>>
>>>>>>>>> Christopher Gross
>>>>>>>>>
>>>>>>>>> University of Florida
>>
>>
>>
>> --
>> 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 -
>> www.gswot.org>} http{middleware.ucdavis.edu}
>
>
>
> --
> 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 - www.gswot.org>} http{middleware.ucdavis.edu}



-- 
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 -
www.gswot.org>}
http{middleware.ucdavis.edu}


More information about the gradebook2-dev mailing list