jBPM Workbench & KIE Server interaction - drools

I am running 7.0.0.CR2 of workbench and server in a docker container. It looks on first view that they are working perfectly together. However, when I select the tasks tab in the workbench I get the following error:
Unable to complete your request. The following exception occurred:
Can't lookup on specified data set: jbpmHumanTasksWithUser.
This lead me to this bug: https://issues.jboss.org/browse/JBPM-5432
There they are saying that this is caused by a user not having the kie-server role. There is no kie-server role in my installation, there is however a kie-server group, and the user I am using is a member of this group.
Dockerfile and user and role files can be found here:
https://gist.github.com/martijnburger/c9a1072746d94ffe4beff72830e03ca7

I believe it could be due to a missing login module in your set up, to ensure the role/authentication is passed on to the Kie Server, you need to add a custom login module. Please check this example as reference: https://github.com/cristianonicolai/kie-wb-dev-docker/blob/master/src/main/resources/standalone-full-kie.xml#L379

Related

Azure database works on localhost, but not when used with azure service app

So I've been trying to publish my first project to azure. I've got everything set-up, a service app and a sql database.
My initial page loads properly(It's the standard view for a .net core web application).
The first thing I need to do is register a new user. Whenever I try through my azure app (myapp.azurewebsites.net) it fails and the logs says it's db related.
However I try the same thing by running the application on my machine in production environment, again connected to the azure sql server and everything works perfectly. I can register users, I can create posts, I can edit them. The allow access to azure services option is turned on. This error is from the eventlogs. I have not included the stacktrace.
Category: Microsoft.EntityFrameworkCore.Query EventId: 10100 RequestId: 800001be-0000-ba00-b63f-
84710c7967bb RequestPath: /Identity/Account/Register SpanId: |1e5a93ae-43f424904f38ea9f. TraceId:
1e5a93ae-43f424904f38ea9f ParentId: ActionId: c3430236-e61c-4785-a3c3-4f60ba115b6e ActionName:
/Account/Register An exception occurred while iterating over the results of a query for context type
'MyApp.Data.ApplicationDbContext'. Microsoft.Data.SqlClient.SqlException (0x80131904): Server
name cannot be determined. It must appear as the first segment of the server's dns name
(servername.database.windows.net). Some libraries do not send the server name, in which case the
server name must be included as part of the user name (username#servername). In addition, if both
formats are used, the server names must match.
Those are the different ways I tried to add the connection string to the appsettings.json file. (Server name, catalog, user and password have been replaced, they are written correctly in the appsettings file)
Server=tcp:servername.database.windows.net,1433;Initial Catalog=db;Persist Security Info=False;
User ID=user#server;Password=mypassword;
MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;
Server=tcp:servername.database.windows.net,1433;Initial Catalog=db;Persist Security Info=False;
User ID=user;Password=mypassword;
MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;
Data Source=tcp:server.database.windows.net,1433;
Initial Catalog=db;User Id=#server.database.windows.net;Password=password;
Alright so after a day and a half, I finally managed to fix it. The solution is rather simple and it is most likely my newbie mistake, that caused so much trouble.
I was following a tutorial for setting up the application and database connection after that. In the tutorial, the connection string that was being used, was the default one, found in the "myApp -> Configuration -> Connection strings", the format was:
Data Source=tcp:server.database.windows.net,1433;
Initial Catalog=db;User Id=#server.database.windows.net;Password=password;
This one was working in the guide, but not for me. So what I did, was go to my "sqldb -> connection strings" and copied the one provided there. I then went back to the app configuration and added it as a new configuration string using SqlServer as the Type.
This string was in the format:
Server=tcp:servername.database.windows.net,1433;Initial Catalog=db;Persist Security Info=False;
User ID=user;Password=mypassword;
MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;
After that, the app started working properly.

WSO2 API MANAGER clustering Worker-Manager

This is regarding WSO2 API Manager Worker cluster configuration with external Postgres db. I have used 2 databases i.e wso2_carbon for registry and user management and the wso2_am, for storing APIs. Respective xmls have been configured. The postgres scripts have been run to create the database tables. My log console when wso2server.sh is run, shows enabled clustering and the members of the domain. However on the https://: when I try to create to create APIs, it throws and error in the design phase itself.
ERROR - add:jag org.wso2.carbon.apimgt.api.APIManagementException: Error while checking whether context exists
[2016-12-13 04:32:37,737] ERROR - ApiMgtDAO Error while locating API: admin-hello-v.1.2.3 from the database
java.sql.SQLException: org.postgres.Driver cannot be found by jdbc-pool_7.0.34.wso2v2
As per the error message, the driver class name you have given is org.postgres.Driver which is not correct. It should be org.postgresql.Driver. Double check master-datasource.xml config.

Could not initialize class com.ibm.ws.ffdc.FFDCFilter. DSRA0010E: SQL State = 28P01, Error Code = 0

Can I get assistance with the error codes coming from eclipse when I try to deploy enterprise application on websphere. I followed craig st jean, I also face another problem with configuration i.e websphere data sources using postgresql. i am using a windows machine, 64bit arch. the error codes are the topic of this question. i hope this question can be seen as relevant, since not much solutions exist for the first issue concerning com.ibm.ws.ffdc.FFDCFilter, thus if one doesn't overcome the first, how can one press on and attempt to solve the second. thanks.
Webspere logs
The test connection operation failed for data source AppDb on server server1 at node Lenovo-PCNode01 with the following exception: java.sql.SQLException: FATAL: password authentication failed for user "listmanagerremote" DSRA0010E: SQL State = 28P01, Error Code = 0. View JVM logs for further details.
I have fixed the issues with deployment in the eclipse neon IDE. I think it is either as a result of the installation of the IBM WebSphere Application Server Traditional v8.0x Developer tools for Neon, and IBM jre.
Eclipse console final message
00000063 CompositionUn A WSVR0191I: Composition unit WebSphere:cuname=ListManager in BLA WebSphere:blaname=ListManager started.
Postgre documents the 28P01 SQL State as an invalid password:
"28P01 INVALID PASSWORD invalid_password"
https://www.postgresql.org/docs/9.0/static/errcodes-appendix.html
Check your data source configuration to ensure that you have specified the correct password, or if using an authentication alias for your data source, confirm that the authentication data configuration contains the correct password, and that you have configured the data source and/or resource reference to use that authentication data.

BigSheets - java.io.IOException: java.lang.reflect.UndeclaredThrowableException

I'm unable to browse data with BigSheets on BigInsights on Cloud. When I select a file and change the Reader type, I receive the exception (see screenshot, below).
I was previously able to browse data ok.
Have you logged into BigSheets as a biadmin user ? I think there is some permission issue since you are trying to access the file created by biadmin (/user/biadmin).
One option to confirm is, login to bigsheets as biadmin and try the same.
You can try doing impersonation of biadmin user and try your scenario.
Login to Ambari UI, then go to HDFS --> Config --> Advanced --> Custom core-site
Update or Add the property
hadoop.proxyuser.biadmin.groups=*
hadoop.proxyuser.biadmin.hosts=*
The solution for me was to restart the BigX services in the Ambari console.

Drools workbench test scenarios

Two part question:
I need to setup test case where one bean/fact has collection of items - is it possible to do with workbench editor, I picked Guided list and for each item I was trying to do new Item('sku', 'name') .. but when it tries to compiled it it has can not find Item class. Item class is imported.
After deploying artifact to execution server and testing rules with SOAP UI where I did not specify session in the tag - it seems like by default execution server uses statefull session which affect subsequent rule executions.
I went to project properties created "stateless" session
ksession, default=yes, state=stateless, clock=realtime
Now however if I try to execute by test cases in the workbench I get:
Unable to complete your request. The following exception occurred: Cannot find a default KieSession.
Any ideas???