= Bonita Studio preferences
:description: Learn about deployment, web and other Bonita Studio preferences, and the Bonita Studio embedded Tomcat configuration.

Learn about deployment, web and other Bonita Studio preferences, and the Bonita Studio embedded Tomcat configuration.

== Bonita Studio preferences

To configure Bonita Studio preferences, click *_Preferences_* in the Cool bar.

=== General preferences

Database

* Database clean-up: by default, the database (used by Bonita Engine) preserves all data when Bonita Studio exits. You can override this in order to purge all data instead, which may be useful when you are testing processes.
* Organization load: by default, the default organization is loaded with Bonita Studio starts. You can override this.

Appearance

* Coolbar size: Normal (default) or small.
* Grid options for process diagrams. You can choose to use a grid positioning for all new process diagrams
* Grid spacing (in centimeters). Default: 0.5
* Theme: Light or Dark

Language

* Bonita Studio language.
* Web applications language: the language to use by default when loading process forms and Bonita Portal

Java

* The JRE (Java Runtime Environment) to used by default. JRE will be used when compiling and running Java code

=== Deployment preferences

Run mode

* Validation: whether to validate the process before it runs. We recommend to keep this option enabled.

Server settings

* Start engine server lazily: by default, the engine server is started when the Studio starts up. You may choose not to start the engine until it is actually needed, that is, when you first deploy a new process/organization/BDM/... or when you launch the UI Designer for the first time.
* Custom page debug mode: When enabled, custom pages classloader are rebuilt at each call. Can be useful when updating custom page source directly from cache folder (`_<tomcat_folder>/server/temp/bonita_portal__<id>_@hostname/tenants/_<tenantId>_/pages/_<custompage_folder>_`)
* Port number: Studio embedded Tomcat HTTP listening port.
* Tomcat Maximum memory allocation (in Mb): the maximum memory allocation (Xmx) for the heap of the JVM running the Tomcat server. Default: 512
* Tomcat JVM additional arguments: additional java arguments to be passed to the Tomcat JVM at startup. e.g.: -XX:+HeapDumpOnOutOfMemory
* UI Designer JVM options: additional java arguments to be passed to the UI Designer at startup. e.g.: -Xmx256m

Database connectors

* Manage the JDBC drivers associated with database connectors. You should use that to include JDBC drivers for commercial DBMS (e.g. DB2)

=== Web preferences

Browser

* Specify the web browser used when a web page is displayed. Note that some application might override this setting and use a different browser

Proxy

* HTTP Proxy settings for web access

=== Other preferences

Validation

* Define the validation to be applied to the different components of your project: Business Data Model, Connector validation, KPI validation, and Processes.

[NOTE]
====

You can activate this option for Business users so that they can create and share processes without worrying about the technical constraints
====

Advanced

* Rename diagram the first time it is saved.
* Do not show confirmation on connector definition edition.
* SVN connector: the SVN connector used if you are using a remote SVN xref:workspaces-and-repositories.adoc[repository]. Note: if you change this your local working copy might become unstable. To avoid this, commit any outstanding changes before you modify the connector setting, and reinitialize your local working copy after the update

Eclipse
   Give access to all Eclipse settings (Bonita Studio is based on Eclipse)

== Bonita Studio embedded Tomcat configuration

=== Default configuration

* Embedded Tomcat listens on the following ports:
 ** 8080: HTTP. This value can be modified using Bonita Studio preferences (see above).
 ** 8006: shutdown.
 ** 8009: AJP.
 ** 9091: embedded h2 database server.
* Bonita Studio also uses the following port:
 ** 6969: watchdog

=== Changing the configuration

You might need to edit the Tomcat configuration files for example to:

* xref:logging.adoc[Configure logging]
* Change listening ports (shutdown, AJP, h2) to prevent conflicts
* Declare a datasource to connect to a business database

The Tomcat configuration files are located in the Bonita Studio `workspace/tomcat/conf` folder.

* To change a port number, edit `server.xml`.
* To add a data source, edit `context.xml` or `workspace/tomcat/conf/Catalina/localhost/bonita.xml`.

For more details, see the http://tomcat.apache.org/tomcat-8.5-doc/[Tomcat documentation].

[.troubleshooting-title]
== Troubleshooting

[.troubleshooting-section]
--
[.symptom]*Symptom:* _You see the following error in your Studio log file_

[.symptom-description]
[source,log]
----
!ENTRY org.bonitasoft.studio.common 4 0 2021-06-11 08:45:59.981
!MESSAGE
!STACK 0
java.net.UnknownHostException: www.bonitasoft.com
        at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
        at java.net.PlainSocketImpl.connect(Unknown Source)
        at java.net.SocksSocketImpl.connect(Unknown Source)
        at java.net.Socket.connect(Unknown Source)
        at java.net.Socket.connect(Unknown Source)
[...]
----

[.cause]*Potential cause*

You connect to the internet through Proxy.

[.solution]*Possible solution*

You need to configure your HTTP Proxy settings in the Studio Preferences > Web > Proxy.
--
