Home Database Mysql Tutorial Jetspeed 2 将文件数据初始化到数据库的实现方法

Jetspeed 2 将文件数据初始化到数据库的实现方法

Jun 07, 2016 pm 03:18 PM
s initialization accomplish data database document method

[sql] view plaincopy Jetspeed2版本2.2.2 数据库MYSQL 文件:pages/* 首先,不得不说,jetspeed2 的文件转数据库挺折磨人的,在网上收集的各种资料,均告失败: http://www.360doc.com/content/10/0310/20/972665_18281206.shtml http://www.360doc.com/con

[sql] view plaincopy

  1. Jetspeed2 版本 2.2.2  
  2. 数据库 MYSQL  
  3. 文件:pages/*  

首先,不得不说,jetspeed2 的文件转数据库挺折磨人的,在网上收集的各种资料,均告失败:

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

在Jetspeed2.2.2中,已经取代了DatabasePsmlManagerService,改为PageSerializerImpl;而且,在jetspeed2.2.2中,采用admin的方式登录,并在网站管理中,import是无效的,会报出Index Unique错误。

现在,介绍将pages下面的所有文件导入到数据库(初始化)的实现方法

1,所有在导入过程中不允许出现中文字样(文件目录,*psml文件内容,link等)

2,建立文件夹Jetspeed-Data-Files

3,文件夹中包含两部分内容,j2-data.xml,pages文件夹

j2-data.xml文件通过jetspeed2.2.2安装文件的 export jetspeed portal database 功能获取,或者用源码包中的j2-seed.xml替代;

pages文件夹,即为使用文件存储页面数据的文件夹,效果图如下:

Jetspeed 2 将文件数据初始化到数据库的实现方法

4,运行jetspeed2.2.2的安装文件

[python] view plaincopy

  1. java -jar E:\jetspeed2.2.2\jetspeed-installer-2.2.2.jar  
5,选择 Import Jetspeed Portal database

Jetspeed 2 将文件数据初始化到数据库的实现方法


6,选择Jetspeed-Data-Files目录:

Jetspeed 2 将文件数据初始化到数据库的实现方法


7,在数据库导入过程中,jetspeed会生成一些临时文件,包括数据库配置,jar包等等,在这里指定临时文件位置,(默认可忽略)

Jetspeed 2 将文件数据初始化到数据库的实现方法


8,默认需要512m内存供给数据库导入功能,可以设置更大

Jetspeed 2 将文件数据初始化到数据库的实现方法


9,选择数据库类型

Jetspeed 2 将文件数据初始化到数据库的实现方法


10,填写数据库配置,及jdbc链接的jar包位置

Jetspeed 2 将文件数据初始化到数据库的实现方法


11,一切准备就绪,开始导入了

Jetspeed 2 将文件数据初始化到数据库的实现方法


12,日志分析

a,安装数据库导入时必备的功能性文件

[plain] view plaincopy

  1. antinstaller.jarE:\jetspeed2.2.2\jetspeed-installer-2.2.2.jar  
  2.   
  3. setupInstallation:  
  4.      [echo] Starting the installation  
  5.      [echo] Deleting all content from the installation target directory  
  6.      [echo] Installing Jetspeed-2.2.2 Enterprise Portal  
  7.     [unzip] Expanding: E:\jetspeed2.2.2\jetspeed-installer-2.2.2.jar into C:\Users\DB~1\AppData\Local\Temp\Jetspeed-2.2.2  
  8.     [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  
  9.     [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  
  10.      [echo] Setting up the database configuration  
  11.      [copy] Copying 1 file to C:\Users\DB~1\AppData\Local\Temp\Jetspeed-2.2.2\lib  
  12.      [move] Moving 1 file to C:\Users\DB~1\AppData\Local\Temp\Jetspeed-2.2.2\database  
b,读取j2-data.xml,插入权限,规则等

[plain] view plaincopy

  1. importPortalDB:  
  2.      [echo] Import all data into Jetspeed database  
  3.   
  4. checkDerby:  
  5.   
  6. importDB:  
  7.   
  8. importData:  
  9.      [echo] Import Jetspeed database from C:\Apache\Jetspeed-Data-Files/j2-data.xml  
  10.      [java] creating clients, mediatypes and mimetypes  
  11.      [java] creating principals and permissions  
  12.      [java] creating permissions  
  13.      [java] creating profiling rules and user profiling rules  
  14.      [java] creating entities  
  15.      [java] creating SSO sites, principals, and security domains  

c,开始导入pages下面的数据

[plain] view plaincopy

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

d,导入成功

[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.   
  6.   
  7. importdb:  
  8.   
  9.   
  10. BUILD SUCCESSFUL  
  11. Total time: 2 minutes 40 seconds  
    13,注意事项:

1:文件和文件夹的内容中尽量不好包含中文,进入数据库很可能是乱码,尤其在windows系统中

2:在导入过程中,可能会出现错误,尽量找到错误原因重新导入即可,jetspeed2.2.2再导入时会首先删除数据库中的数据确保数据一致性

    14,数据库字段修改

在插入时,遇到字段过长数值越界报错,内容如下,出现在fragment表,LAYOUT_SIZES字段,原字段长度 varchar (20),建议改长些。

[sql] view plaincopy

  1. "white-space:pre">  338px,808px;float:left;margin-top:5px;,20px  
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Will R.E.P.O. Have Crossplay?
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to set font size on mobile phone (easily adjust font size on mobile phone) How to set font size on mobile phone (easily adjust font size on mobile phone) May 07, 2024 pm 03:34 PM

Setting font size has become an important personalization requirement as mobile phones become an important tool in people's daily lives. In order to meet the needs of different users, this article will introduce how to improve the mobile phone use experience and adjust the font size of the mobile phone through simple operations. Why do you need to adjust the font size of your mobile phone - Adjusting the font size can make the text clearer and easier to read - Suitable for the reading needs of users of different ages - Convenient for users with poor vision to use the font size setting function of the mobile phone system - How to enter the system settings interface - In Find and enter the "Display" option in the settings interface - find the "Font Size" option and adjust it. Adjust the font size with a third-party application - download and install an application that supports font size adjustment - open the application and enter the relevant settings interface - according to the individual

Tesla robots work in factories, Musk: The degree of freedom of hands will reach 22 this year! Tesla robots work in factories, Musk: The degree of freedom of hands will reach 22 this year! May 06, 2024 pm 04:13 PM

The latest video of Tesla's robot Optimus is released, and it can already work in the factory. At normal speed, it sorts batteries (Tesla's 4680 batteries) like this: The official also released what it looks like at 20x speed - on a small "workstation", picking and picking and picking: This time it is released One of the highlights of the video is that Optimus completes this work in the factory, completely autonomously, without human intervention throughout the process. And from the perspective of Optimus, it can also pick up and place the crooked battery, focusing on automatic error correction: Regarding Optimus's hand, NVIDIA scientist Jim Fan gave a high evaluation: Optimus's hand is the world's five-fingered robot. One of the most dexterous. Its hands are not only tactile

The U.S. Air Force showcases its first AI fighter jet with high profile! The minister personally conducted the test drive without interfering during the whole process, and 100,000 lines of code were tested for 21 times. The U.S. Air Force showcases its first AI fighter jet with high profile! The minister personally conducted the test drive without interfering during the whole process, and 100,000 lines of code were tested for 21 times. May 07, 2024 pm 05:00 PM

Recently, the military circle has been overwhelmed by the news: US military fighter jets can now complete fully automatic air combat using AI. Yes, just recently, the US military’s AI fighter jet was made public for the first time and the mystery was unveiled. The full name of this fighter is the Variable Stability Simulator Test Aircraft (VISTA). It was personally flown by the Secretary of the US Air Force to simulate a one-on-one air battle. On May 2, U.S. Air Force Secretary Frank Kendall took off in an X-62AVISTA at Edwards Air Force Base. Note that during the one-hour flight, all flight actions were completed autonomously by AI! Kendall said - "For the past few decades, we have been thinking about the unlimited potential of autonomous air-to-air combat, but it has always seemed out of reach." However now,

AI startups collectively switched jobs to OpenAI, and the security team regrouped after Ilya left! AI startups collectively switched jobs to OpenAI, and the security team regrouped after Ilya left! Jun 08, 2024 pm 01:00 PM

Last week, amid the internal wave of resignations and external criticism, OpenAI was plagued by internal and external troubles: - The infringement of the widow sister sparked global heated discussions - Employees signing "overlord clauses" were exposed one after another - Netizens listed Ultraman's "seven deadly sins" Rumors refuting: According to leaked information and documents obtained by Vox, OpenAI’s senior leadership, including Altman, was well aware of these equity recovery provisions and signed off on them. In addition, there is a serious and urgent issue facing OpenAI - AI safety. The recent departures of five security-related employees, including two of its most prominent employees, and the dissolution of the "Super Alignment" team have once again put OpenAI's security issues in the spotlight. Fortune magazine reported that OpenA

How to choose a mobile phone screen protector to protect your mobile phone screen (several key points and tips for purchasing mobile phone screen protectors) How to choose a mobile phone screen protector to protect your mobile phone screen (several key points and tips for purchasing mobile phone screen protectors) May 07, 2024 pm 05:55 PM

Mobile phone film has become one of the indispensable accessories with the popularity of smartphones. To extend its service life, choose a suitable mobile phone film to protect the mobile phone screen. To help readers choose the most suitable mobile phone film for themselves, this article will introduce several key points and techniques for purchasing mobile phone film. Understand the materials and types of mobile phone films: PET film, TPU, etc. Mobile phone films are made of a variety of materials, including tempered glass. PET film is relatively soft, tempered glass film has good scratch resistance, and TPU has good shock-proof performance. It can be decided based on personal preference and needs when choosing. Consider the degree of screen protection. Different types of mobile phone films have different degrees of screen protection. PET film mainly plays an anti-scratch role, while tempered glass film has better drop resistance. You can choose to have better

iOS 18 adds a new 'Recovered' album function to retrieve lost or damaged photos iOS 18 adds a new 'Recovered' album function to retrieve lost or damaged photos Jul 18, 2024 am 05:48 AM

Apple's latest releases of iOS18, iPadOS18 and macOS Sequoia systems have added an important feature to the Photos application, designed to help users easily recover photos and videos lost or damaged due to various reasons. The new feature introduces an album called "Recovered" in the Tools section of the Photos app that will automatically appear when a user has pictures or videos on their device that are not part of their photo library. The emergence of the "Recovered" album provides a solution for photos and videos lost due to database corruption, the camera application not saving to the photo library correctly, or a third-party application managing the photo library. Users only need a few simple steps

Detailed tutorial on establishing a database connection using MySQLi in PHP Detailed tutorial on establishing a database connection using MySQLi in PHP Jun 04, 2024 pm 01:42 PM

How to use MySQLi to establish a database connection in PHP: Include MySQLi extension (require_once) Create connection function (functionconnect_to_db) Call connection function ($conn=connect_to_db()) Execute query ($result=$conn->query()) Close connection ( $conn->close())

How to handle database connection errors in PHP How to handle database connection errors in PHP Jun 05, 2024 pm 02:16 PM

To handle database connection errors in PHP, you can use the following steps: Use mysqli_connect_errno() to obtain the error code. Use mysqli_connect_error() to get the error message. By capturing and logging these error messages, database connection issues can be easily identified and resolved, ensuring the smooth running of your application.

See all articles