Total Pageviews

2011/01/31

RSA Error: 需要管理員權限,請嘗試『以系統管理員身分執行』。

Scenario
I got this error message "需要管理員權限,請嘗試『以系統管理員身分執行』。" when I launch IBM Installation Manager.


Solution

2011/01/28

Rational Software Architect (RSA) 7.5 for WebSphere Installation

Install IBM Installation Manager

Welcome Page, Click Next

Choose I accept agreement...., and Click Next

Click Next

Click Install

Downloading....

Finish


Install Rational Software Architect (RSA 7.5) and WebSphere Application Server 7.0

Enter welcome page, and click Next

Downloading jar files

Select I accept agreement, and Click Next

Click Next

Click Next

Click Next

Click Next

Select the plug-ins which you need to install

Click Next

Click Next

Click Install

downloading jar files

As it download all selected jar files, then the installation process was well done.

Before you startup RSA, remember to edit eclipse.ini to allocate more memory to RSA.


RSA Error: alt + / does not work

Scenario
In Rational Software Architect (RSA) 7.5, I create a web project. And I would like to use alt + / hot key.

Root Cause
I update eclipse.ini to change RSA's language from Traditional Chinese to English. And the hot key had been changed to ctrl + after I changed RSA's language. But the hot key has conflict with my 輸入法.

Solution
Remove -Duser.language=en

RSA Error:WebSphere Application Server 6.1版目前正在執行,請關閉它以繼續進行。


Scenario
As I installed RSA 7.5 for WebSphere, and selected RSA & WebSphere

It show this error message: WebSphere Application Server 6.1版目前正在執行,請關閉它以繼續進行。


Solution
As you install RSA, you have to CLOSE Microsoft Word.


2011/01/27

Eclipse Error – Failed to load the JNI shared library "C:\Program Files (x86)\Java\jre6\bin\client\jvm.dll"

Scenario
As I start up eclipse after I installed Windows 7 64-bit, it complained this error:
Failed to load the JNI shared library "C:\Program Files (x86)\Java\jre6\bin\client\jvm.dll"

Root Cause
I install JDK 32-bit version on Windows 7 64-bit.

Solution
Uninstall JDK 32-bit version, and install JDK 64-bit version.

2011/01/18

How to Query Columns' Comments from Database

Problem
I would like retrieve comments from each column. The database is Oracle.

Solution
select table_name, column_name, comments 
from user_col_comments 
where table_name like 'NIGT%';

2011/01/07

Utilize JDeveloper and SchemaSpy to maintain database schema & document

Scenario
1. I need to change database schema frequently, and add comments for each column (it does not have any comments originally).
2. I have to deliver the up-to-date schema document to customer.

Solution
1. Use JDeveloper to maintain database schema and add comments for each column.
2. Use SchemaSpy to generate the up-to-date database schema [Concerning SchemaSpy, please refer to http://albert-myptc.blogspot.com/2010/12/schemaspy-quick-start.html]


Prerequisite

1. Download JDeveloper from http://www.oracle.com/technetwork/developer-tools/jdev/downloads/soft11-098086.html

2. Launch JDeveloper after you installed it

3. JDeveloper workspace

4. Setup database connection

5. Check the connection in Database Navigator

5.Create a new Project

6. Choose "Generic Project", and click OK

7. Click Finish

8. Project had been created

9. Create Database Diagram from project




Before change
I would like to add three columns to NIGT036, and add comments for each column.

Use JDeveloper to change database schema
1. Select specific table --> Column --> Add

2. Assign "Column Name", "Data Type", "Precision", and then click Apply

3. Check the result

4. Add comments for each column

5. Assign Comment and then click Apply

Generate the latest schema document via SchemaSpy
1. execute the command:
java -jar "C:\schemaSpy_5.0.0.jar" -dp "C:\ojdbc6.jar" -t orathin -db dev02 -s ap_tax -host 192.168.30.102 -port 1521 -u ap_tax -p taxtest -schemas AP_TAX -connprops "C:\schemaSpyGUI\properties\orathin.properties" -i "NIG.*" -charset UTF-8 -o "C:\schemaSpyGUI\output" -norows -hq

You can get more information about this command from http://schemaspy.sourceforge.net/

2. check the result

2011/01/05

Java to UML via NetBeans and IBM Rational Software Architect(RSA)

Scenario
I have 80+ tables in my system, and need to deliver class diagram before deadline. Even worse, the schema keep changing. I need to find an automation approach to resolve this problem.

Solution
1. Create table in database
2. Use NetBeans to create entities and DAOs.
3. Import into RSA, and create entities/DAOs UML symbo from Java classes
(If schema change in the future, just repeat step2 and step3)

Process

Create database connection in NetBeans

1. Create connection

2. Add jdbc jar file and click OK

3. Provide connection information

4. Assign schema name

5. Done

Use code generation from NetBeans
1. New --> Entity Classes from Database...

2. select database connection, and select tables which we would like to do code generation

3. Assign Java package

4. Assign association fetch and collection type, then click Next

5. Generating

6. Entities had been generated

7. New --> JSF Pages from Entities Classes

8. Select entity classes, and click Next

9. assign packages

10. Generating DAOs...

11. DAO classes

12. Owing to the naming convention doesn't meet our need, so we need to do refactor


13. DAO classes generation process is done.

Java to UML via IBM Rational Software Architect(RSA)
1. File --> Project

2. Select Java Project in RSA

3. assign project name and click Next

4. Click Finish

5. Create dao and entity package

6. Change to Modeling perspective

7. Right click --> Transform --> New Configuration

8. Select Java to UML

9. Select source and target, then click Finish

10. Click Run

11. Generating...

12. Finish