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


 
Search: 

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