Development Environment Setup – Resource - Assembla

weaverchurchΛογισμικό & κατασκευή λογ/κού

15 Αυγ 2012 (πριν από 5 χρόνια και 7 μέρες)

432 εμφανίσεις



1


D
EVELOPMENT
E
NVIRONMENT
S
ETUP


R
ESOURCE
M
ANAGEMENT
S
YSTEM


Title

Development Environment Setup


Resource
Management System

Client

DWS
-

Internal

Reference

RMS
D
evelopment
E
nv
ironment
S
etup v0.
2
.doc

Date

Friday, 15 March 2013

Author

Terry Su

Version

0.
2

Approved

Yes

Distribution

Project members only; Commercial
-
in
-
confidence

Description

The document contains the
development environment
setup

such as IDE, Application Server, Database
installation
for a

resource management

system































2

1. JDK 5.0 Update 16
setup

Download
JDK 5.0 Update 16

and instal
l it.


2. NetBeans IDE 6.1
setup

2.1
Download
NetBeans IDE 6.1 Bundles
. Please choose Web&Java EE NetBeans
pack to download.

GlassFish V2 UR2 is included in this pack.


2.2 Install NetBeans IDE

6.1, GlassFish V2 UR2 application server should be
selected to install with the IDE.




2.3 Choose jdk1.5.0_16 for the NetBeanss IDE.





3



2.4
Choose jdk1.5.0_16 for the GlassFish application server.
Change admin
username, password and ports.

Admin usern
ame: admin

Admin password: adminadmin

Http port:

808
0

Https port:

8181

Admin port:
4848




4

3. MySQL Server 5.0 setup

3.1 Download
MySQL Community Server 5.0
.67
.

Download
MySQL GUI Tools
5.0
-
r14
.


3.2
Install MySQL Server 5.0.67. Select typical for setup type.



3.3
Configure the MySQL Server.



5



3.4
Select detailed configuration for the configuration type.



3.5

Select developer machine for the server type.



6



3.6
Select multifunctional database for the database type.



3.7
Keep default settings for this step.



7



3.8 Select decision support (DSS)/OLAP



3.9 Keep default settings for this step.



8



3.10 Select st
andard character set.



3.11
Select include bin directory in windows path.



9



3.12 Create password for root.

Password: adminadmin





10

3.13
Install MySQL GUI Tools 5.0
-
r14. Select complete for setup type.



3.14 Open MySQL Administrator



3.15 Click Resto
re
-
> Open Backup Files
-
> Choose RMS.sql

-
> Start Restore



11



4.
Stru
ts configuration

4.1
Download
Struts 2.0.12 distribution
.
Download
nbstruts2support
.


4.2
Open NetBeans
-
> Tools
-
> Plugins
-
>
Downloaded
-
> Add Plugins
-
> Choose
org
-
netbeans
-
modules
-
web
-
frameworks
-
struts2.nbm

to install




12



4.3

Open NetBeans
-
> Tools
-
> Libraries
-
> New Library
-
> Create new library
Struts2.0.
12



4.4
Click Classpath tab and add JAR below:

1.

freemarker
-
2.3.8.jar

(
struts
-
2.0.12
\
lib
\
)

2.

ognl
-
2.6.11.jar
,

(
struts
-
2.0.12
\
lib
\
)

3.

struts2
-
core
-
2.0.12.jar
,
(
struts
-
2.0.12
\
lib
\
)

4.

xwork
-
2.0.6.jar
,
(
struts
-
2.0.12
\
lib
\
)

5.

sitemesh
-
2.3.jar

(sitemesh
-
2.3)

6.

struts2
-
si
temesh
-
plugin
-
2.0.12.jar

(
struts
-
2.0.12
\
lib
\
)
,

7.

struts2
-
spring
-
plugin
-
2.0.12.jar
, (
struts
-
2.0.12
\
lib
\
)




13




4.5 Click Javadoc tab, click Add ZIP/Folder and add folder
struts
-
2.0.12
-
all
\
struts
-
2.0.12
\
docs
\
struts2
-
core
\
apidocs



14



5. Spring
configuration

5.1

Download
Spring 2.5.6 distribution
. Download
Spring NetBeans Module
.


5.2 Open NetBeans
-
> Tools
-
> Plugins
-
> Downloaded
-
> Add Plugins
-
>
spring
-
support
-
plugin
-
1.1.nbm

to install




15



5.3 Open NetBeans
-
> Tools
-
> Libraries
-
> New Libra
ry
-
> Create new library
Spring
2.5.6



5.4 Click Classpath tab and add JAR below:

spring.jar

(
spring
-
framework
-
2.5.6
-
with
-
doc
s
\
spring
-
framework
-
2.5.6
\
dist
)



16



5.5 Click Javadoc tab, click Add ZIP/Folder and add folder
spring
-
framework
-
2.5.6
-
with
-
dependencies
\
spring
-
framework
-
2.5.6
\
docs
\
api



17



6. Hibernate configuration

6.1

Download
Hibernate 3.3.1.GA

and download
Hibernate Annotations 3.4.0.GA
.


6.2
Open NetBeans
-
> Tools
-
>

Plugins
-
> Available Plugins
-
> select Hibernate
Support to install.



18



6.3 Open NetBeans
-
> Tools
-
> Libraries
-
> New Library
-
> Create new library
Hibernate3.3.1



6.
4

Click Classpath tab and add JAR below:

1.

antlr
-
2.7.6
.jar (hibernate
-
distribution
-
3.3.1
.GA
\
lib
\
required)

2.

commons
-
collections
-
3.1.jar,

(hibernate
-
distribution
-
3.3.1.GA
\
lib
\
required)

3.

dom4j
-
1.6.1.jar,
(hibernate
-
distribution
-
3.3.1.GA
\
lib
\
required)

4.

javassist
-
3.4.GA.jar,

(hibernate
-
distribution
-
3.3.1.GA
\
lib
\
required)

5.

jta
-
1.1.jar,
(hibernate
-
dist
ribution
-
3.3.1.GA
\
lib
\
required)

6.

slf4j
-
api
-
1.5.2.jar
,

(hibernate
-
distribution
-
3.3.1.GA
\
lib
\
required)

7.

hibernate3.jar,

(
\
hibernate
-
distribution
-
3.3.1.GA
)

8.

hibernate
-
annotations.jar
,

(
\
hibernate
-
annotations
-
3.4.0.GA)



19

9.

hibernate
-
commons
-
annotations.jar
,
(hibernat
e
-
annotations
-
3.4.0.GA
\
lib)

10.

ejb3
-
persistence.jar
,
(hibernate
-
annotations
-
3.4.0.GA
\
lib)

11.

asm.jar
,

(hibernate
-
annotations
-
3.4.0.GA
\
lib
\
test)

12.

asm
-
attrs.jar
,
(hibernate
-
annotations
-
3.4.0.GA
\
lib
\
test)

13.

commons
-
collections.jar,

(hibernate
-
annotations
-
3.4.0.GA
\
lib
\
test)

14.

ehcahe
-
1.2.3.jar

(hibernate
-
distribution
-
3.3.1.GA
\
lib
\
optional
\
ehcache)

15.

c3p0.jar,
(c3p0
-
0.9.1.jar) (
\
hibernate
-
distribution
-
3.3.1.GA
\
lib
\
optional
\
c3p0)

16.

cglib.jar,
(missing
-
libs)

17.

commons
-
logging.jar,

(missing
-
libs)

18.

slf4j
-
log4j12.jar

(
hibernate
-
annotat
ions
-
3.4.0.GA/lib/
)

19.

log4j.jar

(
hibernate
-
annotations
-
3.4.0.GA/lib/
)






20

7
. Database configuration

7.1 Open NetBean
-
> Services
-
> right click drivers
-
> New Driver



7.2 Right click databases
-
> New Connection



7.3 Open NetBeans
-
> Tools
-
> Libraries
-
> New Library
-
> Create new library
MySQL5.1.7.



21



7.4 Click Classpath tab and add JAR below:

mysql
-
connector
-
java
-
5.1.
7
-
bin.jar



8
. Subversion configuration

8
.1 Download

CollabNet Subversion Comm
and Line Client v1.4.6

and install it.


8
.2
Open NetBeans
-
> Tools
-
> Options
-
> Miscellaneous
-
> Versioning
-
>
Subversion
-
> specify the SVN home folder



22

.


8
.3 Register account in
http://www.assembla.com

and joi
n in the space RMS.


8
.
4

Open NetBeans
-
> Versioning
-
> Checkout
-
> input repository URL, user,
password

-
> next

Repository URL:
http://svn.assembla.com/svn/rms2008/RMS



23



8
.
5

Choose repository folder RMS and local folder
-
> finish




24


8.

GlassFish
configurat
ion


copy
mysql
-
connector
-
java
-
5.1.7
-
bin

(from
\
mysql
-
connector
-
java
-
5.1.7
) to
C:
\
Program Files
\
glassfish
-
v2ur2
\
domains
\
domain1
\
lib
\
ext
\



and restart your application server.



Create a connection Pool


Name: mysqlPool

Resource Type:

javax.sql.DataSource

Database Vendor: MySQL



25

Add the following details



Add the following properties


Ping to test the connection



Create a new JDBC Resource



26







Extra Resources:

Getting error:

Class name is wrong or classpath is not set for :
com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource"

http://www.innoq.
com/blog/gs/2007/10/howto_get_jsasglassfish_with_m.html



new JDBC Resource/JNDI configuration

http://thestewscope.wordpress.com/2008/01/08/glassfish
-
v2
-
ur1
-
and
-
mysql
-
connection
-
pool/