ORABPEL-30515与WebCenter Process Portal

现象描述:

配置完WebCenter Process Portal后,发现SOA Managed Server启动导常,报了很多错,截图如下:

error

BPM流程可以发布,但是不能创建实例。

解决方案:

打开%DOMAIN_HOME%\config\fmwconfig\system-jazn-data.xml文件,加入如下代码:

<grant>
    <grantee>
        <codesource>
            <url>file:${soa.oracle.home}/soa/modules/oracle.soa.workflow_11.1.1/bpm-services.jar
            </url>
        </codesource>
    </grantee>
    <permissions>
        <permission>
            <class>oracle.security.jps.JpsPermission</class>
            <name>VerificationService.createInternalWorkflowContext</name>
        </permission>
        <permission>
            <class>oracle.security.jps.service.policystore.PolicyStoreAccessPermission
            </class>
            <name>context=APPLICATION, name=*</name>
            <actions>getApplicationPolicy</actions>
        </permission>
        <permission>
            <class>oracle.security.jps.service.policystore.PolicyStoreAccessPermission
            </class>
            <name>context=SYSTEM, name=*</name>
            <actions>getConfiguredApplications</actions>
        </permission>
        <permission>
            <class>oracle.security.jps.service.policystore.PolicyStoreAccessPermission
            </class>
            <name>context=SYSTEM, name=*</name>
            <actions>getSystemPolicy</actions>
        </permission>
        <permission>
            <class>oracle.security.jps.service.credstore.CredentialAccessPermission
            </class>
            <name>context=SYSTEM, mapName=BPM-SERVICES, keyName=BPM-SERVICES
            </name>
            <actions>read</actions>
        </permission>
        <permission>
            <class>oracle.security.jps.service.credstore.CredentialAccessPermission
            </class>
            <name>context=SYSTEM, mapName=BPM-CRYPTO, keyName=BPM-CRYPTO</name>
            <actions>read,write</actions>
        </permission>
        <permission>
            <class>oracle.security.jps.JpsPermission</class>
            <name>IdentityAssertion</name>
            <actions>*</actions>
        </permission>
        <permission>
            <class>java.security.AllPermission</class>
        </permission>
    </permissions>
</grant>
<grant>
    <grantee>
        <codesource>
            <url>file:${ucm.oracle.home}/soa/modules/oracle.soa.workflow_11.1.1/bpm-services.jar
            </url>
        </codesource>
    </grantee>
    <permissions>
        <permission>
            <class>oracle.security.jps.JpsPermission</class>
            <name>VerificationService.createInternalWorkflowContext</name>
        </permission>
        <permission>
            <class>oracle.security.jps.service.policystore.PolicyStoreAccessPermission
            </class>
            <name>context=APPLICATION, name=*</name>
            <actions>getApplicationPolicy</actions>
        </permission>
        <permission>
            <class>oracle.security.jps.service.policystore.PolicyStoreAccessPermission
            </class>
            <name>context=SYSTEM, name=*</name>
            <actions>getConfiguredApplications</actions>
        </permission>
        <permission>
            <class>oracle.security.jps.service.policystore.PolicyStoreAccessPermission
            </class>
            <name>context=SYSTEM, name=*</name>
            <actions>getSystemPolicy</actions>
        </permission>
        <permission>
            <class>oracle.security.jps.service.credstore.CredentialAccessPermission
            </class>
            <name>context=SYSTEM, mapName=BPM-SERVICES, keyName=BPM-SERVICES
            </name>
            <actions>read</actions>
        </permission>
        <permission>
            <class>oracle.security.jps.service.credstore.CredentialAccessPermission
            </class>
            <name>context=SYSTEM, mapName=BPM-CRYPTO, keyName=BPM-CRYPTO</name>
            <actions>read,write</actions>
        </permission>
        <permission>
            <class>oracle.security.jps.JpsPermission</class>
            <name>IdentityAssertion</name>
            <actions>*</actions>
        </permission>
        <permission>
            <class>java.security.AllPermission</class>
        </permission>
    </permissions>
</grant>
<grant>
    <grantee>
        <codesource>
            <url>file:${wc.oracle.home}/soa/modules/oracle.soa.workflow_11.1.1/bpm-services.jar
            </url>
        </codesource>
    </grantee>
    <permissions>
        <permission>
            <class>oracle.security.jps.JpsPermission</class>
            <name>VerificationService.createInternalWorkflowContext</name>
        </permission>
        <permission>
            <class>oracle.security.jps.service.policystore.PolicyStoreAccessPermission
            </class>
            <name>context=APPLICATION, name=*</name>
            <actions>getApplicationPolicy</actions>
        </permission>
        <permission>
            <class>oracle.security.jps.service.policystore.PolicyStoreAccessPermission
            </class>
            <name>context=SYSTEM, name=*</name>
            <actions>getConfiguredApplications</actions>
        </permission>
        <permission>
            <class>oracle.security.jps.service.policystore.PolicyStoreAccessPermission
            </class>
            <name>context=SYSTEM, name=*</name>
            <actions>getSystemPolicy</actions>
        </permission>
        <permission>
            <class>oracle.security.jps.service.credstore.CredentialAccessPermission
            </class>
            <name>context=SYSTEM, mapName=BPM-SERVICES, keyName=BPM-SERVICES
            </name>
            <actions>read</actions>
        </permission>
        <permission>
            <class>oracle.security.jps.service.credstore.CredentialAccessPermission
            </class>
            <name>context=SYSTEM, mapName=BPM-CRYPTO, keyName=BPM-CRYPTO</name>
            <actions>read,write</actions>
        </permission>
        <permission>
            <class>oracle.security.jps.JpsPermission</class>
            <name>IdentityAssertion</name>
            <actions>*</actions>
        </permission>
        <permission>
            <class>java.security.AllPermission</class>
        </permission>
    </permissions>
</grant>

(完)

WebCenter Process Spaces

什么是WebCenter Process Spaces?

从业务上来讲,WebCenter Process Spaces就是将Oracle BPM(业务流程管理)与Oracle BPA(业务流程分析)产品的交互界面融入到WebCenter协作门户之中的桥梁。用户无需在不同的界面中切换即可访问相应服务,同时,还可以通过WebCenter强大的E2.0服务提高员工的工作效率与实现知识分享。从技术上讲WebCenter Process Spaces就是在WebCenter中预先配置好的两个Spaces:Modeling Space与Process Space以及其它配套服务。

为什么需要WebCenter Process Spaces?

那么她存在的意义是什么呢?我们可以设想,无论是业务流程的分析过程,还是业务流程参与过程的每个阶段,用户的工作并不是孤立的,不免要与人员、流程、非关系型数据发生关系。例如:员工处理待办时遇到问题,有的员工习惯打开即时聊天工具直接与其它员工即时交流沟通;有的员工喜欢在公司的论坛上与他人深入交流查找答案;也有的员工更习惯查找相关资料或查看维基自己解决问题。当问题解决了,员工可能希望借助博客分享自己的经验。所有这些服务这些都是为了增强员工间交流与实现企业的知识分享,最终实现提高员工的工作效率与企业的知识积累。我们发现,所有这些需求,通过单一的BPM产品很难完全解决问题,而以上所涉及的这些需求又恰恰是WebCenter的强项,因此,WebCenter Process Spaces应运而生,她象是胶水,将BPM与BPA胶合在一起,嵌入到WebCenter容器中,她更象是一个门面,让用户通过单一用户体验界面即可访问不同的服务。

如何配置WebCenter Process Spaces?

首先需要说明的是:

  • WebCenter 与BPM 可以配置在一个域中,也可以配置为各自的域。
  • WebCenter 域与BPM 域可以在一台物理机器也可以分布在不同的物理机器
  • 如果WebCenter 与BPM 配置在不同的域中,需要为这两个域配置信任域

由于硬件环境限制,以下示例以单域配置。

1. 创建域

注意在创建域之前应该先想清楚你需要哪些服务,例如:是否需要配置Paglet Producer服务器或Portlet Producer服务器,尽量避免配置不必要的产品。

运行域置向导,在“选择域源”页中选择以下产品(我的配置为例):

  • Basic WebLogic Server
  • Oracle BPM Suite
  • Oracle WebCenter Spaces
  • Oracle SOA Suite
  • Oracle Universal Content Management
  • Oracle Enterprise Manager
  • Oracle WebCenter Discussion Server
  • Oracle WSM Policy Manager
  • Oracle JRF

其它步骤略:参见《如何配置WebCenter Domain》

注:为避免带来后续配置不必要的麻烦,建议创建域时,为每个被管理服务器指定机器名或IP地址

2. 扩展域

在线文档中描述:

On the “Select Extension Source” screen, select Extend my domain
automatically to support the following added products and select Oracle
BPM Spaces
from the list of available products.

注:上文中指的Oracle BPM Spaces根本不存在,此处是个bug,通过以下步骤修正:

再次运行域配置向导,在“选择域源”页中,选择“将此域基于一个现有模板”,点击“浏览”选择:%WC_ORACLE_HOME”%\common\templates\applications\oracle.bpm.spaces_template_11.1.1.jar。

其它步骤略

3. 配置脚本

将目录%SOA_ORACLE_HOME”%\bpm\process_spaces复制到任意位置,例如:d:\process_spaces

修改目录中的配置文件:process-portal-install.properties,以我的配置文件为例:

################################################
# BPM Process Portal installation properties   #
################################################
#Flag to decide whether to extend existing BPM domain or create a new one.
extendSoa=true
#Flag to decide whether to prompt for passwords or read them from this file
promptForPasswords=false
#BPM Schema details
bpmDBUser=DEV_SOAINFRA
bpmDBPassword=welcome1
bpmDBType=ORACLE
bpmDBDriver=oracle.jdbc.OracleDriver
bpmDBUrl=jdbc:oracle:thin:localhost:1521:orcl
#BPM MDS details
bpmMDSUser=DEV_MDS
bpmMDSPassword=welcome1
#BPM Runtime details
bpmHost=gniu-cn
#Managed server port if BPM is installed on managed server. Else admin port
bpmRuntimePort=8001
bpmAdminUser=weblogic
bpmAdminPassword=welcome1
#webcenter spaces installation details
wcOracleHome=s:/fmw/wc
#If extendSoa flag is set to true, then configure the below two properties to point to BPM domain
wcDomainName=wc_domain
#Flag to control whether to set domain realm password or not
wcSetDomainRealmPassword=true
#This is the password to setup trusted domains. Same password should be set on BPM domain as well
wcDomainRealmPassword=welcome1
wc.server.port=8888
#Webcenter's weblogic installation details
wcHost=gniu-cn
wcAdminPort=7001
wcAdminUser=weblogic
wcAdminPwd=welcome1
wcManagedServerName=WC_Spaces
#Flag to control whether to configure services
wcConfigServices=false
#content server details
wcContentServerName=gniu-cn
wcContentServerPort=4444
wcContentSpacesRoot=/WebCenterSpaces-Root
wcContentAdminUser=weblogic
#discussion server details
wcDiscussionServerUrl=http://gniu-cn:8890/owc_discussions
wcDiscussionAdminUser=weblogic

注:修改install.xml,查找:

<handler classname=”oracle.bpm.processportal.util.AntPasswordInputHandler”

classpath=”${wcOracleHome}/soa/modules/oracle.bpm.processportal_11.1.1/oracle.bpm.processportal.util.jar”/>

将oracle.bpm.processportal_11.1.1换为oracle.bpm.spaces_11.1.1,些处是个bug

4. 执行脚本

首先执行%WL_HOME%\server\bin\setWLSEnv.cmd加载必要类,在process_spaces目录下执行:

ant -f install.xml -DpromptForPasswords=true

重新启动所有服务器,然后执行如下脚本:

ant -f install.xml post-install -DpiArgs –importGSOnly

再次提醒,如果WebCenter 与BPM 配置在不同的域中,需要为这两个域配置信任域

5. 查看结果

process_portal

(完)

IBM JDK OutOfMemoryError

一个客户使用的是Oracle BPM 10.3(即:以前的BEA AquaLogic BPM,其前身是Fuego)for WebSphere,最近出现每半小时重启一次的问题,经过分析最终定位是IBM JDK升级造成的,同时找到以下信息:

NOTE: Only for Java 5.0 Service Refresh 4 (build date:February 1st, 2007) and older. When you use delegated class loaders, the JVM can create a large number of ClassLoader objects. On IBM Java 5.0 Service Refresh 4 and older, the number of class loaders that are permitted is limited to 8192 by default and an OutOfMemoryError exception is thrown when this limit is exceeded. Use the -Xmxcl parameter to increase the number of class loaders allowed to avoid this problem, for example to 25000, by setting -Xmxcl25000, until the problem is resolved. Please examine the current thread stack trace to check whether a class loader is being loaded if there is an OutOfMemoryError. For example, the following stack trace indicates that a class loader is being loaded: at com/ibm/oti/vm/VM.initializeClassLoader(Native Method) at java/lang/ClassLoader. (ClassLoader.java:120)

……

这里至关重要的一个参数是:-Xmxcl。上面的意思就是Java 5.0 SR4及以前的版本,这个参数默认是8192,如果类加载器加载的类超过这一数值就会报OutofMemoryError。解决办法就是不断的增加些值,直到找到一个合理数值。

注:Oracle BPM 10.3平台认证信息参考:

《Release Notes for Oracle Business Process Management 10gR3》

(完)

30分钟内搭建SOA/BPM/WC环境

 1. 概述

因为内存3GB的限制在自己的笔记本电脑上通常不能安装完整的FMW 11g。我们可以利用Oracle Amazon EC2的BPM11g PS2的Amazon Machine Image(AMI) 完成从环境搭建演示的工作。在这个虚拟机镜像安装并且配置了以下Oracle产品和BPM 11g的范例应用:

  • Oracle 11g Database Standard Edition
  • Oracle SOA Suite 11gR1 Patch-set 2
  • Oracle BPM 11gR1
  • Oracle Webcenter with BPM Process Spaces
  • Oracle Universal Content Management
  • Oracle JDeveloper with SOA and BPM extensions

可以参考本文档利用Amazon EC2服务创建和管理BPM 11g虚拟机实例,并且连接和访问BPM服务。

2. 主要步骤

2.1 登录Amazon AWS Console(https://aws.amazon.com/ec2/) ,注意:第一次登陆需要注册帐号并且绑定信用卡付费还需要通过固定电话激活帐号。

2. 2 确定security group开放了以下SSH和BPM必须的协议和端口

  • SSH :22
  • HTTP:7001, 8001, 8888, 9001

clip_image002

2.3 选择Lunch Instance启动配置向导,选择Community AMIs标签页,输入soa-bpm,选择083342568607/oracle-soa-bpm-11gr1-ps2-4.2-pub,然后点击Select启动Request Instance Wizard。

clip_image004

clip_image006

2.4 Request Instance Wizard在Create Key Pair部分需要选择Create a new Key Pair输入key pair的名称并且把Keypair下载到本地,其余部分都选择默认值即可。

clip_image008

2.5 当Instance的Status变成running即可启动PuTTY通过SSH到实例.

2.6 接受terms of use 并且设置密码oracle用户密码后所有的服务会自动启动,大概要15分钟即可完成。

2.7 你可以通过PuTTY的SSH,浏览器访问管理界面和应用,或者VNC远程桌面管理f访问。甚至使用本地的JDeveloper把开发后的应用部署到服务器上

3. 常见问题

3.1如何使用PuTTY连接

PuTTY不能直接支持EC2产生的私钥格式,但是可以通过PuTTYgen 转换到PuTTY可以支持的内部格式。

(PuTTYgen download url:ttp://the.earth.li/~sgtatham/putty/latest/x86/puttygen.exe)

1. Import Key导入扩展名为pem的密钥对

clip_image010

2. 然后点击Save private key按钮(注意:不要点默认的Generate)

clip_image012

3. 提示下图选择Y后就获得PuTTY了需要的私钥(扩展名为ppk)。

clip_image014

4. 启动PuTTY,配置Session的Host name。该参数就是EC2 Instance的Public DNS

clip_image016

clip_image018

5. 配置SSH的Auth的私钥为刚才生成的私钥文件

clip_image020

6. 如果在公司内网访问需要配置proxy,注意选择Proxy Type为HTTP,Proxy hostname可以使用www-proxy.jp.oracle.com

clip_image022

7. 输入Session的名称然后Save后可以复用。就可以点击Open开始SSH EC2实例了。

clip_image024

8. 用户名为root,就开始显示Terms of Use了。

clip_image026

9. 10到15分钟后相关服务完成自动启动,一些常用的脚本和文档

root用户查看启动日志 grep ‘orawls-start’ /var/log/messages | tail

oracle用户查看服务器状态 /home/oracle/bin/check-server-status.sh

readme文档 /home/oracle/README.txt

3.2 如何使用VNC连接

1. 配置PuTTY打开本地SSH通道将流量转发到EC2实例,load之前保存的配置选择Tunnels,新增一个转发端口然后单击Add

clip_image028

2. 选择Connection->Data设置登录的用户名设置为oracle

clip_image030

3. 好习惯先Save Session再Open

clip_image032

4. 私钥不起作用,必须要输入oracle的password(第一次SSH成功后设置的password)。使用vncserver命令启动VNC会话,如果返回值是2那么对应的5902端口

clip_image034

5. 然后就可以使用VNC Viewer远程连接。可以启动远程桌面的Firefox访问BPM/WC/EM,甚至启动JDeveloper,就是速度比较慢。建议用本地的浏览器和JDev

clip_image036

clip_image038

clip_image040

3.3 配置和费用

为了运行BPM+WC必须使用8G内存的m1.large类型的EC2,配置是

7.5 GB memory

4 EC2 Compute Units (2 virtual cores with 2 EC2 Compute Units each)

850 GB instance storage

64-bit platform

I/O Performance: High

费用参考http://aws.amazon.com/ec2/pricing/ ,m1.large是每小时$0.34

3.4 Weblogic/jcooper用户的默认密码都是welcome1

3.5 BPM Workspace中弹出窗口无法访问

注意到访问的地址是机器名,必须在i:\WINDOWS\system32\drivers\etc修改hosts文件,新增ip地址和机器名的对应。IP地址是Public DNS中的数字,例如http://ec2-174-129-89-101.compute-1.amazonaws.com的IP就是172.129.89.101

clip_image042

clip_image044

4. 参考文档

Amazon Elastic Compute Cloud Getting Started Guide

Oracle BPM Blog

(完)