Thursday, August 11, 2011

Install Bonita BPMS 5.4.2 with JBoss 6

(also tested with Bonita 5.5)

Bonita API tutorials
http://www.bonitasoft.org/blog/tutorial/building-your-applications-with-bonita-runtime-part-1/
http://www.bonitasoft.org/blog/tutorial/building-your-applications-with-bonita-runtime-part-2/
http://www.bonitasoft.org/blog/tutorial/building-your-applications-with-bonita-runtime-%E2%80%93-part-3/

Bonita installation tutorials
http://www.bonitasoft.org/wiki/doku.php
http://www.bonitasoft.org/wiki/doku.php?id=install_bos5.3_in_jboss

==============================

Installation:
- download Bonita 5.4.2 + JBoss 5.1 bundle

- copy bonita-app.war bonita.ear bonita.war to JBOSS_HOME/server/default/deploy/

- rename bonita.war to bonita-web.war
new administration path - http://127.0.0.1:8080/bonita-web/
(otherwise JBoss 6 generate exception because two appication with similar name.)

copy folders bonita/client bonita/server/ from bundle to JBOSS_HOME/


add Bonita configuration lines to  JBOSS_HOME/bin/run.conf

#Sets Bonita configuration variables
BONITA_OPTS="-DBONITA_HOME=../bonita -Dorg.ow2.bonita.api-type=EJB3 "
MEMORY_OPTS="-Xshare:auto -Xms512m -Xmx1024m -XX:MaxPermSize=256m -XX:+HeapDumpOnOutOfMemoryError"
LOG_OPTS="-Djava.util.logging.config.file=../external/logging/logging.properties"
JAVA_OPTS="$JAVA_OPTS $BONITA_OPTS $MEMORY_OPTS $LOG_OPTS"
export JAVA_OPTS

- if your start directory is not $JBOSS_HOME/bin then you must add absolute path to BONITA_HOME, for example -DBONITA_HOME=/opt/jboss-6.0.0.Final/bonita


- add security configuration to JBoss:
Add to $asDomain\conf\login-config.xml inside <policy> tags:

<!-- Config for Bonita -->
<application-policy name="BonitaAuth">
          <authentication>
            <login-module code="org.ow2.bonita.identity.auth.BonitaIdentityLoginModule" flag="required"/>
          </authentication>
</application-policy>
<application-policy name="BonitaStore">
          <authentication>
            <login-module code="org.ow2.bonita.identity.auth.BonitaRemoteLoginModule" flag="required"/>
            <login-module code="org.jboss.security.ClientLoginModule" flag="required">
             <module-option name="password-stacking">useFirstPass</module-option>
           </login-module>
          </authentication>
</application-policy>
<!-- End config for bonita -->


==============================

Libraries:

- add

bonita-client-5.4.2.jar
jaxrs-api-1.2.1.GA.jar

to $JBOSS_HOME/client


- replace slf4j-api with version 1.6.1 (latest)

- replace hibernate-search with version 3.4.Final (latest) and move to /common/lib/

- replace lucene-core with version 3.1 (latest) and move to /common/lib/
- replace lucene-analyzers with version 3.1 (latest) and move to /common/lib/


bonita.war
- remove asm.jar
commons-codecs
commons-io
commons-logging
slfj
xstream


remove all hibernate & lucene libraries from bonita.ear WEB-INF/lib
(I removed all libraries from bonita.ear WEB-INF/lib)

==============================

Source code changes:

- make 2 changes in org.ow2.bonita.search.SearchUtil java class:

1 - recompile SearchUtil with hibernate-search-3.4.jar in dependencies
2 - remive (comment) all hibernate search hanlers regishtations

You can find SearchUtil.java here:
http://svn.bonitasoft.org/bonita-runtime/tags/bonita-runtime-5.4/bonita-server/src/main/java/org/ow2/bonita/search/SearchUtil.java
and SearchUtil.class in bonita.ear:bonita-ejbjar.jar

rebuild with hibernate-search-3.4.jar in dependencies and pack back to bonita.ear:bonita-ejbjar.jar

==============================

Switch from H2 to PostgreSQL database (optional):

- create PostgreSQL Bonita databases:

createdb -h localhost -U postgres -E UTF8 bonita_journal
createdb -h localhost -U postgres -E UTF8 bonita_history

(Bonita will self-create tables)

- copy postgresql JDBC driver jar file to JBOSS_HOME/server/default/lib/

- remove $JBOSS_HOME/server/default/deploy/h2-ds.xml
- create Bonita database configuration file $JBOSS_HOME/server/default/deploy/postgres-ds.xml

with text:
<?xml version="1.0" encoding="UTF-8"?>

<datasources>
  <no-tx-datasource>
    <jndi-name>bonita/default/journal</jndi-name>
    <connection-url>jdbc:postgresql://localhost/bonita_journal</connection-url>
    <driver-class>org.postgresql.Driver</driver-class>
    <user-name>postgres</user-name>
    <password></password>
    <idle-timeout-minutes>0</idle-timeout-minutes>
  </no-tx-datasource>

  <no-tx-datasource>
    <jndi-name>bonita/default/history</jndi-name>
    <connection-url>jdbc:postgresql://localhost/bonita_history</connection-url>
    <driver-class>org.postgresql.Driver</driver-class>
    <user-name>postgres</user-name>
    <password></password>
    <idle-timeout-minutes>0</idle-timeout-minutes>
  </no-tx-datasource>

</datasources>

Edit these files (comment H2 parts and uncomment PostgreSQL parts)
jboss-6.0.0.Final/bonita/server/default/conf/bonita-history.properties
jboss-6.0.0.Final/bonita/server/default/conf/bonita-journal.properties
(there is bug - PostgreSQL port 5432 written as 5433 - you must replace to 5432)

....

Profit!

Thursday, July 7, 2011

Mercurial Version Control CheatSheet

Tutorial: http://hgbook.red-bean.com/read/

create a new repository in the given directory:
hg init

Making a local copy of a repository:
hg clone http://hg.serpentine.com/tutorial/hello

A tour through history:
hg log

Viewing specific revisions:
hg log -r 3
hg log -r 0272e0d5a517
hg log -r 4:2 (from 2 to 4 revision)

display the latest changeset (HEAD revision):
hg tip

tell what Mercurial knows about the files in the repository:
hg status

review changes:
hg diff

create a new changeset:
hg commit

use the hg pull command to bring changes from remote repository to local (hg pull does not (by default) touch the working directory files):
hg pull [remote repository]

command to tell us what changes the hg pull command would pull into the repository, without actually pulling the changes in:
hg incoming [remote repository]

update working files to latest repository revision:
hg update tip

The hg outgoing command tells us what changes would be pushed into another repository
(it simply lists any changes in the current repository that aren’t in the another repository):
hg outgoing [remote repository]

And the hg push command does the actual push into another repository:
hg push [remote repository]

Make patch from single revision:
hg export 3 > ../changes.diff
or
hg export tip > patch.diff

Apply patch (single revision):
hg import ../changes.diff

Create branch:
hg clone -r mybranchname

List activerepository branches:
hg branches -a

List actual repository branch head revisions:
hg heads

Merge heads:
hg merge
hg commit -m "merge"

Tag version:
hg tag Version-1.0

Init new project:
hg init myproject

Import Subversion repository
(Mercurial will automatically detect the trunk, tags and branches layout that Subversion projects usually use):
hg convert http://python-nose.googlecode.com/svn

To start tracking working files:
hg add

Undo changes that you have made to your working directory:
hg revert

Undo revision:
hg rollback

Undo entire changeset:
hg backout --merge

Finding the source (revision) of a bug:
hg bisect

Repository backup (The -U option doesn't check out a working directory after the clone completes):
hg clone -U myrepo myrepo.bak

Sign code (GPG extension):
hg sign [REVISION]

Check signature:
hg sigcheck REVISION

List signed revisions:
hg sigs

Friday, May 27, 2011

OpenERP 6.0 installation instruction (Debian 5)

Please read my previous post http://enterprise-soft.blogspot.com/2011/05/openerp-60-installation-instruction.html

Here are only Debian 5 specific differences


# install system dependencies
apt-get install python
apt-get install python-lxml
apt-get install python-mako
apt-get install python-egenix-mxdatetime
apt-get install python-dateutil
apt-get install python-psycopg2
apt-get install python-pychart
apt-get install python-pydot
apt-get install python-tz
apt-get install python-reportlab
apt-get install python-yaml
apt-get install python-vobject
apt-get install python-setuptools
apt-get install python-matplotlib # for client
apt-get install python-hippocanvas # for client

# configuration file for Debian - /usr/share/doc/openerp-server-6.0.2/openerp-server.conf

adduser openerp
su openerp
cd

#run for testing:
python /usr/lib/python2.5/site-packages/openerp-server/openerp-server.py

# run standalone server:
nohup python /usr/lib/python2.5/site-packages/openerp-server/openerp-server.py &

Postinstall steps

1. OpenERP client - change superadministrator password
2. OpenERP client - create database for your company

OpenERP 6.0 installation instruction (Ubuntu)

# download openerp-server and openerp-client sources from official site http://www.openerp.com/

# create database user
sudo su postgres
createuser openerp
psql template1 -c "alter role openerp with password 'postgres'";
exit

# install system dependencies
sudo apt-get install python-lxml
sudo apt-get install python-mako
sudo apt-get install python-egenix-mxdatetime
sudo apt-get install python-dateutil
sudo apt-get install python-psycopg2
sudo apt-get install python-pychart
sudo apt-get install python-pydot
sudo apt-get install python-tz
sudo apt-get install python-reportlab
sudo apt-get install python-yaml
sudo apt-get install python-vobject
sudo apt-get install python-setuptools
sudo apt-get install python-webdav # for client
sudo apt-get install python-matplotlib
sudo apt-get install python-hippocanvas

# test server:
tar -xzf openerp-server-6.0.0.tar.gz
cd openerp-server-6.0.0/bin
python openerp-server.py

# install server:
tar -xzf openerp-server-6.0.0.tar.gz
cd openerp-server-6.0.0
sudo python setup.py install

# run server:
openerp-server


#GTK client v. 5.0.14:
sudo apt-get install openerp-client

Open ERP Folder:
/usr/local/share/doc/openerp-server-6.0.2

# You can find the OpenERP server configuration file at ~/openerp-server-6.0.0/doc/openerp-server.conf
/usr/local/share/doc/openerp-server-6.0.2/doc/openerp-server.conf
(Debian - /usr/share/doc/openerp-server-6.0.2/openerp-server.conf )

Database Configuration:
1. configure openerp-server.conf
2. run server (openerp-server)
3. install GTK client
4. configure client to server path
5. create database from client menu


To create database from command line:
openerp-server -d DB_NAME -r DB_USER -w DB_PASSWORD --init=модули [--without-demo=all]

Friday, May 6, 2011

jBPM 5 Tips

From jBoss advertisement (http://www.jboss.org/jbpm/components/core-engine.html):

- From a spring based web application for a grocery store on Tomcat over a top scale banking application to a plain standalone Java application.
- The jBPM engine can be used as a remote service.
- Simple API
- Human tasks
- Integrated with rules engine
- Transactional execution, timers and asynchronous continuations

Reality:

0. jBPM & Drools source code & documentation quality


- no comments in source code
- no Java API with any comments. (What do fireAllRuless() function while I start BPMN2 process?).

jBPM only:
- no developer documentation
- no typical deployment configurations (only Tomcal+hibernate. No typical GlassFish or JBoss configurations).
- no examples. Test cases only. Developer need read Drools documentation & source code for BPMN programming!
- absolutly unusefull API for Business Process Management. jBPM 5.0 have only API for Rules in simple drools-flow session, but it is nontrivial task to find active tasks for user "myuser" avtivity.
- no usefull remote API. Remote application can set tast "completed" or "aborted" but it cannot find tasks for execution! It must already now the Task ID for set it "completed", but without search! JBoss group said it is "Simple API" and "The jBPM engine can be used as a remote service." :)
- now any user authorithation internally (in source code)
- TCP port for MinaTaskServer "Human Task" without any authorithation. JBoss group said it is "top scale banking application" - ready :) Banks are welcome:)
- The community of previous versions of jBPM migrated from JBoss to Activiti fork project.

Guvner only:
- No any way to integrate with Subversion or other version control or build system for developers.


1. Experimental & unstable dependencies in "stable" releases.

jBPM 5.0 FINAL is based on Drool Flow and include drools, drools-flow 5.2.0.M1 (Milestome 1) library, with unfixed database bugs, etc. It is Drools/jBPM practice. It is fact.


2. Do you want to use JPA persistence?
- You need add persistence.xml + orm.cml to META-INF folder.
- You need catch exception ProcessInstancesWaitingForEvent, then use google, then find ProcessInstancesWaitingForEvent named query in GWT (http://community.jboss.org/thread/162854), then manually add ProcessInstancesWaitingForEvent named query to orm.xml.


ProcessInstancesWaitingForEvent named query:

<named-query name="ProcessInstancesWaitingForEvent">
<query>
select
    processInstanceInfo.processInstanceId
from
    ProcessInstanceInfo processInstanceInfo
where
    :type in elements(processInstanceInfo.eventTypes)
</query>
</named-query>


jBPM 5.0 Final user documentation said, for persistance:

StatefulKnowledgeSession ksession = JPAKnowledgeService.newStatefulKnowledgeSession(knowledgeBase, null, env);

It is not work with JPA, of course.
In reality (work example from jBPM JUnit test):

Properties properties = new Properties();
properties.put("drools.processInstanceManagerFactory","org.jbpm.persistence.processinstance.JPAProcessInstanceManagerFactory");
properties.put("drools.processSignalManagerFactory","org.jbpm.persistence.processinstance.JPASignalManagerFactory");
KnowledgeSessionConfiguration config = KnowledgeBaseFactory.newKnowledgeSessionConfiguration(properties);

StatefulKnowledgeSession ksession = JPAKnowledgeService.newStatefulKnowledgeSession(knowledgeBase, config, env);



- For PostgreSQL, after Hibernate create database structure, developer must run database modification script to fix metadata bug:


ALTER TABLE sessioninfo DROP COLUMN rulesbytearray;
ALTER TABLE sessioninfo ADD COLUMN rulesbytearray bytea;


ALTER TABLE workiteminfo DROP COLUMN workitembytearray;
ALTER TABLE workiteminfo ADD COLUMN workitembytearray bytea;


There is same bug in processinstanceinfo table - processinstancebytearray column, but ORM mapping do not allow fix it by simple database modification.

So, yes! It is 5.0 FINAL version! :)

3. Do you want to use JBoss JPA?

- Use this persistence.xml configuration:

<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
             version="1.0">


   <persistence-unit name="org.jbpm.persistence.jpa" transaction-type="JTA">
      <provider>org.hibernate.ejb.HibernatePersistence</provider>
      <jta-data-source>java:/jdbc/jbpmDS</jta-data-source>


    <class>org.drools.persistence.info.SessionInfo</class>
    <class>org.jbpm.persistence.processinstance.ProcessInstanceInfo</class>
    <class>org.jbpm.persistence.processinstance.ProcessInstanceEventInfo</class>
    <class>org.drools.persistence.info.WorkItemInfo</class>
    <class>org.jbpm.process.audit.ProcessInstanceLog</class>
    <class>org.jbpm.process.audit.NodeInstanceLog</class>
    <class>org.jbpm.process.audit.VariableInstanceLog</class>
   
    <class>org.jbpm.task.Attachment</class>
    <class>org.jbpm.task.Content</class>
    <class>org.jbpm.task.BooleanExpression</class>
    <class>org.jbpm.task.Comment</class>
    <class>org.jbpm.task.Deadline</class>
    <class>org.jbpm.task.Delegation</class>
    <class>org.jbpm.task.Escalation</class>
    <class>org.jbpm.task.Group</class>
    <class>org.jbpm.task.I18NText</class>
    <class>org.jbpm.task.Notification</class>
    <class>org.jbpm.task.EmailNotification</class>
    <class>org.jbpm.task.EmailNotificationHeader</class>
    <class>org.jbpm.task.PeopleAssignments</class>
    <class>org.jbpm.task.Reassignment</class>
    <class>org.jbpm.task.Status</class>
    <class>org.jbpm.task.SubTasksStrategy</class>
    <class>org.jbpm.task.Task</class>
    <class>org.jbpm.task.TaskData</class>
    <class>org.jbpm.task.OnParentAbortAllSubTasksEndStrategy</class>
    <class>org.jbpm.task.OnAllSubTasksEndParentEndStrategy</class>
    <class>org.jbpm.task.User</class>


      <properties>
         <property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect"/>
         <property name="hibernate.show_sql" value="true"/>
         <property name="hibernate.hbm2ddl.auto" value="update"/>
         <property name="hibernate.jdbc.batch_size" value="20"/>
         <property name="hibernate.default_schema" value="public"/>
         <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup"/>
      </properties>
   </persistence-unit>
</persistence>




Still you want to use jBPM and DRools now?

Wednesday, May 4, 2011

Subversion + Apache install and administration cheatsheet (Ubuntu/Debian Linux)

Help links

http://subversion.apache.org/


http://www.noah.org/wiki/Apache_webdav_svn


http://www.systhread.net/texts/200707svndav1.php

Install software packets (Ubuntu/Debian Linux)

sudo apt-get install apache2
sudo apt-get install subversion
sudo apt-get install libapache2-svn
/etc/init.d/apache2 restart

Configure

mkdir /var/subversion
mkdir /var/subversion/repository1
mkdir /var/subversion/repository2

svnadmin create --fs-type fsfs /var/subversion/repository1
svnadmin create --fs-type fsfs /var/subversion/repository2

echo "" > /var/subversion/users.htpasswd
echo "" > /var/subversion/apache_svn.conf


vim /var/subversion/apache_svn.conf


# /var/subversion/apache_svn.conf
#############################################

## webdav entry for Subversion repositories



<Location /svn>
DAV svn
SVNParentPath /var/subversion
SVNAutoversioning on
AuthType Basic
AuthName SVNRepository
AuthUserFile /var/subversion/users.htpasswd
require valid-user
Order deny,allow
</Location>
########################################################################



echo "Include /var/subversion/apache_svn.conf" >> /etc/apache2/httpd.conf

htpasswd /var/subversion/users.htpasswd user1
htpasswd /var/subversion/users.htpasswd user2
chown -R www-data:root /var/subversion

/etc/init.d/apache2 restart


Create repository directories structure

svn co http://89.111.61.188/svn/repository1
cd repository1
mkdir myproject
mkdir myproject/tags
mkdir myproject/branches
mkdir myproject/trunk
svn add myproject
svn commit -m "add myproject"

Repository sample directories structure

myproject - subversion repository project
myproject/clientfiles - all files received from a client
myproject/docs - project related documentation, diagrams and other files
myproject - all project work here
myproject/trunk/myproject - my project
myproject/trunk/myproject/forms
myproject/trunk/myproject/services
myproject/tags
myproject/tags/0.1/myproject
myproject/tags/0.5/myproject
myproject/tags/1.0/myproject

Backup and Resore

Backup:

svnadmin dump /var/subversion/repository1 > repository1.dumpfile

Resore:

svnadmin load /var/subversion/repository1 < repository1.dumpfile Hotcopy (as direcotry): svnadmin hotcopy /var/subversion/repository1 /var/subversion/repository1-backup create local read-only repository mirror: svnsync initialize MIRROR_URL SOURCE_URL --source-password ARG --source-username ARG --sync-password ARG --sync-username ARG update mirror: svnsync synchronize DEST_URL


Redmain integration

Redmine is very power project management and team collaboration tool.

From Redmain install instruction (DO NOT FOLLOW IT!):

#find / -name reposman.rb


#ruby /opt/redmine-1.0.3/extra/svn/reposman.rb -f --redmine-host http://89.111.61.188:80/ --svn-dir /var/subversion/redmine --url file:///var/subversion/redmine/ --owner www-data



Configure like here:

- Go to redmine -> myproject -> settings -> Repository

- Type http://89.111.61.188/svn/repository1 + login + password

JBoss 5.1 + Linux/Unix install, secure, administration cheatsheet

Install

Download jboss-5.1.0.GA and unpack to /opt directory:

cd /opt

wget -nd http://citylan.dl.sourceforge.net/project/jboss/JBoss/JBoss-5.1.0.GA/jboss-5.1.0.GA.zip

unzip jboss-5.1.0.GA.zip

Configure

addgroup jboss

adduser --system --home /opt/jboss-5.1.0.GA --no-create-home --ingroup jboss jboss

passwd jboss [enter password]

chown -R jboss:jboss /opt/jboss-5.1.0.GA

Start JBoss

Start command for Jboss server (jboss user, mydomain.com IP binding, "default" server domain)

nohup su -l jboss -s /bin/bash -c "/opt/jboss-5.1.0.GA/bin/run.sh -c default -b mydomain.com" > /dev/null &

You can add this command to cron.

Command:

crontab -e

Cron file string:

@reboot nohup su -l jboss -s /bin/bash -c "/opt/jboss-5.1.0.GA/bin/run.sh -c default -b mydomain.com" > /dev/null &


View JBoss log to control that all run well:

tail -f /opt/jboss-5.1.0.GA/server/default/log/server.log

Secure

By default JBoss installation have some web administration enter points with standard admin login/password.

Administrator must change these passwords to secure server.


Config files for password changing:

cd /opt/jboss-5.1.0.GA/server/default/

vim deploy/jmx-console.war/WEB-INF/web.xml

vim deploy/jmx-console.war/WEB-INF/jboss-web.xml



vim deploy/http-invoker.sar/invoker.war/WEB-INF/web.xml

vim deploy/http-invoker.sar/invoker.war/WEB-INF/jboss-web.xml



vim deploy/admin-console.war/WEB-INF/web.xml

vim deploy/admin-console.war/WEB-INF/jboss-web.xml



vim deploy/management/console-mgr.sar/web-console.war/WEB-INF/web.xml

vim deploy/management/console-mgr.sar/web-console.war/WEB-INF/jboss-web.xml



vim deploy/jbossws.sar/jbossws-management.war/WEB-INF/web.xml

vim deploy/jbossws.sar/jbossws-management.war/WEB-INF/jboss-web.xml



vim deploy/management/console-mgr.sar/web-console.war/WEB-INF/classes/web-console-users.properties

vim deploy/profileservice-secured.jar/profileservice-users.properties



vim conf/props/jbossws-users.properties

vim conf/props/jmx-console-users.properties

vim conf/props/messaging-users.properties



Deploy Web/Java EE application

Chown file owner to jboss:jboss and move WAR/EAR to /opt/jboss-5.1.0.GA/server/default/deploy/

PostgreSQL data source configuration

Download PostgreSQL JDBC file postgresql-*.*-***.jdbc3.jar to /opt/jboss-5.1.0.GA/server/default/lib/ directory.

chown jboss:jboss /opt/jboss-5.1.0.GA/server/default/lib/postgresql-*.*-***.jdbc3.jar



Create configuration file postgres-ds.xml in deploy directory:

vim /opt/jboss-5.1.0.GA/server/default/deploy/postgres-ds.xml


postgres-ds.xml file content:


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE datasources
    PUBLIC "-//JBoss//DTD JBOSS JCA Config
1.5//EN" "http://www.jboss.org/j2ee/dtd/jboss-ds_1_5.dtd">
<datasources>
   <local-tx-datasource>
<jndi-name>MyDatasource</jndi-name>
<use-java-context>false</use-java-context>
<connection-url>jdbc:postgresql:payment_processing</connection-url>
<driver-class>org.postgresql.Driver</driver-class>
<user-name>postgres</user-name>
<password>mypassword</password>
   </local-tx-datasource>
</datasources>


chown /opt/jboss-5.1.0.GA/server/default/deploy/postgres-ds.xml

Tuesday, May 3, 2011

Bonita (BPMS) installation with JBoss AS 5.1 and PostgreSQL database

create PostgreSQL Bonita databases:

createdb -h localhost -U postgres -E UTF8 bonita_journal
createdb -h localhost -U postgres -E UTF8 bonita_history

copy postgres JDBC driver jar to $JBOSS_HOME/server/default/lib

copy lib jars to $JBOSS_HOME/server/default/lib

copy conf./* to $JBOSS_HOME/server/default/conf/

edit $JBOSS_HOME/server/default/conf/bonita/server/default/conf/bonita-journal.properties
edit $JBOSS_HOME/server/default/conf/bonita/server/default/conf/bonita-history.properties


edit run.conf
JAVA_OPTS="$JAVA_OPTS -DBONITA_HOME=/opt/jboss-5.1.0.GA/server/default/bonita"
JAVA_OPTS="$JAVA_OPTS -Djava.util.logging.config.file=/opt/jboss-5.1.0.GA/server/default/external/logging/logging.properties"
JAVA_OPTS="$JAVA_OPTS -Djava.security.auth.login.config=/opt/jboss-5.1.0.GA/server/default/external/security/jaas-jboss.cfg"
JAVA_OPTS="$JAVA_OPTS -Dorg.ow2.bonita.environment=/opt/jboss-5.1.0.GA/server/default/bonita/server/default/conf/bonita-environment.xml"
JAVA_OPTS="$JAVA_OPTS -Djava.naming.factory.initial=org.jnp.interfaces.NamingContextFactory"

edit ./server/default/conf/login-config.xml

</application-policy>
<application-policy name="BonitaAuth">
<authentication>
    <login-module code="org.ow2.bonita.identity.auth.BonitaIdentityLoginModule" flag="required"/>
</authentication>
</application-policy>
<application-policy name="BonitaStore">
<authentication>
    <login-module code="org.ow2.bonita.identity.auth.BonitaRemoteLoginModule" flag="required"/>
    <login-module code="org.ow2.bonita.identity.auth.LocalStorageLoginModule" flag="required"/>
</authentication>
</application-policy>


JBoss security context:

-Djava.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-Djava.naming.provider.url=jnp://localhost:1099
-Dorg.ow2.bonita.api-type=EJB3
-Dorg.ow2.bonita.environment=conf/bonita-environment.xml

JBoss 5.1 Web Services bug under JDK 1.6

Problem:

When using Jboss 5.1 I get the stack trace below when trying to submit a WS SOAP request:

   1. 09:58:31,822 ERROR [SOAPFaultHelperJAXWS] SOAP request exception 
   2. java.lang.UnsupportedOperationException: setProperty must be overridden by all subclasses of SOAPMessage 
   3.     at javax.xml.soap.SOAPMessage.setProperty(Unknown Source) 
   4.     at org.jboss.ws.core.soap.SOAPMessageImpl.<init>(SOAPMessageImpl.java:82) 
   5.     at org.jboss.ws.core.soap.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:215) 
   6.     at org.jboss.ws.core.soap.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:193) 
   7.     at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:455) 
   8.     at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:295) 
   9.     at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:205) 
  10.     at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:131) 
  11.     at org.jboss.wsf.common.servlet.AbstractEndpointServlet.service(AbstractEndpointServlet.java:85) 
  12.     at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) 
  13.     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) 
  14.     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 
  15.     at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) 
  16.     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) 
  17.     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 
  18.     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235) 
  19.     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) 
  20.     at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190) 
  21.     at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92) 
  22.     at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126) 
  23.     at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70) 
  24.     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) 
  25.     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) 
  26.     at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158) 
  27.     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) 
  28.     at com.northgatearinso.common.SessionCookieValve.invoke(SessionCookieValve.java:81) 
  29.     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330) 
  30.     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829) 
  31.     at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601) 
  32.     at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) 
  33.     at java.lang.Thread.run(Unknown Source) 
  34. 09:58:31,822 ERROR [RequestHandlerImpl] Error processing web service request 
  35. org.jboss.ws.WSException: java.lang.UnsupportedOperationException: setProperty must be overridden by all subclasses of SOAPMessage 
  36.     at org.jboss.ws.WSException.rethrow(WSException.java:68) 
  37.     at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:336) 
  38.     at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:205) 
  39.     at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:131) 
  40.     at org.jboss.wsf.common.servlet.AbstractEndpointServlet.service(AbstractEndpointServlet.java:85) 
  41.     at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) 
  42.     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) 
  43.     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 
  44.     at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) 
  45.     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) 
  46.     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 
  47.     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235) 
  48.     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) 
  49.     at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190) 
  50.     at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92) 
  51.     at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126) 
  52.     at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70) 
  53.     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) 
  54.     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) 
  55.     at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158) 
  56.     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) 
  57.     at com.northgatearinso.common.SessionCookieValve.invoke(SessionCookieValve.java:81) 
  58.     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330) 
  59.     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829) 
  60.     at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601) 
  61.     at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) 
  62.     at java.lang.Thread.run(Unknown Source) 
  63. Caused by: java.lang.UnsupportedOperationException: setProperty must be overridden by all subclasses of SOAPMessage 
  64.     at javax.xml.soap.SOAPMessage.setProperty(Unknown Source) 
  65.     at org.jboss.ws.core.soap.SOAPMessageImpl.<init>(SOAPMessageImpl.java:82) 
  66.     at org.jboss.ws.core.soap.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:169) 
  67.     at org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS.createSOAPMessage(SOAPFaultHelperJAXWS.java:295) 
  68.     at org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS.toSOAPMessage(SOAPFaultHelperJAXWS.java:256) 
  69.     at org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS.exceptionToFaultMessage(SOAPFaultHelperJAXWS.java:187) 
  70.     at org.jboss.ws.core.jaxws.binding.SOAP11BindingJAXWS.createFaultMessageFromException(SOAP11BindingJAXWS.java:102) 
  71.     at org.jboss.ws.core.CommonSOAPBinding.bindFaultMessage(CommonSOAPBinding.java:671) 
  72.     at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:496) 
  73.     at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:295) 
  74.     ... 25 more 
  75. 09:58:31,822 ERROR [[DocumentGenerator]] Servlet.service() for servlet DocumentGenerator threw exception 
  76. java.lang.UnsupportedOperationException: setProperty must be overridden by all subclasses of SOAPMessage 
  77.     at javax.xml.soap.SOAPMessage.setProperty(Unknown Source) 
  78.     at org.jboss.ws.core.soap.SOAPMessageImpl.<init>(SOAPMessageImpl.java:82) 
  79.     at org.jboss.ws.core.soap.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:169) 
  80.     at org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS.createSOAPMessage(SOAPFaultHelperJAXWS.java:295) 
  81.     at org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS.toSOAPMessage(SOAPFaultHelperJAXWS.java:256) 
  82.     at org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS.exceptionToFaultMessage(SOAPFaultHelperJAXWS.java:187) 
  83.     at org.jboss.ws.core.jaxws.binding.SOAP11BindingJAXWS.createFaultMessageFromException(SOAP11BindingJAXWS.java:102) 
  84.     at org.jboss.ws.core.CommonSOAPBinding.bindFaultMessage(CommonSOAPBinding.java:671) 
  85.     at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:496) 
  86.     at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:295) 
  87.     at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:205) 
  88.     at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:131) 
  89.     at org.jboss.wsf.common.servlet.AbstractEndpointServlet.service(AbstractEndpointServlet.java:85) 
  90.     at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) 
  91.     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) 
  92.     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 
  93.     at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) 
  94.     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) 
  95.     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 
  96.     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235) 
  97.     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) 
  98.     at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190) 
  99.     at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92) 
 100.     at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126) 
 101.     at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70) 
 102.     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) 
 103.     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) 
 104.     at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158) 
 105.     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) 
 106.     at com.northgatearinso.common.SessionCookieValve.invoke(SessionCookieValve.java:81) 
 107.     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330) 
 108.     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829) 
 109.     at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601) 
 110.     at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) 
 111.     at java.lang.Thread.run(Unknown Source) 


Solution:

- copy
client/jbossws-native-jaxrpc.jar
client/jbossws-native-jaxws-ext.jar
client/jbossws-native-jaxws.jar
client/jbossws-native-saaj.jar
to libs/endorsed

P.S. I found this list of jar-s to copy in internet, but it is incorrect with my JBoss installation:
jboss-jaxrpc.jar
jboss-jaxws-ext.jar
jboss-jaxws.jar
jboss-saaj.jar

OpenERP 6 installation instruction

OpenERP 6 + Ubuntu 10.10 installation instruction

sudo su postgres
createuser openerp
psql template1 -c "alter role openerp with password 'postgres'";
exit


sudo apt-get install python-lxml
sudo apt-get install python-mako
sudo apt-get install python-egenix-mxdatetime
sudo apt-get install python-dateutil
sudo apt-get install python-psycopg2
sudo apt-get install python-pychart
sudo apt-get install python-pydot
sudo apt-get install python-tz
sudo apt-get install python-reportlab
sudo apt-get install python-yaml
sudo apt-get install python-vobject
sudo apt-get install python-setuptools
sudo apt-get install python-webdav # for client
sudo apt-get install python-matplotlib
sudo apt-get install python-hippocanvas

# test server:
tar -xzf openerp-server-6.0.0.tar.gz
cd openerp-server-6.0.0/bin
python openerp-server.py

# install server:
tar -xzf openerp-server-6.0.0.tar.gz
cd openerp-server-6.0.0
sudo python setup.py install

# run server:
openerp-server


#GTK client v. 5.0.14:
sudo apt-get install openerp-client

Open ERP Folder:
/usr/local/share/doc/openerp-server-6.0.2

# You can find the OpenERP server configuration file at ~/openerp-server-6.0.0/doc/openerp-server.conf
/usr/local/share/doc/openerp-server-6.0.2/doc/openerp-server.conf

Database Configuration:
1. configure openerp-server.conf
2. run server (openerp-server)
3. install GTK client
4. configure client to server path
5. create database from client menu


Create database from command line:
openerp-server -d DB_NAME -r DB_USER -w DB_PASSWORD --init=модули [--without-demo=all]

https://launchpad.net/openobject-addons - modules
https://launchpad.net/openobject-server - server
https://launchpad.net/openobject-client - Python+GTK desktop client
https://launchpad.net/openobject-client-kde - Qt desctop client
https://launchpad.net/openobject-client-web - web client