Bonita home for Bonita BPM 7.4

1
0
-1

Trying to run Bonita BPM with Spring Boot using https://github.com/bonitasoft/bonita-examples/blob/1.0.0/embedded-engine...
I'm still getting

    Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'application': Invocation of init method failed; nested exception is java.lang.RuntimeException: The system property bonita.home is not set. Please, set this property with the path to the bonita home folder.
     You can get a bonita home from BonitaBPMCommunity-<bonita.engine.version>-deploy.zip or use the one generated under
    the folder target/home on this project by running the command 'mvn clean install'.

I know I have to set bonita.home property but the value is unknown.
System.setProperty("bonita.home", "C:\BonitaBPMCommunity-7.4.0-deploy\???");

Thanks!

3 answers

1
0
-1

Any tips?

1
0
-1

Thanks for the reply.

I've seen the documentation. I'm trying to configure my application with this chapter: http://documentation.bonitasoft.com/?page=create-your-first-project-with...

Application.java:

imports...
    public class Application {
        public static void main(String[] args) {
            APITypeManager.setAPITypeAndParams(ApiAccessType.LOCAL, null);
   
            try {
                LoginAPI loginAPI = TenantAPIAccessor.getLoginAPI();
            } catch (BonitaHomeNotSetException e) {
                System.out.println("Set Bonita Home");
            } catch (ServerAPIException e) {
                System.out.println("Server API Exception");
            } catch (UnknownAPITypeException e) {
                System.out.println("Unknwon API Type");
            }
   
        }
    }

pom.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<properties>
<bonita.bpm.version>7.4.0</bonita.bpm.version>
</properties>
<dependencies>
<dependency>
<groupId>org.bonitasoft.engine</groupId>
<artifactId>bonita-client</artifactId>
<version>${bonita.bpm.version}</version>
</dependency>
</dependencies>
<groupId>com.company</groupId>
<artifactId>bonitaMavenCustom</artifactId>
<version>1.0-SNAPSHOT</version>
</project>

After running I get
java.lang.ClassNotFoundException: org.bonitasoft.engine.api.impl.ServerAPIFactory.

Comments

Submitted by Sean McP on Tue, 04/18/2017 - 11:41

A Tip on displaying CODE/LOGS correctly in Posts:

Do not use the Supplied Buttons above, for some reason they refuse to work correctly, and despite bringing it to Bonitasofts attention, it's low priority.

To Show Code/Logs correctly use

< code >
your code/log
< /code >

removing the spaces to allow the showing of code/logs correctly as here:

your code/log

You should still be able to edit your post to ensure the correct formatting of the code to help us understand it easier.

Thanks and regards
Seán

Submitted by mail_146 on Tue, 04/18/2017 - 11:42

Done. :)

1
0
-1

Yeah, that's not gonna work, that's for 6.x.x and will be different for 7.4.x

also as far as I remember there is only one bonita home now as of 7.x.x.

would refer to the 7.x.x documentation here:
http://documentation.bonitasoft.com/?page=_engine-api

regards
Seán

PS: As this reply offers an answer your question, and if you like it, please Mark UP and/or as Resolved.

Comments

Submitted by mail_146 on Fri, 04/21/2017 - 10:57

I've seen the documentation. I'm using this guide: http://documentation.bonitasoft.com/?page=create-your-first-project-with...
I'm sure I'm missing something. I think I'm not the only one: http://community.bonitasoft.com/questions-and-answers/bonita-home-and-pr...
Thanks.

Notifications