Jetspeed2 how to initialize file data to the database

Source: Internet
Author: User
[SQL] viewplaincopyJetspeed2 2.2.2 MYSQL database file: pages * First of all, I have to say that jetspeed2's file conversion to the database is very painful. All the information collected on the Internet has failed: www.360doc.comcontent10031020942565_18281206.shtml www.360doc. comcon

[SQL] view plaincopy Jetspeed2 2.2.2 MYSQL database file: pages/* First of all, I have to say that jetspeed2's file conversion to the database is very painful, and various information collected online, failed: http://www.360doc.com/content/10/0310/20/972665_18281206.shtml http://www.360doc.com/con

[SQL]View plaincopy

  1. Jetspeed2 version 2.2.2
  2. MYSQL database
  3. File: pages /*


First of all, I have to say that jetspeed2's file-to-database transfer is very painful. All the information collected on the Internet has failed:

Http://www.360doc.com/content/10/0310/20/972665_18281206.shtml

Http://www.360doc.com/content/08/0128/11/27906_1010273.shtml

Http://portals.apache.org/jetspeed-1/psml_db.html

In Jetspeed2.2.2, DatabasePsmlManagerService has been replaced and changed to PageSerializerImpl. In jetspeed2.2.2, admin logon is used and import is invalid in website management, the Index Unique error is returned.

Now, we will introduce how to import all files under pages to the database (initialization ).

1. Chinese characters (file directory, * psml file content, link, etc.) are not allowed during the import process)

2. Create the Jetspeed-Data-Files folder.

3, the folder contains two parts, j2-data.xml, pages folder

The j2-data.xml file is obtained through the export jetspeed portal database function of the jetspeed2.2.2 installation file, or replaced with the j2-seed.xml in the source package;

Pages folder is the folder for storing page data using files, as shown below:


4. Run the Installation File jetspeed2.2.2.

[Python]View plaincopy

  1. Java-jar E: \ jetspeed2.2.2 \ jetspeed-installer-2.2.2.jar

5. Select Import Jetspeed Portal database


6. Select the Jetspeed-Data-Files directory:



7. During Database Import, jetspeed will generate some temporary files, including database configuration and jar packages. The location of the temporary files is specified here (ignored by default)



8. By default, MB of memory is required for Database Import. You can set a larger value.



9. Select the database type.



10. Enter the database configuration and the location of the jar package linked to jdbc.



11. Everything is ready. Import started.



12. Log Analysis

A. required functional files for Database Import Installation

[Plain]View plaincopy

  1. Antinstaller. jarE: \ jetspeed2.2.2 \ jetspeed-installer-2.2.2.jar
  2. SetupInstallation:
  3. [Echo] Starting the installation
  4. [Echo] Deleting all content from the installation target directory
  5. [Echo] Installing Jetspeed-2.2.2 Enterprise Portal
  6. [Unzip] Expanding: E: \ jetspeed2.2.2 \ jetspeed-installer-2.2.2.jar into C: \ Users \ DB ~ 1 \ AppData \ Local \ Temp \ Jetspeed-2.2.2
  7. [Unzip] Expanding: C: \ Users \ DBLIUE ~ 1 \ AppData \ Local \ Temp \ Jetspeed-2.2.2 \ database.zip into C: \ Users \ DB ~ 1 \ AppData \ Local \ Temp \ Jetspeed-2.2.2
  8. [Unzip] Expanding: C: \ Users \ DB ~ 1 \ AppData \ Local \ Temp \ Jetspeed-2.2.2 \ tomcat-portal.zip into C: \ Users \ DB ~ 1 \ AppData \ Local \ Temp \ Jetspeed-2.2.2
  9. [Echo] Setting up the database configuration
  10. [Copy] Copying 1 file to C: \ Users \ DB ~ 1 \ AppData \ Local \ Temp \ Jetspeed-2.2.2 \ lib
  11. [Move] Moving 1 file to C: \ Users \ DB ~ 1 \ AppData \ Local \ Temp \ Jetspeed-2.2.2 \ database

B. Read j2-data.xml, insert permissions, rules, etc.

[Plain]View plaincopy

  1. ImportPortalDB:
  2. [Echo] Import all data into Jetspeed database
  3. CheckDerby:
  4. ImportDB:
  5. ImportData:
  6. [Echo] Import Jetspeed database from C: \ Apache \ Jetspeed-Data-Files/j2-data.xml
  7. [Java] creating clients, mediatypes and mimetypes
  8. [Java] creating principals and permissions
  9. [Java] creating permissions
  10. [Java] creating profiling rules and user profiling rules
  11. [Java] creating entities
  12. [Java] creating SSO sites, principals, and security domains


C. Start importing data under pages.

[Plain]View plaincopy

  1. ImportPrefs:
  2. ImportPages:
  3. [Echo] Import Jetspeed database pages from C: \ Apache \ Jetspeed-Data-Files/pages directory
  4. [Java] Starting complete import of folder:/(overwriting folders: true, pages: true)
  5. [Java] overwriting folder/
  6. [Java] processing new pages/css-demo.psml
  7. [Java] processing new pages/default-page.psml
  8. [Java] processing new page/jetspeed. psml
  9. [Java] processing new pages/minimal-default-page.psml
  10. [Java] processing new pages/my-account.psml
  11. [Java] processing new page/p002.psml
  12. ......


D. Import successful

[Plain]View plaincopy

  1. [Java] Import finished: processed 80 folder (s), 120 page (s), 24 link (s ).
  2. [Echo] Import Jetspeed database complete!
  3. [Echo] Deleting temporary installation target directory
  4. [Delete] Deleting directory C: \ Users \ DBLIUE ~ 1 \ AppData \ Local \ Temp \ Jetspeed-2.2.2
  5. Importdb:
  6. BUILD SUCCESSFUL
  7. Total time: 2 minutes 40 seconds

13. Notes:

1. Try not to include Chinese Characters in files and folders. garbled characters may occur when accessing the database, especially in windows systems.

2: An error may occur during the import process. Try to find the cause of the error and re-import it. When jetspeed2.2.2 is re-imported, the data in the database will be deleted first to ensure data consistency.

14. Modify database fields

During insertion, an error is returned when the field is too long. The content is as follows. The LAYOUT_SIZES field appears in the fragment table. The original field length is varchar (20). We recommend that you change it to a longer value.

[SQL]View plaincopy

  1. "White-space: pre"> 338px, 808px; float: left; margin-top: 5px;, 20px

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.