Forum LAMS for Tech-Heads - General Forum: Re: Re: Re: Problems deploying lams_tool_example


 
Search: 

6: Re: Re: Re: Problems deploying lams_tool_example
In response to 4 08/29/06 05:30 PM
[ Reply | Forward ]
Ken,

I'll deal with the two problems separately as the replies are rather long. First the tool icons in authoring. As you might have guessed, the "question mark with a red circle and slash on top" indicates that the Flash client couldn't get the image from the server for some reason. I suspect whatever is stopping it getting the icon is also causing the file not found.

Have a look in your access log. When you try to start authoring you should get similar entries to this:

127.0.0.1 - mmm [30/Aug/2006:09:09:07 +1000] "GET /lams/lams_preloader.swf?loadFile=lams_authoring.swf&loadLibrary=lams_authoring_library.swf&userID=4&serverURL=http://127.0.01:8080/lams/&build=2.0.200608291840&lang=en&country=AU&theme=default&uniqueID=190127664 HTTP/1.1" 200 34513
127.0.0.1 - mmm [30/Aug/2006:09:09:07 +1000] "GET /lams/lams_authoring_library.swf HTTP/1.1" 200 362339
127.0.0.1 - mmm [30/Aug/2006:09:09:07 +1000] "GET /lams/lams_authoring.swf?userID=4&serverURL=http://127.0.01:8080/lams/&build=2.0.200608291840&lang=en&country=AU&theme=default&uniqueID=190127664 HTTP/1.1" 200 254714
127.0.0.1 - mmm [30/Aug/2006:09:09:07 +1000] "GET /lams/lams_authoring.swf?userID=4&serverURL=http://127.0.01:8080/lams/&build=2.0.200608291840&lang=en&country=AU&theme=default&uniqueID=190127664 HTTP/1.1" 200 254714
127.0.0.1 - mmm [30/Aug/2006:09:09:07 +1000] "GET /lams/lams_authoring_library.swf HTTP/1.1" 200 362339
127.0.0.1 - mmm [30/Aug/2006:09:09:08 +1000] "GET /lams/flashxml/configData.xml HTTP/1.1" 200 2613
127.0.0.1 - mmm [30/Aug/2006:09:09:08 +1000] "GET /lams/flashxml/defaultTheme.xml HTTP/1.1" 200 8095
127.0.0.1 - mmm [30/Aug/2006:09:09:08 +1000] "GET /lams/flashxml/authoring/en_AU_dictionary.xml HTTP/1.1" 200 37343
127.0.0.1 - mmm [30/Aug/2006:09:09:10 +1000] "GET /lams/authoring/author.do?method=getAvailableLicenses HTTP/1.1" 200 3168
127.0.0.1 - mmm [30/Aug/2006:09:09:10 +1000] "GET /lams/authoring/author.do?method=createUniqueContentFolder&userID=4 HTTP/1.1" 200 337
127.0.0.1 - mmm [30/Aug/2006:09:09:13 +1000] "GET /lams/authoring/author.do?method=getAllLearningLibraryDetails HTTP/1.1" 200 23758
127.0.0.1 - mmm [30/Aug/2006:09:09:13 +1000] "GET /lams/tool/lasbmt11/images/icon_reportsubmission.swf HTTP/1.1" 200 1085
127.0.0.1 - mmm [30/Aug/2006:09:09:13 +1000] "GET /lams/tool/lavote11/images/icon_ranking.swf HTTP/1.1" 200 476
127.0.0.1 - mmm [30/Aug/2006:09:09:13 +1000] "GET /lams/images/icon_urlcontentmessageboard.swf HTTP/1.1" 200 617
127.0.0.1 - mmm [30/Aug/2006:09:09:13 +1000] "GET /lams/tool/larsrc11/images/icon_rsrc.swf HTTP/1.1" 200 573
127.0.0.1 - mmm [30/Aug/2006:09:09:13 +1000] "GET /lams/tool/laqa11/images/icon_questionanswer.swf HTTP/1.1" 200 307
127.0.0.1 - mmm [30/Aug/2006:09:09:13 +1000] "GET /lams/tool/lanb11/images/icon_htmlnb.swf HTTP/1.1" 200 370
127.0.0.1 - mmm [30/Aug/2006:09:09:13 +1000] "GET /lams/tool/lamc11/images/icon_mcq.swf HTTP/1.1" 200 279
127.0.0.1 - mmm [30/Aug/2006:09:09:13 +1000] "GET /lams/tool/lantbk11/images/icon_notebook.swf HTTP/1.1" 200 308
127.0.0.1 - mmm [30/Aug/2006:09:09:13 +1000] "GET /lams/tool/lafrum11/images/icon_forum.swf HTTP/1.1" 200 291
127.0.0.1 - mmm [30/Aug/2006:09:09:13 +1000] "GET /lams/tool/lachat11/images/icon_chat.swf HTTP/1.1" 200 284

Pick one of the entries, say the last one, and turn it into a full request and try it in your browser. For example http://localhost:8080/lams/tool/lachat11/images/icon_chat.swf. If it is working, then the icon will appear in your browser window. As it is a swf (ie a Flash file) it will probably scale - the icons scale themselves up to fill the browser window normally.

If that doesn't work then check that:

** Your server address is correct (e.g. localhost:8080). You need to double check that the url you are using to access LAMS matches the server name in lams.xml. The lams.xml is in lams_build/conf/windows/lams and is copied to c:/lamsconf when you do the "copyfiles" step in the build. The file in c:/lamsconf is the one used when JBOSS runs so if want to try out values without having to keep rebuilding, modify c:/lamsconf/lams.xml but remember it will be overwritten next time you do a complete build. The file is read when JBOSS starts up so if you change a value then you will need to restart JBOSS.

For example, if lams.xml has localhost:8080 you must use http://localhost:8080/lams/. Even using http://127.0.0.1:8080/lams/ won't work properly as the browser will see this as a different "server".

** Check if the war files have actually deployed correctly. You might want to find the matching war file (lachat11 is in [jboss]\server\default\deploy\lams.ear\lams-tool-lachat11.war) and unzip it and make sure the .swf file is actually in the .war file. If the .war file is missing, or the file is not in the .war file then we need to go back and check the build again.

** Check for any errors in system.log that may have occurred during the JBOSS startup. I'm thinking of errors that would have stopped the war files deploying. All the logs are in [jboss]\server\default\log

When a tool is deployed (as part of the build), it writes entries to the lams_tool, lams_learning_activity and lams_learning_library tables. If you are getting entries for the tools in authoring, then it suggests the tools built and deployed okay, just that something has gone wrong either during JBOSS starting up or with the servername.

Regards,

Fiona

Posted by Fiona Malikoff

11: More Problems deploying lams_tool_example
In response to 6 08/30/06 08:16 PM
[ Reply | Forward ]
>What is a good way to deal with CVS and these configuration files? Should I edit them each time I grab some new source code version?

> [java] Caused by: java.sql.BatchUpdateException: Can't create table '.\lams\#sql-28c_51.frm' (errno: 121)
> [java] at com.mysql.jdbc.Statement.executeBatch(Statement.java:709)
> [java] at org.lamsfoundation.lams.tool.deploy.ScriptRunner.executeStatements(ScriptRunner.java:107)
> [java] ... 4 more
> BUILD SUCCESSFUL
> Total time: 12 seconds

> Kind of confusing to say "BUILD SUCCESSFUL" when "TOOL DEPLOY FAILED" --
>particularly since as suggested I added my tool to the build/build.xml script.

Yeah that is a bit misleading but I've never managed to get all the ant flags just right so that it detects all the errors and gives the right message. Works right sometimes, not other times.

An unfortunately the error message "Can't create table '.\lams\#sql-28c_51.frm' (errno: 121)" isn't very helpful. I suspect there is something wrong relating to foreign keys in one of the db scripts.

Can you email me (fmalikoff@lamsinternational.com) the build.xml and the sql scripts and I'll try them out for myself. You can send me the entire project if you want, just clear out the build directory (build/classes, build/deploy, build/lib, etc) first - it will make it a bit smaller. :->

I'll try to log on again about 9:30pm tonight Brisbane time which I think is about 11:30 am in the UK (give or take daylight saving)? If you can get me the scripts then I'll try to look at them tonight and get back to you straight away.


>So then I dropped the whole lams schema using the MySQL Adminstrator tool, created a new "lams" schema and rebuilt evertyhing from the beginning.
>(I'm unclear when I need to rebuild like this?). But I still get the above error when I run deploy-tool. Everything else seems to be working.

You don't need to drop the database very often - normally just running rebuild-db will do the trick as it actually drops and recreates the database. (So you ask, why do I need to configure the database the first place? So that ANT doesn't throw a hissy fit. One of these days I'll find a way to work around it.)

But when I feel like I'm in the twilight zone and MySQL just doesn't want to work, then I delete and recreate the LAMS database. I usually find out afterwards that it was something I was doing wrong but I feel so much better for doing it.

And now you have the rest of the system and deployed okay, just keep running "deploy-tool" in your own project (rather than running the full build) until we get it deployed. You won't need to do another full build until either
(1) you check out the code again or
(2) you have run your tool and put data in the tool's database tables and then you get to the point where you want to clean out the tables and rebuild your tool.

We'll get your tool running first and I'll explain (2) in more detail then.


Regards,

Fiona

Posted by Fiona Malikoff

12: Re: More Problems deploying lams_tool_example
In response to 11 08/30/06 08:18 PM
[ Reply | Forward ]
I seem to have lost part of my previous post while editing. Ken asked:

>What is a good way to deal with CVS and these configuration files? Should I edit them each time I grab some new source code version?

I've yet to find a really good way. Ernie's way works really well until we go and change one of the configuration files and then you will be back to your original problem - you will miss out on the update.

Are you working within Eclipse? If so then this is what I do.

Doing "Team, Synchronise with Repository" for the lams_build directory. This will show you if there have been updates to the configuration files. lams.jar is updated regularly but the other files aren't updated very often. If you get a little
red arrow on a file, then you know you have a conflict i.e. there is an update to a a file you have changed. Then you update the file and then check
it to make sure your entries are okay.

For the other projects, its fine to do just do Team, Update as you aren't changing any files in the other projects, so you aren't likely to get any conflicts.

I'll have a think about adding a "custom tool" properties file which might save you some fiddling. But I'll have to think exactly how I can do it and if it would really make it any easier. Which entries have you changed in the properties file?

Regards,

Fiona

Posted by Fiona Malikoff

13: Re: Re: More Problems deploying lams_tool_example
In response to 12 09/01/06 03:40 AM
[ Reply | Forward ]
Regarding which configuration files I changed:

shared.properties -- to list my tool

windows.properties -- to say where JBOSS is

build.xml -- to add my tool (though as you suggested I could use deploy-tool directly in its folder)

C:\lams\lams_build\conf\windows\lams\lams.xml -- again to say where JBOSS is

I have JBOSS in c:\program files\ (rather than d:\ in the originals) which may be a better default but maybe that would cause too much trouble.

Posted by Ken Kahn

14: Re: More Problems deploying lams_tool_example
In response to 11 09/01/06 03:55 AM
[ Reply | Forward ]
Hi Fiona,

I tried to send you email (both from the Oxford account and my Gmail account) and they bounced. Details below.

Thanks for all your help with this. The attached was created by using RenameTool on the submit file tool.

Best,

-ken

From Gmail:

Delivery to the following recipient failed permanently:

    fmalikoff@lamsinternational.com

Technical details of permanent failure:
PERM_FAILURE: SMTP Error (state 9): 553 sorry, relaying denied from your location [64.233.182.188] (#5.7.1)


From oucs.ox.ac.uk:

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

  fmalikoff@lamsinternational.com
    SMTP error from remote mail server after RCPT TO:<fmalikoff@lamsinternational.com>:
    host smtp.secureserver.net [64.202.166.12]: 553 sorry, relaying denied from your location [129.67.1.165] (#5.7.1)

Posted by Ken Kahn

Attachments:
15: Re: Re: More Problems deploying lams_tool_example
In response to 14 09/01/06 06:13 AM
[ Reply | Forward ]
Ken,

I'm not sure why you aren't getting through on the email address. I've had a quick look at the script and the foriegn key definitions are the problem. The horrible FKA75538F9785A173A names must be conflicting with the existing tables.

Attached is a modified script. All I've done is remove the FKA75538F9785A173A entries in the foriegn key definitions - our sql generator puts them in but I'm not sure if they are really needed. I'm to tired to start reading MySQL manuals right now but the script at least runs and your tool deploys.

I'm attaching the updated script.

But there is another error. When I start up the server:

21:56:11,722 ERROR [ContextLoader] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'submitFilesServiceTarget' defined in class path resource [org/lamsfoundation/lams/tool/sbmt/submitFilesApplicationContext.xml]: Error setting property values; nested exception is PropertyAccessExceptionsException (2 errors)
PropertyAccessExceptionsException (2 errors)
org.springframework.beans.TypeMismatchException: Failed to convert property value of type [org.lamsfoundation.lams.tool.behaviourComposer.dao.hibernate.SubmissionDetailsDAO] to required type [org.lamsfoundation.lams.tool.sbmt.dao.ISubmissionDetailsDAO] for property 'submissionDetailsDAO'
at org.springframework.beans.BeanWrapperImpl.doTypeConversionIfNecessary(BeanWrapperImpl.java:951)

For some reason the submit tool configuration is picking up your class over its own class, but I'm not sure why we are getting a clash now when we haven't got a clash in the past. The quick and dirty fix is just to not deploy the submitFiles project at the moment.

I can't think of an easy way around this right now except go into the main build.xml in lams_build and go to deploy-tools comment out the entry for the submit tool. Then do a complete build (sorry!). Hopefully then your tool will deploy okay and LAMS should start up.

Right now, its 10pm at night on a day that I've taken an awful lot of headache tablets and my husband is nagging me to stop working so I hope you will forgive me if I leave it at that.

Regards,

Fiona

Posted by Fiona Malikoff

16: Re: Re: Re: More Problems deploying lams_tool_example
In response to 15 09/01/06 06:15 AM
[ Reply | Forward ]
Might help if I attached the attachment!

Posted by Fiona Malikoff

Attachments:
17: Re: Re: Re: More Problems deploying lams_tool_example
In response to 15 09/06/06 06:12 AM
[ Reply | Forward ]
Hi. Thanks for all your help with this. (I just returned from a conference and plan to work on this every day until I get it working.)

Your script did indeed fix the problem I reported.

Regarding the new problem recall that I created my tool using RenameTool on the submit file tool. So the conflict isn't too mysterious. I figured there was a conflict with the submit file tool's SubmissionDetails so I added these lines to the RenameTool's config file:

Rename SubmissionDetails BCSubmissionDetails
Rename submissionDetails bCSubmissionDetails

But now I get the error:

13:04:20,363 ERROR [org.springframework.web.context.ContextLoader] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'learnerDAO' defined in class path resource [org/lamsfoundation/lams/tool/behaviourComposer/behaviourComposerApplicationContext.xml]: Cannot resolve reference to bean 'behaviourComposerSessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'behaviourComposerSessionFactory' defined in class path resource [org/lamsfoundation/lams/tool/behaviourComposer/behaviourComposerApplicationContext.xml]: Initialization of bean failed; nested exception is org.hibernate.PropertyNotFoundException: Could not find a getter for bCSubmissionDetails in class org.lamsfoundation.lams.tool.behaviourComposer.Learner
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'behaviourComposerSessionFactory' defined in class path resource [org/lamsfoundation/lams/tool/behaviourComposer/behaviourComposerApplicationContext.xml]: Initialization of bean failed; nested exception is org.hibernate.PropertyNotFoundException: Could not find a getter for bCSubmissionDetails in class org.lamsfoundation.lams.tool.behaviourComposer.Learner
org.hibernate.PropertyNotFoundException: Could not find a getter for bCSubmissionDetails in class org.lamsfoundation.lams.tool.behaviourComposer.Learner

In the meanwhile I'll try your suggestion to just remove the submit tool for the time being and go back to the version of my tool before the renaming of the SubmissionDetails.

Thanks again.

Best,

-ken

Posted by Ken Kahn

18: Re: Re: Re: Re: More Problems deploying lams_tool_example
In response to 17 09/07/06 12:03 AM
[ Reply | Forward ]
Ken,

I think you need to make change bCSubmissionDetails to bcSubmissionDetails. I tried changing the classes manually (ie I didn't run the RenameTool) and it seemed to work if I was using bcSubmissionDetails (and hence the getters become getBcSubmissionDetails(), the setters setBcSubmissionDetails()).

Ugly but it seems to work. I'm going to try to sort out your other issues and then I'll email you a zip file with my version of your code.

Regards,

Fiona

Posted by Fiona Malikoff

Reply to first post on this page
Back to LAMS for Tech-Heads - General Forum