[Building Sakai] sakora-csv tool install?

Gregory Guthrie guthrie at mum.edu
Wed Feb 26 10:23:22 PST 2014


Yes; seems like this is the problem, missing sakora tables cause the update job(s) to fail:

   [root at sakai4test tomcat]# grep -r -i sakora_log *
   logs/catalina.out:2014-02-25 21:11:10,509 ERROR QuartzScheduler_Worker-3 org.hibernate.util.JDBCExceptionReporter - Table   'sakai.SAKORA_LOG' doesn't exist
   logs/catalina.out:Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'sakai.SAKORA_LOG' doesn't exist
   logs/catalina.out:2014-02-25 21:11:10,515 ERROR QuartzScheduler_Worker-3 org.hibernate.util.JDBCExceptionReporter - Table 'sakai.SAKORA_LOG' doesn't exist
   logs/catalina.out:Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'sakai.SAKORA_LOG' doesn't exist
   logs/catalina.out:Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'sakai.SAKORA_LOG' doesn't exist

In the source code:

   grep -r -i sakora_log *
   sakora-csv/samples/truncate_cm_tables.sql:TRUNCATE sakora_log;
   sakora-csv/samples/.svn/text-base/truncate_cm_tables.sql.svn-base:TRUNCATE sakora_log;
   sakora-csv/sakora-csv-api/api/target/classes/net/unicon/sakora/api/csv/model/SakoraLog.hbm.xml:  
        <class name="net.unicon.sakora.api.csv.model.SakoraLog" table="SAKORA_LOG">
   sakora-csv/sakora-csv-api/api/src/java/net/unicon/sakora/api/csv/model/.svn/text-base/SakoraLog.hbm.xml.svn-base: 
       <class name="net.unicon.sakora.api.csv.model.SakoraLog" table="SAKORA_LOG">
   sakora-csv/sakora-csv-api/api/src/java/net/unicon/sakora/api/csv/model/SakoraLog.hbm.xml: 
      <class name="net.unicon.sakora.api.csv.model.SakoraLog" table="SAKORA_LOG">

But where are these tables setup?  

The sakora-csv build seemed to be OK, but it had a bunch of Maven warnings - which I ignored - a note on SO indicates it is just a missing <version> specification in pom.xml files - and not serious (it's a Maven-3 new "feature").

mvn -Dmaven.tomcat.home=/opt/sakai/tomcat  install sakai:deploy
[INFO] Scanning for projects...
[WARNING]  
[WARNING] Some problems were encountered while building the effective model for net.unicon:sakai-sakora-csv-api:jar:1.8-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ org.sakaiproject:master:2.8.2, /root/.m2/repository/org/sakaiproject/master/2.8.2/master-2.8.2.pom, line 843, column 21
..
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
.
[INFO] Simple Sakai SIS Integration Services (Sakora CSV)  SUCCESS [1.689s]
[INFO] Simple Sakai SIS Integration Services (Sakora CSV) API  SUCCESS [5.930s]
[INFO] Simple Sakai SIS Integration Services (Sakora CSV) Implementation  SUCCESS [2.354s]
[INFO] Simple Sakai SIS Integration Services (Sakora CSV) Component Packaging  SUCCESS [2.568s]
[INFO] Simple Sakai SIS Integration Services (Sakora CSV) Tool  SUCCESS [1.916s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------

-----------------------------------------------------------------------------------------------------
Subject: RE: [Building Sakai] sakora-csv tool install?

Poking around a bit more, I see an error in the toncat/logs/catalina.out file:

   2014-02-25 21:11:10,510 ERROR QuartzScheduler_Worker-3 net.unicon.sakora.impl.csv.CsvSyncServiceImpl - Failed 
    to process batch at    [/opt/sakai/tomcat/sakai/sakora-csv/sakora-csv-batch-1393384270372] 
   during action [Sessions]. Skipping remainder of batch.

The sessions.csv file is the one which did show up in the CM_academic_session_T table, but not in the other table: Sakora_Session (which does not exist) where it should have been added (per the documentation as I read it).

   [root at sakai4test sakora-csv-batch-1393384270372]# l
   courseMembership.csv  courses.csv         courseSets.csv  sectionMembership.csv
   courseOfferings.csv   courseSections.csv  people.csv      sessions.csv

Is it possible that the non-existing SAKORA_* tables caused this failure, and then the job quit-failure?

So I still wonder why all of the cm_* tables (except academic_session) are empty, and the sakora_* tables are missing. Have I missed some setup step?
-------------------------------------------

From: Steve Swinsburg [mailto:steve.swinsburg at gmail.com] 
Sent: Wednesday, February 26, 2014 4:44 AM
To: Gregory Guthrie; Mark J. Norton
Cc: Neal Caidin; sakai-dev at collab.sakaiproject.org
Subject: Re: [Building Sakai] sakora-csv tool install?

I think Mark knows a fair bit about this? CC/d

cheers,
Steve

On Wed, Feb 26, 2014 at 3:02 PM, Gregory Guthrie <guthrie at mum.edu> wrote:
A bit more testing leaves me (still...) confused.

I ran the samples that come with sakora-csv (single), and the one I ran appeared to run, but in the database I find;

1) several of the tables indicated in the sakora-csv document are not even in the database (sakora_*).

2) of the entries sent to the test request, I only see one that was made - in the cm_academic_session_T table.

3) of all other cm_* tables that were to be updated, none were, and in fact all of them are empty.

I didn't see any error return from the curl test command, in fact no return.
???
-------------------------------------------
> -----Original Message-----
> From: Gregory Guthrie
> Sent: Tuesday, February 25, 2014 5:54 PM
> To: 'Steve Swinsburg'; 'Neal Caidin'
> Cc: sakai-dev at collab.sakaiproject.org
> Subject: RE: [Building Sakai] sakora-csv tool install?
>
> Steve,
> Thanks - I has a (silly) error in the mvn deploy command, undefined target for tomcat
> directory - so it all ran fine but did not deploy.
>
> I think I got it fixed now, but trying to do a simple(-est) test fails;
>
> From http:  (not intended to work, just a test...)
>    http://localhost/sakai-sakora-csv-tool/csv
> Gives:
>    HTTP Status 405 - HTTP method GET is not supported by this URL
>    type Status report
>    message HTTP method GET is not supported by this URL
>    description The specified HTTP method is not allowed for the requested resource (HTTP
> method GET is not supported by this URL).
>    Apache Tomcat/7.0.21
>
> And trying from curl:  (a do-nothing test of the service)
>    C:\Users\guthrie>curl -F "username=user" -F "password=mypass" http://sakai4test/sakai-
> sakora-tool/csv
> Gives:
>    HTTP Status 404 - /sakai-sakora-tool/csv
>    Status report:
>    Message
>    /sakai-sakora-tool/csv
>    The requested resource (/sakai-sakora-tool/csv) is not available
>
> The logs show:
>    192.168.10.50 - - [25/Feb/2014:17:35:36 -0600] "POST /sakai-sakora-tool/csv HTTP/1.1"
> 404 1018
>    Feb 25, 2014 5:46:40 PM org.apache.tomcat.util.http.Cookies processCookieHeader
>    INFO: Cookies: Invalid cookie. Value not a token or quoted value
>    192.168.10.50 - - [25/Feb/2014:17:46:40 -0600] "GET /sakai-sakora-csv-tool/csv
> HTTP/1.1" 405 1112
>
> Am I missing something here?
>
> ( I get a ton of these "Invalid cookie" messages in the logs...)
> -------------------------------------------
> From: Steve Swinsburg [mailto:steve.swinsburg at gmail.com]
> Sent: Monday, February 24, 2014 11:21 PM
> To: Gregory Guthrie
> Cc: sakai-dev at collab.sakaiproject.org
> Subject: Re: [Building Sakai] sakora-csv tool install?
>
> Hi Gregory,
>
> Check tomcat/logs/catalina.out when Tomcat is starting up to ensure that the tool starts up
> cleanly. There is probably an error in there related to this.
> cheers,
> Steve



More information about the sakai-dev mailing list