Prerequisites:
-ant installation: in linux:
apt-get install ant
-Create PostgreSQL databases: journal and history in PostgreSQL.
1. Export from the STUDIO the userxp and the engine:
Go to Bonita Studio menu, Export Process-Advanced, click on Switch to the last step, Runtime Export Select, verify path: / home/silvia/bonita_applications2, click on Export.
2. Connecting to databases: history and journal.
you have to change this files content:
/ Home/silvia/bonita_applications2/conf/bonita/server/default/conf/bonita-history.properties
and
/ Home/silvia/bonita_applications2/conf/bonita/server/default/conf/bonita-journal.properties
Taking into account for postgreSQL:
hibernate.connection.driver_class org.hibernate.dialect.PostgreSQLDialect hibernate.dialect org.postgresql.Driver
hibernate.connection.url jdbc: postgresql: localhost: 5432/bonita_core
hibernate.connection.shutdown true
postgres hibernate.connection.username
suPostgresPassword hibernate.connection.password
Configure two files:
##
# POSTGRESQL HISTORY
hibernate.dialect org.hibernate.dialect.PostgreSQLDialect
#hibernate.connection.shutdown true
# The following properties must be commented out for deployment using datasource (e.g. when using bundles provided by BonitaSoft)
hibernate.connection.driver_class org.postgresql.Driver
hibernate.connection.url jdbc:postgresql://localhost:5432/history
hibernate.connection.username postgres
hibernate.connection.password silvia
# #
# PostgreSQL JOURNAL OR CORE
hibernate.dialect org.hibernate.dialect.PostgreSQLDialect
#hibernate.connection.shutdown true
# The following properties must be commented out for deployment using datasource (e.g. when using bundles provided by BonitaSoft)
hibernate.connection.driver_class org.postgresql.Driver
hibernate.connection.url jdbc:postgresql://localhost:5432/journal
hibernate.connection.username postgres
hibernate.connection.password silvia
3. copy the DB(PostgreSQL) driver : postgresql-8.4-702.jdbc4.jar
in :
/ home/silvia/bonita_applications2/runtime/lib/server/
4. Db Connection, filling the database tables by built.xml
Located in the runtime folder and enter the command console terminal: ant init-db
silvia-root @ desktop: / home / silvia / bonita_applications2 / runtime # ant init-db
BuildFile: / home / silvia / bonita_applications2 / runtime / build.xml
init-db:
[Input]
[Input] Which domain you want to use to (press enter to use default Without nothing)?
[Input] [default]
ENTER to: DEFAULT
[Input] Where is your BONITA_HOME folder?
[Input]
/Home/silvia/bonita_applications2/conf/bonita /: path BONITA_HOME
[Input]
[Input] Which configuration to use hibernate to generate database (press enter to use default Without nothing)?
[Input] Default is 'hibernate-configuration: core hibernate-configuration: history' to init Both databases
[Input] [hibernate-configuration: core hibernate-configuration: history]
hibernate-configuration: history first
hibernate-configuration: core second time
4. GENERATE BONITA.EAR
Enter the command ant ear.ejb3 from runtime.
root@silvia-desktop:/home/silvia/bonita_applications2/runtime# ant ear.ejb3
Buildfile: /home/silvia/bonita_applications2/runtime/build.xml
ear.ejb3:
ear:
[mkdir] Created dir: /home/silvia/bonita_applications2/runtime/ear/tmp
[mkdir] Created dir: /home/silvia/bonita_applications2/runtime/ear/tmp/META-INF
[copy] Copying 1 file to /home/silvia/bonita_applications2/runtime/ear/tmp/META-INF
[copy] Copying 4 files to /home/silvia/bonita_applications2/runtime/ear/tmp/META-INF
[copy] Copying 1 file to /home/silvia/bonita_applications2/runtime/ear/ejb3
[jar] Updating jar: /home/silvia/bonita_applications2/runtime/ear/ejb3/bonita-ejbjar.jar
[delete] Deleting directory /home/silvia/bonita_applications2/runtime/ear/tmp
[copy] Copying 49 files to /home/silvia/bonita_applications2/runtime/ear/lib
[ear] Building ear: /home/silvia/bonita_applications2/runtime/ear/ejb3/bonita.ear
[echo] EJB3 ear has been generated in ear/ejb3 directory.
[echo] You can use it in the easybeans container, jonas 5 and jboss 5 application server.
BUILD SUCCESSFUL
Total time: 3 seconds
This will generate the file in the directory bonita.ear: bonita_applications2/runtime/ear/ejb3, and this is the file that we can deploy our application server.
You can verify that created the. Ear, and has sun-ejb-jar.xml inside it.
/ Home/silvia/bonita_applications2/runtime/ear/ejb3/glassfish/sun-ejb-jar.xml
Display bonita.ear file in Glassfish.
5. copy the contents of the folders
bonita_applications2/runtime / server / lib: Libraries Bonita engine
bonita_applications2/runtime / client / lib: Libraries Client
bonita_applications2/web / lib: Libraries (Bonita User XP)
in
glassfish3/glassfish/domains/domain1/lib/
6. Set BONITA_HOME path in JVM.
7. Bonita configure User security XP (Auth) and Bonita engine
: BonitaStore
Copy the the contents of JAAS-standard.cfg located in:
/bonita_applications2/conf/external/security/jaas-standard.cfg
to:
/glassfish/domains/domain1/config/login.conf:
BonitaAuth {
org.ow2.bonita.identity.auth.BonitaIdentityLoginModule required;
};
BonitaStore {
org.ow2.bonita.identity.auth.LocalStorageLoginModule required;
};
8. Deploy bonita.war on the server who is located in the bonita_applications2/web/bonita.war: D
HOW TO SOLVE THE ERROR?
HTTP Status 500 -
type Exception report
message
descriptionThe server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: PWC6033: Error in Javac compilation for JSP PWC6199: Generated servlet error: string:///login_jsp.java:6: package org.bonitasoft.console.security.server does not exist PWC6197: An error occurred at line: 21 in the jsp file: /console/login.jsp PWC6199: Generated servlet error:string:///login_jsp.java:57: cannot find symbol symbol : variable
CredentialsEncryptionServlet location: class org.apache.jsp.console.login_jsp note The full stack traces of the exception and its root causes are available in the GlassFish Server Open Source Edition 3.1.1 logs.
GlassFish Server Open Source Edition 3.1.1
Well, this error indicates that : your /bonita_applications/web/lib/security-server-5.4.1.jar there is not in your folder : glassfish3/glassfish/domains/domain1/lib/.So you have to copy all the libs of the folder /bonita_applications2/web/lib/ to the glassfish3/glassfish/domains/domain1/lib/. and after that deploy BonitaUserXp (BUE)