Forum Problems Installing LAMS: problems with "ant deploy-tools" and deploy Lams


 
You may request notification for problems with "ant deploy-tools" and deploy Lams.
Search: 

1: problems with "ant deploy-tools" and deploy Lams
02/28/13 02:23 AM
[ Reply | Forward ]
Hi,
I executed the deploy-tools ant task,though the result is "build successful",still get some errors.when I finished all the ant task following http://wiki.lamsfoundation.org/display/lams/Building+LAMS ,I try to start jboss then I found lams deploy failed.I wonder where I had missed or performed incorrectly.Can anyone give me some advice? many thanks.
I'm using Window 7, lams2.4.0,mysql 5.6,jdk1.6,jboss 5.1.0

Posted by willam smith

Attachments:
2: Re: problems with "ant deploy-tools" and deploy Lams
In response to 1 02/28/13 06:55 AM
[ Reply | Forward ]
Hi Willam,
is "deploy-tools" task the only one you run? There are several you need to before, see the page you mentioned for details.
If you want to run all in one go, use "lams-cruise", it should do the trick.

What errors do you see? Can you paste them here?

Marcin Cieslak

Posted by Marcin Cieslak

3: Re: problems with "ant deploy-tools" and deploy Lams
In response to 1 02/28/13 07:35 AM
[ Reply | Forward ]
Folks,

There is also an error on the provided server log:
Error running SQL at statement number 12 "INSERT INTO lams_supported_locale (locale_id, language_iso_code, country_iso_code, description, direction, fckeditor_code)
VALUES (10, 'ko', 'KR', '한국�?, 'LTR', 'ko');
It looks description field misses closing quote.
Wilam, can you please try to add missing quote and check whether it solved the problem?
The file you need to change located here \lams_common\src\java\org\lamsfoundation\lams\dbupdates\patch02040009.sql.
Then run deploy-jar ANT target from lams_common.

Also check other description fields on that file.
As there is at least one more missing quote:
INSERT INTO lams_supported_locale (locale_id, language_iso_code, country_iso_code, description, direction, fckeditor_code)
VALUES (24, 'ja', 'JP', '????, 'LTR', 'ja')".


Also I'm not so sure how did you get spoiled version of this file. May be some issues with encodings..
Anyway I hope it'll solve the problem

Posted by Andrey Balan

4: Re: Re: problems with "ant deploy-tools" and deploy Lams
In response to 3 02/28/13 11:12 AM
[ Reply | Forward ]
Oh, I did not notice the attachments, sorry!

I believe this is not the case of missing quote. It is that previous characters "consume" the closing quote, i.e. they are not read as UTF-8 encoding but something else and the quote is incorrectly merged with preceding char, giving "?".

One option is that the file was saved with improper encoding. This has happened before but has been fixed about a year ago:
http://code.lamsfoundation.org/fisheye/changelog/lams?cs=MAIN:ernieg:20120310130629
If this is the case, please try downloading lams-common tag lams2_4 from CVS again, or at least only this SQL file.

Another option is that your MySQL reads the file in a wrong way. This can be because of MySQL or OS language settings.

If the first solution does not work, let us know and we will look into the second one.

Posted by Marcin Cieslak

5: Re: Re: Re: problems with "ant deploy-tools" and deploy Lams
In response to 4 03/01/13 06:35 AM
[ Reply | Forward ]
many thanks to all of you!
I checked the file(patch02040009.sql) carefully,but actually it was saved with proper encoding.when I was performing lams-cruise ant task,I got the underlying errors.And sometimes the mysql server would stop, so I had to start it manually.
The errors are attached below.



Thanks again for your help!

Posted by willam smith

Attachments:
6: Re: problems with "ant deploy-tools" and deploy Lams
In response to 5 03/01/13 09:37 AM
[ Reply | Forward ]
Wow, this is getting strange.
I believe (and hope) that problem with patch file is separate from MySQL shutting down by itself. And what does MySQL server logs (not JBoss) say, what was the reason of shut down?

As for locale problem, let us give it a try with these:

1. As MySQL root user
* Create a new database
CREATE DATABASE lams_test DEFAULT CHARACTER SET utf8;
USE lams_test;


* Create a table with the same structure

CREATE TABLE lams_supported_locale (
      locale_id INTEGER NOT NULL AUTO_INCREMENT
    , language_iso_code VARCHAR(2) NOT NULL
    , country_iso_code VARCHAR(2)
    , description VARCHAR(255) NOT NULL
    , direction VARCHAR(3) NOT NULL
     , fckeditor_code VARCHAR(10)
    , PRIMARY KEY (locale_id)
)ENGINE=InnoDB;


* Try to manually load the patch

mysql -u root -p<ROOT_PASSWORD> lams_test < patch02040009.sql

* Let us know what the server said


2. Can you attach output of MySQL command
SHOW VARIABLES;
Maybe there is no encoding handshake between client and server.

3. Can you download HEAD of LAMS from CVS instead of lams2_4 tag and give it a try? Maybe it is an error that has been already fixed, we just need to find when.

Posted by Marcin Cieslak

7: Re: Re: problems with "ant deploy-tools" and deploy Lams
In response to 6 03/01/13 11:10 PM
[ Reply | Forward ]
Right, I thought the issue occurred at the time of checking out or storing the patch file. Although it could also occur directly at the MySQL server. I think we're on the right track now! ;)

Cheers

Posted by Andrey Balan

8: Re: Re: problems with "ant deploy-tools" and deploy Lams
In response to 6 03/02/13 01:58 AM
[ Reply | Forward ]
Thank you, Marcin.
Now I have made lams running on my machine.I just replaced the string in the "description" field of lams_supported_locale table with English words.And before than,I followed your advice creating a new database and load the patch manually,the data inserted into the database appeared to be all right. No errors or warnings during the operation.I finished all the ant task successfully after reinstalling all the required softwares as recommended.
Now I have two puzzlings:
1. why patch02040009.sql called because all the data needed are inserted into the database before jboss begin to start.
2.why the first data insert operation (rebuild-db)worked,
the second one(during the process of jboss starting)worked abnormally(because data in the database appeared to be messy,thus resulted in some errors and exceptions).

Posted by willam smith

Attachments:
10: Re: problems with "ant deploy-tools" and deploy Lams
In response to 8 03/02/13 03:43 AM
[ Reply | Forward ]
I am happy to hear you made it run!

Still, if database is UTF8 and the file is UTF8, you should not need to change the description field - it should just load the way it was. If there is something wrong with DB encoding, you may (or may not) encounter problems with further work with LAMS.
Can you still send the output of
SHOW VARIABLES
command while using "lams" database?


There is no JBoss log attached, though you mentioned it.
The MySQL error file says there are some problems with databases, but it is difficult for me to figure out what exactly...
On one hand all shut downs seem to be from normal causes, not failures, but there are reports of corrupted files, InnoDB engine issues etc.
Is it possible for you to drop everything there, ideally reinstall MySQL from a scratch?
Are you using default or custom settings file? Can you post it? Did you add these entries:
http://wiki.lamsfoundation.org/display/lamsdocs/Installing+MySQL+on+Windows+for+LAMS


Now, I am not sure if I am answering exactly the question you asked, but:
In LAMS we have got an automatic patching system
http://wiki.lamsfoundation.org/display/lams/Autopatch
When LAMS is build via Ant, basic DB structure is created.
When JBoss starts up, it checks what SQL patch files exist and whether they have been already installed. So it goes for example:
- I see patch patch02040008.sql. Has it been already installed? Yes. Carry on.
- I see patch patch02040009.sql. Has it been already installed? No. Apply!
- I see patch patch02040010.sql. Has it been already installed? No. Apply!
etc.
Naming of patch files is very important here.
At the end of this process, DB has the structure LAMS can work with.
For example, compare lams_lesson table from create_lams_11_tables.sql and what is happening with it in patch02040010.sql. The original table structure was altered, because new LAMS code uses these new columns.

This mechanism is very good for distributing new versions of LAMS. Users do not have to alter DB tables manually. They just receive new JARs, including lams.jar, which contains SQL patch files and whole update process is done automatically during JBoss start up.

On the other hand, patch files should not exist for major release versions like 2.4.0. We should have merged them with the basic create_lams_11_tables.sql file and add patch files as development goes. This must have been overlooked and we will pay more attention to this when next release is done (hopefully soon!)

Posted by Marcin Cieslak

11: Re: Re: problems with "ant deploy-tools" and deploy Lams
In response to 10 03/05/13 08:45 PM
[ Reply | Forward ]
I'm sorry,but the system failed to upload the jboss log file when i tried to.The output of SHOW VARIABLES using lams database are as follows:
Variable_name value
character_set_connection utf8
character_set_client utf8
character_set_database utf8
character_set_filesystem binary
character_set_results utf8
character_set_server utf8
character_set_system utf8
......

I'm sorry to reply to you so late,because of my personal affairs.Thanks for your attention!

Posted by willam smith

12: Re: problems with "ant deploy-tools" and deploy Lams
In response to 11 03/08/13 10:18 AM
[ Reply | Forward ]
This time I am sorry for replying so late...
Do you still have problems with MySQL stopping by itself?
Have you encountered any other encoding-related issues while working with LAMS?

Posted by Marcin Cieslak

13: Re: Re: Re: problems with "ant deploy-tools" and deploy Lams
In response to 11 03/11/13 02:32 PM
[ Reply | Forward ]
Have you tried creating the database as follows?


CREATE DATABASE lams DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;

Posted by Ernie Ghiglione

9: Re: Re: problems with "ant deploy-tools" and deploy Lams
In response to 6 03/02/13 02:07 AM
[ Reply | Forward ]
jboss log file and mysql log file attached below:

Posted by willam smith

Reply to first post on this page
Back to Problems Installing LAMS