unable to resolve class com.company.model

1
0
-1

Hi team,
I have deployed a diagram in the server portal and imported BDM also successfully.
I am calling the API and able to get the process ID via process name but unable to instantiate the process by necessary inputs via payload. Getting following error.
Please do the needful at the earliest.

Error:- {"exception":"class org.bonitasoft.engine.bpm.process.ProcessExecutionException","message":"USERNAME=XXXX | org.bonitasoft.engine.core.process.instance.api.exceptions.SProcessInstanceCreationException: PROCESS_DEFINITION_ID=7885772952500303039 | PROCESS_NAME=TestMultiInputPool | PROCESS_VERSION=1.0 | org.bonitasoft.engine.expression.exception.SExpressionEvaluationException: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:\nBScript7.groovy: 1: unable to resolve class com.company.model.TestMultiPool \n @ line 1, column 24.\n def testMultiPoolVar = new com.company.model.TestMultiPool()\n ^\n\n1 error\n"}

Comments

Submitted by charles.souillard on Tue, 09/24/2019 - 17:03

Hello,

this looks weird. It works well on my side. Can you please share you .bos file?

thanks,
Charles

Submitted by sivaprasad.kodu... on Wed, 09/25/2019 - 07:36

Hi Chales,

Thanks for quick reply,

here is my .bos file and steps that i followed for publishing this as follows:-
bos file link
Step 1:- Build the bonita diagram and executed it in bonita studio. extracted it in the .bar file.Step 2:- upload the bdm.zar file in the bonita server portal and uploaded the .bar file in the process.Step 3:- Trying to run the process as per the documentation via API. (a) http://localhost:8080/bonita/loginservice - POST (b) http://localhost:8080/bonita/API/bpm/process?s=poolname - GET (c) http://localhost:8080/bonita/API/bpm/process/'+ task_id +'/instantiation - POST(with payload)
Getting error:- {"exception":"class org.bonitasoft.engine.bpm.process.ProcessExecutionException

.bos file is at :- https://get.xcubelabs.com/index.php/s/OJLDc49O1NM77AJ/download

Submitted by charles.souillard on Wed, 09/25/2019 - 10:35

Hello,

it is actually working well on my side. I have:
- imported your bos file in my Studio
- tested it in my embedded runtime (works well) using the run button
- tested it using the 3 API calls from a Postma app:
* POST - http://localhost:8080/bonita/loginservice?username=walter.bates&passwrod...
* GET - http://localhost:8080/bonita/API/bpm/process?s=PackedPool
* POST - http://localhost:8080/bonita/API/bpm/process/7826460503800440240/instant... - with payload { "packedAlaramInput": {"eid":"A", "event":"B", "tally":"C", "ip":"D", "port":"E"}}

The only thing that looks different from what you did is about the deployment. Actually I don't undersatnd what you did when you talk about "extracted it in the .bar file.Step 2:- upload the bdm.zar file in the bonita server portal and uploaded the .bar file in the process."

If you can clarify this I can test again.

Charles

Submitted by sivaprasad.kodu... on Wed, 09/25/2019 - 12:08

Hi charles,
Thanks once again,
It worked fine in the bonita studio(Only for the testing purpose), but how do i deploy into the server for production environment. I want that to be deployed in the bonita server.
So followed the steps.
1) In bonita studio -> Server -> Build ( uploaded that in the process tab of server)
2) Development -> Business Data Model -> Export ( Imported the same in the server as the tenant user)

Then i am unable to run the process via API.

Please do the needful.

Thanks,
Naga siva prasad.

Submitted by charles.souillard on Thu, 09/26/2019 - 11:06

Hello again,

there is something I don't understand. On my side, starting from a fresh Bonita Community Tomcat bundle, I did:
- login to the portal as a technical user with install/install
- install an organization (ACME, exported from the Studio)
- give to Walter Bates user both Admin and user profiles
which organization are you using? You need some users to be mapped to actors or nothing will work right?
- login as Walter Bates to the portal as Admin and install the PackedPool process (build from studio) => this partially fails as BDM as not been installed (process is installed but is not enabled
- login as install/install to the portal and install the BDM (exported from the studio)
- login as Walter Bates to the portal as Admin and enables the PackedPool process
- switch to user profile (still with Walter bates) and start a first case of the process and check it was successfully executed (it works)
- logout
- execute from Postma the 3 REST Calls I did mention in my previous comment (they all 3 work)
- login to the portal as walter bates user and verify the case has been started executed correctly: it works

Can you please try this sequence as well and let me know?

Charles
- go into postma
-

Submitted by sivaprasad.kodu... on Thu, 09/26/2019 - 11:37

Hi Charles,

Ya tried with the same flow as you suggested, but there also I can't able to run the process. I am getting the attached error.
https://get.xcubelabs.com/index.php/s/Fc0g9Qa11S9WOWS/download

(One more modification i have done is Changed the default h2 database to Mysql Database)

Error:-
https://get.xcubelabs.com/index.php/s/Fc0g9Qa11S9WOWS

Please do the needful.

Thanks,
Naga siva prasad.

Submitted by charles.souillard on Thu, 09/26/2019 - 12:00

Hello,

to make sure we make progress on the analysis, we need to reduce the problem size. Can you please confirm (or try it) that:
- you started from a brand new Bonita Community Tomcat (to avoid conflicts related to past actions)
- you did not change the DB configuration

It is key that we end up you and me in the same situation to move forward. Once we will be there, we will change one thing at a time...

thanks,
Charles

Submitted by sivaprasad.kodu... on Thu, 09/26/2019 - 12:08

Hi Charles,
Thanks, I just started with a new instance with default configuration and tried the same procedure/flow.
It is working fine and case is been created.
So, please guide me, how we configure with Mysql as well.

Thanks & Regards,
Naga siva prasad.

Submitted by charles.souillard on Thu, 09/26/2019 - 14:22

Hello,

sure I can help. Switching to MySQL is a common use case. You have all the details described in these pages:
- https://documentation.bonitasoft.com/bonita/7.9/BonitaBPM_platform_setup
- https://documentation.bonitasoft.com/bonita/7.9/database-configuration

To make sure you deal with one issue at a time, I strongly recommend that:
- you make a try from a brand new Bonita Community Tomcat bundle and a new MySQL database
- you follow the documentation, step by step
- you make a test using the portal first before spending time with external REST calls

Please write down in a file all steps in the order you made them so that I can reproduce on my side in case it does not work in the end. In addition to this, I will have to know more about your db (version, config...)

Thanks,
Charles

Submitted by sivaprasad.kodu... on Fri, 09/27/2019 - 12:53

Hi Charles,

Taken a fresh instance and followed the installation process as below.

Link :- https://get.xcubelabs.com/index.php/s/PJTT1m2jYhpmXUt

Every thing worked fine.

Process is working fine in the server portal also and data is getting inserted into MySQL also.

Thanks for your support once again.

Regards,
Naga siva prasad.

No answers yet.
Notifications