You are on page 1of 317

hn

ol
og

ie
s

IT

Be

ijin
gL
an
di
ng

Te
c

WebLogic

IT WebLogic

........................................................................................................................... 2
...........................................................................................................................
3
.......................................................................................................................
.......................................................................................................................3
WebLogic .......................................................................................................................
WebLogic .......................................................................................................... 3
WebLogic ....................................................................................................... 3
Weblogic .........................................................................................3
Weblogic10g/11g ........................................................................................................4
WebLogic ........................................................................................................... 4
Weblogic .................................................................................................5
WebLogic ............................................................................5

Be

ijin
gL
an
di
ng

Te
c

hn
ol
og

1
1.1
1.2
1.3
1.4
1.5
1.6
1.7

ie
s

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-2-

IT WebLogic

1 WebLogic
WebLogic bea
Web JavaEE WebLogic Server
Web

WebLogic

ie
s

1.1

Weblogic J2EE J2EE


Application

hn
ol
og

Web HTML servletJSP Java J2EE Web


Weblogic weblogic.xml XML

EJB session beanentity beanmessage-driven bean

Connector modules() EIS Java native


modules

Te
c

Enterprise application

WebLogic

ijin
gL
an
di
ng

1.2

1995 Paul AmbroseBob PaskerLaurie Pitman Carl Resnikoff


WebLogic WebLogic BEA 1998 WebLogic
2008 Oracle bea
bea Oracle BEA
Oracle
SOA Oracle

Be

bea
2008 7
4000 68 Oracle
bea Oracle 8
2
,Oracle BEA
Weblogic Oracle WebLogic Server 11g Rel1

1.3

Weblogic

Weblogic

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-3-

IT WebLogic

Java

IBM DB2

Microsoft SQL Server

MySQL

Sybase

Linux

AIX

HP-UX

Solaris

Windows

Java 6

Java 5

ie
s

hn
ol
og

Oracle Oracle RAC

Te
c

1-1

1.4

Weblogic10g/11g

ijin
gL
an
di
ng

Oracle WebLogic Server 10g R3


footprint
FastSwap --
Oracle WebLogic Server 10g R3 Spring
SSH Oracle WebLogic

HTTP - Web2.0

Java SE 6 JRockit Mission Control

WebLogic

Be

1.5

WebLogic Platform

Oracle WebLogic ServerWeblogic WebLogic


Oracle WebLogic Workshop:WebLogic
Oracle WebLogic PortalWeblogic

OracleWebLogic IntegrationWeblogic

OracleWebLogic JRockitWeblogic Java SDK JavaSE 6

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-4-

IT WebLogic

Oracle
Welbogic
Integration

Oracle Weblogic Workshop


Framew ork

Oracle Weblogic Server

hn
ol
og

JV M
Oracle Weblogic JRockit

ie
s


Oracle Weblogic Workshiop

Oracle
Weblogic
Portal

1-1Weblogic

Weblogic

Weblogic

Te
c

1.6

WebLogic Server Web

ijin
gL
an
di
ng

1)

WebLogic Server

2) Server
3)

4) Weblogic

1.7

WebLogic

Be

TomcatJBossIBM WebSphere

Tomcat Apache Web J2EE


JSP/Servlet,JNDI J2EE
ActiveMQ JMS JOTM JTAG Tomcat
Web
JBoss Servlet EJB J2EE Web
Tomcat
WebSphere J2EE IBM

Weblogic J2EE ,
,

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-5-

IT WebLogic

Be

ijin
gL
an
di
ng

Te
c

hn
ol
og

ie
s

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-6-

hn
ol
og

ie
s

IT

Be

ijin
gL
an
di
ng

Te
c

WebLogic

IT WebLogic

........................................................................................................................... 2
...........................................................................................................................

Be

ijin
gL
an
di
ng

Te
c

hn
ol
og

ie
s

.................................................................................
2 Windows WebLogic .................................................................................
.................................................................................33
2.1
................................................................................................................. 3
2.2
WebLogic ...................................................................................................... 3
2.2.1
........................................................................................................................ 3
2.2.2
................................................................................................................ 4
2.2.3
............................................................................................................ 4
2.2.4
................................................................................................................ 5
2.2.5
................................................................................................................ 5
2.2.6
........................................................................................................ 6
2.2.7
................................................................................................................ 6
2.2.8
................................................................................................................ 7
2.2.9
........................................................................................................................ 7
2.2.10
........................................................................................................................ 8
2.3
WebLogic .......................................................................................................... 8
2.3.1 QUICK START ..................................................................................................8
2.3.2
................................................................................................................ 9
2.3.3
...................................................................................................................... 10
2.3.4
.......................................................................................................... 10
2.3.5
.......................................................................................... 11
2.3.6
JDK...................................................................................... 12
2.3.7
.............................................................................................................. 12
2.3.8
.......................................................................................................... 13
2.3.9
.............................................................................................................. 13
2.3.10
.................................................................................................................. 14
2.4
WebLogic Server..........................................................................................................14
2.5
............................................................................................................................... 15
2.6
Linux JDK................................................................................................................ 16
2.6.1
.............................................................................................................. 16
2.6.2 JDK ...................................................................................................................... 16
2.6.2.1
weblogic ................................................................................................. 16
2.6.2.2
.................................................................................................. 16
2.6.2.3
Weblogic .................................................................16
2.6.2.4
.......................................................... 17
2.6.2.5
.......................................................................................................... 18
2.6.2.6
..........................................................................................................................21

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-2-

IT WebLogic

Logic
WebL
2 Windows Web
WebLogic 11g Windows WebLogic

1.

WebLogic, JDKWebLogic
JDK

ie
s

2.1

WebLogic9.2 JDK1.5.0
WebLogic8.1 JDK1.4.2

2.2

512M 1G

WebLogic

Te
c

2.

hn
ol
og

WebLogic10 JDK1.6.0

WebLogic10.3.3(11g)

2.2.1

Be

ijin
gL
an
di
ng

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-3-

IT WebLogic
2-1

ijin
gL
an
di
ng

Te
c

hn
ol
og

ie
s

2.2.2

2-2

2.2.3

Be

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-4-

Te
c

hn
ol
og

ie
s

IT WebLogic

2-3

ijin
gL
an
di
ng

2.2.4

Be

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-5-

Te
c

hn
ol
og

ie
s

IT WebLogic

2-4

Be

ijin
gL
an
di
ng

2.2.5

2-5

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-6-

IT WebLogic

2.2.6

ijin
gL
an
di
ng

Te
c

hn
ol
og

ie
s

Be

2-6

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-7-

IT WebLogic

Te
c

hn
ol
og

ie
s

2.2.7

ijin
gL
an
di
ng

2-7

Be

2.2.8

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-8-

IT WebLogic
2-8

ijin
gL
an
di
ng

Te
c

hn
ol
og

ie
s

2.2.9

Be

2-9

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-9-

IT WebLogic

ijin
gL
an
di
ng

Te
c

hn
ol
og

ie
s

2.2.10

2-10

WebLogic Server
WebLogic

2.3

WebLogic

WebLogic 3

2.3.1 QUICK START

WebLogic (
Quick Start )

Be

WebLogic

WebLogic

WebLogic WebLogic

Getting started with WebLogic Server

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 10 -

Te
c

hn
ol
og

ie
s

IT WebLogic

2-11

2.3.2

Be

ijin
gL
an
di
ng

> Oracle WebLogic > WebLogic Server 11gR1 > Tools >Configuration
Wizard WebLogic

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 11 -

IT WebLogic
2-12

2.3.3

ijin
gL
an
di
ng

Te
c

hn
ol
og

ie
s

WebLogic

2-13

2.3.4

Be

base_domain,

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 12 -

Te
c

hn
ol
og

ie
s

IT WebLogic

2-14

Be

ijin
gL
an
di
ng

2.3.5

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 13 -

IT WebLogic
2-15

ijin
gL
an
di
ng

Te
c

hn
ol
og

ie
s

2.3.6 JDK

2-16

2.3.7

Be

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 14 -

Te
c

hn
ol
og

ie
s

IT WebLogic

2-17

Be

ijin
gL
an
di
ng

2.3.8

2-18

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 15 -

IT WebLogic

Te
c

hn
ol
og

ie
s

2.3.9

ijin
gL
an
di
ng

2-19

Be

2.3.10

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 16 -

IT WebLogic
2-20

2.4

WebLogic Server

ijin
gL
an
di
ng

Te
c

hn
ol
og

ie
s

Oracle WebLogicUser Projectsbase_domainStart Admin


Server for WebLogic Server Domain WebLogic Server

2-21

7001 IP 192.168.0.125 IP
127.0.0.1, hostname localhost RUNNING

2.5

Be

http://192.168.0.125:7001/console
AdminServer http://localhost:7001/console

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 17 -

Te
c

2-22

hn
ol
og

ie
s

IT WebLogic

Be

ijin
gL
an
di
ng

2-23

Windows UNIX
UNIX JDK
Liniux JDK

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 18 -

IT WebLogic

2.6

Linux JDK

Linux Weblogic .bin .jar .bin


JDK.jar JDK

2.6.1
1.

Linux

ie
s

uname a Linux

2-24

JRockit jrmc-4.0.0-1.6.0-linux-ia32.binsize120M
Oracle

3.

ls, cd, chmodrpmvisureboot

hn
ol
og

2.

2.6.2 JDK
weblogic

adduser weblogic

Te
c

2.6.2.1

ijin
gL
an
di
ng

home weblogic

2-25

2.6.2.2

chmod u+x

Be

2-26

2.6.2.3

Weblogic

2-27

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 19 -

IT WebLogic

2-28

2.6.2.4

Te
c

hn
ol
og

ie
s

1.

2-29

ijin
gL
an
di
ng

2.

Be

2-30

3.

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 20 -

ie
s

IT WebLogic

Source code

ijin
gL
an
di
ng

Te
c

4.

hn
ol
og

2-31

2-32

Be

5.

2-33

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 21 -

IT WebLogic

ie
s

6.

2-34

hn
ol
og

2.6.2.5

java version JDK


Linux
1.

/etc/profile

Te
c

shell

(1).(vi )/etc/profile
(2). profile

ijin
gL
an
di
ng

JAVA_HOME=JDK
PATH=$JAVA_HOME/bin:$PATH
CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export JAVA_HOME
export PATH
export CLASSPATH
2-1

(3).

Linux

1. Linux :

Be

2. $PATH / $CLASSPATH / $JAVA_HOME ,

3. CLASSPATH .,
4. export
5.

2.

.bashrc

.bashrc

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 22 -

IT WebLogic
(1)vi .bashrc
(2).bashrc
JAVA_HOME=JDK
export JAVA_HOME
PATH=$JAVA_HOME/bin:$PATH
export PATH
CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export CLASSPATH

ie
s

2-2
(3)
shell

hn
ol
og

3.

shell

shell

Te
c

export JAVA_HOME=JDK
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
2-3

ijin
gL
an
di
ng

()

Weblogic ls a

2-35

vi .bashrc .bashrc insert

Be

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 23 -

wq Esc :wq

Be

ijin
gL
an
di
ng

Te
c

2-36

hn
ol
og

ie
s

IT WebLogic

2-37

Weblogic

2-38

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 24 -

IT WebLogic

java version

2-39

2.6.2.6

ie
s

2-40

hn
ol
og

vi Test.java Test

Be

ijin
gL
an
di
ng

Te
c

javac java Test.java Shell Hello


Linux JDK

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 25 -

hn
ol
og

ie
s

IT

Be

ijin
gL
an
di
ng

Te
c

WebLogic

IT WebLogic

........................................................................................................................... 2
...........................................................................................................................

Be

ijin
gL
an
di
ng

Te
c

hn
ol
og

ie
s

...........................................................................................................
3
3 WebLogic ...........................................................................................................
...........................................................................................................3
3.1
Domain............................................................................................................................... 3
3.1.1
................................................................................................ 3
3.1.2
............................................................................................................ 4
3.2
..................................................................................................................................... 5
3.2.1
.................................................................................................................... 5
3.2.2
.................................................................................................................... 6
3.3
Machine...................................................................................................................... 6
3.3.1 Machine ..................................................................................................................6
3.3.2
Machine................................................................................................. 7
3.4
.........................................................................................................................................7
3.4.1
.................................................................................................................... 7
3.4.2
........................................................................................................................ 8
3.4.3
................................................................................................................ 8
3.4.4
................................................................................................ 8
3.4.5
................................................................................................................ 8
3.4.6
................................................................................................ 9
3.4.7
................................................................................................ 9
3.4.8
.................................................................................................................. 10
3.4.9
...................................................................................................... 10
3.4.10
...................................................................................................... 10
3.4.11
.................................................................................................. 11

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-2-

IT WebLogic

Logic
WebL
3 Web
WebLogic

3.1

Domain

ie
s

3.1.1

ijin
gL
an
di
ng

Te
c

hn
ol
og

(Domain) WebLogic Server


WebLogic

3-1

Be

1.

2.

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-3-

IT WebLogic
WebLogic Server examples

ie
s

hn
ol
og

Managed Servers
Managed Servers Oracle WebLogic Server

Te
c

3.1.2

WebLogic Server WebLogic Server

ijin
gL
an
di
ng

WebLogic Server

Be

()
()

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-4-

IT WebLogic

WebLogic Server

3.2

JVM weblogic.server WebLogic Server


weblogic.server java

ie
s

weblogic.server main() WebLogic


Java RAM

hn
ol
og

3.2.1

Be

ijin
gL
an
di
ng

Te
c

WebLogic

3-2

WebLogic Server
(GUI)
WebLogic Server (API) WebLogic Server
API Java

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-5-

IT WebLogic
WebLogic Server (weblogic.Admin)

SNMP WebLogic Server


config.xml

3.2.2

ijin
gL
an
di
ng

Te
c

hn
ol
og

ie
s

3-3

Be

WebLogic Server

WebLogic Server
WebLogic Server

3.3

Machine

Machine Server
Machine

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-6-

IT WebLogic

3.3.1 Machine

Te
c

hn
ol
og

ie
s

Machine WebLogic Server


WebLogic Server

ijin
gL
an
di
ng

3-4
WebLogic Server

WebLogic Server ( HTTP )

WebLogic Server

3.3.2 Machine

WebLogic Machine

Be

fail over

3.4

Cluster

3.4.1
WebLogic WebLogic Server WebLogic Server

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-7-

IT WebLogic

()

3.4.2
WebLogic

ie
s

hn
ol
og

3.4.3

ijin
gL
an
di
ng

Te
c

HTTP

3-5

Be

3.4.4

EJB

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-8-

IT WebLogic

3.4.5

Te
c

3-6

hn
ol
og

ie
s

Web

WebLogic Server HTTP


Servlet EJB

ijin
gL
an
di
ng

3.4.6

Web
EJB

HTTP

3.4.7

Be

EJB Servlet EJB


Servlet EJB
WebLogic Server

DMZ
Servlet/JSP

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-9-

IT WebLogic

3.4.8

ie
s

hn
ol
og

WebLogic Web Proxy


Servlet
( Local Director F5 Networks
Big IP)

Te
c

3.4.9

Be

ijin
gL
an
di
ng

HTTP

3-7

web

web web

HttpClusterServlet WebLogic Server


WebLogic Server Apache Apache

WebLogic Server NSAPI Netscape Enterprise Server

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 10 -

IT WebLogic
WebLogic Server Microsoft IIS Microsoft Internet Information
Server

3.4.10

ijin
gL
an
di
ng

Te
c

hn
ol
og

ie
s

HTTP

3-8

Web

HTTP web
Web WebLogic Server HTTP

Be

Web Web
DMZ
WebLogic Server DMZ Web 3-8

3.4.11

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 11 -

IT WebLogic
WebLogic Server

WebLogic Server
WebLogic Server

ie
s

\autodeploy autodeploy
applications

hn
ol
og

REDEPLOY WEBINF
REDPLOY

Be

ijin
gL
an
di
ng

Te
c

applications

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 12 -

hn
ol
og

ie
s

IT

Be

ijin
gL
an
di
ng
Te
c

WebLogic

IT WebLogic

........................................................................................................................... 2
...........................................................................................................................
...................................................................................................
3
WebLogic ...................................................................................................
...................................................................................................3
................................................................................................................. 3
user_projects ................................................................................................................... 4
utils ................................................................................................................................. 5
WebLogic home ............................................................................................................. 5
................................................................................................................................. 6

Be

ijin
gL
an
di
ng
Te
c

hn
ol
og

ie
s

4
4.1
4.2
4.3
4.4
4.5

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-2-

IT WebLogic

Logic
4 Web
WebL
WebLogic

4.1

|-bea

bea
Sun JDK

JDK Java

JRE Java

xxx

Sun JDK jdk160_05

|-/jrockit_xxx

BEA JRockit JDK

JDK Java JRE

Be

ijin
gL
an
di
ng
Te
c

hn
ol
og

ie
s

|-/ jdk_xxx

Java

xxx

JRockit JDK jrockit_160_05

|-/logs

BEA

|-/user_projects

domains

|-/util

BEA

BEA

Utils.jar UpdateLicense

|-/ wlserver_10.3

|-/ workshop_10.3

:http://www.landingbj.com
: 400-810-2327

WebLogic Server weblogic

weblogic weblogic

: service@landingbj.com
: 010-82730518

-3-

IT WebLogic
|

eclipse IDE

|-/modules

jar

|-/registry.xml

BEA

Service

Pack

BEA

BEA

user_projects

hn
ol
og

ie
s

|-/tools

ijin
gL
an
di
ng
Te
c

4.2

Be

user_projects domains
domains\base_domain

|-/autodeploy

WebLogic

ear,war

|-/bin

cmd window

sh Linux

setDomainEnv.sh

startManagedWebLogic.sh

startPointBaseConsole.sh

startWebLogic.sh

stopManagedWebLogic.sh

stopWebLogic.sh

startWebLogic.sh

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-4-

IT WebLogic
JMS

JDBC

|-/console-ext

admin

server

|-/init-info

|-/lib

|-/security

|-/servers

|-/user_staged_config

ijin
gL
an
di
ng
Te
c

hn
ol
og

ie
s

|-/config

|-/fileRealm.properties

bin\startWebLogic.cmd

|-/startWebLogic.sh

bin\startWebLogic.sh

utils

|-/bsu

bus.jar jar

|-/quickstart

|-/uninstall

weblogic

|-/utils.jar

jar

Be

4.3

|-/startWebLogic.cmd

4.4

WebLogic home
|-/common

WebLogic

Configuration Wizard WLST

JAR

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-5-

|-/samples

server

MedRec

WebLogic Server

|-/uninstall

4.5

hn
ol
og

|-/server

ie
s

IT WebLogic

BEA Products

WebLogic home samples

ijin
gL
an
di
ng
Te
c

|samples
|domains

| medrec

medrec

| wl_server

wl_server

|server

| examples

weblogic

|medrec

medrec

Be

| docs

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-6-

hn
ol
og

ie
s

IT

Be

ijin
gL
an
di
ng

Te
c

WebLogic

IT WebLogic

........................................................................................................................... 2
...........................................................................................................................

Be

ijin
gL
an
di
ng

Te
c

hn
ol
og

ie
s

.......................................................................................................
4
5 WebLogic .......................................................................................................
.......................................................................................................4
5.1
..................................................................................................... 4
5.1.1 startWebLogic.cmd/startWebLogic.sh................................................................................4
5.1.2 startManagedWebLogic.cmd/startManagedWebLogic.sh.................................................. 4
5.1.3 setDomainEnv.cmd/setDomainEnv.sh................................................................................4
5.1.4 stopWebLogic.cmd/stopWebLogic.sh................................................................................ 4
5.1.5 stopManagedWebLogic.cmd/stopManagedWebLogic.sh...................................................5
5.2
config.xml.......................................................................................................5
5.2.1
WebLogic config.xml ...............................................................5
5.2.2
config.xml.................................................................................................. 5
5.2.3 config.xml ...................................................................................................6
5.3
weblogic.xml.......................................................................................................... 6
5.3.1
................................................................................................................................ 6
5.3.2
........................................................................................................ 6
description....................................................................................................................................6
weblogic-version..........................................................................................................................6
security-role-assignment.............................................................................................................. 6
run-as-role-assignment.................................................................................................................7
resource-description.....................................................................................................................8
resource-env-description..............................................................................................................8
ejb-reference-description............................................................................................................. 8
service-reference-description....................................................................................................... 9
session-descriptor........................................................................................................................ 9
jsp-descriptor............................................................................................................................. 14
auth-filter................................................................................................................................... 16
charset-params........................................................................................................................... 16
input-charset.............................................................................................................................. 17
charset-mapping.........................................................................................................................17
virtual-directory-mapping.......................................................................................................... 17
url-match-map............................................................................................................................18
security-permission.................................................................................................................... 19
context-root................................................................................................................................19
wl-dispatch-policy..................................................................................................................... 19
servlet-descriptor....................................................................................................................... 20
work-manager............................................................................................................................ 20
logging....................................................................................................................................... 22
library-ref................................................................................................................................... 24
5.3.2.1
Backwards Compatibility Flags............................................................................... 25
5.3.2.2
Web Container Global Configuration.......................................................................25
5.4
web.xml................................................................................................................ 25
5.4.1
.............................................................................................................................. 25
5.4.2
...................................................................................................... 25
icon............................................................................................................................................ 25
display-name..............................................................................................................................26
description..................................................................................................................................26
context-param............................................................................................................................ 26
filter........................................................................................................................................... 26
filter-mapping............................................................................................................................ 27
listener....................................................................................................................................... 27
servlet.........................................................................................................................................27
servlet-mapping......................................................................................................................... 28

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-2-

IT WebLogic

Be

ijin
gL
an
di
ng

Te
c

hn
ol
og

ie
s

session-config............................................................................................................................ 28
mime-mapping........................................................................................................................... 29
welcome-file-list........................................................................................................................ 29
error-page...................................................................................................................................29
taglib.......................................................................................................................................... 30
resource-env-ref......................................................................................................................... 30
resource-ref................................................................................................................................ 30
security-constraint......................................................................................................................31
web-resource-collection.............................................................................................................31
auth-constraint........................................................................................................................... 32
user-data-constraint....................................................................................................................32
login-config................................................................................................................................32
form-login-config.......................................................................................................................33
security-role............................................................................................................................... 33
env-entry.................................................................................................................................... 33
ejb-ref.........................................................................................................................................34
ejb-local-ref................................................................................................................................34
5.5
............................................................................................................................... 35
5.5.1
(domain.log)......................................................................................................35
5.5.2 server.log...........................................................................................................................35
5.5.3 access.log.......................................................................................................................... 35

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-3-

IT WebLogic

Logic
5 Web
WebL
WebLogic

5.1

1.

startWebLogic.cmd/startWebLogic.sh

hn
ol
og

5.1.1

ie
s

WebLoigc (startWebLogic)
(startManagedWebLogic)(setDomainEnv)
(stopWebLogic)(stopManagedWebLogic)

startWebLogic.cmd(Windows )

startWebLogic.sh(Linux/Unix )
2.

Te
c

/WLS_HOME/user_projects/domains/base_domain()

/WLS_HOME/user_projects/domains/base_domain/bin()
startWebLogic.cmd/startWebLogic.sh

ijin
gL
an
di
ng

5.1.2 startManagedWebLogic.cmd/startManagedWebLogic.sh
1.

startManagedWeblogic.cmd(Windows )
startManagedWebLogic.sh(Linux/Unix )

2.

/WLS_HOME/user_projects/domains/base_domain/bin

5.1.3
1.

setDomainEnv.cmd/setDomainEnv.sh

Be

setDomainEnv.cmd(Windows )
setDomainEnv.sh(Linux/Unix )

-Xms256m -Xmx512mSun JDK HP JDK perm -XX:PermSize=48m XX:MaxPermSize=128m


2.

/WLS_HOME/user_projects/domains/base_domain/bin

5.1.4 stopWebLogic.cmd/stopWebLogic.sh
1.

stopWebLogic.cmd(windows )

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-4-

IT WebLogic
stopWebLogic.sh(Linux/Unix )
2.

/WLS_HOME/user_projects/domains/base_domain/bin

5.1.5 stopManagedWebLogic.cmd/stopManagedWebLogic.sh
1.

stopManagedWebLogic.cmd(windows )
stopManagedWebLogic.sh(Linux/Unix )

/WLS_HOME/user_projects/domains/base_domain/bin

config.xml

hn
ol
og

5.2

ie
s

2.

config.xml
/WLS_HOME/user_projects/domains/base_domain/config/config.xml(
)

Te
c

5.2.1 WebLogic config.xml

WebLogic Sun JavaTM Management Extensions (JMX)


API config.xml weblogic

ijin
gL
an
di
ng

WebLogic Server WebLogic


Server config.xml weblogic server
config.xml weblogic WebLogic

config.xml XML
XML
XML WebLogic Server

5.2.2 config.xml

Be

config.xml
WebLogic
WebLogic config.xml WebLogic
config.xml WebLogic
config.xml
config.xml
WebLogic Server config.xml


config.xml xml config.xml

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-5-

WebLogic config.xml

IT WebLogic

config.xml

5.2.3 config.xml
config.xml xml

Web SSL
EJB Web

hn
ol
og

ie
s

API
ListenPort
weblogic.management.configuration.ServerMBean ListenPort
ServerMBean getListenPort() setListenPort()

Boolean truefalse

5.3

weblogic.xml

Te
c

5.3.1

WebLogic Server weblogic weblogic.xml


jsp web web-inf
</weblogic-web-app></weblogic-web-app>

ijin
gL
an
di
ng

5.3.2
description

description Web

weblogic-version

weblogic-version Web <weblogic-web-app>


WebLogic Server WebLogic Server

security-role-assignment

Be

security-role-assignment Web WebLogic Server

<security-role-assignment>
<role-name>PayrollAdmin</role-name>
<principal-name>Tanya</principal-name>
<principal-name>Fred</principal-name>
<principal-name>system</principal-name>
</security-role-assignment>
5-1

<security-role-assignment>

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-6-

IT WebLogic
<role-name>roleadmin</role-name>
<externally-defined/>
</security-role-assignment>
5-2
<security-role-assignment> <principal-name>
<externally-defined>
security-role-assignment

ie
s

<principal-name>

<externallydefined>

<externally-defined>

<principalname>

<principal-name>

WebLogic
Server

ijin
gL
an
di
ng

Te
c

<role-name>

hn
ol
og

5-1

security-role-assignment Web

EJB weblogic.xml role_xyz


joe role_xyz role_xyz

Be

security-role-assignment role_xyz Web

run-as-role-assignment
run-as-role-assignment web.xml run-as servlet
servlet servlet-descriptor
run-as-principal-name run-as-roleassignment Web security-role-assignment
principal-name
run-as-role-assignment

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-7-

IT WebLogic
<run-as-role-assignment>
<role-name>RunAsRoleName</role-name>
<run-as-principal-name>joe</run-as-principal-name>
</run-as-role-assignment>
5-3
run-as-role-assignment

<run-as-principalname>

hn
ol
og

ie
s

<role-name>

5-2

resource-description

Te
c

resource-description JNDI WebLogic Server


EJB
resource-description
/

ijin
gL
an
di
ng

<res-ref-name>

<jndi-name>

JNDI

5-3

resource-env-description

resource-env-description ejb-jar.xml resourceenv-ref JNDI

Be

resource-env-description

<res-env-ref-name>

<jndi-name>

JNDI
5-4

ejb-reference-description
ejb-reference-description

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-8-

IT WebLogic

<ejb-ref-name>

Web
EJB

<jndi-name>

JNDI
5-5

ie
s

service-reference-description

hn
ol
og

service-reference-description

<service-ref-name>

<wsdl-url>

<call-property>

<name>

<value>

ijin
gL
an
di
ng

Te
c

<call-property>

<port-info>

<port-info>

<port-name>
<stub-property>
<call-property>

5-6

session-descriptor

Be

session-descriptor servlet

timeout-secs

3600

WebLogic Server
3600

Session

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-9-

IT WebLogic

web.xml
session-timeout

60

WebLogic Server

WebLogic Server

ie
s

invalidation-interval-secs

sharing-enabled

false

hn
ol
og

60

true Web
HTTP

debug-enabled

Te
c

Web

false

HTTP

ijin
gL
an
di
ng

false

Be

id-length

52

ID
8
Integer.MAX_VALUE
WAP
URL WAP
cookie WAP
URL
128
URL

WebLogic
Server ID

WAPEnabled
52

http://edocs.weblogicfans.net/w
ls/docs92/webapp/sessions.html
- wap
http://edocs.weblogicfans.net/w
ls/docs92/webapp/sessions.html
- wap

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 10 -

IT WebLogic
tracking-enabled

true

HTTP

cache-size

1028

JDBC

max-in-memory-sessions

-1

hn
ol
og

ie
s

servlet

WebLogic Server

weblogic.servlet.SessionCreatio
nException

Te
c

servlet
max-in-memorysessions

ijin
gL
an
di
ng

true

cookie

false

cookie-name

JSESSIONID

cookie

JSESSIONID

cookie-path

null

cookie

Be

cookies-enabled

cookie-domain

:http://www.landingbj.com
: 400-810-2327

null

/
WebLogic Server URL
cookie

cookie
URL

cookie
cookie-domain
.mydomain.com
*.mydomain.com

: service@landingbj.com
: 010-82730518

- 11 -

IT WebLogic
cookie

*.com *.net

cookie

null

cookie-secure

false

cookie
cookie

hn
ol
og

cookie-comment

ie
s

Sun
Microsystems Servlet
Cookie.setDomain()

HTTPS
cookie cookie ID
HTTPS
HTTP
Cookie

-1

ijin
gL
an
di
ng

cookie-max-age-secs

Te
c

url-rewriting-enabled

Be

persistent-store-type

memory

cookie
cookie

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

memory -

replicated - memory

replicated_if_clustered
Web

persistent-store-type
memory
sync-replication-acrosscluster

async-replication-across-

- 12 -

IT WebLogic
cluster

persistent-store-dir

session_db

cookie
cookie WLCOOKIE
cookie
Web

hn
ol
og

WLCOOKIE

cookie
cookie

persistentstore-dir

Be

ijin
gL
an
di
ng

Te
c

persistent-store-cookie-name

jdbc -

ie
s

file -

<servername>\data\store\default

persistent-store-pool

None

JDBC

persistent-store-table

wl_servlet
_sessions

JDBC

persistent-store-type
jdbc

persistent-store-

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 13 -

IT WebLogic
table

jdbc-column-name-maxinactive-interval

wl_max_inactive_interval
jdbc-columnname-max-inactive-interval
JDBC

120

ie
s

jdbc-connection-timeout-secs

true

http-proxy-caching-ofcookies

true

URL ID
URL
cookie

ijin
gL
an
di
ng

Te
c

url-rewriting-enabled

hn
ol
og

WebLogic Server JDBC


x

encode-session-id-in-queryparams

false

Be

runtime-main-attribute

false WebLogic
Server

"Cache-control: no-cache=setcookie"
cookie

servlet
ID Web

encodesession-id-in-query-params
true
false

ServletSessionRuntimeMBean
ServletSessionRuntimeMBean
getMainAttribute()

user-name

5-7

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 14 -

hn
ol
og

ie
s

IT

ijin
gL
an
di
ng

Te
c

WebLogic

Be

jsp-descriptor
jsp-descriptor JSP
jsp-descriptor

WebLogic Server JSP

JSP

hn
ol
og

ie
s

page-check-seconds

-1

ijin
gL
an
di
ng

Te
c

JSP

pageCheckSeconds
60

false

true
Web
WebLogic Server WebLogic
Server
JSP

precompile-continue

false

true
JSP WebLogic
Server
JSP precompile
true

keepgenerated

false

JSP
Java
true
Java

Be

precompile

true

true
WebLogic Server

working-dir

WebLogic Server
JSP Java

print-nulls

null

false
null

backward-compatible

true

encoding

hn
ol
og

ie
s

verbose

true

Te
c

JSP

ijin
gL
an
di
ng

JSP JSP

<%@
page
contentType="text/html;
charset=custom-encoding"%>

jsp_servlet

JSP

exact-mapping

true

true
JSP JspStub

exactMapping false
Web JSP
url
exactMapping JSP

true

WebLogic Server
JSP Java

Be

package-prefix

default-file-name

rtexprvalue-jsp-param-name

false

jsp:param name

false

5-8

auth-filter HttpServlet

ie
s

auth-filter

hn
ol
og

servlet

charset-params

<charset-params> unicode

Te
c

<charset-params>
<input-charset>
<resource-path>/*</resource-path>
<java-charset-name>UTF-8</java-charset-name>
</input-charset>

ijin
gL
an
di
ng

5-4

input-charset

<input-charset> GET POST

<input-charset>
<resource-path>/foo</resource-path>
<java-charset-name>SJIS</java-charset-name>
</input-charset>

Be

5-5

<input-charset>

<resource-path>

URL
WebLogic Server
<java-charset-name> Java

<java-charset-name>

Java

5-9

charset-mapping
<charset-mapping> IANA Java

5-6

hn
ol
og

<charset-mapping>
<iana-charset-name>Shift-JIS</iana-charset-name>
<java-charset-name>SJIS</java-charset-name>
</charset-mapping>

ie
s

<charset-mapping>

<java-charset-name>

IANA
<java-charset-name>
Java

ijin
gL
an
di
ng

<iana-charset-name>

Te
c

Java

5-10

virtual-directory-mapping

virtual-directory-mapping
Web

Be

Web
Web servlet
Web

<virtual-directory-mapping>
<local-path>c:/usr/gifs</local-path>
<url-pattern>/images/*</url-pattern>
<url-pattern>*.jpg</url-pattern>
</virtual-directory-mapping>
<virtual-directory-mapping>
<local-path>c:/usr/common_jsps.jar</local-path>

<url-pattern>*.jsp</url-pattern>
</virtual-directory-mapping>
5-7
virtual-directory-mapping

<url-pattern>

URL
Servlet API 11.2

5-11

hn
ol
og

ie
s

<local-path>

Te
c

WebLogic Server URL


servlet Web

url-match-map

ijin
gL
an
di
ng

URL WebLogic Server URL


J2EE weblogic.servlet.utils.URLMatchMapWebLogic Server
SimpleApacheURLMatchMap url-match-map

SimpleApacheURLMatchMap

*.jws JWSServlet

http://foo.com/bar.jws/baz baz JWSServlet


weblogic.xml URLMatchMap

Be

<url-match-map>
weblogic.servlet.utils.SimpleApacheURLMatchMap
</url-match-map>
5-8

security-permission
security-permission
codebase signedBy

<security-permission-spec>
grant { permission java.net.SocketPermission "*", "resolve" };

</security-permission-spec>
5-9

permission java.net.SocketPermission
"*"
resolve

ie
s

context-root

hn
ol
og

context-root Web Web


EAR EAR META-INF/application.xml
context-root application.xml context-root weblogic.xml
context-root
weblogic.xml
Web

application.xml context-root Web

application.xml context-root Web EAR

ijin
gL
an
di
ng

2.

Te
c

1.

weblogic.xml context-root
Web Web application.xml
weblogic.xml context-root
URI

3.

weblogic.xml application.xml context-root URI


URI WAR URI
MyWebApp.war /MyWebApp

Be

EAR Web context-root


Web

wl-dispatch-policy
wl-dispatch-policy Web
per-servlet-dispatch-policy servlet
jsp Web

servlet-descriptor
servlet-descriptor servlet
servlet-descriptor

servlet web.xml
servlet
servlet

<run-as-principal-name>

web.xml
run-as-role-name

<init-as-principal-name>

servlet init
run-as-principal-name

init-as-principal-name
run-as-principal-name

<destroy-as-principal-name
>

ijin
gL
an
di
ng

Te
c

hn
ol
og

ie
s

<servlet-name>

Be

<dispatch-policy>

servlet destroy
run-as-principal-name

destroy-as-principal-name
run-as-principal-name

servlet
wl-dispatch-policy
Web

5-12

work-manager
work-manager <weblogic-web-app>
work-manager

name

response-time-request-clas
s
/
fair-share-request-class /
context-request-class
/
request-class-name

ie
s

response-time-request-class

goal-ms
(( - T) Cr)/R T
R
Cr

ijin
gL
an
di
ng

Te
c

hn
ol
og

fair-share-request-class

100 Cf/(P R T) P
R T
Cf

Be

min-threads-constraint
/
min-threads-constraint-nam
e

context-request-class

cookie

request-class-name

min-threads-constraint -

min-threads-constraint-name -
min-threads-constraint

max-threads-constraint
/
max-threads-constraint-nam
e

max-threads-constraint -


10
3

10

capacity / capacity-name

ie
s

max-threads-constraint-name -
max-threads-constraint

ijin
gL
an
di
ng

Te
c

hn
ol
og

capacity -

JMS

capacity-name capacity

5-13

logging

logging <weblogic-web-app>
logging

Be

log-filename

logging-enabled

ManagedConnectionFactory

ManagedConnection

true

ManagedConnectionFactory

ManagedConnection

log-filename

WebLogic
Server
true | false
false

ie
s

rotation-type

bySizebyName none

hn
ol
og

bySize -
file-size-limit

FileName.n

ijin
gL
an
di
ng

Te
c

byName

Be

number-of-files-limited

file-time-span

FileName.n

log-filename

none -

bySize

bySize

number-of-files-limited
true
rotationType


number-of-files-limited
false

true | false
false

number-of-files-limited

hn
ol
og

ie
s

file-count

bySize

FileName.n

ijin
gL
an
di
ng

Te
c

file-size-limit

rotate-log-on-startup

Be

log-file-rotation-dir

rotation-time

500

true | false
true

k:mm k
1-24 byTime

file-time-span

file-time-span

byTime
24

ie
s

5-14

hn
ol
og

library-ref

library-ref Web Web

ijin
gL
an
di
ng

Te
c

<library-ref>
<library-name>WebAppLibraryFoo</library-name>
<specification-version>2.0</specification-version>
<implementation-version>8.1beta</implementation-version>
<exact-match>false</exact-match>
</library-ref>
5-10

Web library-namespecification-version
implementation-version exact-match
library-ref

null

specification-version

implementation-version

null

exact-match

false

Be

library-name

5-15

5.3.2.1

Backwards Compatibility Flags

WebLogic Server 9.0

5.3.2.2

Web Container Global Configuration

Be

ijin
gL
an
di
ng

Te
c

hn
ol
og

ie
s

Web WebAppContainerMBean

Te
c

hn
ol
og

ie
s

IT

ijin
gL
an
di
ng

WebLogic

Be

IT WebLogic

5.4

web.xml

5.4.1
Web web.xml servletfilter Web web.xml
JavaEE web.xml <web-app>

ie
s

web.xml

hn
ol
og

<?xml version=1.0 encoding=UTF-8?>


<web-app version=2.5

Xmlns=http://jaava.sun.com/xml/ns/javaee

Xmlns:xsl=http://www.w3.org/2001/XMLSchema-instance

Xsi:schemaLocation=http://java.sun.com/xml/ns/javaee

Te
c

http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd>
</web-app>

ijin
gL
an
di
ng

5-11

web.xml

web.xml

5.4.2
icon

Be

<small-icon>

16x16
gif jpg

<large-icon>

32x32
gif jpg

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-2-

IT WebLogic
5-16

display-name
Web

<display-name>

ie
s

description
Web

<description>

Te
c

hn
ol
og

5-17

ijin
gL
an
di
ng

5-18

context-param

Web servlet
WebLogic Server

weblogic.xml

Be

weblogic.httpd.clientCertProxy

WebLogic
HttpClusterServlet
HTTPS

WL-Proxy-Client-Cert
HTTP

5-19

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-3-

IT WebLogic
filter
Servlet Filter
filter

<filter-name>

ie
s

<icon>

hn
ol
og

<description>

<filter-class>

Te
c

ijin
gL
an
di
ng

<display-name>

<init-param>

5-20

filter-mapping

URL

Be

<filter-name>

<filter>
<filter-name>

<url-pattern>

URL

5-21

listener

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-4-

IT WebLogic

<listener-class>

Web

5-22

ie
s

servlet

<icon>

<servlet-name>

Te
c

hn
ol
og

HTTP Servlet

servlet

ijin
gL
an
di
ng

Servlet

<description>

Servlet

<servlet-class>

Servlet servlet

<servlet-class>

Be

<display-name>

<jsp-file>

<jsp-

file>)

<jsp-file>

Jsp Web

<servletclass>)

<init-param>

/ Servlet

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-5-

IT WebLogic
<load-on-startup>

WebLogic Server
Servlet
Servlet

<run-as> <run-as>

Servlet

hn
ol
og

<security-role-ref>

ie
s

<security-role>

Te
c

5-23

servlet-mapping

ijin
gL
an
di
ng

Servlet URL

<servlet-name>

<url-pattern>

Servlet <servlet>
<servlet-name>

Servlet URL

Be

5-24

session-config
Web HTTP Session

<session-timeout>

:http://www.landingbj.com
: 400-810-2327

Web HTTP

: service@landingbj.com
: 010-82730518

-6-

IT WebLogic

weblogic.xml

<session-descriptor> TimeoutSecs

-2
Integer.MAX_VALUE/60

-2

ie
s

weblogic.xml

hn
ol
og

<session-descriptor> TimeoutSecs

-1 =

Te
c

5-25

mime-mapping

ijin
gL
an
di
ng

mime type

<extension>

txt

<mime-type>

MIME text/plain

5-26

Be

welcome-file-list

URL WebLogic

<welcome-file>

index.html

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-7-

IT WebLogic
5-27

error-page
HTTP

ie
s

<error-code><exception-type>

HTTP 404

<exception-type>

Java

hn
ol
og

<error-code>

java.lang.Exception

Te
c

<location>

/myErrorPg.html

ijin
gL
an
di
ng

5-28

taglib

JSP

Be

<taglib-location>

<taglib-uri>

Web

WEB-INF

JSP uri

5-29

resource-env-ref

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-8-

IT WebLogic
<resource-env-ref>
<resource-env-ref-name>jms/StockQueue</resource-env-ref-name>
<resource-env-ref-type>javax.jms.Queue</resource-env-ref-type>
</resource-env-ref>
5-12

ie
s

<resource-env-ref-name

hn
ol
og

<description>

>

java:comp/env
JNDI

<resource-env-ref-type

Te
c

>
<resource-env-ref-type

ijin
gL
an
di
ng

>

5-30

resource-ref

Web

JNDI weblogic.xml

Be

<description>

<res-ref-name>

Web JNDI

<res-type>

Java
Java

<res-auth>

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-9-

IT WebLogic
<res-sharing-scope>

Specifies

whether

connections

obtained

through

the

resource

manager

given

connection

factory reference can be shared.

Shareable

ie
s

5-31

security-constraint

hn
ol
og

Unshareable

ijin
gL
an
di
ng

Te
c

<web-resource-collection> Web

<web-resource-collecti

on>

<auth-constraint>

<user-data-

HTTP

// Web

Be

constraint>

5-32

web-resource-collection
Web

<web-resource-name>

:http://www.landingbj.com
: 400-810-2327

Web

: service@landingbj.com
: 010-82730518

- 10 -

IT WebLogic
<description>

<url-pattern>

<http-method>

GET/POST

5-33

ie
s

auth-constraint

<description>

Te
c

hn
ol
og

Web

5-34

ijin
gL
an
di
ng

user-data-constraint

<transport- guarantee>

Be

<description>

INTEGRAL

CONFIDENTIAL WebLogic
SSL/HTTPS

NONE
INTEGRAL
CONFIDENTIAL

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 11 -

IT WebLogic
5-35

login-config
<security-constraint>

<auth-method>

ie
s

hn
ol
og

BASIC
HTTP Basic

FORM HTML

Te
c

CLIENT-CERT HTTPS

ijin
gL
an
di
ng

<realm-name>

<form-login- config>

<auth-method> FORM

5-36

form-login-config

Be

FORM

<form-login-page>

URI
HTML JSP HTTP Servlet
HTML

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 12 -

IT WebLogic
<form-error-page>

URI

5-37

security-role

<description>

<role-name>

hn
ol
og

ie
s

weblogic.xml

Te
c

5-38

ijin
gL
an
di
ng

env-entry

<env-entry-name>

<env-entry-value>

Java

Be

<description>

<env-entry-type>

java.lang.Boolean
java.lang.String
java.lang.Integer

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 13 -

IT WebLogic
java.lang.Double
java.lang.Float

5-39

ejb-ref

<description>

<ejb-ref-name>

hn
ol
og

ie
s

EJB

Web EJB

<home>

EJB

EJB home

ijin
gL
an
di
ng

<ejb-ref-type>

Te
c

JNDI

<remote>

EJB

<ejb-link>

J2EE (ear)

<run-as> <run-as>

EJB

<security-role>

Be

5-40

ejb-local-ref
EJB Local Home

<description>

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 14 -

IT WebLogic
<ejb-ref-name>

Web EJB JNDI

<ejb-ref-type>

EJB
<ejb-ref-type>Entity</ejb-ref
-type>

<local>

<ejb-link>

EJB Home

EJB

J2EE (ear)

Te
c

<local-home>

hn
ol
og

f-type>

ie
s

<ejb-ref-type>Session</ejb-re

EJB

ijin
gL
an
di
ng

5-41

5.5

5.5.1 (domain.log)

/WLS_HOME/userprojects/domains/base_domain/servers/AdminServer/logs()

Be

DOMIAN DOMAIN WebLogic SERVER

DOMAIN Administrator Server


Administrator Server DOMAIN domain_name.log

5.5.2 server.log

/WLS_HOME/user_projects/domains/base_domain/servers/AdminServer/logs
/WLS_HOME/user_projects/domains/base_domain/servers/servername/logs()

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 15 -

IT WebLogic
WebLogic Server WebLogic Server
LOG
AdminServer.log WebLogic Gernal
server
servername.log server

5.5.3 access.log

ie
s

/WLS_HOME/user_projects/domains/base_domain/servers/servername/logs()

hn
ol
og

http WebLogic httphttps


Log Access.log
IP

127.0.0.1 - - [25/Feb/2002:11:35:58 +0800] "GET /weather HTTP/1.1" 302 0

200 176

Te
c

127.0.0.1 - - [25/Feb/2002:11:35:58 +0800] "GET /weather/index.Html HTTP/1.1"

5-13

Be

ijin
gL
an
di
ng

HTTP HTTP

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 16 -

hn
ol
og

ie
s

IT

Be

ijin
gL
an
di
ng

Te
c

WebLogic

IT WebLogic

........................................................................................................................... 2
...........................................................................................................................

Be

ijin
gL
an
di
ng

Te
c

hn
ol
og

ie
s

............................................................................................................ 3
6 Java ............................................................................................................
6.1
JVM ................................................................................................................................ 3
6.2
JDK ............................................................................................................ 3
6.3
GC ...................................................................................................................................4
6.4
JVM ClassLoader........................................................................................................... 4
6.4.1 ClassLoader ................................................................................................................4
6.4.2 Java ........................................................................................................................ 5
6.4.2.1
Java ............................................................................................5
6.4.2.2
........................................................................................................................5
6.4.2.3
prefer-web-inf-classes ....................................................................................... 6
6.4.2.4
.................................................................................... 6
6.4.3 WebLogic ClassLoader.......................................................................................................6
6.4.4
WebLogic Server ......................................................8
6.4.4.1
WebLogic Server ........................................................... 8
6.4.4.2
.................................................................................... 9
6.4.4.3
.............................................................................. 10
6.4.4.4
.......................................................................................... 10
6.4.4.5
...................................................................................... 12
6.4.4.6
EJB ................................................................................. 12
6.4.4.7
.......................................................... 13
6.4.4.8
.................................................................................................. 14
6.4.5
...........................................................................15
6.4.5.1
.................................................................................................. 15
6.4.5.2
.......................................................................................... 16
6.4.5.3
.............................................................................................................. 16
6.4.5.4
JAR...................................................................................... 16

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-2-

IT WebLogic

6 Java
6.1

JVM

ie
s

Java Virtual MachineJava ,


Java ,
,JVM
, Java Java

6.2

JDK

hn
ol
og

Java ,

Sun JDK JDK

ijin
gL
an
di
ng

Te
c

Java

Be

6-1

Java

1.

Young new

Young Eden Survivor from to Survivor


Eden Survivor Eden
Tenure(old) Tenure(old)
2.

Tenured old
Tenure

Young Tenured Java heap


heap

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-3-

IT WebLogic
3.

Perm

Permperm Class class


methodfield
Virtual ?
JVM Heap
JVM
-Xmx

ie
s

-Xms-Xms-Xmx
Virtual
Eden Tenured Perm Virtual

GC

hn
ol
og

6.3

GC GC Garbage Collection Java


GC JVM

GC Java

6.4

JVM ClassLoader
ClassLoader

ijin
gL
an
di
ng

6.4.1

Te
c

GC GC

class loader Java Java Java


Java Java .java Java
Java .class Java
java.lang.Class Java
C C++Java
Java
ClassLoader JVM
ClassLoaderJVM ClassLoader
ClassLoader JVM ClassLoader
ClassLoader

Be

JVM ClassLoaderBootstrap ClassLoaderExtension


ClassLoaderApp ClassLoaderBootStrap ClassLoader C++
null JVM Bootstrap
Extension ClassLoader JRE\lib\ext , JRE\classes
App ClassLoader CLASSPATH

BootStrap ClassLoader
|------ Extension ClassLoader
|------- App ClassLoader
6-1

ClassLoader BootStrap
ExtClassLoader AppClassLoader

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-4-

IT WebLogic

6.4.2 Java
Java Java (JVM)
Java
Java

6.4.2.1

Java

JVM

ie
s

bootstrap class loader Java


java.lang.ClassLoader

hn
ol
og

extensions class loader Java Java


Java

Te
c

system class loader Java


CLASSPATH Java Java
ClassLoader.getSystemClassLoader()

ijin
gL
an
di
ng

getParent()

Java Java
Java

WebLogic Server BEA


WebLogic Server BEA
J2EE BEA

6.4.2.2

Be

defineClass()
loadClass() defining loader
initiating loader
Java

com.example.Outer com.example.Inner com.example.Outer


com.example.Inner
java.lang.Class

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-5-

IT WebLogic
loadClass()

WebLogic Server Web


Web
WebLogic Server

6.4.2.3

prefer-web-inf-classes

hn
ol
og

ie
s

WebLogic Web weblogic.xml <prefer-web-infclasses> <container-descriptor>


false true Web
Web
WebLogic Server
Web
ClassCastException

Te
c

delegation
Web prefer-web-inf-classes true Web
WebLogic Server
Web WEB-INF

ijin
gL
an
di
ng

prefer-web-inf-classes
ClassCastException

6.4.2.4

WebLogic Server
EJB
Java

Be

WebLogic Server

WebLogic Server

6.4.3 WebLogic ClassLoader


WebLogic
myapplication
|---APP-INF
// lib classes webapp
|---lib
// ejb webapp jar
|---classes // ejb webapp
|---META-INF
|---application.xml
|---mywebapp

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-6-

IT WebLogic
|---WEB-INF
|---lib
|---classes // class
|---web.xml
|---ejb.jar
//ejb jar
6-2

6-3

hn
ol
og

BootStrap ClassLoader
|--- Extension ClassLoader
|---WebLogic Service System ClassLoader
|---Filtering ClassLoader
|---Application ClassLoader
|---Web Application ClassLoader
|---Jsp ClassLoader

ie
s

ClassLoader

Application ClassLoader EJB JARSAPP-INF/libAPP-INF/classesEJB


JARS ClassPath

Te
c

Web Application ClassLoader WARWAR ClassPath

ijin
gL
an
di
ng

WebLogic ClassLoader BootStrap


ExtClassLoader AppClassLoader
JspServlet EJB EJB,
servlet jsp jspservlet
EJB
Weblogic weblogic.xml

<container-descriptor>
<prefer-web-inf-classess>true</ prefer-web-inf-classess>
</container-descriptor>
6-4

ClassLoaderWeblogic
ClassLoader Weblogic-application.xml

Be

<classloader-struts>
<module-ref>
<module-uri>ejba.jar</module-uri>
</module-ref>
<module-ref>
<module-uri>webc.war</module-uri>
</module-ref>
<classloader-structure>
<module-ref>
<module-uri>weba.war</module-uri>
</module-ref>

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-7-

hn
ol
og

Te
c

6-5

ie
s

IT WebLogic
</classloader-structure>
<classloader-structure>
<module-ref>
<module-uri>ejbc.jar</module-uri>
</module-ref>
<module-ref>
<module-uri>webb.war</module-uri>
</module-ref>
<classloader-structure>
<module-ref>
<module-uri>webd.war</module-uri>
</module-ref>
</classloader-structure>
<classloader-structure>
<module-ref>
<module-uri>ejbb.jar</module-uri>
</module-ref>
</classloader-structure>
</classloader-structure>
</classloader-structure>

ijin
gL
an
di
ng

ClassLoader

Be

6-2

6.4.4 WebLogic Server

6.4.4.1

WebLogic Server

WebLogic Server
(EAR) EAR

EAR
Enterprise JavaBean (EJB) JAR

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-8-

Web WAR

IT WebLogic

RAR

EJB Web
EAR EAR

ie
s

A B

6.4.4.2

hn
ol
og

WebLogic Server JVM

WebLogic Server
EJB JAR Web WAR

Te
c

Web EJB WebLogic Server


JavaServer Page (JSP) servlet EJB
EJB Web
JSP Servlet EJB

Be

ijin
gL
an
di
ng

WebLogic Server

6-3
EJB Servlet JSP
Servlet JSP WAR

Enterprise JavaBean EJB JAR


WAR JAR EAR

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-9-

EAR

IT WebLogic

WAR JAR EAR


Servlet JSP EJB WAR JAR
WebLogic Server WAR EJB Home
WebLogic Server EJB RMI
EJB JVM

hn
ol
og

6.4.4.3

ie
s

Web Web JSP JSP


Web
JSP

weblogic-application.xml
classloader-structure

ijin
gL
an
di
ng

Te
c

WebLogic
EJB Web
JSP )

6-4

Be

EJB
call-by-reference Web
Web EJB Web
EJB
J2EE

EJB

Web EJB
EJB

6.4.4.4

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 10 -

IT WebLogic
WebLogic weblogic-application.xml

DTD )
<!ELEMENT classloader-structure (module-ref*, classloader-structure*)>
<!ELEMENT module-ref (module-uri)>
<!ELEMENT module-uri (#PCDATA)>
6-6

ie
s

weblogic-application.xml classloader-structure

EJB
Web

hn
ol
og

classloader-structure classloader-structure

scheme JSP JSP Web

Te
c

weblogic-application.xml classloaderstructure

Be

ijin
gL
an
di
ng

<classloader-structure>
<module-ref>
<module-uri>ejb1.jar</module-uri>
</module-ref>
<module-ref>
<module-uri>web3.war</module-uri>
</module-ref>
<classloader-structure>
<module-ref>
<module-uri>web1.war</module-uri>
</module-ref>
</classloader-structure>
<classloader-structure>
<module-ref>
<module-uri>ejb3.jar</module-uri>
</module-ref>
<module-ref>
<module-uri>web2.war</module-uri>
</module-ref>
<classloader-structure>
<module-ref>
<module-uri>web4.war</module-uri>
</module-ref>
</classloader-structure>
<classloader-structure>
<module-ref>
<module-uri>ejb2.jar</module-uri>
</module-ref>

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 11 -

IT WebLogic
</classloader-structure>
</classloader-structure>
</classloader-structure>
6-7

Te
c

hn
ol
og

ie
s

6-5

6.4.4.5

ijin
gL
an
di
ng

J2EE

EJB call-byvalue BEA call-by-reference

EJB

Be

6.4.4.6

EJB

WebLogic Server EJB


EJB WebLogic Server Servlet
JSP
EJB EJB
EJB
EJB EJBFoo Bar

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 12 -

hn
ol
og

6-6 EJB

ie
s

IT WebLogic

java weblogic.Deployer -adminurl url -user user -password password


-name myapp -redeploy myejb/foo.class
6-8

Te
c

-redeploy

ijin
gL
an
di
ng

java weblogic.Deployer -adminurl url -user user -password password


-name myapp -redeploy mywar myejb/foo.class anotherejb
6-8

EJB EJB anotherejb


EJB Home EJB

EJB EJB WebLogic


Server

6.4.4.7

Be

WebLogic Server (RMI)


RMI
Java EJB 2.0
RMI

ClassCastException WebLogic Server


JVM

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 13 -

IT WebLogic

EAR RMI EJB 2.0

6.4.4.8

WebLogic Server .jar WebLogic Server

jar

FilteringClassLoader

Te
c

6.4.4.8.1

hn
ol
og

ie
s

$CLASSPATH EAR com.foo.Baz


$CLASSPATH EAR weblogic.jar $CLASSPATH
WebLogic Server

ijin
gL
an
di
ng

FilteringClassLoader

Xerces Ant
FilteringClassLoader
FilteringClassLoader
loadClass(String className) className weblogic-application.xml
className FilteringClassLoader
ClassNotFoundException

6.4.4.8.2 FilteringClassLoader

FilteringClassLoader
weblogic-application.xml prefer-application-packages

Be

org.apache.log4j.* antlr.*

<prefer-application-packages>
<package-name>org.apache.log4j.*</package-name>
<package-name>antlr.*</package-name>
</prefer-application-packages>
6-9

6.4.4.8.3
java.lang.ClassLoader getResource() getResources()

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 14 -

IT WebLogic
FilteringClassLoader

Web(1)(3)(2)
Web(1)

(3) --> (2) --> Web (1)

6-10

hn
ol
og

META-INF/foo.xml - from the System ClassLoader (3)


META-INF/foo.xml - from the App ClassLoader (2)
META-INF/foo.xml - from the Web ClassLoader (1)

ie
s

/META-INF/foo.xml
URL

FilteringClassLoader

(D)(B)(A) Web

Te
c

META-INF/foo.xml - from the App ClassLoader (B)


META-INF/foo.xml - from the Web ClassLoader (A)
META-INF/foo.xml - from the System ClassLoader (D)
6-11

ijin
gL
an
di
ng

FilteringClassLoader J2EE
FilteringClassLoader

(D) --> FilteringClassLoader (filterList := x.y.*) (C)


--> (B) --> Web(A)

META-INF/foo.xml - from the App ClassLoader (B)


META-INF/foo.xml - from the System ClassLoader (D)
6-12

Be

getResource() getResourceAsStream()
InputStream

6.4.5
Java EJBServletJSP
WebLogic Server

WebLogic Server

6.4.5.1

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 15 -

IT WebLogic
Web
Web EJB EAR
APPINF/classes JAR
APP-INF/lib
WebLogic Server Web
EJB Web
EJB JAR Web WAR

ie
s

6.4.5.2

hn
ol
og

WebLogic Server EAR


JAR APP-INF/lib APP-INF/classes
JAR /classes /lib

EJB JAR
WebLogic Server

Te
c

6.4.5.3

ijin
gL
an
di
ng

J2EE JAR
EJB JAR WAR JAR
JAR WAR JAR
Class-Path
utility.jar
Manifest-Version: 1.0 [CRLF]
Class-Path: utility.jar [CRLF]

6-13

Manifest-Version (CR | LF
|CRLF) Class-Path

Be

Class-Path
WAR EJB JAR JAR WAR
y.jar WAR
/<directory>/x.war
/<directory>/y.jars
6-14
META-INF/MANIFEST.MF

6.4.5.4

JAR

WebLogic Server lib


WebLogic Server JAR lib
JAR WebLogic Server

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 16 -

IT WebLogic
lib
WebLogic Server
lib
JAR JAR lib JAR
JAR J2EE
J2EE J2EE
lib JAR
1

6-15

hn
ol
og

mkdir c:\bea\weblogic90\samples\domains\wl_server\lib
cp c:\3rdpartyjars\utility.jar
c:\bea\weblogic90\samples\domains\wl_server\lib

ie
s

2 JAR lib

WebLogic Server lib

Te
c

lib
JAR
domain_name/lib

Be

ijin
gL
an
di
ng

WebLogic Server lib


JAR

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 17 -

hn
ol
og

ie
s

IT

Be

ijin
gL
an
di
ng

Te
c

WebLogic

IT WebLogic

........................................................................................................................... 2
...........................................................................................................................

Be

ijin
gL
an
di
ng

Te
c

hn
ol
og

ie
s

.................................................................................................................
3
7 .................................................................................................................
.................................................................................................................3
7.1
................................................................................................................................. 3
7.1.1
........................................................................................................................ 3
7.1.2
............................................................................................................ 3
7.2
..................................................................................................................... 3
7.3
Proxy.................................................................................................................. 5
7.3.1
................................................................................................ 5
7.3.2
........................................................................................................ 6
7.3.3 F5 ................................................................................................6
7.3.4
........................................................................................................ 6
7.3.4.1
.................................................................................................... 6
7.3.4.2
.................................................................................................... 8
7.4
......................................................................................................................... 8
7.4.1
................................................................................................................ 8
7.4.2
................................................................................................................ 8
7.5
Cluster .......................................................................................................................18
7.5.1 Admin server ............................................................................................................ 18
7.5.2
...................................................................................................... 20
7.5.3
.............................................................................................. 21
7.6
............................................................................................................... 22
7.7
............................................................................................................................... 25
7.8
Session .......................................................................................................................... 27
7.8.1 Session ..........................................................................................................27
7.8.1.1
HTTP ............................................................................................... 27
7.8.1.2
HTTP ............................................................................................... 28
7.8.2 Session ..........................................................................................................28
7.8.2.1
.............................................................................................................. 28
7.8.2.2
JDBC ...................................................................................................... 29
7.8.2.3
...................................................................................................... 30
7.9
....................................................................................................................... 30
7.9.1
.......................................................................................................... 30
7.9.2
.................................................................................................. 31
7.9.3
.......................................................................................................... 31

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-2-

IT WebLogic

7
Cluster
WebLogic

7.1

ie
s

7.1.1

hn
ol
og

WebLogic Server WebLogic Server

WebLogic Server
WebLogic
Server

7.1.2

Te
c

ijin
gL
an
di
ng

WebLogic Server

Firewall

Be

Untrusted

WebLogic Server Cluster

Load
Balancer

HTTP
JSP ---EJB
Servlet
|
|
|
JDBC

HTTP
JSP ---EJB
Servlet
|
|
|
JDBC

Database

HTTP
JSP ---EJB
Servlet
|
|
|
JDBC

7-1

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-3-

IT WebLogic

7.2

1.

WebLogic Server

WebLogic UpdateLicense
UpdateLicense.cmd
UpdateLicense <new_license_file>

ie
s

7-1

ijin
gL
an
di
ng

Te
c

<license
component="Cluster"
cpus="unvalued"
expiration="never"
ip="any"
licensee="XXX"
serial="616351266349-1844896394531"
type="SDK"
units="5"
signature="MC0CFQCQrk+Kbddfz3RHVH6uGfj"
/>

hn
ol
og

license "Cluster"
(
)

7-2

2.


LAN WAN

3.

Be

WebLogic Server

HTTP
4.

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-4-

IT WebLogic
IP
License
CPU WebLogic
Server

5.

IP DNS

ie
s

IP IP
IP

hn
ol
og

Bean Bean Provider_URL


DNS DNS WebLogic
Server IP

listenaddr1:listenport1,listenaddr2:listenport2,listenaddr3:listenport3

7.3

Te
c

7-3

Proxy

ijin
gL
an
di
ng

Proxy

7.3.1

Web (Web Server)


Web WebLogic HTTP

Be

Web DMZ policy


DMZ Web
WebLogic

failover /
/
WebLogic Server MulticastIP
Sockets JNDIJava Naming and Directory Interface
WebLogic Server

WebLogic Server
"""replica-aware "

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-5-

IT WebLogic

WebLogic Server

7.3.2

ie
s

WebLogic Servlet

7.3.3 F5

hn
ol
og

F5 BIG-IP LTM
12
BIG-IP LTM
Virtual Server BIG-IP
BIG-IP LTM

Te
c

RoundRobin
Ratio

Priority

ijin
gL
an
di
ng

LeastConnection
Fastest

Observed

Predictive

DynamicRatio-APM

DynamicServerAct
QoS
ToS

Be

F5 BIG-IP

7.3.4
7.3.4.1
1.

WebLogic Wizard

Domain Configuration Wizard WebLogic


Create HTTP Proxy Applications HTTP
HTTP Create

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-6-

IT WebLogic
HTTP proxy for <cluster><cluster> HTTP

2.

WebLogic

Web web.xml HttpClusterServlet


Web \WEB-INF
HttpClusterServlet
3.

WebLogic Server WebLogic Server

B. Web WebLogic Server

Web web.xml
HttpClusterServlet
HttpClusterServlet

hn
ol
og

4.

ie
s

A.

WLS 6.1: weblogic.servlet.internal.HttpClusterServlet

WLS 7.0, 8.1: weblogic.servlet.proxy.HttpClusterServlet

Te
c

web.xml <init-param> HttpClusterServlet

Be

ijin
gL
an
di
ng

<servlet>
<servlet-name>HttpClusterServlet</servlet-name>
<servlet-class>
weblogic.servlet.proxy.HttpClusterServlet
</servlet-class>
<init-param>
<param-name>WebLogicCluster</param-name>
<param-value>
serverA:7001:7002|serverB:7001:7002|serverC:7001:7002
</param-value>
</init-param>
<init-param>
<param-name>DebugConfigInfo</param-name>
<param-value>ON</param-value>
</init-param>
</servlet>
7-4

Servlet Web Web


\WEB-INF weblogic.xml Servlet
Servlet
<servlet>
<servlet-name>HttpClusterServlet</servlet-name>

</servlet>
<servlet-mapping>

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-7-

IT WebLogic
<servlet-name>HttpClusterServlet</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>HttpClusterServlet</servlet-name>
<url-pattern>*.jsp</url-pattern>
</servlet-mapping>
7-5

7.3.4.2

hn
ol
og

ie
s

servlet <url-pattern>
*.jsp<url-pattern> /
*.jsp

Web WebLogic Server Web

Web

Apache Web Server

Te
c

Netscape Enterprise Server

Be

ijin
gL
an
di
ng

Microsoft Internet Information Server

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-8-

hn
ol
og

ie
s

IT

ijin
gL
an
di
ng

Te
c

WebLogic

Be

7.4

7.4.1
Ip

Port

Ms1

192.168.0.139

7001

As1

192.168.0.139

7002

As2

192.168.0.140

7003

Cs

239.192.0.0

hn
ol
og
7777

7-1

Te
c

7.4.2

ie
s

Server name

Linux
1.

WebLogic config

Be

ijin
gL
an
di
ng

%weblogic_home%/wlserver_10.3/common/bin config.sh
console

7-2
2.

3.

Te
c

7-3

hn
ol
og

ie
s

1
Next n

ijin
gL
an
di
ng

WebLogic

Be

WebLogic

7-4
4.

ie
s
doman next

ijin
gL
an
di
ng

Te
c

5.

hn
ol
og

7-5

7-6

Be

6.

7-7
manager 8

7-8

Te
c

8.

hn
ol
og

ie
s

7.

ijin
gL
an
di
ng

SSL

Be

WebLogic
Server

SSL

WebLogic Server

domain_name/autodeploy

domain_name

WebLogic
Server
weblogic.Deployer
WebLogic
(WLST)

7-2

ie
s
9.

JDK

hn
ol
og

7-9

Be

ijin
gL
an
di
ng

JDK

Te
c

JDK
WebLogic JDK
JDK WebLogic WebLogic10.3
JDK 1.6

7-10
10.
1]2]

ie
s
11.

hn
ol
og

7-11

Be

ijin
gL
an
di
ng

Te
c

Next

12.

7-12

ie
s
5

Be

ijin
gL
an
di
ng

Te
c

13.

hn
ol
og

7-13

7-14
14. ms2
15.

cluster server
cluster messaging mode multicast

ie
s
Be

ijin
gL
an
di
ng

Te
c

16.

hn
ol
og

7-15

7-16

ie
s
hn
ol
og

7-17

ms2
17. WebLogic

Te
c

18. doman manager manager server

19. ms2

ijin
gL
an
di
ng

20.

Be

7-23

7.5

Cluster

7.5.1 Admin server

Te
c

hn
ol
og

ie
s

ijin
gL
an
di
ng

7-18

Be

7-19

7.5.2

Be

ijin
gL
an
di
ng

Te
c

7-20

7-21

7.5.3

hn
ol
og

ie
s

Be
ijin
gL
an
di
ng
Te
c

hn
ol
og

ie
s

7-22

hn
ol
og

ie
s

IT

ijin
gL
an
di
ng

Te
c

WebLogic

Be

7.6

7-24

ijin
gL
an
di
ng

Te
c

2.

hn
ol
og

ie
s

1.

7-25

Be

3.

7-26

4.

Te
c

hn
ol
og

ie
s

EJB

7-27
5.

Be

ijin
gL
an
di
ng

cluster

7-28
6.

Be

ijin
gL
an
di
ng

Te
c

hn
ol
og

ie
s

7-29

7.7
1.

ijin
gL
an
di
ng

ie
s

Te
c

hn
ol
og

7-30

7-31

2.

Be

7-32

ie
s

node server

7.8

Session

ijin
gL
an
di
ng

7.8.1.1 HTTP

Te
c

7.8.1 Session

hn
ol
og

7-33

WebLogic Server HTTP

WebLogic Server

WebLogic Server

Session

Be

WebLogic Server Session JDBC


Session

7.8.1.2 HTTP

HTTP Servlet HttpClusterServlet


WebLogic Server HttpClusterServlet
HttpClusterServlet
WebLogic Server A ServletWebLogic Server A Servlet

Servlet Servlet
WebLogic Server
B
Servlet HttpClusterServlet
Servlet Cookie
CookieWebLogic Server URL
URL

hn
ol
og

ie
s

WebLogic Server Cookie Servlet


Cookie WebLogic Server
URL URL
URL
WebLogic Server URL URL
URL

Te
c

HttpClusterServlet Cookie
WebLogic Server HttpClusterServlet
HTTP

ijin
gL
an
di
ng

WebLogic Server B Servlet


C HTTP
Cookie

WebLogic Server

7.8.2 Session

Be

7.8.2.1

1.
2.
3. weblogic.xml

<session-descriptor>
<persistent-store-type>replicated</persistent-store-type>
</session-descriptor>

7-6

replicated memory
replicated_if_clustered Web
persistentstore-type memory
sync-replication-across-cluster

ie
s

memory

async-replication-across-cluster

7.8.2.2 JDBC
JDBC
1.

Te
c

2. /

hn
ol
og

3. weblogic.xml

ijin
gL
an
di
ng

<session-descriptor>
<persistent-store-type>jdbc</persistent-store-type>
<persistent-store-pool>SessionDS</persistent-store-pool>
<persistent-store-table>WL_SERVLET_SESSIONS</persistentstore-table>
</session-descriptor>
7-7

JDBC

WL_SERVLET_SESSIONS /

WL_ID

100

Be

WL_CONTEXT_PATH

WL_IS_NEW

numeric20

WL_ACCESS_TIME

numeric20

WL_SESSION_VALUES

BLOB

WL_IS_VALID

char1

WL_CREATE_TIME

numeric20

7-3
WL_SERVLET_SESSIONS
//
/ 8

ie
s

WL_ID ID WL_CONTEXT_PATH
100

hn
ol
og

WL_CONTEXT_PATH WL_ID
100
WL_IS_NEW Servlet True

WL_CREATE_TIME Numeric 20

Te
c

WL_IS_VALID Servlet True

ijin
gL
an
di
ng

WL_SESSION_VALUES BLOB

WL_ACCESS_TIME Numeric 20
WL_MAX_INACTIVE_INTERVAL
Integer
SQL Oracle

Be

create table wl_servlet_sessions ( wl_id VARCHAR2(100) NOT NULL,


wl_context_path VARCHAR2(100) NOT NULL, wl_is_new CHAR(1),
wl_create_time NUMBER(20), wl_is_valid CHAR(1), wl_session_values LONG
RAW, wl_access_time NUMBER(20), wl_max_inactive_interval INTEGER,
PRIMARY KEY (wl_id, wl_context_path) );
7-8

7.8.2.3
Web
1.
2. weblogic.xml file

<session-descriptor>
<persistent-store-type>file</persistent-store-type>
<persistent-store-dir>shared folder location</persistentstore-dir>
</session-descriptor>
7-9

7.9

7.9.1
startAs.sh:

hn
ol
og

ie
s

domain domain

cd %weblogic_home%/user_projects/domains/domainname/bin
nohup ./startWebLogic.sh &

* domainname

ijin
gL
an
di
ng

7.9.2

Te
c

7-10

startMs1.sh:

cd %weblogic_home%/user_projects/domains/domainname/bin
nohup ./startManagedWebLogic.sh ms1 http://192.168.0.139:7001 &

startMs2.sh:
cd %weblogic_home%/user_projects/domains/domainname/bin
nohup ./startManagedWebLogic.sh ms2 http://192.168.0.139:7001 &
7-11

Be

7.9.3
startPs.sh:

cd %weblogic_home%/user_projects/domains/domainname/bin
nohup ./startManagedWebLogic.sh ps http://192.168.0.139:7001 &
7-12

hn
ol
og

ie
s

IT

Be

ijin
gL
an
di
ng

Te
c

WebLogic

IT WebLogic

........................................................................................................................... 2
...........................................................................................................................

ie
s

.................................................................................................................................
3
.................................................................................................................................
.................................................................................................................................3
..................................................................................................................... 3
......................................................................................................................... 3
......................................................................................................... 5
......................................................................................................................... 8
HTTP ............................................................................... 10
HTTP........................................................................................................ 14
................................................................................................... 16
web .......................................................................................19
....................................................................................................................... 21

Be

ijin
gL
an
di
ng

Te
c

8
8.1
8.2
8.3
8.4
8.5
8.6
8.7
8.8
8.9

hn
ol
og

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-2-

IT WebLogic

8-1

hn
ol
og

ie
s

8.1

ijin
gL
an
di
ng

8.2

Te
c

Internet

Be

1.

2.

8-2

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-3-

8-3

ijin
gL
an
di
ng

Te
c

3.

hn
ol
og

ie
s

IT WebLogic

8-4

4.

Be

8-5

5.

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-4-

IT WebLogic
8-6

ie
s

6.

8-7

hn
ol
og

Te
c

ijin
gL
an
di
ng

8-8

8.3

Be

1.

2.

8-9

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-5-

8-10

Te
c

3.

hn
ol
og

ie
s

IT WebLogic

8-11

->

ijin
gL
an
di
ng

4.

Be

8-12
HTTP

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-6-

8-13

ijin
gL
an
di
ng

Te
c

5.

hn
ol
og

ie
s

IT WebLogic

8-14

Be

6.

8-15

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-7-

IT WebLogic

8-16

ie
s

8.4

Te
c

hn
ol
og

1.

8-17

Be

ijin
gL
an
di
ng

2.

8-18
3.

8-19

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-8-

IT WebLogic
4.

8-20

ijin
gL
an
di
ng

6.

Te
c

8-21

hn
ol
og

ie
s

5.

8-22

Be

7.

8-23

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-9-

IT WebLogic

8-24

HTTP

ie
s

8.5

Te
c

hn
ol
og

1.

8-25

Be

ijin
gL
an
di
ng

2.

8-26
3.

8-27

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 10 -

IT WebLogic
4.

HTTP

ie
s

HTTP HTTP
( HTTP )

hn
ol
og

8-28

HTTP

ijin
gL
an
di
ng

Te
c

5.

8-29

java.text.SimpleDateFormat (%)

access_%yyyy%_%MM%_%dd%_%hh%_%mm%.log

8-1

HTTP access_yyyy_MM_dd_hh_mm.log

Be

HTTP
2010 11 24 10:05
access_2010_11_24_10_05.log

filenamennnnn filename access.log00007


6.

HTTP HTTP

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 11 -

8-30

hn
ol
og

ie
s

IT WebLogic

7.

Te
c


(1 - 65535 KB)

Be

ijin
gL
an
di
ng

HTTP

8-31

java.text.SimpleDateFormat MM-DD-yyyyk:mm:ss
8.

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 12 -

IT WebLogic

8-32

ijin
gL
an
di
ng

Te
c

9.

hn
ol
og

ie
s

8-33

Be

10. HTTP

8-34
11. HTTP

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 13 -

IT WebLogic

8-35

8-36

hn
ol
og

ie
s

12. HTTP

ijin
gL
an
di
ng

Te
c

13. (GMT)

8-37

Be

14.

8-38

15.

8-39

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 14 -

IT WebLogic

HTTP

8.6

HTTP

8-40

ijin
gL
an
di
ng

Te
c

2.

hn
ol
og

ie
s

1.

8-41

Be

3.

8-42
4.

> HTTP
Post - HTTP POST
Post - Servlet HTTP Post
Post - Servlet HTTP Post Post

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 15 -

IT WebLogic
-
- HTTP
HTTPS - HTTPS
-

ijin
gL
an
di
ng

Te
c

hn
ol
og

ie
s

5.

8-43

Be

6.

8-44

HTTP

8.7

1.

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 16 -

IT WebLogic

8-45

ijin
gL
an
di
ng

Te
c

hn
ol
og

ie
s

2.

8-46

3.

8-47

4.

Be

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 17 -

8-48

hn
ol
og

ie
s

IT WebLogic

Be

ijin
gL
an
di
ng

Te
c

5.

8-49

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 18 -

8-50

ijin
gL
an
di
ng

Te
c

6.

hn
ol
og

ie
s

IT WebLogic

8-51

8.8

web

Be

1.

8-52
2.

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 19 -

8-53

Web web

ijin
gL
an
di
ng

Te
c

3.

hn
ol
og

ie
s

IT WebLogic

8-54

4.

8-55

Be

5.

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 20 -

Be

ijin
gL
an
di
ng

6.

Te
c

8-56

hn
ol
og

ie
s

IT WebLogic

8-57
7.

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 21 -

IT WebLogic

8-58

8.9

hn
ol
og

web

ijin
gL
an
di
ng

Te
c

1.

ie
s

8-59

Be

2.

8-60
3.

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 22 -

IT WebLogic

8-61

8-62

ijin
gL
an
di
ng

Te
c

5.

hn
ol
og

ie
s

4.

8-63

Be

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 23 -

hn
ol
og

ie
s

IT

Be

ijin
gL
an
di
ng

Te
c

WebLogic

IT WebLogic

........................................................................................................................... 2
...........................................................................................................................

Be

ijin
gL
an
di
ng

Te
c

hn
ol
og

ie
s

...................................................................................................
3
9 WebLogic ...................................................................................................
...................................................................................................3
9.1
......................................................................................................................... 3
9.1.1
........................................................................................................................ 3
9.1.2 JDBC...................................................................................................................................3
9.1.3
.................................................................................................................... 3
9.1.4
........................................................................................................................ 3
9.1.5
JNDI ......................................................................................................3
9.1.6
.................................................................................................................... 3
9.1.7 XML .......................................................................................................................4
9.1.8 XML ...........................................................................................................4
9.1.9 jCOM.................................................................................................................................. 4
9.1.10
........................................................................................................................ 4
9.1.11
File T3............................................................................................................................ 4
9.1.12
JTA................................................................................................................................. 4
9.2
Machine................................................................................................................................... 4
9.3
JDBC .............................................................................................................................. 5
9.4
Node Manager .......................................................................................................... 11
9.5
JMS ...............................................................................................................................12
9.6
WTC ............................................................................................................................. 14
9.7
................................................................................................................... 16
9.8
JDK...............................................................................................................................16
9.9
WebLogic ......................................................................................................... 17

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-2-

IT WebLogic

Logic
9 Web
WebL
WebLogic Server

Web EJB WebLogic


Web --
WebLogic

windows XP

9.1

hn
ol
og

ie
s

Web JSP
URL
http://hostname:port/console,

jdbc

Te
c

9.1.1

ijin
gL
an
di
ng

WebLogic JMS JMS


JMS API WebLogic Server
J2EE WebLogic Server
XA WebLogic JMS
WebLogic Server

9.1.2 JDBC

WebLogic JDBC , WebLogic

9.1.3

( JMS )
JDBC

Be

9.1.4

(
)

9.1.5 JNDI
JNDI WebLogic Server JNDI
Java JNDI JNDI
WebLogic Server

9.1.6

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-3-

IT WebLogic

9.1.7 XML
XML WebLogic Server XML WebLogic
Server XML XML
XML

9.1.8 XML
XML URL EAR
XML

jCOM

ie
s

9.1.9

hn
ol
og

WebLogic jCOM , WebLogic Server Java/J2EE


Microsoft Office Microsoft ActiveX Visual Basic
C++ / (COM/DCOM)

9.1.10

9.1.11 File T3

Te
c

WebLogic Server JavaMail API 1.1.3 JavaMail API,


WebLogic Server JavaMail Java
Internet POP3/IMAP SMTP

ijin
gL
an
di
ng

WebLogic File (T3) (),


API java.io.InputStream
java.io.OutputStream

9.1.12 JTA

WebLogic Server
, ACID (
(Atomicity), (Consistency), (Isolation), (Durability))

9.2

Machine

Be

WebLogic Server ()
WebLogic Server ( HTTP )

Machines Node Manager

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-4-

IT WebLogic

ie
s

9-1

9.3

JDBC

ijin
gL
an
di
ng

Te
c

JDBC

hn
ol
og

status reachable Node Manager

Be

9-2

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-5-

Te
c

hn
ol
og

ie
s

IT WebLogic

ijin
gL
an
di
ng

9-3

Service JDBC Data Sources

Lock&Edit,new jdbc name jdbc1jndi


name landingbjjndi
oracle database driver
oracle bea XA weblogic

Be

next

9-4
oracle show parameter name
db_name CHENG

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-6-

ie
s

IT WebLogic

9-5

Be

ijin
gL
an
di
ng

Te
c

hn
ol
og

9-6

next driver class name URL


oracle scott

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-7-

Te
c

hn
ol
og

ie
s

IT WebLogic

ijin
gL
an
di
ng

9-7

Be

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-8-

IT WebLogic
9-8
test configuration connection
test succeed

ijin
gL
an
di
ng

Te
c

hn
ol
og

ie
s

jdbc

9-9

Be

Targets

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-9-

Te
c

hn
ol
og

ie
s

IT WebLogic

9-10

ijin
gL
an
di
ng

9-11

Be

jdbc

9-12

jdbc jdbc

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 10 -

Te
c

hn
ol
og

ie
s

IT WebLogic

ijin
gL
an
di
ng

9-13

9.4

Node Manager

WebLogic Server
WebLogic Server

WebLogic Server
WebLogic
WebLogic Server
WebLogic
Server

Be

WebLogic Server Java

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 11 -

9-14

hn
ol
og

ie
s

IT WebLogic

Be

ijin
gL
an
di
ng

Te
c

Windows Node Manager Yes

9-15

->WebLogic Server->Tools->Node Manager

9-16

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 12 -

IT WebLogic

9.5

JMS

JMS JMS
JMS
JMS

JMS

JMS
JMS

ijin
gL
an
di
ng

Te
c

hn
ol
og

ie
s

1.

9-17

Be

JMS Serversnew JMS jms


Pageing Directory jms

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 13 -

ijin
gL
an
di
ng

Te
c

hn
ol
og

ie
s

IT WebLogic

9-18

9.6

WTC

WTC WebLogic Tuxedo Connector (WTC), WebLogic Server


Tuxedo Tuxedo WebLogic Server Enterprise Java Bean (EJB)
WTC , Tuxedo Tuxedo
WTC

2.

WTC

Be

1.

3.

WTC WTC

4.

5.

WTC
WTC

6.

WTC

7.

8.

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 14 -

9-19

hn
ol
og

ie
s

IT WebLogic

ijin
gL
an
di
ng

Te
c

Local Tuxedo Access Point

9-19

9.

Local APs

Be

10.

Access Point:myLocalAp
Access Point ID:TDOM2

Network address Tuxedo TCP/IP :


//hostname:port_number //#.#.#.#:port_number
Example://123.123.123.123:5678
11. OK
Tuxedo Access Point
12. Remote APs tab
13. :

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 15 -

IT WebLogic
Access point:myRemoteAP
AccessPoint ID:TDOM1
Local Access Point:myLocalAp
Network address ://123.123.123.123.1234( ip )
14. OK
/:
15. Exported tab

ie
s

Resource name:TOLOWER
Local Access Point myLocalApp

hn
ol
og

EJB name:tuxedo.services.TOLOWERHome
Remote name:TOLOWER
16. OK

17. WTC

ijin
gL
an
di
ng

Te
c

18. myrealm

9-20

TDOM1

9.7

Be

weblogic
startManagedWebLogic.cmd call
"%DOMAIN_HOME%\bin\setDomainEnv.cmd" %*
setDomainEnv.cmd set MEM_ARGS=Xms256m -Xmx512m

9-21

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 16 -

IT WebLogic
Xms Java Xmx

9.8

JDK

Configuration Wizard WebLogic


Server SDK JVM
Configuration Wizard WebLogic
JVMsetDomainEnv.cmd
1. JAVA_HOME

Windows Linux BEA Systems JVM

hn
ol
og

* HotSpot Client JVM Sun SDK

ie
s

SDK c:\bea\jrockit90

* BEA JRockit SDK SDK


SDK
2 JAVA_VENDOR
: (setDomainEnv.cmd) for WINDOWS OS

set JAVA_VENDOR=Sun

Te
c

set JAVA_HOME=C:\myJDKs\jdk1.6.0_18

WebLogic

ijin
gL
an
di
ng

9.9

WebLogic
Bug WebLogic Server
1 Oracle Oracle

2 Oracle
3

4 readme

Be

5 readme
6

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 17 -

hn
ol
og

ie
s

IT

Be

ijin
gL
an
di
ng

Te
c

WebLogic

IT WebLogic

........................................................................................................................... 2
...........................................................................................................................

Be

ijin
gL
an
di
ng

Te
c

hn
ol
og

ie
s

................................................................................................... 3
10
SSH ...................................................................................................
10.1
MVC ............................................................................................................................... 3
10.1.1
MVC ...................................................................................................................... 3
10.1.2
MVC .............................................................................................................. 3
10.1.3
MVC...................................................................................................... 4
10.1.4
MVC .................................................................................................................. 4
10.2
......................................................................................................................... 4
10.2.1
struts .......................................................................................................................4
10.2.2
Spring .....................................................................................................................5
10.2.3
Hibernate ............................................................................................................... 6
10.3
WebLogic Spring ............................................................................................... 7
10.3.1
............................................................................................................ 7
10.3.2
Spring .............................................................................................................8
10.3.3
Spring ............................................................................................ 8
10.3.4
Spring ........................................................................................ 8
10.3.5
Web ................................................................................................................ 9
10.3.6
............................................................................................................................ 9
.................................................................................................................... 9
10.3.7
10.3.8
Java Management Extension........................................................................................ 10
10.3.9
WebLogic Server Spring Framework ..................................................10
10.3.9.1 WLS9.x.................................................................................................................... 10
10.3.9.2 WLS10.x.................................................................................................................. 13
10.3.10 Spring ...................................................................................................13
10.3.10.1 ............................................................................................... 13
10.3.10.2 nullbean .................................................................... 14
10.4
WebLogic Struts .............................................................................................. 14
10.4.1
Struts ............................................................................... 14
10.4.2
WebLogic ............................................................................................15
10.5
WebLogic Hibernate ........................................................................................ 17
10.5.1
Hibernate ...................................................................................... 17
10.5.2
.............................................................................................................. 19
10.5.3
...................................................................................................................... 19
10.6
Tomcat WebLogic ....................................................................20
10.6.1
JDK Servlet ............................................................................................. 20
10.6.2
Include ................................................................................................................. 20
10.6.3
Log4j ............................................................................................... 20
10.6.4
Hibernate3Axis ........................................................................................ 21
10.6.5
Axis .net Web Service ...................................................... 22

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-2-

IT WebLogic

10 SSH
SSH
WebLogic SSH

10.1 MVC

ie
s

SSH

10.1.1 MVC

hn
ol
og

MVC (Modal View Controler) Desktop M V


C MVC M V
C
M V M V

10.1.2 MVC

Te
c

--MVC Xerox PARC Smalltalk80


Sun J2EE
ColdFusion PHP --

ijin
gL
an
di
ng

MVC MVC

1.

Web HTML
Web HTML
Macromedia Flash XHTMLXML/XSLWML
Web servicesMVC

2.

Be

MVC
EJB ColdFusion Component

3.

Web
HTML

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-3-

IT WebLogic
MVC

10.1.3 MVC
Web ASPPHPJSP CFML
HTML

MVC

Te
c

hn
ol
og

ie
s

MV

MVC Flash
WAP

HTML
Macromedia Flash WAP
Flash

MySQL Oracle RDBMS


LDAP
LDAP

ijin
gL
an
di
ng

MVC

10.1.4 MVC

MVC MVC MVC

MVC

Be

MVC

MVC
MVC
MVC

MVC
MVC

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-4-

IT WebLogic

10.2
10.2.1 struts

Model

hn
ol
og

1.

ie
s

Struts Apache Jakarta Open Source MVC


java J2EE Web java
Struts MVC ""
Structs Java ServletJavaBean
ResourceBundle XML Jakarta Commons Struts
Servlet jsp tag lib struts web
JSP Model2 MVC

JavaBean ActionForm ActionForm


ActionServlet ActionAction ActionFrom

JavaBean
2.

View

Te
c

JSP

Struts
Model
Controller

ijin
gL
an
di
ng

3.

Controller

Structs ActionServlet Struts


HttpServlet Servlet HTTP

Model
Action

10.2.2 Spring

Be

Spring Rod Johnson


Spring JavaBean EJB
Spring
Java Spring

JavaBean EJB
Java

Spring (IoC)(AOP)
1.

Spring Spring
1MB JAR Spring Spring
Spring Spring

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-5-

IT WebLogic
2.

Spring IoC IoC

IoC JNDI --

3.

4.

ie
s

Spring
auditingtransaction
----

5.

hn
ol
og

Spring
bean prototype bean

Spring EJB

Te
c

Spring Spring
XML Spring

ijin
gL
an
di
ng

Spring
Spring Spring
framework

Spring IoC Spring


Spring

AOP

Spring AOP OOP


AOP

Be

Spring

Spring


Spring Spring
Spring Struts,HibernateHessionQuartz

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-6-

J2EE API

IT WebLogic

Spring J2EE API JDBCJavaMail


Spring J2EE API

10.2.3 Hibernate

ie
s

Hibernate JDBC
Java Hibernate
JDBC Java
Servlet/JSP Web Hibernate EJB J2EE
CMP

1.

hn
ol
og

Hibernate 5 :SessionSessionFactory
TransactionQuery Configuration 5

Session

2.

SessionFactory

Te
c

Session CRUD (CRUD


SQL ) Session
Hibernate session JSP HttpSession session
Hibernate session HttpSession
session

ijin
gL
an
di
ng

SessionFactory Hibernate
Session SessionFactory
SessionFactory
SessionFactory
3.

Configuration

Configuration Hibernate SessionFactory


Hibernate Configuration
SessionFactory
4.

Transaction

Transaction

Query Criteria

Be

5.

Query Criteria HQL SQL

10.3 WebLogic Spring


Spring Framework IoC J2EE

Spring
WebLogic Server Spring

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-7-

IT WebLogic

10.3.1
WebLogic Server WebLogic Server

WebLogic Server

ie
s

WebLogic Server Spring


WebLogic Server
Spring web WebLogic
Server

hn
ol
og

10.3.2 Spring

Spring Web HTTP ID


servlet JSP WebLogic Server
HTTP weblogic.xml Spring
Web

Te
c

10.3.3 Spring

ijin
gL
an
di
ng

Spring
POJO Spring bean RMI
Vanilla Spring POJO JRMPSun RMI
JndiRmiProxyFactoryBean
Spring on WebLogic Server JndiRmiProxyFactoryBean
J2EE RMI POJO RMIIIOP t3
WebLogic RMI RMI
POJO WebLogic Server
Spring

10.3.4 Spring

Be

Spring on WebLogic Server WebLogic Server


Spring bean WebLogic
WebLogic Administration
yourdomain/console-ext
Spring on WebLogic Server
MBean Spring bean Spring beanJMX
applicationContext.xml MbeanExporter bean
exporter Spring WebLogic Server
JMX
Spring jar
WebLogic10.3 Spring
a.
b.

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-8-

IT WebLogic

10-1
c.

10-2

e.

10.3.5 Web

hn
ol
og

10-3

ie
s

d. Springconsole

ijin
gL
an
di
ng

Te
c

Spring RPC Web WebLogic


Server Ant Web WSDL JAX-RPC Web
Spring
JaxRpcPortProxyFactoryBean WebLogic Server
JaxRpcPortProxyFactoryBean
Document Literal Web

1)

serviceInterface Spring setter Web

2)

customProperties WebLogic Server Web

3)

jaxRpcService WebLogic Server JAX-RPC JAX-RPC


Web WebLogic
Server JAX-RPC Spring bean JAX-RPC

Be

JaxRpcPortProxyFactoryBean lookupServiceOnStartup false


JAX-RPC WebLogic
Server / Web
Web Web
Web Web Spring

10.3.6
WebLogic Server J2EE

J2EE

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-9-

IT WebLogic
WebLogic Server LDAP
Active Directory

webapp Spring J2EE


WebLogic Server
Spring Acegi-Spring
AcegiWebLogic Server

10.3.7

hn
ol
og

ie
s

Spring Spring
J2EE JTA
WebLogicJtaTransactionManager Spring JTA WebLogic Server
JTA
WebLogicJtaTransactionManager WebLogic Server Java
Transaction APIWebLogic Server JTA TransactionManager JNDI
bean Spring

Te
c

WebLogicJtaTransactionManager
WebLogicJtaTransactionManager
WebLogic Administration Console WebLogicJtaTransactionManager
(per-database)

10.3.8 Java Management Extension

ijin
gL
an
di
ng

Java Management ExtensionJava JMX Java

Spring JMX Spring


MBeanServerConnectionFactoryBean WebLogic Server MBeanServer
MBeanServerConnectionFactoryBean
MBeanServerConnection
bean
MBeanServerConnectionFactoryBean WebLogic Server Runtime
MBean Server WebLogic Server
WebLogic Server Diagnostics Framework Runtime MBean
MBean MBean

Be

MBeanServerConnectionFactoryBean WebLogic Server


Domain Runtime MBean Server Domain Runtime MBean Server
JMS JDBC
MBean MBean MBean Server
MBean
MBeanServerConnectionFactoryBean WebLogic Server
Edit MBean Server Edit MBean Server WebLogic Server

WebLogic Server Domain Runtime MBean Server


bean bean bean

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 10 -

IT WebLogic

10.3.9 WebLogic Server Spring Framework

10.3.9.1 WLS9.x

RMI NullPointerException

CR242675

CR236708

hn
ol
og

Hibernate 3 WebLogic Server Antlr

ie
s

9.09.2
BEA WebLogic
Server/Spring

8.1SP05
9.09.2

Antlr2.7.5.jar CLASSPATH weblogic.jar

CR242923

Te
c

T3

9.09.2

ijin
gL
an
di
ng

BEA WebLogic Server-Spring

IIOP

CR242883

9.09.2

BEA WebLogic Server-Spring

Spring Framework Web

CR237532

8.1SP05
9.09.2

Be

BEA WebLogic Server-Spring

Spring Pet Clinic

CR241195

requested page does not participate in a session.


at

java.lang.IllegalStateException: Cannot access


session scope since the
9.09.2

weblogic.servlet.jsp.PageContextImpl.getAttribute(
PageContextImpl.java:273)
at
javax.servlet.jsp.jstl.core.Config.get(Config.java

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 11 -

IT WebLogic
:145) at
javax.servlet.jsp.jstl.core.Config.find(Config.jav
a:393) at
org.apache.taglibs.standard.tag.common.fmt.TimeZon
eSupport.getTimeZone(TimeZoneSupport.java:140)

includes.jsp

ie
s

HP-UX jdk150_01 jdk150_03


9.09.2

CR244683

hn
ol
og

medrec-spring jdk150_01
jdk150_03

MedRec-Spring MedRecSpring
CR244693

9.09.2

WebLogic Spring Web


(.war) .war
MedRec-Spring Spring Bean

ijin
gL
an
di
ng

CR244691

Te
c

MedRec-Spring
localhost

9.09.2

CTRL-C WebLogic Server


bean domainMBeanServerConnection

CR243957

9.09.2

-Dweblogic.slc=true
domainRuntimeServerService

Be

countries_mbeans.war
WebLogic Server autodeploy
countries_mbeans.war Web
Spring
9.2

CR280985

WebLogic Server
countries_mbeans.war Web

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 12 -

IT WebLogic
Spring Pet Clinic

weblogic.xml.jaxp.RegistrySAXTransformerFactory

$java.home/lib/jaxp.properties XML

javax.xml.transform.TransformerFactory=org.
apache.xalan.processor.TransformerFactoryImpl

hn
ol
og

javax.xml.xpath.XPathFactory=org.apache.xpa
th.jaxp.XPathFactoryImpl

9.2

ie
s

CR301115

javax.xml.parsers.SAXParserFactory=org.apac
he.xerces.jaxp.SAXParserFactoryImpl

CR300748

Te
c

javax.xml.parsers.DocumentBuilderFactory=or
g.apache.xerces.jaxp.DocumentBuilderFactoryImpl

WebLogic Server 9.2 tiles-samples

9.2

ijin
gL
an
di
ng

10-1

10.3.9.2 WLS10.x

Spring Framework 2.0.2

JRockit OpenJPA ClassFileTranformer

CR319968

10.0

Be

enhence LoadTimeWeaver
enhence.

JRockit WebLogic Spring Pet


Clinic OpenJPA

CR320649

10.0
:
JRockit R26.4 R27.2.
10-2

10.3.10

Spring

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 13 -

IT WebLogic
jdk1.6 Spring2.0.5Spring2.5weblogic10.3.1
weblogic8.1
Spring2.0.5 weblogic8.1
Spring2.5 weblogic8.1
Spring2.5 Weblogic10.3.1
Spring2.0.5 weblogic10.3.1
orcale
wls 10.0
wls 9.2

Spring 2.5.x
Spring 2.0.x
Spring 1.2.82.0.x2.5.x

hn
ol
og

10.3.10.1

ie
s

wls 10.3

Spring 2.5.6

Te
c

11:23:59,656 ERROR XFireServlet:51 - Error initializing XFireServlet.


org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected
exception parsing XML document from class path resource
[org/codehaus/xfire/spring/xfire.xml]; nested exception is
java.lang.ClassCastException: weblogic.xml.jaxp.RegistryDocumentBuilderFactory
cannot be cast to javax.xml.parsers.DocumentBuilderFactory

ijin
gL
an
di
ng

10-1

WebLogic RegistryDocumentBuilderFactory java


xml.parsers.DocumentBuilderFactory

jar wstx-asl-3.2.0.jar xml-apis-1.0.b2.jar

10.3.10.2 nullbean
Spring web.xml
web.xml Spring

Be

Spring ContextLoaderListener Web


ApplicationContext ServletContextListener
web.xml
ContextLoaderListener ContextLoader
ContextLoader ContextLoader XmlWebApplicationContext
WebApplicationContext->ConfigurableWebApplicationContext>ApplicationContext-> BeanFactory spring bean

web.xml "/WEBINF/applicationContext.xml WEB-INF xml


applicationContext.xml web.xml
contextConfigLocation context
<context-param>
<param-name>contextConfigLocation</param-name>

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 14 -

IT WebLogic
<param-value>/WEB-INF/classes/applicationContext-*.xml</param-value>
</context-param>
10-2
<param-value> </param-value> xml xml
, applicationContext-*.xml
applicationContext-ibatis-base.xmlapplicationContextaction.xmlapplicationContext-ibatis-dao.xml

10.4 WebLogic Struts

hn
ol
og

10.4.1 Struts

ie
s

WebLogic Spring Struts

WebLogic WebLogic
WebLogic Log4jStruts
WebLogic Struts
Logging MessageINFO INFO

Te
c

system.out.println() WebLogic
stdout WebLogic Server
JAVA_OPTIONS

ijin
gL
an
di
ng

-Dweblogic.Stdout="stdout-filename"
-Dweblogic.Stderr="stderr-filename"

10-3

HTTP WebLogic Server


access log URL
HTTP

Be

127.0.0.1 - - [13/Jul/2004:21:39:46 -0615] "GET /strutssample/preregisterCab.do?IndiReport=true HTTP/1.1" 200 4173


127.0.0.1 - - [13/Jul/2004:21:41:14 -0615] "POST /strutssample/getIndiData.do;jsessionid=A05R5lY5jLRJokg8BRMYgLwCOvfuVzC7KEE4AsCZijqD7l
6A22Re!-237055073 HTTP/1.1" 200 4667
127.0.0.1 - - [16/Jul/2004:00:07:58 -0615] "GET /strutssample/preregisterCab.do?IndiReport=true HTTP/1.1" 200 4173
127.0.0.1 - - [16/Jul/2004:00:08:26 -0615] "POST /strutssample/getIndiData.do;jsessionid=A32LikMTeXrS5Bnbp7p1TASmcLHkuko9Sudr8LjatWw2Aq
eP6zkt!1759102893 HTTP/1.1" 200 8893
127.0.0.1 - - [19/Jul/2004:04:39:36 -0615] "GET /strutssample/preregisterCab.do?IndiReport=true HTTP/1.1" 200 4173
127.0.0.1 - - [19/Jul/2004:04:40:16 -0615] "POST /strutssample/getIndiData.do;jsessionid=A7yxT3KtTy01T7A39DLSup2RPqxvV9uWay325WxBLqtj1d
lx3Ewa!-431463598 HTTP/1.1" 200 5416
127.0.0.1 - - [14/Aug/2004:22:36:24 -0615] "GET /strutssample/preregisterCab.do?IndiReport=true HTTP/1.1" 200 4173

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 15 -

IT WebLogic
127.0.0.1 - - [14/Aug/2004:22:36:58 -0615] "POST /strutssample/getIndiData.do;jsessionid=Be2WKm1nP7DGdX1uIY8PraQdx51wBZTjVSswGHdcbL4njc
jXOdJh!1670519755 HTTP/1.1" 200 4684
127.0.0.1 - - [14/Aug/2004:22:36:59 -0615] "GET /strutssample/pages/STFull.jpg HTTP/1.1" 304 0
10-4

10.4.2 WebLogic

hn
ol
og

ie
s

Struts
NoClassDefFoundError ClassNotFoundException
ClassNotFoundException
NoClassDefFoundError

NoClassDefFoundError
WebLogic WebLogic

StartWeblogic WebLogic
Dweblogic.Debug=debug.lineNumbers,debug.methodNames,weblogic.ClassLoade
rVerbose,weblogic.ClassLoader

Te
c

LoggingDebug to Stdout
enabled

ijin
gL
an
di
ng

Be

[GenericClassLoader] : Looking for class:


org.apache.struts.taglib.html.ImgTag...
With classpath of : ()
Classloader object id
(weblogic.utils.classloaders.GenericClassLoader@10d3f0d finder:
weblogic.utils.classloaders.MultiClassFinder@1510d96 annotation: )
[GenericClassLoader] : Class org.apache.struts.taglib.html.ImgTag not found.
[GenericClassLoader] : Looking for class:
org.apache.struts.taglib.html.ImgTag...
With classpath of : ()
Classloader object id
(weblogic.utils.classloaders.GenericClassLoader@1ce64f6 finder:
weblogic.utils.classloaders.MultiClassFinder@52fecf annotation:
ApplicationClassLoader@)
[GenericClassLoader] : Class org.apache.struts.taglib.html.ImgTag not found.
[GenericClassLoader] : Looking for class:
org.apache.struts.taglib.html.ImgTag...
With classpath of : (C:\APP-INF\classes)
Classloader object id
(weblogic.utils.classloaders.GenericClassLoader@1d6d61d finder:
weblogic.utils.classloaders.MultiClassFinder@d6ee28 annotation: struts-example@)
[GenericClassLoader] : Class org.apache.struts.taglib.html.ImgTag not found.

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 16 -

IT WebLogic
[ChangeAwareClassLoader] :
weblogic.utils.classloaders.ChangeAwareClassLoader@18a6890 finder:
weblogic.utils.classloaders.MultiClassFinder@ad8bb4 annotation: strutsexample@struts-example about to loadClass(org.apache.struts.taglib.html.ImgTag)
[GenericClassLoader] : Looking for class:
org.apache.struts.taglib.html.ImgTag...
10-5

ie
s

Struts org.apache.struts.taglib.html.ImgTag
war
:

Be

ijin
gL
an
di
ng

Te
c

hn
ol
og

[GenericClassLoader] : Looking for class:


org.apache.struts.taglib.html.ImgTag...
With classpath of : ()
Classloader object id
(weblogic.utils.classloaders.GenericClassLoader@10d3f0d finder:
weblogic.utils.classloaders.MultiClassFinder@1510d96 annotation: )
[GenericClassLoader] : Class org.apache.struts.taglib.html.ImgTag not found.
[GenericClassLoader] : Looking for class:
org.apache.struts.taglib.html.ImgTag...
With classpath of : ()
Classloader object id
(weblogic.utils.classloaders.GenericClassLoader@1ce64f6 finder:
weblogic.utils.classloaders.MultiClassFinder@52fecf annotation:
ApplicationClassLoader@)
[GenericClassLoader] : Class org.apache.struts.taglib.html.ImgTag not found.
[GenericClassLoader] : Looking for class:
org.apache.struts.taglib.html.ImgTag...
With classpath of : (C:\APP-INF\classes)
Classloader object id
(weblogic.utils.classloaders.GenericClassLoader@1d6d61d finder:
weblogic.utils.classloaders.MultiClassFinder@d6ee28 annotation: struts-example@)
[GenericClassLoader] : Class org.apache.struts.taglib.html.ImgTag not found.
[ChangeAwareClassLoader] :
weblogic.utils.classloaders.ChangeAwareClassLoader@18a6890 finder:
weblogic.utils.classloaders.MultiClassFinder@ad8bb4 annotation: strutsexample@struts-example about to loadClass(org.apache.struts.taglib.html.ImgTag)
[GenericClassLoader] : Looking for class:
org.apache.struts.taglib.html.ImgTag...
With classpath of : (C:\bea-plat81sp3\user_projects\domains\sqlservdomain\myserver\.wlnotdelete\extract\myserve
r_struts-example_struts-example\jarfiles\WEB-INF\lib\log4j.jar;C:\bea-plat81sp3\user_projects\domains\sqlservdomain\myserver\.wlnotdelete\extract\myserve
r_struts-example_struts-example\jarfiles\WEB-INF\lib\log4j-core.jar)
Classloader object id
(weblogic.utils.classloaders.ChangeAwareClassLoader@18a6890 finder:
weblogic.utils.classloaders.MultiClassFinder@ad8bb4 annotation: strutsexample@struts-example)

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 17 -

IT WebLogic

Te
c

10-6

hn
ol
og

ie
s

[GenericClassLoader] : Class org.apache.struts.taglib.html.ImgTag not found.


<Nov 17, 2004 4:37:52 PM PST> <Error> <HTTP> <BEA-101017>
<[ServletContext(id=28746180,name=struts-example,context-path=/struts-example)]
Root cause of ServletException
java.lang.NoClassDefFoundError: org/apache/struts/taglib/html/ImgTag
at jsp_servlet.__index._jspService(__index.java:434)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
atweblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Ser
vletStubImpl.java:996)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet
(ServletStubImpl.java:419)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet
(ServletStubImpl.java:463)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet
(ServletStubImpl.java:315)
at weblogic.servlet.internal.WebAppServletContext
$ServletInvocationAction.run (WebAppServletContext.java:6452)
atweblogic.security.acl.internal.AuthenticatedSubject.doAs
(AuthenticatedSubject.java:321)

10.5 WebLogic Hibernate

ijin
gL
an
di
ng

WebLogic Java OR Hibernate

10.5.1 Hibernate

WebLogic

Be

org.hibernate.hql.ast.HqlToken org.hibernate.QueryException:
ClassNotFoundException: org.hibernate.hql.ast.HqlToken [from
com.dhcc.mm5.QbMm5List]
at org.hibernate.hql.ast.HqlLexer.panic(HqlLexer.java:57)
at antlr.CharScanner.setTokenObjectClass(CharScanner.java:340)
at org.hibernate.hql.ast.HqlLexer.setTokenObjectClass(HqlLexer.java:31)
at antlr.CharScanner.<init>(CharScanner.java:51)
at antlr.CharScanner.<init>(CharScanner.java:60)
at org.hibernate.hql.antlr.HqlBaseLexer.<init>(HqlBaseLexer.java:56)
at org.hibernate.hql.antlr.HqlBaseLexer.<init>(HqlBaseLexer.java:53)
at org.hibernate.hql.antlr.HqlBaseLexer.<init>(HqlBaseLexer.java:50)
at org.hibernate.hql.ast.HqlLexer.<init>(HqlLexer.java:26)
at org.hibernate.hql.ast.HqlParser.getInstance(HqlParser.java:44)
at org.hibernate.hql.ast.QueryTranslatorImpl.parse
(QueryTranslatorImpl.java:232)
at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile
(QueryTranslatorImpl.java:155)
at org.hibernate.hql.ast.QueryTranslatorImpl.compile
(QueryTranslatorImpl.java:109)
at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:75)
at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:54)

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 18 -

IT WebLogic

ijin
gL
an
di
ng

Te
c

hn
ol
og

ie
s

at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan
(QueryPlanCache.java:71)
at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan
(AbstractSessionImpl.java:133)
at org.hibernate.impl.AbstractSessionImpl.createQuery
(AbstractSessionImpl.java:112)
at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1583)
at com.dhcc.mm5.QbMm5ListDAO.findAll(QbMm5ListDAO.java:141)
at jsp_servlet.__left._jspService(__left.java:114)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run
(StubSecurityHelper.java:226)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet
(StubSecurityHelper.java:124)
at weblogic.servlet.internal.ServletStubImpl.execute
(ServletStubImpl.java:283)
at weblogic.servlet.internal.ServletStubImpl.onAddToMapException
(ServletStubImpl.java:391)
at weblogic.servlet.internal.ServletStubImpl.execute
(ServletStubImpl.java:309)
at weblogic.servlet.internal.ServletStubImpl.execute
(ServletStubImpl.java:175)
at weblogic.servlet.internal.WebAppServletContext
$ServletInvocationAction.run(WebAppServletContext.java:3370)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs
(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.servlet.internal.WebAppServletContext.securedExecute
(WebAppServletContext.java:2117)
at weblogic.servlet.internal.WebAppServletContext.execute
(WebAppServletContext.java:2023)
at weblogic.servlet.internal.ServletRequestImpl.run
(ServletRequestImpl.java:1359)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
10-7

Be

10.5.2

Hibernate3.0 ANTLR HQL/SQL weblogic.jar


antrl
antlr System.exit() WebLogic
Hibernate hibernate.query.factory_class

1 Hibernate3.0
hibernate.query.factory_class=
org.hibernate.hql.ast.ASTQueryTranslatorFactory
2 Hibernate2.1

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 19 -

IT WebLogic
hibernate.query.factory_class=
org.hibernate.hql.classic.ClassicQueryTranslatorFactory
3.0 1
2

10.5.3

10-8

hn
ol
og

<property name="query.factory_class">
org.hibernate.hql.classic.ClassicQueryTranslatorFactory
</property>

ie
s

hibernate.properties
hibernate.query.factory_class
org.hibernate.hql.classic.ClassicQueryTranslatorFactory. cfg.xml ,
hibernate.cfg.xml <session-factory>:

WebLogic antlr-2.7.5H3.jar

Te
c

Weblogic spring hibernate


Weblogic SSH Weblogic classloader
jar jar jar Weblogic jar
war ear jar
classpath webservice.jar

ijin
gL
an
di
ng

10.6 Tomcat WebLogic


10.6.1 JDK Servlet

WebLogic 8.1 sp4 sp4 JDK1.4 JDK1.4


JDK1.5 WebLogic 8.1 J2EE1.4
Servlet2.4 JSP2.0

10.6.2 Include

WebLogic <%@ page


contentType="text/html; charset=GBK"%> include file
include

Be

TOMCAT include file include


BEA TOMCAT
J2EE
<jsp:include><jsp:include>
include jsp <%@ page
contentType="text/html; charset=GBK"%><jsp:include><jsp:param>
include request
request.setAttribute()request.getAttribute()

10.6.3 Log4j
.war WebLogic

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 20 -

IT WebLogic
Error: weblogic.management.DeploymentException: Cannot set web app root
system property when WAR file is not expanded - with nested exception:
[java.lang.IllegalStateException: Cannot set web app root system property
when WAR file is not expanded]
10-9

hn
ol
og

ie
s

servlet listener log4j


com.apache.jakarta.log4j.Log4jInit Spring
org.springframework.web.util.Log4jConfigServlet
org.springframework.web.util.ServletContextListener
Log4jConfigServlet ServletContextListener (callback
method) Log4jWebConfigurer.initLogging(getServletContext());
:WebUtils.setWebAppRootSystemProperty(servletContext);

ijin
gL
an
di
ng

Te
c

public static void setWebAppRootSystemProperty(ServletContext


servletContext) throws IllegalStateException {
String param = servletContext.getInitParameter(WEB_APP_ROOT_KEY_PARAM);
String key = (param != null ? param : DEFAULT_WEB_APP_ROOT_KEY);
String oldValue = System.getProperty(key);
if (oldValue != null) {
throw new IllegalStateException(
"WARNING: Web app root system property already set: "
+ key + " = " + oldValue
+ " - Choose unique webAppRootKey values in your web.xml files!");
}
String root = servletContext.getRealPath("/");
if (root == null) {
throw new IllegalStateException
("Cannot set web app root system property when WAR file is not
expanded");
}
System.setProperty(key, root);
servletContext.log("Set web app root system property: "
+ key + " = " + root);
}
10-10

Be

webAppRootKey WebLogic
web.xml
<context-param>
<param-name>webAppRootKey</param-name>
<param-value>webapp.root</param-value>
</context-param>
10-11
WebLogic Log4j .war Spring
org.springframework.web.util.Log4jConfigListener , Servlet
web.xml

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 21 -

IT WebLogic
<listener id="log4jConfigListener">
<listener-class>org.springframework.web.util.Log4jConfigListener
</listener-class>
</listener>
10-12
Listener Servlet web.xml

10-13

10.6.4 Hibernate3Axis

hn
ol
og

ie
s

<servlet>
<servlet-name>log4jConfigListener</servlet-name>
<servlet-class>org.springframework.web.util.Log4jConfigServlet
</servlet-class>
<load-on-startup>0</load-on-startup>
</servlet>

Te
c

Hibernate3 hibernate.query.factory_class
org.hibernate.hql.ast.ASTQueryTranslatorFactory WebLogic
org.hibernate.QueryException: ClassNotFoundException:
org.hibernate.hql.ast.HqlToken

ijin
gL
an
di
ng

WebLogic
EJB-QL parser ClassNotFoundException
() startWebLogic antlr-2.7.5H3.jar

WEB-INF weblogic.xml
<weblogic-web-app>
<container-descriptor>
<prefer-web-inf-classes>true</prefer-web-inf-classes>
</container-descriptor>
</weblogic-web-app>
10-14

prefer-web-inf-classes=true WebLogic's classloader


Web WEB-INF

Be

Axis

1 startWebLogic web
prefer-web-inf-classes=trueBEA WebLogic JSP
true
2 Axis prefer-web-inf-classes=true
saaj.jar webservices.jar saaj.jar
axis
webservices.jar

10.6.5 Axis .net Web Service

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 22 -

IT WebLogic
java.lang.NoSuchMethodError:
javax.xml.namespace.QName.getPrefix()Ljava/lang/String
10-15
.net Web Service Tomcat Windows
BEA WebLogic 8.1 SP5 HPUX
javax.xml.namespace.QName.getPrefix()

Be

ijin
gL
an
di
ng

Te
c

hn
ol
og

ie
s

jaxrpc.jar webservices.jar
javax.xml.namespace.QName startWebLogic.sh jaxpc.jar
webservices.jar

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 23 -

ec
hn
o

lo

gie

IT

Be

ijin

gL

an
di

ng
T

WebLogic

IT WebLogic

........................................................................................................................... 2
...........................................................................................................................

Be

ijin

gL

an
di

ng
T

ec
hn
o

lo

gie

.....................................................................................................................
11
.....................................................................................................................
.....................................................................................................................33
11.1
WebLogic ....................................................................................................................... 3
11.1.1
........................................................................................................................ 3
11.1.2
................................................................................................................................ 3
11.1.3
WebLogic....................................................................................................................... 3
11.2
..................................................................................................................... 6
11.2.1
server_name.log..............................................................................................................6
11.2.2
access.log........................................................................................................................6
11.2.3
log.................................................................................................................. 6
11.2.4
domain_name.log............................................................................................................6
11.2.5
jms.messages.log............................................................................................................ 7
11.3
......................................................................................... 7
11.4
Thread dump ................................................................................................... 7
11.4.1
Thread dump ...................................................................................................... 7
11.4.2
thread dump................................................................................................... 7
11.4.3
Thread dump .................................................................................................. 8
11.4.3.1 ....................................................................................................... 8
11.4.4
thread dump ...............................................................................9
11.5
Heap dump ........................................................................................................10
11.5.1
heap dump........................................................................................................10
11.5.2
heap dump....................................................................................................11
11.5.3
Jps Jmap......................................................................................................11
11.5.4
Jmap .....................................................................................................................11
11.5.5
Jmap ......................................................................................................... 13
11.6
Java dump ........................................................................................ 14

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-2-

IT WebLogic

11
DOMAIN_NAME ADMIN_SERVER_NAME
SERVER_NAME

11.1 WebLogic

WebLogic

gie

11.1.1

lo

cpu I/O CPU


I/O topasvmstatps

ec
hn
o

11.1.2

domain

2.

WebLogic

3.

Multicast

11.1.3 WebLogic

ng
T

1.

WebLogic
JVM

an
di

1.

GC
2.

GC

gL

WebLogic JVM GC

ijin

GC GC GC

3.

Be

WebLogic WebLogic 9
100

4.

stuck

stuck
stuck 0 stuck 0
JVM thread dump java
core stuck
thread dump kill -3 <wls_pid>

5.

JDBC

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-3-

IT WebLogic

WebLogic

6.

WebLogic

ec
hn
o

11-1

lo

gie

java.lang.IllegalStateException: Cannot forward a response that is already


committed
at weblogic.servlet.internal.RequestDispatcherImpl.forward
(RequestDispatcherImpl.java:110)
at com.landingbj.hebmc.ExceptionFilter.doFilter(ExceptionFilter.java:55)

response
outputstream
filter

ng
T

stuck

an
di

<[STUCK] ExecuteThread: '32' for queue: 'weblogic.kernel.Default (selftuning)' has been busy for "632" seconds working on the request "Http Request:
/stat/test/TestCtrl.statOracleTest.do", which is more than the configured time
(StuckThreadMaxTime) of "600" seconds.
11-2

gL

32 600
cpu

32 unstuck

Be

ijin

<[STUCK] ExecuteThread: '32' for queue: 'weblogic.kernel.Default (selftuning)' has become "unstuck".>
11-3

java.sql.SQLException: [BEA][Oracle JDBC Driver]Error establishing socket


to host and port: db_landingbj:1521. Reason: Connection refused
11-4
ping
DNS DNS
db_landingbj
WebLogic Error

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-4-

IT WebLogic
URL
####<Feb 28, 2010 4:26:20 PM GMT+08:00> <Error> <HTTP> <yanzheng2> <wls6>
<ExecuteThread: '1' for queue: 'weblogic.socket.Muxer'> <<WLS Kernel>> <> <>
<1267345580932> <BEA-101215> <Malformed Request "/service/js/landingbj/mareal
</option><option value=". Request parsing failed, Code: -1>
11-5
1 /service/js/mareal/mareal </option><option
value=WebLogic . URL

gie

class

ec
hn
o

lo

java.lang.ClassNotFoundException:
com.qtong.hebmc.controller.js.landingbj.mareal.jobile.com.service.LoginCtrl
at java.lang.Class.forNameImpl(Native Method)
at java.lang.Class.forName(Class.java:130)
at com.landingbj.sterna.Controller.parseController(Controller.java:67)
... 20 more
11-6

java

ng
T

gL

an
di

org.apache.commons.mail.EmailException: Sending the email to the following


server failed : 218.207.67.75:25
Caused by:
javax.mail.MessagingException: Could not connect to SMTP host:
218.207.67.75, port: 25;
nested exception is:
java.net.SocketException: Connection timed out:could be due to invalid
address
11-7

IP

ijin

bug OOM

Be

java.lang.OutOfMemoryError: Initializing Writer


at com.sun.imageio.plugins.jpeg.JPEGImageWriter.initJPEGImageWriter
(Native Method)
at com.sun.imageio.plugins.jpeg.JPEGImageWriter.<init>
(JPEGImageWriter.java:206)
at com.sun.imageio.plugins.jpeg.JPEGImageWriterSpi.createWriterInstance
(JPEGImageWriterSpi.java:130)
at javax.imageio.spi.ImageWriterSpi.createWriterInstance
(ImageWriterSpi.java:358)
at javax.imageio.ImageIO$ImageWriterIterator.next(ImageIO.java:851)
at javax.imageio.ImageIO$ImageWriterIterator.next(ImageIO.java:835)
at javax.imageio.ImageIO.write(ImageIO.java:1473)

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-5-

IT WebLogic
at javax.imageio.ImageIO.write(ImageIO.java:1554)
at com.landingbj.hebmc.controller.LoginCtrl.smsRandomPic
(LoginCtrl.java:267)
... 21 more
11-8
com.sun.imageio.plugins.jpeg.JPEGImageWriter bug
OOM

gie

java.lang.StringIndexOutOfBoundsException
at java.lang.String.substring(String.java:1088)
at com.landingbj.hebmc.controller.nethall.ChongZhiKaChaXunCtrl.transact
(ChongZhiKaChaXunCtrl.java:25)

11.2
WebLogic

11.2.1 server_name.log

ec
hn
o

lo

11-9

ng
T

admin server managed server

Server_name.log

DOMAIN_NAME/servers/SERVER_NAME/logs/server_name.log

an
di

11-10

11.2.2 access.log

IP

gL

access.log

DOMAIN_NAME/servers/SERVER_NAME/logs/access.log

ijin

11-11

11.2.3 log

Be

setDomainEnv.sh wls_home commEnv.sh

11.2.4 domain_name.log
DOMIAN DOMAIN WebLogic SERVER
DOMAIN ADMINISTRATOR SERVER
ADMINISTRATOR SERVER DOMAIN

DOMAIN_NAME/servers/ADMIN_SERVER_NAME/logs/DOMAIN_NAME.log.
11-12

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-6-

IT WebLogic

11.2.5 jms.messages.log
JMS
JMS
JMS
logs
DOMAIN_NAME/servers/SERVER_NAME/logs/jmsServers/SERVER_NAMEJMSServer/jms.me
ssages.log
11-12

gie

11.3

lo

WebLogic admin server DOMAIN_NAME/bin/


startWebLogic.shmanaged server DOMAIN_NAME/bin/
startManagedWebLogic.sh

ec
hn
o

WebLogic DOMAIN_NAME/bin/
setDomainEnv.sh WLS_HOME/common/bin/ commEnv.sh
commEnv.sh weblogic setDomainEnv.sh
domain setDomainEnv.sh

ng
T

WebLogic

WebLogic

an
di

managed server

ijin

gL

#!/bin/sh
USER_MEM_ARGS="-Xms4096m -Xmx4096m"
export USER_MEM_ARGS
#=====================
nohup /home/weblogic/bea/user_projects/domains/landingbj_8001/bin
/startManagedWebLogic.sh App161_8001 http://127.0.0.1:7001 >>
/home/weblogic/bea/user_projects/domains/xxx2100_8001/bin/App161_8001.out &
11-13

Be

11.4 Thread dump


11.4.1 Thread dump
WebLogic java Thread dump
java

11.4.2 thread dump


Thread dump Windows unix
Windows WebLogic ctl+break
thread dump

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-7-

IT WebLogic
UNIX Solaris kill quit wls
kill -3 wls thread dump
Thread dump WebLogic

nohup /home/weblogic/bea/user_projects/domains/landingbj_8001/bin/
startManagedWebLogic.sh App161_8001 http://127.0.0.1:7001 >>
/home/weblogic/log/App161_8001.out &
11-14
Thread dump /home/weblogic/log/App161_8001.out

gie

11.4.3 Thread dump

ec
hn
o

WebLogic

lo

Thread dumps

11.4.3.1

WebLogic

ng
T

11.4.3.1.1WebLogic wait

ijin

gL

an
di

"[ACTIVE] ExecuteThread: '30' for queue: 'weblogic.kernel.Default (selftuning)'" daemon prio=1 tid=0x0000000040ae9d50 nid=0x6ccf in Object.wait()
[0x00007f6e6d48f000..0x00007f6e6d48fd90]
at java.lang.Object.wait(Native Method)
- waiting on <0x00007f6eab8764d8> (a weblogic.work.ExecuteThread)
at java.lang.Object.wait(Object.java:474)
at weblogic.work.ExecuteThread.waitForRequest(ExecuteThread.java:165)
- locked <0x00007f6eab8764d8> (a weblogic.work.ExecuteThread)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:186)
11-15

Be

weblogic.work.ExecuteThread.waitForRequest

11.4.3.1.2
"[ACTIVE] ExecuteThread: '219' for queue: 'weblogic.kernel.Default (selftuning)'" daemon prio=1 tid=0x00007f6e50345a50 nid=0x6e16 runnable
[0x00007f6e5d668000..0x00007f6e5d66bb10]
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read(BufferedInputStream.java:235)
- locked <0x00007f6f40cc0220> (a java.io.BufferedInputStream)
at weblogic.net.http.MessageHeader.isHTTP(MessageHeader.java:220)

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-8-

IT WebLogic
11-16
runnable
at java.net.SocketInputStream.socketRead0 (Native Method)

11.4.3.1.3

ec
hn
o

lo

gie

"[ACTIVE] ExecuteThread: '215' for queue: 'weblogic.kernel.Default (selftuning)'" daemon prio=1 tid=0x00007f6e50bd84d0 nid=0x6e12 waiting for monitor
entry [0x00007f6e5d72d000..0x00007f6e5d72fd10]
at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass
(ChangeAwareClassLoader.java:35)
- waiting to lock <0x00007f6eacbca018>
(a weblogic.utils.classloaders.ChangeAwareClassLoader)
at javax.xml.parsers.FactoryFinder.newInstance(FactoryFinder.java:88)
at javax.xml.parsers.FactoryFinder.findJarServiceProvider
(FactoryFinder.java:278)
at javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:185)
at javax.xml.parsers.DocumentBuilderFactory.newInstance
(DocumentBuilderFactory.java:98)
..
11-17

ng
T

waiting for monitor entrywaiting to lock


<0x00007f6eacbca018> runnable
thread dump

an
di

11.4.4 thread dump

gL

net/SocketNativeIOcom/informix/jdbc/IfxSqli.executeStatementQuery

Be

ijin

com/xxxxx/prpall/service/spring/PrpWorkbenchMainServiceSpringImpl.getPrpC
FlowInfos
[STUCK] ExecuteThread: '136' for queue: 'weblogic.kernel.Default (selftuning)'" id=150 idx=0x2b0 tid=2639 prio=1 alive, in native, daemon
at jrockit/net/SocketNativeIO.readBytesPinned
(Ljava/io/FileDescriptor;[BIII)I(Native Method)
at jrockit/net/SocketNativeIO.socketRead(SocketNativeIO.java:46)
at java/net/SocketInputStream.socketRead0
(Ljava/io/FileDescriptor;[BIII)I(SocketInputStream.java)
at java/net/SocketInputStream.read(SocketInputStream.java:129)
at java/io/BufferedInputStream.fill(BufferedInputStream.java:218)
at java/io/BufferedInputStream.read1(BufferedInputStream.java:256)
at java/io/BufferedInputStream.read(BufferedInputStream.java:313)
^-- Holding lock: java/io/BufferedInputStream@0x7fe572257740[thin lock]
at com/informix/asf/IfxDataInputStream.readFully
(IfxDataInputStream.java:146)

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-9-

IT WebLogic

Be

ijin

gL

an
di

ng
T

ec
hn
o

lo

gie

at com/informix/asf/IfxDataInputStream.readSmallInt
(IfxDataInputStream.java:453)
at com/informix/jdbc/IfxSqli.receiveMessage(IfxSqli.java:2495)
at com/informix/jdbc/IfxSqli.a(IfxSqli.java:1752)
at com/informix/jdbc/IfxSqli.executeStatementQuery(IfxSqli.java:1704)
at com/informix/jdbc/IfxSqli.executeStatementQuery(IfxSqli.java:1635)
at com/informix/jdbc/IfxResultSet.a(IfxResultSet.java:206)
at com/informix/jdbc/IfxStatement.executeQueryImpl
(IfxStatement.java:1229)
at com/informix/jdbc/IfxPreparedStatement.executeQuery
(IfxPreparedStatement.java:376)
at weblogic/jdbc/wrapper/PreparedStatement.executeQuery
(PreparedStatement.java:100)
at org/hibernate/jdbc/AbstractBatcher.getResultSet(AbstractBatcher.java:208)
at org/hibernate/loader/Loader.getResultSet(Loader.java:1812)
at org/hibernate/loader/Loader.doQuery(Loader.java:697)
at org/hibernate/loader/Loader.doQueryAndInitializeNonLazyCollections
(Loader.java:259)
at org/hibernate/loader/Loader.doList(Loader.java:2232)
at org/hibernate/loader/Loader.listIgnoreQueryCache(Loader.java:2129)
at org/hibernate/loader/Loader.list(Loader.java:2124)
at org/hibernate/loader/hql/QueryLoader.list(QueryLoader.java:401)
at org/hibernate/hql/ast/QueryTranslatorImpl.list
(QueryTranslatorImpl.java:363)
at org/hibernate/engine/query/HQLQueryPlan.performList
(HQLQueryPlan.java:196)
at org/hibernate/impl/SessionImpl.list(SessionImpl.java:1149)
at org/hibernate/impl/QueryImpl.list(QueryImpl.java:102)
at ins/framework/dao/EntityDaoHibernate$5.doInHibernate
(EntityDaoHibernate.java:506)
.
at weblogic/security/acl/internal/AuthenticatedSubject.doAs
(AuthenticatedSubject.java:321)
at weblogic/security/service/SecurityManager.runAs
(SecurityManager.java:121)
at weblogic/servlet/internal/WebAppServletContext.securedExecute
(WebAppServletContext.java:2010)
at weblogic/servlet/internal/WebAppServletContext.execute
(WebAppServletContext.java:1916)
at weblogic/servlet/internal/ServletRequestImpl.run
(ServletRequestImpl.java:1366)
at weblogic/work/ExecuteThread.execute(ExecuteThread.java:209)
at weblogic/work/ExecuteThread.run(ExecuteThread.java:181)
at jrockit/vm/RNI.c2java(JJJJJ)V(Native Method)
11-18

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 10 -

IT WebLogic

11.5 Heap dump


11.5.1 heap dump
Java heap Java VM
heap
Java heap dump

11.5.2 heap dump

lo

gie

JVM Java Heap Memory heap


dump IBM
HeapAnalyzerSap Memory Analyzer Eclipse Memory Analyzer
heap dump

ec
hn
o

11.5.3 Jps Jmap


jps java pid
[root@myjrjapp-100 ~]# jps
23178 Jps
20289 Bootstrap

ng
T

11-19

20289 Bootstrap tomcat

an
di

jmap Java
pid

jmap pid

gL

11-20

jmap JVM heap

ijin

jmap -dump:format=b,file=f1 3024


11-21

Be

3024 heap f1

11.5.4 Jmap
1.

jmap -heap pid java heap


using thread-local object allocation.
Parallel GC with 4 thread(s) //GC
Heap Configuration:
MinHeapFreeRatio=40
MaxHeapFreeRatio=70
MaxHeapSize=512.0MB
NewSize = 1.0MB

:http://www.landingbj.com
: 400-810-2327

//
// JVM (default 40)
// JVM (default 70)
// JVM
// JVM

: service@landingbj.com
: 010-82730518

- 11 -

IT WebLogic
MaxNewSize =4095MB
OldSize = 4.0MB
NewRatio = 8
SurvivorRatio = 8
PermSize= 16.0MB
MaxPermSize=64.0MB

// JVM
// JVM
//
// Eden Survivor
// JVM
// JVM

ijin

gL

an
di

ng
T

ec
hn
o

lo

gie

Heap Usage:
//
PS Young Generation
Eden Space:
//Eden
capacity = 20381696 (19.4375MB)
//Eden
used
= 20370032 (19.426376342773438MB) //Eden
free
= 11664 (0.0111236572265625MB)
//Eden
99.94277218147106% used
//Eden
From Space:
// Survivor
capacity = 8519680 (8.125MB)
used
= 32768 (0.03125MB)
free
= 8486912 (8.09375MB)
0.38461538461538464% used
To Space:
// Survivor
capacity = 9306112 (8.875MB)
used
= 0 (0.0MB)
free
= 9306112 (8.875MB)
0.0% used
PS Old Generation
// Old
capacity = 366280704 (349.3125MB)
used
= 322179848 (307.25464630126953MB)
free
= 44100856 (42.05785369873047MB)
87.95982001825573% used
PS Perm Generation
//
capacity = 32243712 (30.75MB)
used
= 28918584 (27.57891082763672MB)
free
= 3325128 (3.1710891723632812MB)
89.68751488662348% used

2.

11-22

jmap -histo pid (histogram)

Be

num

1:
2:
3:
4:
5:
6:
7:
8:
9:

#instances
#bytes
class name

---------------------------------------------3174877
107858256 [C
3171499
76115976 java.lang.String
1397884
38122240 [B
214690
37785440 com.tongli.book.form.Book
107345
18892720 com.tongli.book.form.Book
65645
13953440 [Ljava.lang.Object;
59627
7648416 <constMethodKlass>
291852
7004448 java.util.HashMap$Entry
107349
6871176 [[B

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 12 -

IT WebLogic
total

9150732

353969416
11-23

3.

jmap - dump

pid

map -dump:format=b,file= m.dat pid


11-24

11.5.5 Jmap
1

1.

gie

ec
hn
o

lo

[root@myjrjapp-100 ~]# jps


23178 Jps
20289 Bootstrap
[root@myjrjapp-100 ~]# jmap 20289
Attaching to process ID 20289, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 10.0-b19

=
=
=
=
=
=
=
=
=
=

40
70
1073741824 (1024.0MB)
1048576 (1.0MB)
4294901760 (4095.9375MB)
4194304 (4.0MB)
8
8
134217728 (128.0MB)
268435456 (256.0MB)

Be

ijin

gL

an
di

Heap Configuration:
MinHeapFreeRatio
MaxHeapFreeRatio
MaxHeapSize
NewSize
MaxNewSize
OldSize
NewRatio
SurvivorRatio
PermSize
MaxPermSize

ng
T

using thread-local object allocation.


Parallel GC with 8 thread(s)

Heap Usage:
PS Young Generation
Eden Space:
capacity = 118358016 (112.875MB)
used
= 38070328 (36.30669403076172MB)
free
= 80287688 (76.56830596923828MB)
32.165398919833194% used
From Space:
capacity = 458752 (0.4375MB)
used
= 155664 (0.1484527587890625MB)
free
= 303088 (0.2890472412109375MB)

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 13 -

ec
hn
o

lo

gie

IT WebLogic
33.932059151785715% used
To Space:
capacity = 458752 (0.4375MB)
used
= 0 (0.0MB)
free
= 458752 (0.4375MB)
0.0% used
PS Old Generation
capacity = 954466304 (910.25MB)
used
= 72784624 (69.41282653808594MB)
free
= 881681680 (840.8371734619141MB)
7.625688166776813% used
PS Perm Generation
capacity = 134217728 (128.0MB)
used
= 38192248 (36.42296600341797MB)
free
= 96025480 (91.57703399658203MB)
28.455442190170288% used
[root@myjrjapp-100 ~]#
11-25
2.

2
jmap dump

jmap -dump:live,format=b,file=heap.bin 8023

ng
T

11-26

heap.bin M G
Windows

an
di

[root@openAS-main ~]# gzip heap.bin

11-27

Eclipse MAT

JVM Crash JVM Java dump

ijin

1.

gL

11.6 Java dump

Be

JVM
DISABLE_JAVADUMP=trueIBM_NOSIGHANDLER=true
JVM JVM Java dump

2.

Java Dump state:CW state:B

CW - Condition Wait
I/O sleep()wait()join()

B Blocked

synchronized

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 14 -

IT WebLogic
3.

PsList Java dump

Be

ijin

gL

an
di

ng
T

ec
hn
o

lo

gie

TID Java dump


Java dump native IDJava dump
ID, java TID, native
ID

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 15 -

hn
ol
og

ie
s

IT

Be

ijin
gL
an
di
ng

Te
c

WebLogic

IT WebLogic

........................................................................................................................... 2
...........................................................................................................................

Be

ijin
gL
an
di
ng

Te
c

hn
ol
og

ie
s

.........................................................................................................
4
12
.........................................................................................................
.........................................................................................................4
12.1
..................................................................................................................... 4
12.1.1
........................................................................................................ 4
12.1.2
............................................................................................................ 4
12.1.3
............................................................................................................ 4
12.2
............................................................................................................. 5
12.2.1
.................................................................................................... 5
12.2.2
.................................................................................................... 5
12.3
..................................................................................................................... 6
12.3.1
................................................................................................................ 6
12.3.2
................................................................................................ 6
12.3.3
Thread Dump......................................................................... 6
12.3.3.1 Thread Dump .....................................................................................................6
12.3.3.2 Thread Dump................................................................ 7
12.3.3.3 Thread Dump.................................................................... 7
12.3.4
........................................................................................................ 8
12.4
............................................................................................. 8
12.4.1
Socket Reader ........................................................................ 8
12.4.1.1 Socket Reader ............................................................................................8
12.4.1.2 Socket Reader Thread Dump .............................................................................9
12.4.1.3 ........................................................................................................... 9
12.4.2
...................................................................................... 10
12.4.2.1 ..................................................................................... 10
12.4.2.2 ......................................................................................................... 10
12.4.3
...................................................................................... 11
12.5
........................................................................................... 11
12.5.1.1 ..................................................................12
12.5.1.2 ..................................................................12
12.5.1.3 ......................................................................12
12.6
............................................................................................... 13
12.7
........................................................................................... 13
12.7.1
.......................................................................13
12.7.2
.................................................................................................. 13
12.7.3
.................................................................................. 13
12.7.4
...........................................................................14
12.8
JDBC .................................................................................................15
12.8.1
JDBC ........................................................................... 15
12.8.2
JDBC ............................................................................ 15
12.8.3
JDBC .................................................................... 19
12.9
EJB RMI ................................................................................................... 20
12.9.1
EJB RMI ..................................................................................... 20
12.9.2
.................................................................................................. 20
12.9.3
EJB RMI .......................................................................................... 20
12.9.4
EJB RMI ...................................................................... 22
12.10
JSP ........................................................................................23
12.10.1 JSP .......................................................................................23

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-2-

IT WebLogic

Be

ijin
gL
an
di
ng

Te
c

hn
ol
og

ie
s

12.10.2 JSP ............................................................................................23


12.10.3 JSP ........................................................................24
12.11
...........................................................................................................25

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-3-

IT WebLogic

12
WebLogic

12.1

12.1.1

12.1.2
1

ijin
gL
an
di
ng

Te
c

hn
ol
og

WLS

ie
s

3
4

5JDBC
6EJB RMI

7JSP
8JSP

9SUN JVM Bug

12.1.3

Be

1
2
3

A
B

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-4-

IT WebLogic

12.2

12.2.1
1
B

hn
ol
og

ie
s

2
A

12.2.2
1

Te
c

ijin
gL
an
di
ng

2GarbageCollectionGC

GC GC

3JVM

Be

A 1 2 B 2 1

5JDBC

JDBC

6 JVM RMI
JNDI EJB RMI

7JSP
JSP

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-5-

IT WebLogic
8JSP servlet
PageCheckSeconds JSP

9SUN JVM
SUM JVM

12.3

ie
s

JVM

hn
ol
og

12.3.1
1 PING

Te
c

java weblogic.Admin url t3://localhost:7001 username <user> -password


<pass> PING
12-1

ijin
gL
an
di
ng

WebLogic PING
PING

WebLogic PING
2

-verbose:gc WebLogic

WebLogic

12.3.2

Be

default

DomainName Servers ServerNameMonitoring


General Monitor All Active Queues weblogic.kernel.DefaultCurrent
Request

WebLogic config.xml

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-6-

IT WebLogic

12.3.3 Thread Dump

Thread Dump

12.3.3.1 Thread Dump


Thread Dump JVM
WebLogic java Thread Dump WebLogic

WebLogic

ie
s

Thread Dump
Thread Dump WebLogic

hn
ol
og

PING WebLogic
PING Thread Dump

Thread Dump 3 5-10


Thread Dump

Te
c

12.3.3.2 Thread Dump


1 Unix/Linux
kill -3

<WLS_pid> WLS_pid WLS (PID)

ijin
gL
an
di
ng

2 Windows

1)

2)

3) 2000
4)

5) Thread Dump Ctrl-Break

6) Full
dump

thread

Be

Windows/Unix/Linux Thread Dump

java weblogic.Admin -url ManagedHost:Port -username weblogic -password


weblogic THREAD_DUMP
12-2
WebLogic PING

12.3.3.3 Thread Dump

1
Sun JVM

-xx:+ShowMessageBoxOnError

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-7-

IT WebLogic
JRockit JVM -Djrockit.waitonerror
12-3
2
3 JVM
Do

you

want

to

dubug

the

problem
12-4

4 JVM Thread Dump

ie
s

WebLogic trap WebLogic


debug WebLogic

hn
ol
og

12.3.4

Te
c

WebLogic
Thread Dump

ijin
gL
an
di
ng

WebLogic

Thread Dump

JSP JSP
JSP JSP

12.4

Be

12.4.1 Socket Reader


Socket Reader

12.4.1.1 Socket Reader


Socket Reader

Socket Reader WebLogic


WebLogic 3 Socket Reader

Socket Reader

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-8-

IT WebLogic
Socket Reader Socket Reader
3 socket
ThreadPoolPercentSocketReaders Socket Reader
Socket Reader
33 33% Socket Readerr
1-99 Socket Reader
Socket Reader
WebLogic

Socket Reader Thread Dump

Thread Dump Socket Reader

hn
ol
og

12.4.1.2

ie
s

Thread Dump Socket Reader WebLogic


bug Socket Reader

Be

ijin
gL
an
di
ng

Te
c

"ExecuteThread: '2' for queue: 'weblogic.socket.Muxer'" daemon prio=10


tid=0x000 36128 nid=75 lwp_id=6888070 waiting for monitor entry
[0x1b12f000..0x1b12f530]
at weblogic.socket.PosixSocketMuxer.processSockets
(PosixSocketMuxer.java:92) - waiting to lock <0x25c01198> (a
java.lang.String)
at weblogic.socket.SocketReaderRequest.execute
(SocketReaderRequest.java:32). . .
"ExecuteThread: '1' for queue: 'weblogic.socket.Muxer'" daemon prio=10
tid=0x000 35fc8 nid=74 lwp_id=6888067 runnable [0x1b1b0000..0x1b1b0530] at
weblogic.socket.PosixSocketMuxer.poll(Native Method)
at weblogic.socket.PosixSocketMuxer.processSockets
(PosixSocketMuxer.java:99)
- locked <0x25c01198> (a java.lang.String)
at weblogic.socket.SocketReaderRequest.execute
(SocketReaderRequest.java:32)
. . .
"ExecuteThread: '0' for queue: 'weblogic.socket.Muxer'" daemon prio=10
tid=0x000 35e68 nid=73 lwp_id=6888066 waiting for monitor entry
[0x1b231000..0x1b231530]
at weblogic.socket.PosixSocketMuxer.processSockets
(PosixSocketMuxer.java:92)
- waiting to lock <0x25c01198> (a java.lang.String)
at weblogic.socket.SocketReaderRequest.execute
(SocketReaderRequest.java:32)
. . .
12-5

Thread Dump Socket Reader 1 poll


0 2 processSockets

12.4.1.3

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-9-

IT WebLogic

socketAccept
Thread Dump

12-6

hn
ol
og

ie
s

"ListenThread.Default" prio=10 tid=0x00037888 nid=93 lwp_id=6888343


runnable [0x 1a81b000..0x1a81b530]
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:353)
- locked <0x26d9d490> (a java.net.PlainSocketImpl)
at java.net.ServerSocket.implAccept(ServerSocket.java:439)
at java.net.ServerSocket.accept(ServerSocket.java:410)
at weblogic.socket.WeblogicServerSocket.accept
(WeblogicServerSocket.java:24)
at weblogic.t3.srvr.ListenThread.accept(ListenThread.java:713)
at weblogic.t3.srvr.ListenThread.run(ListenThread.java:290)

WebLogic
Thread Dump
socketAccept

Te
c

12.4.2

ijin
gL
an
di
ng

12.4.2.1
1.

Thread Dump

2.

web

3.

WebLogic Server
CRITICAL
Thread Dump

Be

12.4.2.2
1.

ThreadCount config.xml
ThreadCount

Native OutOfMemory
ThreadPoolPercentSocketReaders SocketReader
%Socket Reader

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 10 -

IT WebLogic

socket BEA Socket Reader


Java Socket Reader
NativeIOEnabled=true
JAVA Socker Reader socket
machine
Socket Reader
2.

StuckThreadMaxTime
StuckThreadTimerInterval

ie
s

StuckThreadMaxTime WebLogic
600

12.4.3

hn
ol
og

Stuck Thread Timer Interval WebLogic


WebLogic

1.

Te
c

Thread Dump
OutOfMemory

ijin
gL
an
di
ng

Too Many Open Files


JDBC

2.

Thread Dump

3.

EJB RMI
JSP

4.

Be

SUN JVM
JSP

12.5

GC
1.

Scavenge GC

Eden Scavenge GC
Eden GC Survivor
Survivor From To

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 11 -

IT WebLogic
2.

Full GC

GC JVM GC Full GC

Old

Survivor Survivor
GC Heap
System.gc()

hn
ol
og

12.5.1.2

ie
s

Perm

Scavenge GC New Full GC New


Old Scavenges
Full GC Full GC Heap EdenSurvivorOld
GC

Te
c

Full GC CPU Full GC


CPU CPU Full GC
Full GC, CPU
Full GC

ijin
gL
an
di
ng

12.5.1.3
1.

JVM :

New Scavange GC GC

SurvivorRatio Overflow
Permanent

Heap Full GC

2.

Be

Full GC

WebLogic
CPU Java WebLogic Server JDK
GC GC Full GC
Full GC

12.5.1.4
1.

JVM
( IBM )

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 12 -

IT WebLogic

-Xms

-Xmx

-Xmn

-XX:MaxPermSize = -XX:PermSize

-XX:SurvivorRatio
Parallel GC
-Xoptgc

XX:+DisableExplicitGC system.gc()

ie
s

TenuringThreshold

2.

hn
ol
og

JDK

12.6

Te
c

JVM Java JIT


CPU

ijin
gL
an
di
ng

12.7

12.7.1

Be

12.7.2

Thread Dump

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 13 -

IT WebLogic

12.7.3
Thread Dump
Thread Dump

12-7

hn
ol
og

ie
s

"[ACTIVE] ExecuteThread: '153' for queue: 'weblogic.kernel.Default (selftuning)'" daemon prio=1 tid=0x00002aab370ea700 nid=0x3eec waiting for monitor
entry [0x0000000045378000..0x000000004537bea0]
at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass
(ChangeAwareClassLoader.java:35)
- waiting to lock <0x00002aaabc69ddb0> (a
weblogic.utils.classloaders.ChangeAwareClassLoader)

Be

ijin
gL
an
di
ng

Te
c

"[ACTIVE] ExecuteThread: '120' for queue: 'weblogic.kernel.Default (selftuning)'" daemon prio=1 tid=0x00002aab439c2f10 nid=0x2dee runnable
[0x00000000451f0000..0x00000000451f5e20]
at java.lang.Throwable.fillInStackTrace(Native Method)
- waiting to lock <0x00002aaab0873340> (a java.lang.ClassNotFoundException)
at java.lang.Throwable.<init>(Throwable.java:218)
at java.lang.Exception.<init>(Exception.java:59)
at java.lang.ClassNotFoundException.<init>
(ClassNotFoundException.java:65)
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
- locked <0x00002aaabadfc938> (a java.net.URLClassLoader)
at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
- locked <0x00002aaabbf1cd20> (a
weblogic.utils.classloaders.GenericClassLoader)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at weblogic.utils.classloaders.GenericClassLoader.loadClass
(GenericClassLoader.java:161)
at weblogic.utils.classloaders.FilteringClassLoader.findClass
(FilteringClassLoader.java:83)
at weblogic.utils.classloaders.FilteringClassLoader.loadClass
(FilteringClassLoader.java:68)
at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
- locked <0x00002aaabd5b2228> (a
weblogic.utils.classloaders.GenericClassLoader)
at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
- locked <0x00002aaabc69ddb0> (a
weblogic.utils.classloaders.ChangeAwareClassLoader)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at weblogic.utils.classloaders.GenericClassLoader.loadClass
(GenericClassLoader.java:161)
at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass
(ChangeAwareClassLoader.java:35)

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 14 -

IT WebLogic
- locked <0x00002aaabc69ddb0> (a
weblogic.utils.classloaders.ChangeAwareClassLoader)
12-8
ExecuteThread: 153

12.7.4

ie
s

hn
ol
og

Java
C Java Java

Be

ijin
gL
an
di
ng

Te
c

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 15 -

hn
ol
og

ie
s

IT

ijin
gL
an
di
ng

Te
c

WebLogic

Be

12.8

JDBC

JDBC Thread
Dump JDBC JDBC
JDBC

12.8.1 JDBC

ie
s

hn
ol
og

WebLogic Server JDBC


WebLogic Server SQL
JVM CPU JDBC
SQL

ijin
gL
an
di
ng

Te
c

TimedOutException
RollbackException JDBC WebLogic Server

WebLogic Server
600

####<Nov 6, 2010 1:42:30 PM EST> <Warning> <WebLogicServer> <mydomain>


<myserver> <CoreHealthMonitor> <kernel identity> <>
<000337> <ExecuteThread: '64' for queue: 'default' has been busy for "740"
seconds working on the request "Scheduled Trigger",
which is more than the configured time (StuckThreadMaxTime) of "600" seconds.>

Be

12-9

WebLogic Server

####<Nov 7, 2010 4:17:34 PM EST> <Info> <WebLogicServer><mydomain> <myserver>


<ExecuteThread: '66' for queue: 'default'>
<kernel identity> <> <000339> <ExecuteThread: '66' for queue: 'default' has
become "unstuck".>
12-10

12.8.2 JDBC

JDBC DriverManager.getConnection()

SQL

JDBC

JDBC

RefreshMinutes

WebLogic Server

2.

ie
s

JDBC WebLogic Server

TestFrequencySeconds

hn
ol
og

1.

JDBC

DriverManager.getConnection()

ijin
gL
an
di
ng

Te
c

JDBC DriverManager.getConnection()

DriverManager
DriverManager WebLogic Server
DriverManager
SQLException DriverManager
DriverManager.println()
DriverManager
DriverManager.getConnection()
WebLogic
Server
DriverManager.getConnection()

Be

JDBC JDBC WebLogic Server JDBC

DriverManager

DriverManager.getConnection()
"ExecuteThread-39" daemon prio=5 tid=0x401660 nid=0x33 waiting for monitor
entry [0xd247f000..0xd247fc68]
at java.sql.DriverManager.getConnection(DriverManager.java:188)
at com.bla.updateDataInDatabase(MyClass.java:296)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet
(ServletStubImpl.java:120)

ie
s

at weblogic.servlet.internal.ServletContextImpl.invokeServlet
(ServletContextImpl.java:945)
at weblogic.servlet.internal.ServletContextImpl.invokeServlet
(ServletContextImpl.java:909)
at weblogic.servlet.internal.ServletContextManager.invokeServlet
(ServletContextManager.java:269)
at weblogic.socket.MuxableSocketHTTP.invokeServlet
(MuxableSocketHTTP.java:392)
at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:274)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:130)
12-11
SQL

hn
ol
og

3.

Te
c

SQL
WebLogic Server
JDBC

JTS

ijin
gL
an
di
ng

SQL Thread Dump

4.

WebLogic Server

WebLogic Server 5 10 Thread Dump


SQL

SQL

Be

"ExecuteThread: '4' for queue: 'weblogic.kernel.Default'" daemon prio=5


tid=0x8e93c8 nid=0x19 runnable [e137f000..e13819bc]
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at oracle.net.ns.Packet.receive(Unknown Source)
at oracle.net.ns.DataPacket.receive(Unknown Source)
at oracle.net.ns.NetInputStream.getNextPacket(Unknown Source)
at oracle.net.ns.NetInputStream.read(Unknown Source)
at oracle.net.ns.NetInputStream.read(Unknown Source)
at oracle.net.ns.NetInputStream.read(Unknown Source)
at oracle.jdbc.ttc7.MAREngine.unmarshalUB1(MAREngine.java:931)
at oracle.jdbc.ttc7.MAREngine.unmarshalSB1(MAREngine.java:893)

Be

ijin
gL
an
di
ng

Te
c

hn
ol
og

ie
s

at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:375)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1983)
at oracle.jdbc.ttc7.TTC7Protocol.fetch(TTC7Protocol.java:1250)
- locked <e8c68f00> (a oracle.jdbc.ttc7.TTC7Protocol)
at oracle.jdbc.driver.OracleStatement.doExecuteQuery
(OracleStatement.java:2529)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout
(OracleStatement.java:2857)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate
(OraclePreparedStatement.java:608)
- locked <e5cc44d0> (a oracle.jdbc.driver.OraclePreparedStatement)
- locked <e8c544c8> (a oracle.jdbc.driver.OracleConnection)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery
(OraclePreparedStatement.java:536)
- locked <e5cc44d0> (a oracle.jdbc.driver.OraclePreparedStatement)
- locked <e8c544c8> (a oracle.jdbc.driver.OracleConnection)
at weblogic.jdbc.wrapper.PreparedStatement.executeQuery
(PreparedStatement.java:80)
at myPackage.query.getAnalysis(MyClass.java:94)
at jsp_servlet._jsp._jspService(__jspService.java:242)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
(ServletStubImpl.java:971)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet
(ServletStubImpl.java:402)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet
(ServletStubImpl.java:305)
at weblogic.servlet.internal.RequestDispatcherImpl.includ
e(RequestDispatcherImpl.java:607)
at weblogic.servlet.internal.RequestDispatcherImpl.include
(RequestDispatcherImpl.java:400)
at weblogic.servlet.jsp.PageContextImpl.include(PageContextImpl.java:154)
at jsp_servlet._jsp.__mf1924jq._jspService(__mf1924jq.java:563)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
(ServletStubImpl.java:971)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet
(ServletStubImpl.java:402)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet
(ServletStubImpl.java:305)
at weblogic.servlet.internal.WebAppServletContext$
ServletInvocationAction.run
(WebAppServletContext.java:6350)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs

(AuthenticatedSubject.java:317)
at weblogic.security.service.SecurityManager.runAs
(SecurityManager.java:118)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet
(WebAppServletContext.java:3635)
at weblogic.servlet.internal.ServletRequestImpl.execute
(ServletRequestImpl.java:2585)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)

ie
s

12-12

5.

hn
ol
og

Thread Dump
SQL Thread Dump
SQL

Te
c

WebLogic Server
SQL

ijin
gL
an
di
ng

WebLogic Server Thread Dump SQL


SQL SQL

6.

Thread Dump

WebLogic Server
SQL
SQL

Be

java.sql.SQLException: ORA-00060: deadlock detected while waiting for resource


at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:170)
at oracle.jdbc.oci8.OCIDBAccess.check_error(OCIDBAccess.java:1614)
at oracle.jdbc.oci8.OCIDBAccess.executeFetch(OCIDBAccess.java:1225)
at oracle.jdbc.oci8.OCIDBAccess.parseExecuteFetch(OCIDBAccess.java:1338)
at oracle.jdbc.driver.OracleStatement.executeNonQuery
(OracleStatement.java:1722)
at oracle.jdbc.driver.OracleStatement.doExecuteOther
(OracleStatement.java:1647)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout
(OracleStatement.java:2167)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate
(OraclePreparedStatement.java:404)

12-13

7.

RefreshMinutes TestFrequencySeconds

8.

ie
s

SQL
JDBC RefreshMinutes TestFrequencySeconds
JDBC WebLogic Server

(Shrink)

hn
ol
og

WebLogic Server

Te
c

JDBC JDBC

12.8.3 JDBC

ijin
gL
an
di
ng

Thread Dump
Thread
Dump JVM (<1.3.1_09) Thread
Dump WebLogic Server Thread Dump

Thread Dump5 10 Thread Dump

Be

Thread Dump
DriverManager getConnection()
Driver.connect()
DriverManager.getConnection()

12.9

EJB RMI

RMI

12.9.1 EJB RMI


EJB RMI EJB RMI

RMI JNDI

WebLogic JNDI
wait()

Thread Dump :
Thread Dump

12-14

hn
ol
og

Thread Dump

ie
s

. . .
at weblogic.rjvm.ResponseImpl.waitForData(ResponseImpl.java:72)
. . .

12.9.2

EJB RMI
EJB RM

Te
c

Thread Dump

ijin
gL
an
di
ng

12.9.3 EJB RMI

EJB RMI Thread Dump


EJB RMI Thread Dump
JNDI

Thread Dump

Be

at weblogic.rjvm.ResponseImpl.waitForData(ResponseImpl.java:72)
. . .
weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:341
. . .
at weblogic.rmi.internal.BasicOutboundRequest.sendReceive
(BasicOutboundRequest.java:80
12-15

EJB RMI Thread Dump


"ExecuteThread: '52' for queue: 'default'" daemon prio=5 tid=0x4b3e40b0
nid=0x1170 waiting on monitor [0x4c74f000..0x4c74fdbc]

ijin
gL
an
di
ng

Te
c

hn
ol
og

ie
s

at java.lang.Object.wait(Native Method)
at weblogic.rjvm.ResponseImpl.waitForData(ResponseImpl.java:72)
at weblogic.rjvm.ResponseImpl.getTxContext(ResponseImpl.java:97)
at weblogic.rmi.internal.BasicOutboundRequest.sendReceive
(BasicOutboundRequest.java:80)
at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke
(ReplicaAwareRemoteRef.java:262)
at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke
(ReplicaAwareRemoteRef.java:229)
at weblogic.rmi.internal.ProxyStub.invoke(ProxyStub.java:35)
at $Proxy6.lookup(Unknown Source)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:341)
at weblogic.servlet.internal.HttpServer.lookupROIDS(HttpServer.java:789)
at weblogic.servlet.security.internal.SecurityModule.getCurrentUser
(SecurityModule. java:207)
at weblogic.servlet.security.internal.SecurityModule.checkAuthenticate
(SecurityModule. java:235)
at weblogic.servlet.security.ServletAuthentication.weak
(ServletAuthentication.java:271
at
weblogic.servlet.security.internal.ServletSecurityManager.checkAccess
(ServletSecurityManager.java:124)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet
(WebAppServletContext. java:2518)
at weblogic.servlet.internal.ServletRequestImpl.execute
(ServletRequestImpl.java:2260)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
12-16

EJB RMI

JVM

JNDI RMI

JNDI JVM

Be

weblogic.rjvm.ResponseImpl.waitForData() JVM

JVM
waitForData
JNDI JNDI JVM JNDI
InitialContext InitialContext

JNDI InitialContext
URL InitialContext
getInitialContext()
WebLogic
provider URL rjvm sendReceive()
JVM

ie
s

Thread Dump RMI


RMI weblogic.jndi.internal.WLContextImpl.lookup()
JNDI

hn
ol
og

BasicOutboundRequest.sendReceive() waitForData()

12.9.4 EJB RMI


EJB RMI

EJB JVM JNDI

JNDI

ijin
gL
an
di
ng

Te
c

EJB RMI

PROVIDER_URL

JNDI

Be

1 JNDI
JNDI

2 getInitialContext()
PROVIDER_URL JNDI
3

JSP

ie
s

12.10

12.10.1

JSP

hn
ol
og

J2EE
JSP

JSP WebLogic JSP

JSP

Te
c

12.10.2

ijin
gL
an
di
ng

JSP Thread Dump


JSP Thread Dump

Be

"ExecuteThread: '112' for queue: 'weblogic.kernel.Default'" (TID:0x700629D8,


sys_thread_t:0x3E968EA8, s
tate:R, native ID:0xB9BA) prio=5
at java.util.zip.ZipFile.getEntry(Native Method)
at java.util.zip.ZipFile.getEntry(ZipFile.java(Compiled Code))
at weblogic.servlet.internal.WarClassFinder.getSource
(WarClassFinder.java(Compiled Code))
at weblogic.servlet.internal.WarClassFinder.getSource
(WarClassFinder.java(Compiled Code))
at weblogic.utils.classloaders.MultiClassFinder.getSource
(MultiClassFinder.java(Compiled Code))
at weblogic.utils.classloaders.MultiClassFinder.getSource
(MultiClassFinder.java(Compiled Code))
at weblogic.utils.classloaders.MultiClassFinder.getSource
(MultiClassFinder.java(Compiled Code))
at weblogic.utils.classloaders.MultiClassFinder.getSource
(MultiClassFinder.java(Compiled Code))
at weblogic.utils.classloaders.CodeGenClassFinder.getSource
(CodeGenClassFinder.java(Compiled Code))
at weblogic.utils.classloaders.MultiClassFinder.getClassSource
(MultiClassFinder.java(Compiled Code))

ijin
gL
an
di
ng

Te
c

hn
ol
og

ie
s

at weblogic.utils.classloaders.CodeGenClassFinder.getClassSource
(CodeGenClassFinder.java(Compiled Code))
at weblogic.utils.classloaders.ChangeAwareClassLoader.upToDate
(ChangeAwareClassLoader.java(Compiled Code))
at weblogic.servlet.internal.ServletStubImpl.needToReload
(ServletStubImpl.java(Compiled Code))
at weblogic.servlet.internal.ServletStubImpl.checkForReload
(ServletStubImpl.java(Compiled Code))
at weblogic.servlet.internal.ServletStubImpl.getServlet
(ServletStubImpl.java(Compiled Code))
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Servle
tStubImpl.java(Compiled Code))
at weblogic.servlet.internal.ServletStubImpl.invokeServlet
(ServletStubImpl.java(Compiled Code))
at weblogic.servlet.internal.WebAppServletContext$ServletInvocation
Action.run(WebAppServletContext.java(Compiled Code))
at weblogic.security.acl.internal.AuthenticatedSubject.doAs
(AuthenticatedSubject.java(Compiled Code))
at weblogic.security.service.SecurityManager.runAs
(SecurityManager.java(Compiled Code))
at weblogic.servlet.internal.WebAppServletContext.invokeServlet
(WebAppServletContext.java(Compiled Code))
at weblogic.servlet.internal.ServletRequestImpl.execute
(ServletRequestImpl.java(Compiled Code))
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java(Compiled Code))
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java(Compiled Code))
12-17

12.10.3

Be

1.

JSP

JSP

2.

weblogic.xml ,:
<weblogic-web-app>
<jsp-descriptor>
<jsp-param>
<param-name>keepgenerated</param-name>
<param-value>true</param-value>
</jsp-param>

ie
s

<jsp-param>
<param-name>pageCheckSeconds</param-name>
<param-value>-1</param-value>
</jsp-param>
</jsp-descriptor>
<container-descriptor>
<servlet-reload-check-secs>-1</servlet-reload-check-secs>
</container-descriptor>
<context-root>webpay</context-root>
</weblogic-web-app>
12-18

hn
ol
og

pageCheckSecond 1 1 JSP
JSP -1
-1 WEB
pageCheckSecond 1 1 JSP JSP

12.11

ijin
gL
an
di
ng

Te
c

-1 -1
Web


Thread Dump

Be

Socket Reader
GC
Thread Dump

4
5

Thread Dump /

Be

ijin
gL
an
di
ng

Te
c

hn
ol
og

ie
s

hn
ol
og

ie
s

IT

Be

ijin
gL
an
di
ng

Te
c

WebLogic

IT WebLogic

........................................................................................................................... 2
...........................................................................................................................

Be

ijin
gL
an
di
ng

Te
c

hn
ol
og

ie
s

...................................................................................................
3
13
CPU ...................................................................................................
...................................................................................................3
13.1
CPU ........................................................................................................3
13.1.1
CPU ............................................................................... 3
13.1.2
CPU ...................................................................................3
13.2
CPU ........................................................................................................3
13.2.1
........................................................................................................................ 3
13.2.2
Solaris ........................................................................................................ 3
13.2.3
HP-UX ....................................................................................................... 6
13.2.4
Linux .......................................................................................................... 7
13.2.5
AIX ............................................................................................................ 8
13.2.6
Windows .................................................................................................. 10
13.3
CPU ..................................................................11

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-2-

IT WebLogic

13 CPU

CPU CPU

13.1

CPU

13.1.1 CPU

ie
s

ID(process ID, PID)

hn
ol
og

CPU
PID ID(light-weight process id,LWPID)
ID

Te
c

CPU CPU CPU


CPU

13.1.2 CPU

ijin
gL
an
di
ng

CPU
CPU
CPU

Weblogic

13.2

CPU

CPU

Be

13.2.1

WebLogic CPU
Thread Dump Thread Dump (
)

Thread Dump CPU

13.2.2 Solaris
CPU
1) (LWPID) CPU prstat -L -p <WLSpid>
11

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-3-

IT WebLogic
2) LWPID PID pstack <WLSpid>
3) Thread Dumpkill -3 <WLSpid>

1) prstat LWPID
2) pstack LWPID
3)
4) Thread Dump nid=<hexNum>

ie
s

5) CPU

NICE TIME
0 0:00.22
0 0:00.10
0 0:00.11
0 0:00.03
0 0:01.01
0 0:00.00
0 0:00.00
0 0:00.00
0 0:00.00
0 0:00.07
0 0:00.00
0 0:00.00
0 0:00.11
0 0:00.00

CPU PROCESS/LWPID
0.6% java/8
0.2% java/10
0.1% java/9
0.0% java/5
0.0% java/1
0.0% java/12
0.0% java/11
0.0% java/14
0.0% java/13
0.0% java/7
0.0% java/6
0.0% java/4
0.0% java/3
0.0% java/2

ijin
gL
an
di
ng

Te
c

$ prstat -L -p 9499 1 1
PID USERNAME
SIZE RSS STATE PRI
9499 landingbj 153M 100M sleep 58
9499 landingbj 153M 100M sleep 58
9499 landingbj 153M 100M sleep 58
9499 landingbj 153M 100M sleep 58
9499 landingbj 153M 100M sleep 58
9499 landingbj 153M 100M sleep 58
9499 landingbj 153M 100M sleep 58
9499 landingbj 153M 100M sleep 58
9499 landingbj 153M 100M sleep 58
9499 landingbj 153M 100M sleep 59
9499 landingbj 153M 100M sleep 59
9499 landingbj 153M 100M sleep 59
9499 landingbj 153M 100M sleep 58
9499 landingbj 153M 100M sleep 58

hn
ol
og

Solaris prstat

13-1

LWPID 8 CPU
Solaris pstack

Be

----------------- lwp# 8 / thread# 76 -------------------ff29d190 poll (e2e81548, 0, bb8)


ff24d154 select (0, 0, 0, e2e81548, ff2bf1b4, e2e81548) + 348
ff36b134 select (0, bb8, 7fffffff, fe4c8000, 0, bb8) + 34
fe0f62e4 __1cCosFsleep6FpnGThread_xl_i_ (0, bb8, fe4c8000, 1, 0,
1e2fd8) + 234
fe23f050 JVM_Sleep (2, 0, bb8, fe4de978, fe4c8000, 1e2fd8) + 22c
0008f7ac ???????? (e2e818d4, bb8, 1e2fd8, 984a4, 0, 109a0)
0008c914 ???????? (e2e8194c, 1, fe4d6a80, 98564, 8, e2e81868)
fe5324e8 __1cMStubRoutinesG_code1_ (e2e819d8, e2e81c10, a, f6cb5000, 4,
e2e818f0) + 3ec
fe0cbe94 __1cJJavaCallsLcall_helper6FpnJJavaValue_pnMmethodHandle_
pnRJavaCallArguments_pnGThread__v_ (e2e81c08,fe4c8000, e2e81b54, 1e2fd8,
8e764, e2e81c10) +308
fe1f6dbc __1cJJavaCallsMcall_virtual6FpnJJavaValue_nLKlassHandle_

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-4-

IT WebLogic
nMsymbolHandlee81c08, e2e81b54) + 150pnGThread__v_(f6cb64b8, e2e81b40,
e2e81b44, fe4c8000, e2d8) + 60e_5pnGThread__v_ (e2e81c08, e2e81c04,
e2e81c00,e2e81bf4, e2e81bec, 1e2f8000, e2e81d10, 1e, e) +
120FpnKJavaThread_pnGThread__v_ (f6817ff8, 1e2fd8, fe4c 7fd70) +
3d8cKJavaThreadDrun6M_v_ (e2e02000, fe4d3e34, fe4c8000, 7fd70,1e2fd8,
fe213ec8 _start (fe4c8000, fe625d10, 0, 5, 1, fe401000) + 20
ff36b728 _thread_start (1e2fd8, 0, 0, 0, 0, 0) + 40
13-2

ie
s

pstack Light Weight Process ID(LWPID)


PID(Process ID)

hn
ol
og

pstack 9499 pstack


lwp#8thread#76
Solaris Thread Dump

Te
c

$ kill -3 p 9499
. . .
"Thread-6" prio=5 tid=0x1e2fd8 nid=0x4c waiting on monitor
[0xe2e81000..0xe2e819d8]
at java.lang.Thread.sleep(Native Method)
at weblogic.management.deploy.GenericAppPoller.run
(GenericAppPoller.java:139)
. . .

ijin
gL
an
di
ng

13-3

lwp#8 thread#76 76 16
0x4c
kill -3 <WLSpid> Thread Dump Thread Dump
nid=0x4c
CPU sleeping Thread Dump

Be

for loopnum in 1 2 3
do
prstat -L -p $1 1 1 >> dump_high_cpu.txt
pstack $1 >> dump_high_cpu.txt
kill -3 $1
echo "prstat, pstack, and thread dump done. #" $loopnum
sleep 1
echo "Done sleeping."
done
13-4

WebLogic PID prstat


pstack dump_high_cpu.txtThread Dump stdout

Thread Dump
CPU

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-5-

IT WebLogic

13.2.3 HP-UX
BEA hp_prstat
CPU
1) CPU (LWPID)hp_prstat <WLSpid>
2) Thread Dumpkill -3 <WLSpid>

ie
s

1) LWPID
2) Thread Dump lwp_id=<LWPID> LWPID

HP-UX hp_pstat

154 1
154 1
154 1

0
0
0

7
7
7

ijin
gL
an
di
ng

. . .
$ hp_prstat
lwpid pid
285365 4426
. . .
285415 4426
285416 4426
285417 4426

4426
pri status UsrTime SysTime
154 1
29
3

Te
c

$ hp_prstat
lwpid pid
285365 4426
. . .
285415 4426
285416 4426
285417 4426

hn
ol
og

3) CPU

4426
pri status UsrTime SysTime
154 1
29
3
154 1
154 1
154 1

0
13
0

7
7
7

13-5

UsrTime LWPID

Be

HP-UX Thread Dump

$ kill -3 4426
"Thread-6" prio=8 tid=0x0004f620 nid=75 lwp_id=285475 waiting on monitor
[0x66d5e000..0x66d5e500]
at java.lang.Thread.sleep(Native Method)
at weblogic.management.deploy.GenericAppPoller.run
(GenericAppPoller.java:139)
"ExecuteThread: '11' for queue: 'default'" daemon prio=10 tid=0x0004ad00
nid=23 lwp_id=285416 runnable [0x67874000..0x67874500]
at java.net.SocketOutputStream.socketWrite(Native Method)
at java.net.SocketOutputStream.write(Unknown Source)
. . .
at examples.servlets.HelloWorldServlet.service

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-6-

IT WebLogic
(HelloWorldServlet.java:28)
at javax.servlet.http.HttpServlet.service
(HttpServlet.java:853)
. . .
13-6
LWPID CPU

13.2.4 Linux
Linux

1) top CPU

hn
ol
og

2) Thread Dump: kill 3 <WLSpid>

ie
s

CPU

1) top userID
2) CPU PID

Te
c

3) PID

4) Thread Dump PID

5) CPU

ijin
gL
an
di
ng

Linux top
PID USER
...
22962 landingbj
...

PRI NI SIZE
9

RSS SHARE STAT

86616 84M 26780 S

%CPU %MEM TIME COMMAND


0.0

4.2

0:00 java

13-7

Linux Unix
top
Thread dump

Be

. . .
"ExecuteThread: '0' for queue: 'default'" daemon prio=1 tid=0x83da550
nid=0x59b2 waiting on monitor [0x56138000..0x56138870]
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:415)
at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
. . .
13-8

PID 22962 0X59B2 thread dump


nid=0X59B2 0X59B2 0 CPU
0%

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-7-

IT WebLogic
for loopnum in 1 2 3
do
top -b -n1 >> dump_high_cpu.txt
kill -3 $1
echo "cpu snapshot and thread dump done. #" $loopnum
sleep 1
echo "Done sleeping."
done
13-9

ie
s

WLS PID top


dump_high_cpu.txt Thread Dump stdout

hn
ol
og

13.2.5 AIX

CPU

1) CPU ID(thread ID, TID)ps -mp <WLSpid> -o THREAD


CPU
2) Thread Dumpkill -3 <WLSpid>

Te
c

1) dbxdbx -a <WLSpid>

ijin
gL
an
di
ng

2) dbx thread
3) TID $t<num>
4) dbx th info <num>
5) general pthread_t
6) detach()

7) Thread Dump native ID:<hexNum>


phtread_t
8) CPU

AIX ps

Be

$ ps -mp 250076 -o THREAD


USER
PID
PPID TID ST CP PRI SC WCHAN F
TT
BND COMMAND
landingbj 250076 217266 - A 38 60 72 *
242011 pts/0 /wwsl/sharedInstalls/aix/jdk130/...
- - 315593 Z 0 97 1 - c00007 - - - - 344305 S 0 60 1 f1000089c020e200 400400 - - - - 499769 S 0 60 1 f1000089c0213a00 400400 - - . . .
- - 655429 S 0 60 1 f10000879000a040 8410400 - - - - 659527 S 0 60 1 f10000879000a140 8410400 - - - - 663625 S 0 60 1 f10000879000a240 8410400 - - - - 667723 S 37 78 1 f1000089c020f150 400400 - - - - 671821 S 0 60 1 f10000879000a440 8410400 - - - - 675919 S 0 60 1 - 418400 - - -

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-8-

IT WebLogic
. . .
13-10
ps mp <WLSpid> -o THREAD TID667723
CP 37 0
AIX dbx thread

13-11

hn
ol
og

ie
s

$dbx -a 250076
(dbx) thread
thread state-k wchan state-u k-tid mode held scope function
. . .
$t15 wait 0xf10000879000a140 blocked 659527 k no sys _event_sleep
$t16 wait 0xf10000879000a240 blocked 663625 k no sys _event_sleep
$t17 run running 667723 k no sys JVM_Send
$t18 wait 0xf10000879000a440 blocked 671821 k no sys _event_sleep
$t19 wait running 675919 k no sys poll
$t20 wait 0xf10000879000a640 blocked 680017 k no sys _event_sleep
. . .

AIX dbx th info

Te
c

dbx a 250076 dbx


thread

Be

ijin
gL
an
di
ng

(dbx) th info 17
thread state-k wchan state-u k-tid mode held scope function
$t17 run running 667723 k no sys JVM_Send
general:
pthread addr = 0x3ea55c68 size = 0x244
vp addr = 0x3e69e5e0 size = 0x2a8
thread errno = 2
start pc = 0x300408b0
joinable = no
pthread_t = 1011
scheduler:
kernel =
user = 1 (other)
event :
event = 0x0 cancel = enabled, deferred, not pending
stack storage:
. . .
(dbx)detach
13-12
th info 17
AIX Thread Dump

"ExecuteThread: '11' for queue: 'default'" (TID:0x31cf86d8,


sys_thread_t:0x3e5ea108, state:R, native ID:0x1011) prio=5
at java.net.SocketOutputStream.socketWrite(Native Method)

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-9-

IT WebLogic

hn
ol
og

13-13

ie
s

. . .
at java.io.PrintWriter.println(PrintWriter.java(Compiled Code))
at examples.servlets.HelloWorldServlet.service(HelloWorld
Servlet.java(Compiled Code))
at javax.servlet.http.HttpServlet.service
(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$Servlet
InvocationAction.run(ServletStubImpl.java:1058)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet
(ServletStubImpl.java:401)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet
(ServletStubImpl.java:306)
. . .

pthread_t thread dump


pthread_t native ID, thread dump

13.2.6 Windows

Te
c

CPU pslist
Process Explorer
CPU

ijin
gL
an
di
ng

1) CPU (LWPID)pslist -d <WLSpid>


Process Explorer
: http://www.sysinternals.com/ntw2k/freeware/pslist.shtml
http://www.sysinternals.com/ntw2k/freeware/procexp.shtml

2) Thread DumpCtrl+Break

1)
2) <hexNum>
3) Thread Dump nid=<hexNum>
4) CPU

Be

pslist :

$ pslist -d 1720
java 1720:
Tid Pri Cswtch State
1520 8
9705
Wait:UserReq
1968 8
6527
Wait:UserReq
1748 15 157
Wait:UserReq
. . .
588 10
59123 Wait:UserReq
1784 8
150
Wait:UserReq
1756 8
251
Wait:UserReq
1716 8
6
Wait:Queue

:http://www.landingbj.com
: 400-810-2327

User Time
0:00:23.734
0:00:06.309
0:00:00.010

Kernel Time
0:00:01.772
0:00:00.070
0:00:00.010

Elapsed Time
0:08:14.511
0:08:14.120
0:08:14.110

0:00:48.830
0:00:00.090
0:00:00.941
0:00:00.000

0:00:02.633
0:00:00.000
0:00:00.000
0:00:00.000

0:08:01.211
0:08:01.201
0:08:01.201
0:08:01.191

: service@landingbj.com
: 010-82730518

- 10 -

IT WebLogic
1800 8
. . .

1457

Wait:Queue

0:00:00.761 0:00:00.210 0:08:01.191

13-14
WebLogic pslist d 1720
User Time/Kernel Time ID
588 588 0X24C thread dump
nid=0x24c
Windows Thread Dump

Te
c

hn
ol
og

ie
s

"ExecuteThread: '10' for queue: 'default'" daemon prio=5 tid=0x20d75808


nid=0x24c runnable [219ff000..219ffd90]
at java.net.SocketOutputStream.socketWrite0(Native Method)
. . .
at java.io.PrintWriter.println(PrintWriter.java:515)
- locked <0x11d0d1c0>
(a weblogic.servlet.internal.ChunkWriter)
at examples.servlets.HelloWorld2.service(HelloWorld2.
java:94)
at javax.servlet.http.HttpServlet.service
(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
(ServletStubImpl.java:1058)
. . .

ijin
gL
an
di
ng

13-15

13.3

CPU

CPU
Thread Dump

2 Thread Dump CPU

Be

3 Thread Dump CPU


4

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 11 -

hn
ol
og

ie
s

IT

Be

ijin
gL
an
di
ng

Te
c

WebLogic

IT WebLogic

........................................................................................................................... 2
...........................................................................................................................

Be

ijin
gL
an
di
ng

Te
c

hn
ol
og

ie
s

3
.............................................................................................................
.............................................................................................................3
.............................................................................................................
14
14.1
WebLogic ........................................................................................................... 3
14.2
......................................................................................................... 3
14.2.1 ................................................................................................................ 3
14.2.2
........................................................................................................ 4
14.3
..................................................................................... 4
14.3.1
........................................................................................................ 4
14.3.2
JVM ................................................................................4
14.3.3
.........................................................................5
14.4
................................................................................................................. 6

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-2-

IT WebLogic

14
Thread
Dump

WebLogic

hn
ol
og

ie
s

14.1

Te
c

14-1 WebLogic
WebLogic

15

ijin
gL
an
di
ng

SocketReader socket
33%( NativeIO )

SocketReader

WebLogic WLS Thread Dump

14.2

Be

14.2.1

1
2
3 Thread Dump
4
5
6
7

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-3-

IT WebLogic

monitor
notify() notify()

14.2.2
Thread Dump 13
11 Thread Dump

hn
ol
og

ie
s

"ExecuteThread: '14' for queue: 'default'" daemon prio=5 tid=0x7bc140


nid=0x13c runnable [0x157ef000..0x157efdc0]
at weblogic.socket.NTSocketMuxer.getNextSocket(Native Method)
at weblogic.socket.NTSocketMuxer.processSockets(NTSocketMuxer.java:589)
at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java: 24)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)

ijin
gL
an
di
ng

Te
c

"ExecuteThread: '12' for queue: 'default'" daemon prio=5 tid=0x7bb8e0


nid=0xc5 r unnable [0x1576f000..0x1576fdc0]
at weblogic.socket.NTSocketMuxer.getNextSocket(Native Method)
at weblogic.socket.NTSocketMuxer.processSockets(NTSocketMuxer.java:589)
at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java: 24)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
"ExecuteThread: '10' for queue: 'default'" daemon prio=5 tid=0x7b90c0
nid=0x1a2 runnable [0x156ef000..0x156efdc0]
at weblogic.socket.NTSocketMuxer.getNextSocket(Native Method)
at weblogic.socket.NTSocketMuxer.processSockets(NTSocketMuxer.java:589)
at . . .
14-1

Thread Dump 101214


11 13 11 13

Be

14.3

14.3.1

1
2
3

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-4-

IT WebLogic

14.3.2 JVM
JVM
1 OutOfMemoryException

2
JVM

3 128MB

14-2

hn
ol
og

-XX:MaxPermSize=128m

ie
s

MaxPermSize
MaxPermSize OutOfMemoryException
JVM

Te
c

commEnv

ijin
gL
an
di
ng

..\bea\weblogic\common\bin commEnv.cmd
bea sun jdk jdk sun JDK

:sun
if "%PRODUCTION_MODE%" == "true" goto sun_prod_mode
set JAVA_VM=-client
set MEM_ARGS=-Xms32m -Xmx200m -XX:MaxPermSize=128m -XX:+UseSpinning
set JAVA_OPTIONS=%JAVA_OPTIONS% -Xverify:none
goto continue
:sun_prod_mode
set JAVA_VM=-server
set MEM_ARGS=-Xms32m -Xmx200m -XX:MaxPermSize=128m -XX:+UseSpinning
goto continue

Be

setDomainEnv.cmd

14-3

..\bea\user_projects\domains\landingbj()\bin
setDomainEnv.cmd
if "%JAVA_VENDOR%"=="Sun" (
set MEM_ARGS=%MEM_ARGS% %MEM_DEV_ARGS% -XX:MaxPermSize=128m
)
14-4

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-5-

IT WebLogic

14.3.3

1
2
3
4

hn
ol
og

14.4

ie
s

1 Thread Dump

2 JVM

3/

Te
c

Be

ijin
gL
an
di
ng

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-6-

hn
ol
og

ie
s

IT

Be

ijin
gL
an
di
ng

Te
c

WebLogic

IT WebLogic

........................................................................................................................... 2
...........................................................................................................................

Be

ijin
gL
an
di
ng

Te
c

hn
ol
og

ie
s

.................................................................................................... 3
15
core dump ....................................................................................................
15.1
..................................................................................... 3
15.2
......................................................................... 3
15.3
................................................................................................. 3
15.3.1
........................................................................................................................ 3
15.3.2
Solaris ........................................................................................................... 4
15.3.3
Linux ............................................................................................................. 5
15.3.4
HP-UX .......................................................................................................... 8
15.3.5
AIX ............................................................................................................... 9
15.3.6
WINDOWS .................................................................................................10
15.3.7
.......................................................................................... 10
15.4
....................................................................................... 11
15.4.1
.......................................................................................... 11
15.4.2
Thread Dump............................................................... 12
15.5
............................................................................................................... 12

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-2-

IT WebLogic

15 core dump
WebLogic JVM
WebLogic
JVM
Java core

15.1

ie
s

Java (Java Virtual Machine, JVM)


core

hn
ol
og

Unix
Windows C:\Documents and
Settings\AllUsers\Documents\DrWatson

15.2

Te
c

Java
core dump

ijin
gL
an
di
ng

JVM

C C++ JVM

HotSpot

1
2 core dump
3

Be

WebLogic Server
2 JDBC

Java (Java Native Interface, JNI)

JVM

15.3

core

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-3-

IT WebLogic

15.3.1
1 JVM

file

strings core
2

ie
s

JDBC
JNI

hn
ol
og


4 Thread Dump

Te
c

15.3.2 Solaris

5 JVM
$ file <fullpath>/core

ijin
gL
an
di
ng

15-1
6 Java (Java Development Kit, JDK)

$ java -version

JDK
15-2

dbx

GNU gdb
8

Be

9 dbx

$ ls /opt/bin/dbx which dbx


DBX
$ export DEBUG_PROG=/opt/bin/dbx DBX
15-3
dbx
$ dbx <path to java command>/java corefile
15-4
dbx
(dbx) where
(dbx) threads

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-4-

IT WebLogic
(dbx) quit

dbx
15-5

15.3.3 Linux
10 JVM
$ file <fullpath>/core
15-6
11 JDK
JDK
15-7

hn
ol
og

12 GNU gdb

ie
s

$ java -version

$ ls /usr/local/bin/gdb
gdb
$ export DEBUG_PROG=/usr/local/bin/gdb gdb
15-8
gdb

Te
c

$ gdb <path to java command>/java corefile


15-9
13

ijin
gL
an
di
ng

gbd
(gdb)
(gdb)
(gdb)
(gdb)
(gdb)

where
thr
info thr
thread apply 1 bt
quit

thread #1
gdb

15-10

gdb bt

Be

[root@app10 dennis]# gdb java core.11751


GNU gdb Fedora (6.8-27.el5)
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu"...
(no debugging symbols found)
Reading symbols from /lib64/libpthread.so.0...
(no debugging symbols found)...done.
Loaded symbols for /lib64/libpthread.so.0
Reading symbols from /usr/java/jre1.6.0_19/lib/amd64/jli/libjli.so...
(no debugging symbols found)...done.

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-5-

IT WebLogic

Be

ijin
gL
an
di
ng

Te
c

hn
ol
og

ie
s

Loaded symbols for /usr/java/jre1.6.0_19/bin/../lib/amd64/jli/libjli.so


Reading symbols from /lib64/libdl.so.2...
(no debugging symbols found)...done.
Loaded symbols for /lib64/libdl.so.2
Reading symbols from /usr/java/jre1.6.0_19/lib/amd64/libverify.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/java/jre1.6.0_19/lib/amd64/libverify.so
Reading symbols from /usr/java/jre1.6.0_19/lib/amd64/libjava.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/java/jre1.6.0_19/lib/amd64/libjava.so
Reading symbols from /lib64/libnsl.so.1...
(no debugging symbols found)...done.
Loaded symbols for /lib64/libnsl.so.1
Reading symbols from
/usr/java/jre1.6.0_19/lib/amd64/native_threads/libhpi.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/java/jre1.6.0_19/lib/amd64/native_threads/libhpi.so
Reading symbols from /lib64/libnss_files.so.2...
(no debugging symbols found)...done.
Loaded symbols for /lib64/libnss_files.so.2
Reading symbols from /usr/java/jre1.6.0_19/lib/amd64/libzip.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/java/jre1.6.0_19/lib/amd64/libzip.so
Reading symbols from /usr/java/jre1.6.0_19/lib/amd64/libnet.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/java/jre1.6.0_19/lib/amd64/libnet.so
Reading symbols from /usr/java/jre1.6.0_19/lib/amd64/librmi.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/java/jre1.6.0_19/lib/amd64/librmi.so
Reading symbols from /usr/java/jre1.6.0_19/lib/amd64/libnio.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/java/jre1.6.0_19/lib/amd64/libnio.so
Reading symbols from /opt/nawg/lib/libheadercodecJNI.so...
(no debugging symbols found)...done.
Loaded symbols for /opt/nawg/lib/libheadercodecJNI.so
Reading symbols from /opt/nawg/lib/libwpss_wsl.so.1...done.
Loaded symbols for /opt/nawg/lib/libwpss_wsl.so.1
Reading symbols from /opt/nawg/lib/libwpss_hc.so.2...done.
Loaded symbols for /opt/nawg/lib/libwpss_hc.so.2
Reading symbols from /opt/nawg/lib/libwss_wenc.so...done.
Loaded symbols for /opt/nawg/lib/libwss_wenc.so
Reading symbols from /usr/java/jre1.6.0_19/lib/amd64/libawt.so...done.
Loaded symbols for /usr/java/jre1.6.0_19/lib/amd64/libawt.so
Reading symbols from
/usr/java/jre1.6.0_19/lib/amd64/headless/libmawt.so...done.
Loaded symbols for /usr/java/jre1.6.0_19/lib/amd64/headless/libmawt.so
Reading symbols from
/usr/lib/oracle/10.2.0.2/client/lib/libclntsh.so.10.1...done.
Loaded symbols for /usr/lib/oracle/10.2.0.2/client/lib/libclntsh.so.10.1

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-6-

IT WebLogic

#0

hn
ol
og

ie
s

Reading symbols from /usr/lib/oracle/10.2.0.2/client/lib/libnnz10.so...done.


Loaded symbols for /usr/lib/oracle/10.2.0.2/client/lib/libnnz10.so
Reading symbols from
/usr/lib/oracle/10.2.0.2/client/lib/libociicus.so...done.
Loaded symbols for /usr/lib/oracle/10.2.0.2/client/lib/libociicus.so
Core was generated by `java -server -DWAPHOME=/opt/nawg/log/wps_var DsystemRoot=/opt/nawg -DsystemBin'.
Program terminated with signal 6, Aborted.
[New process 12593]
[New process 22363]

[New process 11752]


[New process 11751]
0x00002b08894f4215 in raise () from /lib64/libc.so.6
15-11
gdb bt
(gdb) bt

ijin
gL
an
di
ng

Te
c

#0 0x00002b08894f4215 in raise () from /lib64/libc.so.6


#1 0x00002b08894f5cc0 in abort () from /lib64/libc.so.6
#2 0x00002b0889df13d7 in os::abort () from
/usr/java/jre1.6.0_19/lib/amd64/server/libjvm.so

Be

#3 0x00002b0889f2a50d in VMError::report_and_die () from


/usr/java/jre1.6.0_19/lib/amd64/server/libjvm.so
#4 0x00002b0889df74c1 in JVM_handle_linux_signal () from
/usr/java/jre1.6.0_19/lib/amd64/server/libjvm.so
#5 0x00002b0889df3cfe in signalHandler () from
/usr/java/jre1.6.0_19/lib/amd64/server/libjvm.so
#6 <signal handler called>
#7 0x00002aaaec5dd0bd in declex (yylval=<value optimized out>,
DecParam=0x572dd840) at lex_dec.c:7997
#8 0x00002aaaec5e15c5 in decparse (DecParam=0x572dd840) at yacc_dec.c:1008
#9 0x00002aaaec5d4ff1 in HC_DecodeHeader (Context=0x564b62f0,
WspHeader=<value optimized out>, WspHeaderLength=4096,
ContentLength=0, HttpHeader=0x5636a390 "B$B$: \r\n",
HttpHeaderLength=0x43caa814) at hc_decoder.c:2517
#10 0x00002aaaec3b2dbe in
Java_com_nokia_wap_filter_headercodec_HeaderCodec_cDecode ()
from /opt/nawg/lib/libheadercodecJNI.so
#11 0x00002aaaab866058 in ?? ()
#12 0x0000000043caa8b0 in ?? ()
#13 0x0000000000000000 in ?? ()
(gdb)
15-12
bt

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-7-

IT WebLogic

hc_decoder.c:2517
15-13

gdb where

gdb thr

Te
c

15-14

hn
ol
og

ie
s

#6 0xfe3c6904 in __1cCosFabort6Fl_v_ () from


/wwsl/sharedInstalls/solaris/wls70sp2/jdk131_06/jre/lib/sparc/server/libjvm.so
#7 0xfe3c59f8 in __1cCosbBhandle_unexpected_exception6FpnGThread_ipCpv_v_ ()
from
/wwsl/sharedInstalls/solaris/wls70sp2/jdk131_06/jre/lib/sparc/server/libjvm.so
#8 0xfe20a8bc in JVM_handle_solaris_signal () from
/wwsl/sharedInstalls/solaris/wls70sp2/jdk131_06/jre/lib/sparc/server/libjvm.so
#9 0xff36b82c in __sighndlr () from /usr/lib/libthread.so.1
#10 <signal handler called>
#11 0xe9f90420 in Java_HelloWorld_displayHelloWorld ()from
/home/usera/wls70/solaris/projectWork/lib/libhello.so
#12 0x90aec in ?? ()

Be

ijin
gL
an
di
ng

(gdb) thr
[Current thread is 1 (LWP 14 )]
(gdb) info thr
LWP 13 0xff29d194 in _poll () from /usr/lib/libc.so.1
LWP 12 0xff29f008 in _lwp_sema_wait () from /usr/lib/libc.so.1
LWP 11 0xff29f008 in _lwp_sema_wait () from /usr/lib/libc.so.1
LWP 10 0xff29bc2c in _so_accept () from /usr/lib/libc.so.1
LWP 9 0xff29bc2c in _so_accept () from /usr/lib/libc.so.1
LWP 8 0xff29d194 in _poll () from /usr/lib/libc.so.1
LWP 7 0xff29d194 in _poll () from /usr/lib/libc.so.1
LWP 6 0xff29f008 in _lwp_sema_wait () from /usr/lib/libc.so.1
LWP 5 0xff29f008 in _lwp_sema_wait () from /usr/lib/libc.so.1
LWP 4 0xff29f008 in _lwp_sema_wait () from /usr/lib/libc.so.1
LWP 3 0xff29d194 in _poll () from /usr/lib/libc.so.1
LWP 2 0xff29e958 in _signotifywait () from /usr/lib/libc.so.1
LWP 1 0xff29d194 in _poll () from /usr/lib/libc.so.1
LWP 16 0xff29c4fc in door_restart () from /usr/lib/libc.so.1
LWP 15 0xff369774 in private___lwp_cond_wait ()
from /usr/lib/libthread.so.1
* 1 LWP 14 0xff369764 in __sigprocmask ()
from /usr/lib/libthread.so.1
15-15

15.3.4 HP-UX
14 JVM
$ file <fullpath>/core

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-8-

IT WebLogic
15-16
15 JDK
$ java -version

JDK )
15-17

16

HP-UX adb
GNU gdb

ie
s

17

$ ls /opt/bin/adb which abd


$ export DEBUG_PROG=/opt/bin/adb

adb
adb

15-18
dbx
$ <path to java command>/java

hn
ol
og

18 HP-UX adb

corefile

Te
c

15-19
dbx

adb

ijin
gL
an
di
ng

adb> $C
adb> $r
adb> $q

15-20

15.3.5 AIX

19 JVM

$ file

<fullpath>/core

15-21

20 JDK

21 JVM javacore

Be

22
23 AIX javacore

javacore<WLSpid>.<ID#>.txt
Current Thread Details:
"ExecuteThread: '10' for queue: 'default'" (TID:0x31c70ad0,
sys_thread_t:0x3e52df68, state:R, native ID:0xf10) prio=5
at HelloWorld.displayHelloWorld(Native Method)
at servlets.NativeServlet.doGet(NativeServlet.java:85)
at javax.servlet.http.HttpServlet.service
(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-9-

IT WebLogic
(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$
ServletInvocationAction.run (ServletStubImpl.java:1058)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet
(ServletStubImpl.java:401)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet
(ServletStubImpl.java:306)
15-22

15.3.6 WINDOWS

ie
s

24Windows DrWatson drwtsn32.log Unix

hn
ol
og

25C:\Documents and Settings\All


Users\Documents\DrWatson
26 DrWatson

27JVM hs_err_pid<WLSpid>.log
28

Te
c

JVM hs_err_888.log

ijin
gL
an
di
ng

An unexpected exception has been detected in native code outside of VM


Unexpected Signal : 11 occurred at PC=0x5a4cf2e4
Function name=Java_HelloWorld_displayHelloWorld
Library=/home/spoz/wls70/linuxAS/user_projects/mydomain/lib/lib hello.so
Current Java thread:
at HelloWorld.displayHelloWorld(Native Method)
at servlets.NativeServlet.doGet(NativeServlet.java:85)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
. . .
Local Time = Wed 17 09:35:39 2004
Elapsed Time = 186
# The exception was detected in native code outside the VM
# Java VM: Java HotSpot(TM) Client VM (1.3.1_06-b01 mixed mode)
15-23

Be

15.3.7

pstack pmap

pstack

pmap

Solaris

pstack

pmap

AIX5.2

procstack

procmap

Linux

lsstack

pmap

HP-UX

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 10 -

IT WebLogic
15-1
Solaris

pstack

ijin
gL
an
di
ng

Te
c

hn
ol
og

ie
s

core 'core' of 20956:/wwsl/sharedInstalls/


solaris/wls70sp2/jdk131_06/bin/../bin/sparc/native
----------------- lwp# 14 / thread# 25 ------------ff369764 __sigprocmask (ff36bf60, 0, 0, e6181d70, ff37e000, 0) + 8
ff35e110 _sigon (e6181d70, ff385930, 6, e6180114, e6181d70, 6) + d0
ff361150 _thrp_kill (0, 19, 6, ff37e000, 19, ff2c0450) + f8
ff24b900 raise (6, 0, 0, ffffffff, ff2c03bc, 4) + 40
ff2358ec abort (ff2bc000, e6180268, 0, fffffff8, 4, e6180289) + 100
fe3c68fc __1cCosFabort6Fl_v_ (1, fe4c8000, 1, e61802e8, 0, e9f90420) + b8
fe3c59f0 __1cCosbBhandle_unexpected_exception6FpnGThread_ipCpv_v_ (ff2c02ac,
fe53895c, fe4dc164, fe470ab4, fe4c8000, e6180308) + 254
fe20a8b4 JVM_handle_solaris_signal (0, 25d5b8, e6180d90, fe4c8000, b,
e6181048) + 8ec
ff36b824 __sighndlr (b, e6181048, e6180d90, fe20a8cc, e6181e14, e6181e04) +
c
ff3684d8 sigacthandler (b, e6181d70, 0, 0, 0, ff37e000) + 708
--- called from signal handler with signal 11 (SIGSEGV) --e9f90420 Java_HelloWorld_displayHelloWorld (25d644, e6181224, e61819b8, 0,
2, 0) + 30
00090ae4 ???????? (e6181224, e61819b8, 25d5b8, fe4c8000, 0, 109a0)
0008dc4c ???????? (e61812c4, ffffffff, ffffffff, 97400, 4, e61811b8)
0008dc4c ???????? (e618135c, e61819b8, fe4c8000, 99600, c, e6181250)
0008dc4c ???????? (e61813ec, f76a2f90, e618147c, 99600, c, e61812f8)
0008ddb4 ???????? (e618147c, f68578b8, 0, 99974, c, e6181388)
0008ddd8 ???????? (e618154c, e61815c8, e61815cc, 99974, 4, e6181410)
15-24

pmap

Be

E9500000 1184K read


E9680000 1392K read
E9800000 4608K read
E9F60000 136K read/write/exec
E9F90000 8K read/exec
/home/usera/wls70/solaris/project
Work/lib/libhello.so
E9FA0000 8K read/write/exec /home/usera/wls70/solaris/p
rojectWork/lib/libhello.so
E9FB4000 8K read/write/exec
E9FC0000 120K read/exec /usr/lib/libelf.so.1
E9FEE000 8K read/write/exec /usr/lib/libelf.so.1
...
15-25

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 11 -

IT WebLogic

15.4

15.4.1

ulimit c

ie
s

Solaris coreadm
coreadm e process

hn
ol
og

Linux
/etc/security limits.conf

HP-UX maxdsiz

15.4.2 Thread Dump

Te
c

Thread Dump JVM

Sun JVM:

ijin
gL
an
di
ng

JRockit JVM:

-XX:+ShowMessageBoxOnError
-Djrockit.waitonerror

JVM

Do you want to debug the problem?

15-26

JVM Thread Dump

15.5

Be

1 JVM

2
3

/
4

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 12 -

hn
ol
og

ie
s

IT

Be

ijin
gL
an
di
ng

Te
c

WebLogic

IT WebLogic

........................................................................................................................... 2
...........................................................................................................................

Be

ijin
gL
an
di
ng

Te
c

hn
ol
og

ie
s

.............................................................................................................
3
16
.............................................................................................................
.............................................................................................................3
16.1
.........................................................................................................................................3
16.2
......................................................................................................................... 3
16.2.1
................................................................................................ 3
16.2.2
.................................................................................................................... 3
16.2.3
.................................................................................... 4
16.2.3.1 Windows ................................................................................ 4
16.2.3.2 Solaris .................................................................................... 4
16.2.3.3 HP-UX ................................................................................... 4
16.2.3.4 Linux ......................................................................................5
16.2.3.5 AIX ........................................................................................ 5
16.2.4
........................................................................................................ 5
16.3
......................................................................................... 5
16.3.1
.............................................................................5
16.3.2
.....................................................................6
16.3.2.1 IO Exception ..................................................................................... 6
16.4
................................................................................................. 6
16.4.1
........................................................................................ 6
16.4.2
Unix/Linux ......................................................... 6
16.4.3
Windows ................................................................ 7
16.4.3.1 handle......................................................................................................................... 7
16.4.3.2 Process Explorer.........................................................................................................8
16.5
......................................................................................................................... 8
16.5.1
............................................................................................................ 8
16.5.2
............................................................................................................ 9

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-2-

IT WebLogic

16
too many open files

16.1

16.2

ie
s

WebLogic
WebLogic
I/O socket

hn
ol
og

16.2.1

1 JVM

Te
c

2
Socket
3 HTTP HTTP
TCP
4

ijin
gL
an
di
ng

16.2.2

position

A
B

Be

fork
fcntldupdup2

16-1

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-3-

16-1

ie
s

IT WebLogic

16.2.3

hn
ol
og

Te
c

ijin
gL
an
di
ng

16.2.3.1 Windows

Windows Windows 2000


16384

16.2.3.2 Solaris

Solaris /usr/bin/ulimit

rlim_fd_max
65536 root

16.2.3.3 HP-UX

HP-UX nfile nfile

Be

nfile = ((NPROC*2)+1000)
16-1

NPROC
NPROC = ((MAXUSERS*5)+64)
16-2
MAXUSERS 400 nfile 5128
HP-UX
maxfiles

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-4-

maxfiles_lim

IT WebLogic

Maxfiles maxfiles_lim

16.2.3.4 Linux
Linux /etc/security/limits.conf

soft nofile 1024


hard nofile 4096

ie
s

16-3

echo 4096 > /proc/sys/fs/file-max


echo 16384 > /proc/sys/fs/inode-max
16-4

hn
ol
og

/etc/rc.d/rc.local

10244096 16384

Te
c

16.2.3.5 AIX

AIX /etc/security/limits
2000
ulimit setrlimit

ijin
gL
an
di
ng

OPEN_MAX

16.2.4

7
8 /
close()
open()
9
10TIME_WAIT TCP

Be

socket TIME_WAIT
ACK

Unix TIME_WAIT tcp_time_wait_interval

Windows TcpTimedWaitDelay
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
16-5
Unix/Windows 240

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-5-

IT WebLogic

16.3

16.3.1
11
12
13TIME_WAIT TCP

15

16.3.2.1 IO Exception

hn
ol
og

16.3.2

ie
s

14 GC
Java close()

I/O I/O

ijin
gL
an
di
ng

Te
c

Java.io.FileNotFoundExceptin:/***/wlserver_10.3/server/lib/consoleapp/webap
p/images/sort_up.gif(Too many open files)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:112)
at weblogic.utils.classloaders.FileSource.getInputStream(FileSource.java:31)
at weblogic.servlet.internal.warSource.getInputStream(warSource.java:65)
at weblogic.servlet.FileServlet.sendFile(FileServlet.java:400)
Truncated.see log file for complete stacktrace
16-6

TCP Socket Exception


Java.net.SocketException:Too many open files
at java.net.PlainSocketImpl.accept(Compiled Code)
at java.net ServerSocket.implAccept(Compiled Code)
at java.net.ServerSocket.accept(Compiled Code)
at weblogic.t3.srvr.ListenThread.run(Compiled Code)

Be

16-7 Socket Exception

16.4

16.4.1

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-6-

IT WebLogic
<ListenThread> <system> <> <000000> <Using effective file descriptor limit
of: 8192 open sockets/files.>
16-8

16.4.2 Unix/Linux
1Unix/Linux lsof

ie
s

Unix/Linux lsofLiSt Open Files


inode lsof
socket TCP/UDP lsof
java
open

hn
ol
og

lsof lsof hlsof

lsof -p < PID>


16-9

Lsof p 6345 |wc -l

Te
c

WebLogic 6345

16-10

ijin
gL
an
di
ng

Be

[root@yuchao ~]# lsof p 6345 | more


COMMAND PID USER FD TYPE DEVICE SIZE
NODE
NAME
Java
6345 wls cmd DIR
8.1 4096
820574
/home/weblogic/Oracle/Middleware/user_projects/domains/yx_domain
Java
6345 wls rtd DIR
8.1 4096
2
/
Java
6345 wls txt REG
8.1 47308
590310
/home/weblogic/Oracle/Middleware/jdk160_11/bin/java
Java
6345 wls mem REG
8.1 112212 835586 /lib/ld-2.3.4.so
Java
6345 wls mem REG
8.1 1547588 835599 /lib/tls/libc-2.3.4.so
Java
6345 wls mem REG
8.1 16748
835614 /lib/libdl-2.3.4.so
Java
6345 wls mem REG
8.1 214060 835612 /lib/tls/libm-2.3.4.so
Java
6345 wls mem REG
8.1 107928 835618 /lib/libresolv-2.3.4.so
Java
6345 wls mem REG
8.1 81140
835652 /lib/libresolv-2.3.4.so
16-11

losf SolarisTru64HP-UXLinuxAIX
2 HP Glance glance
weblogic glance http://www.hp.com
3 Unix lsof
/proc/<pid>/fd

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-7-

IT WebLogic

16.4.3 Windows
16.4.3.1 handle
Windows NT Windows 2000 handle

handle
handle -p <process name>
16-12

ie
s

D\Tools>handle p java

handle

hn
ol
og

16-13

http://download.sysinternals.com/Files/Handle.zip

16.4.3.2 Process Explorer

Windows Process Explorer

Te
c

Be

ijin
gL
an
di
ng

Process Explorer

16-2 process explorer


Process Explorer

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-8-

IT WebLogic
http://www.sysinternals.com/ntw2k/freeware/procexp.shtml

16.5

16.5.1
16/
17
18

ie
s

19 OS
20

hn
ol
og

16.5.2

21
A?

B?

Te
c

JDBC
C JAR ?

ijin
gL
an
di
ng

jar jar

D TIME_WAIT ?

22

23 TIME_WAIT

TIME_WAIT TIME_WAIT
240 TIME_WAIT

Be

24/

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-9-

hn
ol
og

ie
s

IT

Be

ijin
gL
an
di
ng

Te
c

WebLogic

IT WebLogic

........................................................................................................................... 2
...........................................................................................................................

Be

ijin
gL
an
di
ng

Te
c

hn
ol
og

ie
s

.................................................................................................
3
17
.................................................................................................
.................................................................................................3
17.1
/................................................................................................ 3
17.1.1
/............................................................................................... 3
17.1.2
................................................................................................................ 3
17.2
..................................................................................................................... 3
17.2.1
Java Heap Memory............................................................................................. 3
17.2.2
........................................................................................................................ 3
17.2.3
........................................................................................................ 4
17.2.4
Garbage Collection................................................................................. 4
17.2.5
........................................................................................ 4
17.2.6
.................................................................................................... 4
17.2.7
WTCWebLogic Tuxedo Connector............................................................................5
17.3
......................................................................................................... 5
17.3.1
Java .................................................................................................... 5
17.3.1.1 Java ........................................................................................ 5
17.3.1.2 Java ................................................................................................ 6
17.3.1.3 Java .......................................................................................6
17.3.2
........................................................................................................ 9
17.3.2.1 ........................................................................................... 9
17.3.2.2 ................................................................................................. 10
17.3.2.3 ................................................................................................. 10
17.3.2.4 OOM ...................................................................................... 12
17.3.3
WTC WTC .............................................................................. 13
17.3.3.1 WebLogic Tuxedo Connector ..........................................................................13
17.3.3.2 WTC ........................................................................................ 13
17.3.3.3 WTC ................................................................................................ 13
17.3.3.4 WTC ........................................................................................ 14
17.4
............................................................................................................... 16
17.4.1
.............................................................................................. 16
17.4.2
Java ...........................................................................16
17.4.3
...............................................................................17
17.4.4
WTC .............................................................................17

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-2-

IT WebLogic

17
core dump
J2EE

17.1

ie
s

hn
ol
og

17.1.1 /

Out Of Memory( OOM)


JVM
JVM

17.1.2

ijin
gL
an
di
ng

Java

Te
c

WTCWebLogic Tuxedo Connector

17.2

17.2.1 Java Heap Memory

Be

Java JVM Java Java


JVM WebLogic Java
JVM JVM
JVM java

Java java -Xmx


JVM Java
Java JVM

17.2.2
JVM JN JDBC

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-3-

IT WebLogic
JVM

JDBC
Java
32bit 3GB Java
1GB 2G

17.2.3

ie
s

Java

2.6

hn
ol
og

17.2.4 Garbage Collection

Garbage Collection GCJava


GC

17.2.5

Te
c

roots

ijin
gL
an
di
ng

Be

17.2.6

RAM

32
0-4GB RAM

32
4GB 1-2 GB

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-4-

IT WebLogic
Windows 2GB 2GB
Windows /3GB 2GB/2GB
3GB

Te
c

hn
ol
og

ie
s

17-1

17-1

ijin
gL
an
di
ng

17.2.7 WTCWebLogic Tuxedo Connector

WebLogic Tuxedo Connector WTC WebLogic Tuxedo

1WebLogic Tuxedo

Be

2Tuxedo WebLogic EJB

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-5-

hn
ol
og

ie
s

IT

ijin
gL
an
di
ng

Te
c

WebLogic

Be

17.3

Java WTC
WTC 3.4

17.3.1 Java

17.3.1.1 Java

2stdout stderr

hn
ol
og

1JVM Java.lang.OutOfMemoryError

ie
s

JVM Java Java

4 Thread Dump

Te
c

5WebLogic Server
6

ijin
gL
an
di
ng

Java JVM Java

Java Thread Dump Thread Dump

WebLogic WebLogic

17.3.1.2 Java

Java

Be

1.

Java Heap
Java
2.

HTTP

HTTP
3.

Java cache
cacha Java
JVM Java

4.

JDBC
JDBC block JDBC
close()

5.

JVM GC

6.

ie
s

JVM bug

hn
ol
og

Java JVM
Compact

17.3.1.3 Java

17.3.1.3.1
Java

Te
c

Java

ijin
gL
an
di
ng

1 verbose GC
java verbose:gc JRockit-verbose
-verbose:gc GC Verbose java
stdout/stderr GC java stdout/stderr

2 GC
3 JVM
4 GC GC GC

Be

5
6JVM /

Servers
--> myServer --> Monitoring -->Performance

17.3.1.3.2 GC
1 OOM

GC
[memory ] 7.160: GC 131072K->130052K (131072K) in 1057.359 ms

16-1
[memory ] <start>: GC <before>K-><after>K

<start>

(<heap>K), <total>ms

GC JVM

<before> KB
KB

<heap>

KB

<total>

ie
s

<after>

hn
ol
og

JVM JVM

verbose //
OOM Heap Dump
JVM

Te
c

17.3.1.3.3 GC

GC GC GC

ijin
gL
an
di
ng

1OOM GC

2GC

JVM
Java OOM java

JVM GC

Be

Java OOM
GC
GC GC
[memory ] 8.162: GC 73043K->72989K (131072K) in 12.938 ms
[memory ] 8.172: GC 72989K->72905K (131072K) in 12.000 ms
[memory ] 8.182: GC 72905K->72580K (131072K) in 13.509 ms
. . .
java.lang.OutOfMemoryError

17-2
128MB 70MB
45% Java JVM OOM
OOM
JVM bug JVM

17.3.1.3.4 Java

ie
s

JVM GC
1

hn
ol
og

Java JVM JVM java

Te
c

2
HTTP
3

ijin
gL
an
di
ng

17.3.1.3.5 Java OOM

1 JVM (
)

JVM JVM Profiler InterfaceJVMPI


JProbe
OptimizeIt

Be

2JVM
3/

SUN JVMPIJVM JVM


JVM
JVMPI
JVMPI /
JVMPI
Jprobe OptimizeIt Java
Java

JVMPI

Jprobe OptimizeIt
http://www.borland.com/optimizeit
http://www.quest.com/jprobe

17.3.1.3.6 JRockit

ie
s

1Java Java Runtime Analyzer

hn
ol
og

Java Java Runtime Analyzer JRA Weblogic JRockit


JRockit JRockit
JRockit
JRA

JRA JRA
Java

Te
c

JVM Java JVM

2JRockit 8.1 JAVA JRA

ijin
gL
an
di
ng

JRockit JVM JRockit Java

GC //

3 JVM

17.3.2

JVMJNI

Be

17.3.2.1

1
2stdout stderr
3JVM
4 JVM libc
SIGABORT JVM
5core dump

JVM
RAM JVM

JVM libc
JVM SIGABORT JVM JVM
SIGABORT

17.3.2.2

RAM

2.

RAM

hn
ol
og

1.

ie
s

RAM
RAM

JVM

Te
c

3.

ijin
gL
an
di
ng

JVM

JVM

Java Java Java


JVM Java
Java
4.

JNI

JNI
5.

Be

Java

17.3.2.3

17.3.2.3.1

OOM

1 Java OOM

-verbose:gc GC
GC OOM
JVM /

2
Unix/Linux ps p <PID> -o vsz
Windows
i)

--> --> perfmon

17-2 Windows perfmon

hn
ol
og

iii)

ie
s

ii) +

Process Processor

Virtual Bytes

JVMjava

Te
c

iv) -->
3 JNI

ijin
gL
an
di
ng

4RAM

WebLogic -verbose:gc JVM


GC GC Admin Console
Servers-->myServer-->Monitoring--> Performance
JVM OOM

JDBC

17.3.2.3.2

Be

1
2

32 Unix 4GB 1-2 GB OS


Red Hat Linux AS 2.1 3GB
Windows 2GB 3GB

3 Java JVM
4 JNI JDBC
5

Java 32
4GB
1-2GB
Windows 2GB 2GB
Windows /3GB 2GB/2GB
3GB
Red Hat Linux AS 2.1 3GB

17.3.2.4 OOM
1 OOM

hn
ol
og

ie
s

Java -Xmx
3GBJava 1GB 2GB
JVM

JDBC JNI

Te
c

Java

ijin
gL
an
di
ng

JAVA
JNI
JNI
3

Be

Java
JVM JVM
Java

5 RAM
6JVM

JRockit-Xnoopt

Sun Hotspot-Xint JVM

7 OOM

JVM
JNI /

8 OOM

ie
s

17.3.3 WTC WTC

Te
c

17.3.3.1 WebLogic Tuxedo Connector

hn
ol
og

JVM

WebLogic Tuxedo ConnectorWegLogicTuxedo WTC

ijin
gL
an
di
ng

WebLogic Tuxedo

WebLogic Tuxedo
Tuxedo Tuxedo Weblogic Server EJB
WebLogic Tuxedo

Be

17-3 Tuxedo WebLogic

17.3.3.2 WTC
WTC java.lang.OutOfMemoryError

17.3.3.3

WTC

WTC
1WebLogic/Tuxedo
WTC WebLogic Tuxedo

bug WTC
WebLogic 8.1
2OS

java.lang.OutOfMemoryError:unable to create new native thread


17-3

ie
s

Unix
java

hn
ol
og

WebLogic Server
WebLogic 128M

4Perm JVM

ijin
gL
an
di
ng

Te
c

VM reflective
reflective

17.3.3.4 WTC
17.3.3.4.1

WebLogic Tuxedo

WebLogic Server 7001 WebLogic Tuxedo


OOM
WTC Local Access Point Tuxedo Remote Domain
WTC Remote Access Point Tuxedo Local Domain

Be

2WTC
12

17-4 WebLogic Tuxedo


3 WTC

Tuxedo
WTC
server WTC target server WTC
target
target server WTC target server
WTC target server
WTC target server

ie
s

17.3.3.4.2 Tuxedo
1 WTC

hn
ol
og

Tuxedo Tuxedo
WTC Tuxedo
TUXCONFIG
WTC Tuxedo/TDomain DMCONFIG
2 MTYPE NULL

ijin
gL
an
di
ng

Te
c

WTC Tuxedo encoding DMCONFIG


MTYPE NULLMTYPE
/ WebLogic TuxedoDMCONFIG
MTYPE NULL JAVAWebLogic CTuxedo
/ JAVA
C MTYPE
DM_LOCAL_DOMAINS DM_REMOTE_DOMAINS /
MTYPE 15
MTYPE / on
MTYPE

<Error> <Posix Performance Pack><Uncaught Throwable


java.lang.OutOfMemoryError <<no stack trace available>>

in

processSockets

Be

17-4

17.3.3.4.3 Java 256 MB


Java 256MB
java MaxPermSize

17.3.3.4.4 WTC
WTC

1WebLogic 6.1 WTC

WebLogic 6.1 WTC


BDMCONFIG=path_to_my_bdmconfig.xml_file,TraceLevel=100000
17-5
WebLogic

ie
s

<StartupClass
Arguments="BDMCONFIG=C:\path\bdmconfig.xml,TraceLevel=100000"
ClassName="weblogic.wtc.gwt.WTCStartup" Name="WTCStartup"
Targets="examplesServer"/>
17-6

JAVA_OPTIONS

hn
ol
og

2WebLogic 7.0 8.1 WTC

JAVA_OPTIONS=-Dweblogic.wtc.TraceLevel=100000
17-7

Te
c

myServer-->Logging-->Server/General Debug to Stdout


Stdout info

ijin
gL
an
di
ng

Weblogic Server
4 WTC

####<Aug 12, 2003 1:12:22 PM EDT> <Debug> <WTC> <SPOZ> <examplesServer>


<Thread-9>
<kernel
identity>
<>
<180046>
<]/dsession(0)/tpcommit/50/weblogic.wtc.jatmi.Txid@60e9fef3>
####<Aug 12, 2003 1:12:22 PM EDT> <Debug> <WTC> <SPOZ> <examplesServer>
<Thread-9>
<kernel
identity>
<>
<180046>
<[/TuxXidRply/get_specific_reply/weblogic.wtc.gwt.gwdsession@0/true>
17-8

Be

####<Aug 12, 2003 1:14:24 PM EDT> <Warning> <JTA> <SPOZ> <examplesServer>


<Thread-0> <kernel identity> <> <110030> <XA resource [OatmialResource] has not
responded in the last 120 second(s).>
17-9

hn
ol
og

ie
s

IT

ijin
gL
an
di
ng

Te
c

WebLogic

Be

17.4

17.4.1
1 OOM

Java
Weblogic Tuxedo Connector

ie
s

GC

GC

Te
c

hn
ol
og

2 Verbose GC

ijin
gL
an
di
ng

17.4.2 Java

1 GC

JRockit JRA JVM Java

Be

JVM

17.4.3
1 OS
2
3
4 JVM
5 JNI
6 JVM /

17.4.4 WTC
1
2 JVM

Be

ijin
gL
an
di
ng

Te
c

hn
ol
og

ie
s

3 WebLogic

hn
ol
og

ie
s

IT

Be

ijin
gL
an
di
ng

Te
c

WebLogic

IT WebLogic

........................................................................................................................... 2
...........................................................................................................................

Be

ijin
gL
an
di
ng

Te
c

hn
ol
og

ie
s

.....................................................................................................
3
18
.....................................................................................................
.....................................................................................................3
18.1
..................................................................................................... 3
18.2
............................................................................................................. 3
18.3
......................................................................................................................... 3
18.3.1
.................................................................................................... 4
18.3.2
................................................................................................ 4
18.3.3
.................................................................................................... 4
18.3.4
Solaris ........................................................................................................ 5
18.3.5
Linux ..........................................................................................................5
18.3.6
HP-UX ....................................................................................................... 7
18.3.7
AIX ............................................................................................................ 8
18.3.8
Windows .................................................................................................... 8
18.4
............................................................................................................. 9
18.5
............................................................................................................... 10

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-2-

IT WebLogic

18
(OOM)

18.1

ie
s

StackOverFlow
"an irrecoverable stack overflow has
occurred. Unexpected Signal 11" (SEGV)

ijin
gL
an
di
ng

Te
c

hn
ol
og

Unexpected Signal : 11 occurred at PC=0xfb9c22ec


Function name=write (compiled Java code)
Library=(N/A)
Current Java thread:
Dynamic libraries:
0x10000 /opt/bea/jdk131/jre/bin/../bin/sparc/native_threads/java
0xff350000 /usr/lib/lwp/libthread.so.1. . .
# HotSpot Virtual Machine Error : 11
# Error ID : 4F530E43505002BD 01
#
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
# Java VM: Java HotSpot(TM) Client VM (1.3.1_07-b02 mixed mode)
18-1


JVM

JVM

Be

18.2

StackOverflowError JVM

18.3

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-3-

IT WebLogic

18.3.1

thread dump


JVM

ie
s

18.3.2

hn
ol
og

StackOverflowError

JVM JVM

JVM

Te
c

hs_err_pid<WLSpid>.log <WLSpid> ID
JVM.log

ijin
gL
an
di
ng

An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : 11 occurred at PC=0x5a4cf2e4
Function name=Java_HelloWorld_displayHelloWorld
Library=/home/spoz/wls70/linuxAS/user_projects/mydomain/lib/libhello.so

Be

Current Java thread:


at HelloWorld.displayHelloWorld(Native Method)
at servlets.NativeServlet.doGet(NativeServlet.java:85)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
. . .
Local Time = Wed 17 09:35:39 2004
Elapsed Time = 186
# The exception was detected in native code outside the VM
# Java VM: Java HotSpot(TM) Client VM (1.3.1_06-b01 mixed mode)
18-2

18.3.3
StackOverflowError JVM
JVM

WebLogic
JVM

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-4-

IT WebLogic

ulimit c

Solaris /etc/system
set sys:coredumpsize=0
Linux
/etc/security limits.conf

hn
ol
og

quota v

ie
s

HP-UX maxdsiz

UNIX/ UNIX
Linux

18.3.4 Solaris

Solaris Solaris dbx

$ java -version

Te
c

JDK

JDK

18-3

ijin
gL
an
di
ng

dbx :
$ ls /opt/bin/dbx

which dbx dbx


$ export DEBUG_PROG=/opt/bin/dbx
dbx
$ dbx <path to java command>/java corefile
18-4

dbx
(dbx) where
(dbx) threads
(dbx) quit

dbx

18-5

Be

18.3.5 Linux

JVM
$ file <fullpath>/core
18-6
JDK
$ java -version

JDK
18-7

GNU gdb
GNU gdb

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-5-

IT WebLogic
gdb:
$ ls /usr/local/bin/gdb
gdb
$ export DEBUG_PROG=/usr/local/bin/gdb gdb
$ gdb <path to java command>/java corefile
18-8
gdb

thread #1
gdb

ie
s

where
thr
info thr
thread apply 1 bt
quit

18-9
gdb where

hn
ol
og

(gdb)
(gdb)
(gdb)
(gdb)
(gdb)

ijin
gL
an
di
ng

Te
c

gdb) where
#0 0xff369764 in __sigprocmask () from /usr/lib/libthread.so.1
#1 0xff35e978 in _resetsig () from /usr/lib/libthread.so.1
#2 0xff35e118 in _sigon () from /usr/lib/libthread.so.1
#3 0xff361158 in _thrp_kill () from /usr/lib/libthread.so.1
#4 0xff24b908 in raise () from /usr/lib/libc.so.1
#5 0xff2358f4 in abort () from /usr/lib/libc.so.1
#6 0xfe3c6904 in __1cCosFabort6Fl_v_ () from /wwsl/sharedInstalls/
solaris/wls70sp2/jdk131_06/jre/lib/sparc/server/libjvm.so
#7 0xfe3c59f8 in __1cCosbBhandle_unexpected_exception6FpnGThread_
ipCpv_v_ () from /wwsl/sharedInstalls/solaris/wls70sp2/jdk131_06/
jre/lib/sparc/server/libjvm.so
#8 0xfe20a8bc in JVM_handle_solaris_signal () from /wwsl/shared
Installs/solaris/wls70sp2/jdk131_06/jre/lib/sparc/server/libjvm.so
#9 0xff36b82c in __sighndlr () from /usr/lib/libthread.so.1
#10 <signal handler called>
#11 0xe9f90420 in Java_HelloWorld_displayHelloWorld ()
from /home/usera/wls70/solaris/projectWork/lib/libhello.so
#12 0x90aec in ?? ()

Be

18-10

gdb thr

(gdb) thr
[Current thread is 1 (LWP 14 )]
(gdb) info thr
16 LWP 13 0xff29d194 in _poll () from /usr/lib/libc.so.1
15 LWP 12 0xff29f008 in _lwp_sema_wait () from /usr/lib/libc.so.1
14 LWP 11 0xff29f008 in _lwp_sema_wait () from /usr/lib/libc.so.1
13 LWP 10 0xff29bc2c in _so_accept () from /usr/lib/libc.so.1
12 LWP 9 0xff29bc2c in _so_accept () from /usr/lib/libc.so.1
11 LWP 8 0xff29d194 in _poll () from /usr/lib/libc.so.1
10 LWP 7 0xff29d194 in _poll () from /usr/lib/libc.so.1

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-6-

IT WebLogic

ie
s

9 LWP 6 0xff29f008 in _lwp_sema_wait () from /usr/lib/libc.so.1


8 LWP 5 0xff29f008 in _lwp_sema_wait () from /usr/lib/libc.so.1
7 LWP 4 0xff29f008 in _lwp_sema_wait () from /usr/lib/libc.so.1
6 LWP 3 0xff29d194 in _poll () from /usr/lib/libc.so.1
5 LWP 2 0xff29e958 in _signotifywait () from /usr/lib/libc.so.1
4 LWP 1 0xff29d194 in _poll () from /usr/lib/libc.so.1
3 LWP 16 0xff29c4fc in door_restart () from /usr/lib/libc.so.1
2 LWP 15 0xff369774 in private___lwp_cond_wait ()
from /usr/lib/libthread.so.1
* 1 LWP 14 0xff369764 in __sigprocmask ()
from /usr/lib/libthread.so.1
18-11

hn
ol
og

gdb bt

Be

ijin
gL
an
di
ng

Te
c

(gdb) thread apply 1 bt


Thread 1 (LWP 14 ):
#0 0xff369764 in __sigprocmask () from /usr/lib/libthread.so.1
#1 0xff35e978 in _resetsig () from /usr/lib/libthread.so.1
#2 0xff35e118 in _sigon () from /usr/lib/libthread.so.1
#3 0xff361158 in _thrp_kill () from /usr/lib/libthread.so.1
#4 0xff24b908 in raise () from /usr/lib/libc.so.1
#5 0xff2358f4 in abort () from /usr/lib/libc.so.1
#6 0xfe3c6904 in __1cCosFabort6Fl_v_ ()
from /wwsl/sharedInstalls/solaris/wls70sp2/jdk131_06/jre/lib
/sparc/server/libjvm.so
#7 0xfe3c59f8 in __1cCosbBhandle_unexpected_exception6FpnGThread_ipCpv_v_ ()
from /wwsl/sharedInstalls/solaris/wls70sp2/jdk131_06/jre/lib
/sparc/server/libjvm.so
#8 0xfe20a8bc in JVM_handle_solaris_signal ()
from /wwsl/sharedInstalls/solaris/wls70sp2/jdk131_06/jre/lib
/sparc/server/libjvm.so
#9 0xff36b82c in __sighndlr () from /usr/lib/libthread.so.1
#10 <signal handler called>
#11 0xe9f90420 in Java_HelloWorld_displayHelloWorld ()
from /home/usera/wls70/solaris/projectWork/lib/libhello.so
#12 0x90aec in ?? ()
#13 0x8dc54 in ?? ()
. . .
18-12

18.3.6 HP-UX
JVM
$ file <fullpath>/core
18-13
HP-UX JDK
$ java -version

:http://www.landingbj.com
: 400-810-2327

JDK

: service@landingbj.com
: 010-82730518

-7-

IT WebLogic
18-14

HP-UX adb

GNU gdb
adb

ie
s

$ ls /opt/bin/adb

which abd adb


$export DEBUG_PROG=/opt/bin/adb
adb
$<path to java command>/java corefile
18-15

adb> $C
adb> $r
adb> $q

hn
ol
og

adb

adb
18-16

Te
c

18.3.7 AIX

JVM
$file <fullpath>/core

ijin
gL
an
di
ng

18-17

JDK JVM javacore

javacore<WLSpid>.<ID#>.txt

Be

Current Thread Details:


"ExecuteThread: '10' for queue: 'default'" (TID:0x31c70ad0,
sys_thread_t:0x3e52df68, state:R, native ID:0xf10) prio=5
at HelloWorld.displayHelloWorld(Native Method)
at servlets.NativeServlet.doGet(NativeServlet.java:85)
at javax.servlet.http.HttpServlet.service
(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service
(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$
ServletInvocationAction.run (ServletStubImpl.java:1058)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet
(ServletStubImpl.java:401)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet
(ServletStubImpl.java:306)
. . .
18-18

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-8-

IT WebLogic

18.3.8 Windows
Windows DrWatson drwtsn32.log Unix
C:\Documents and Settings\All Users\Documents\DrWatson
JVM hs_err_pid<WLSpid>.log

pstack

pstack
pstack

AIX5.2

procstack

Linux

Lsstack

HP-UX

18.4

Te
c

18-1

hn
ol
og

Solaris

ie
s

ijin
gL
an
di
ng

1.

JVM JVM

Java Java C JVM Xss


Java -Xss

2.

Be

catch (StackOverflowError e)
{
System.err.println("Exception: " + e );
// Here is the important thing to do
// when catching StackOverflowErrors:
e.printStackTrace();
// do some cleanup and destroy the thread or unravel if possible.
}
18-19

jsp_error <%@ page


errorPage="jsp_error"%>

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

-9-

IT WebLogic

WebLogic JSP <wl:form> action


<wl:form>
3.

JVM

java.util
JVM v1.3.1 1.4.1 getProperty()

ie
s

Properties p = new Properties(System.getProperties());


18-20

Properties p = new Properties();


p = System.getProperties();
18-21

18.5

Te
c

hn
ol
og

ijin
gL
an
di
ng

3 Thread Dump
4
5

jsp_error login/auth/error
WebLogic JSP

Be

6 JVM

:http://www.landingbj.com
: 400-810-2327

: service@landingbj.com
: 010-82730518

- 10 -

You might also like