Steps to deploy the jbpm-console on Weblogic 9.1 and Oracle 9i
Note: I didnt try this effort using latest JBoss JBPM Version,if you run into issues with new version,let me know..
1. Download the jbpm- jPDL Suite (jbpm-jpdl-3.2.1.zip) or the latest stable version jbpm-jpdl-3.2.2 from http://sourceforge.net/project/showfiles.php?group_id=70542&package_id=145174
2. Extract to C:\
3. Go to deploy folder at C:\jbpm-jpdl-3.2.2\deploy
4. Create a new Folder jbpm-console
5. Create a directory structure as,
C:\jbpm-jpdl-3.2.2\deploy\jbpm-console
\build
\dist
\src
\WebContent
\build.xml
6. The contents of build.xml are :
<project basedir="." default="create.war">
<property name="dist" value="dist" />
<target name="create.war">
<war destfile="dist/jbpm-console.war" webxml="WebContent/WEB-INF/web.xml" basedir="WebContent">
</war>
</target>
</project>
7. The contents of WebContent folder are, the directory structure is,
WebContent
\images
\META-INF
\sa
\ua
\WEB-INF
\index.jsp
Just copy the webapp contents from c:\jbpm-jpdl-3.2.2\deploy\webapp into WebContent folder
8.The contents of index.jsp file are :
<%
final String queryString = request.getQueryString();
final String contextRoot = request.getContextPath();
final String target = contextRoot + "/sa/processes.jsf";
if (queryString != null && queryString.length() > 0) {
response.sendRedirect(target + "?" + queryString);
} else {
response.sendRedirect(target);
}
%>
9. Go to WebContent folder and remove jboss-web.xml
10.Go to WebContent\WEB-INF\classes folder and edit hibernate.cfg.xml file
Add these lines ,
<property name="hibernate.dialect">org.hibernate.dialect.Oracle9Dialect</property>
<!-- JDBC connection properties (begin) -->
<property name="hibernate.connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
<property name="hibernate.connection.url">jdbc:oracle:thin:@HOSTNAME:1521:SID</property>
<property name="hibernate.connection.username">USER</property>
<property name="hibernate.connection.password">PASS</property>
<!-- JDBC connection properties (end) -->
<property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
<property name="hibernate.transaction.factory_class">org.hibernate.transaction.JDBCTransactionFactory</property>
Comment these lines in hibernate.cfg.xml
<!-- DataSource properties (begin) === -->
<!-- <property name="hibernate.connection.datasource">java:/JbpmDS</property>
==== DataSource properties (end) -->
Assumption:jbpm tables already created on the Oracle 9i application schema.
<!-- identity mappings (begin) -->
<!-- <mapping resource="org/jbpm/identity/User.hbm.xml"/>
<mapping resource="org/jbpm/identity/Group.hbm.xml"/>
<mapping resource="org/jbpm/identity/Membership.hbm.xml"/>
identity mappings (end) -->
<!-- logging properties (begin) ===
<property name="hibernate.show_sql">true</property>
<property name="hibernate.format_sql">true</property>
<property name="hibernate.use_sql_comments">true</property>
==== logging properties (end) -->
11. Copy the following jars from C:\jbpm-jpdl-3.2.1\server\server\jbpm\lib
to C:\jbpm-jpdl-3.2.1\deploy\jbpm-console\WebContent \WEB-INF\lib
commons-beanutils.jar
dom4j.jar
antlr-2.7.6.jar
ojdbc14.jar
hibernate3.jar
jboss-backport-concurrent.jar
commons-digester.jar
cglib.jar
jbpm-jpdl.jar
bsh.jar
jbossretro-rt.jar
commons-logging.jar
asm.jar
stax-api-1.0.jar
wstx-lgpl-2.0.6.jar
commons-collections.jarjboss-retro-1.1.0-rt.jar
cglib.jar
jbpm-jpdl.jar
bsh.jar
jbossretro-rt.jar
commons-logging.jar
asm.jar
stax-api-1.0.jar
wstx-lgpl-2.0.6.jar
commons-collections.jar
12. Edit the access.properties file in C:\jbpm-jpdl-3.2.2\deploy\jbpm-console\WebContent\WEB-INF and add the user roles the application needs, like
role.identities.user=manager,admin,user
role.identities.user.add=manager,admin,user
role.identities.user.delete=manager,admin,user
role.identities.user.modify=manager,admin,user
role.identities.group=manager,admin,user
role.identities.group.add=manager,admin,user
role.identities.group.delete=manager,admin,user
role.identities.group.modify=manager,admin,user
# Process definition operations
role.process.deploy=manager,admin,user
role.process.delete=manager,admin,user
role.process.start=manager,admin,user
# Process instance and token operations
role.execution.suspend=manager,admin,user
role.execution.edit=manager,admin,user
role.execution.delete=manager,admin,user
role.execution.end=manager,admin,user
# Task management operations
role.tasks=manager,admin,user
role.task.assign=manager,admin,user
role.task.assign.any=manager,admin,user
role.task.modify=manager,admin,user
# Job management operations
role.jobs=manager,admin,user
role.jobs.delete=manager,admin,user
13. Add weblogic.xml in C:\jbpm-jpdl-3.2.2\deploy\jbpm-console\WebContent\WEB-INF
The contents are :
<weblogic-web-app xmlns="http://www.bea.com/ns/weblogic/90"
xmlns:j2ee="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.bea.com/ns/weblogic/90 http://www.bea.com/ns/weblogic/90/weblogic-web-app.xsd
http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<jsp-descriptor>
<debug>true</debug>
</jsp-descriptor>
<context-root>jbpm-console</context-root>
</weblogic-web-app>
14. Edit the web.xml file C:\jbpm-jpdl-3.2.1\deploy\jbpm-console\WebContent\WEB-INF
And comment these lines
<!-- <security-constraint>
<web-resource-collection>
<web-resource-name>Secure Area</web-resource-name>
<url-pattern>/sa/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>user</role-name>
</auth-constraint>
</security-constraint>-->
<!-- Login configuration option #1 - use the login page ==>
<login-config>
<auth-method>FORM</auth-method>
<form-login-config>
<form-login-page>/ua/login.jsf</form-login-page>
<form-error-page>/ua/login.jsf?error=true</form-error-page>
</form-login-config>
</login-config>
<!== End Login configuration option #1 -->
<!-- Login configuration option #2 - use basic auth ==>
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>jBPM Administration Console</realm-name>
</login-config>
<!== End Login configuration option #2 -->
And ,
<!-- This section is so that the web console can deploy in the jbpm-enterprise.ear module -->
<!-- <ejb-local-ref>
<ejb-ref-name>ejb/LocalTimerServiceBean</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local-home>org.jbpm.scheduler.ejbtimer.LocalTimerServiceHome</local-home>
<local>org.jbpm.scheduler.ejbtimer.LocalTimerService</local>
<ejb-link>TimerServiceBean</ejb-link>
</ejb-local-ref> -->
15. After making all these changes, run “ant build.xml” from C:\jbpm-jpdl-3.2.2\deploy\jbpm-console at command prompt and then “ ant create.war” to create the jbpm-console.war file in “C:\jbpm-jpdl-3.2.2\deploy\jbpm-console\dist”
16. Copy this war file in C:\bea91\user_projects\domains\PRJ_DOMAIN\autodeploy and start your application server to deploy jbpm console on weblogic
17. Go to http://localhost:7001/jbpm-console
18. Softwares Needed :
Ant 1.6.5/Ant1.7 , weblogic 9.0/9.1/9.2 , jbpm-jpdl-3.2.2 suite
19.While deploying this war file on weblogic if you get any exceptions listed below, follow the solutions given below
a) javax.enterprise.deploy.spi.exceptions.InvalidModuleException: [J2EE Deployment SPI:260105]Failed to create DDBeanRoot for application, 'C:\jbpm-jpdl-3.2.1\deploy\jbpmgui.war'
use 2.3 dtd instead of 2.4 xsd
<weblogic-web-app xmlns="http://www.bea.com/ns/weblogic/90" xmlns:j2ee="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.bea.com/ns/weblogic/90 http://www.bea.com/ns/weblogic/90/weblogic-web-app.xsd
http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
b) error 503 service unavailable
Set the following Environment variables:
i) JAVA_HOME = c:\bea\jdk142_08\bin;C:\bea\jrockit81sp5_142_08\bin;
ii) ANT_HOME = c:\ant\bin
iii) CLASSPATH = c:\bea\weblogic91\server\lib;C:\bea\weblogic91\server\lib\Weblogic.jar;
(You might need to set some of these CLASSPATHS after building the WAR files)
Any questions, please leave comments and suggestions are more than welcome...
Wednesday, February 18, 2009
Deploying JBoss JBPM Web Console(3.2.2) on Weblogic 9.2
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment