Bug 1275334

Summary: dashbuilder: Static data set definitions in WEB-INF/datasets dir not loaded on JWS3 (tomcat 8)
Product: [Retired] JBoss BPMS Platform 6 Reporter: Jan Hrcek <jhrcek>
Component: BAMAssignee: David Gutierrez <dgutierr>
Status: CLOSED EOL QA Contact: Gui Jospin <gjospin>
Severity: urgent Docs Contact:
Priority: high    
Version: 6.2.0CC: kverlaen, mczernek, rrajasek
Target Milestone: CR1Keywords: TestBlocker
Target Release: 6.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
When you deploy Business Central on Red Hat JBoss Web Server 3, static Dashbuilder dataset definitions placed in the WEB-INF/datasets directory are not loaded. There is currently no workaround. Note that the ability to create dataset definitions in the Dataset editor (Extensions > Data Sets) is not affected.
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-27 20:10:38 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Static data set definitions none

Description Jan Hrcek 2015-10-26 14:29:31 UTC
Created attachment 1086529 [details]
Static data set definitions

Description of problem:
When business-central is deployed on JWS3 in tomcat 8, Static data set definitions (see attachment) in WEB-INF/datasets are not loaded.

This setup is working correctly on EAP and in JWS2 (with tomcat 7) (i.e. those 3 data set definitions appear in Data Sets perspective > D.S. Explorer)

But when I do similar setup on tomcat8 (EWS 3) the data set definitions are not found/loaded and there are no log messages from DataSetDefDeployer class, which is responsible for scanning the dataset deployments dir.

Version-Release number of selected component (if applicable):
BPM Suite 6.2.0 ER4

How reproducible:
Always

Steps to Reproduce:
1. Setup BPM Suite 6.2.0 on EWS 3 (tomcat8).
2. create directory 'deployments' in tomcat8/webapps/business-central/WEB-INF/ 
3. copy all files from the attachment to this directory
4. Start tomcat using tomcat8/bin/catalina.sh run

Actual results:
The data set definitions are not loaded in UI. No error messages in the logs

Expected results:
The data set definitions should be loaded and should appear in Data Set Explorer in Data Sets perspective.

Comment 1 David Gutierrez 2016-03-18 10:15:10 UTC
It is been reported & fixed upstream:

https://issues.jboss.org/browse/DASHBUILDE-98

Comment 2 Jan Hrcek 2016-03-31 07:38:47 UTC
Bad news:( I executed tests with BPM Suite 6.3.0 ER2 and now it's not working on any container (EAP, WAS, WLS, JWS2 & JWS 3). Static datasets in "business-central.war/WEB-INF/datasets" are not deployed.

From the logs it seems that deployment is not triggered on any container.

I debugged DataSetDefDeployerCDI with BPMS deployed on EAP and found out that its init() method takes else branch [1] and ends up with webInf == null, thus deploy(..) doesn't get executed.

Please review the fix.

[1] https://github.com/dashbuilder/dashbuilder/commit/16c7d30395357b5ee9e5decb5e430b8a541f184e#diff-dcd61d78d45f4318c962928b1b7d98e4R52

Comment 4 Jan Hrcek 2016-04-14 12:41:28 UTC
The current implementation is still not OK I'm afraid :(
Now it's working fine with EAP (distributed in exploded war) and also with EWS 2 and EWS 3.

But it's broken (=nothing gets imported) in WAS and WLS distributions
I checked that these distributions do not contain the files {"app.html.template", "security-management.properties"} in business-central.war/WEB-INF/classes which dashbuilder uses as starting point for finding WEB-INF/datasets.

It's also not working with community eap6 (non-exploded) war distro as we discussed a week ago because EAP seems to create a copy of war contents to some temporary folder in standalone/data directory and does not copy contents of WEB-INF/dataset to this copy.

So far the best implementation seemed to be the original one (using servletContext.getRealPath("WEB-INF/datasets")) which was workin on all containers except for EWS 3 (tomcat 8). Can't we make THAT working for tomcat 8?

Comment 5 Jan Hrcek 2016-04-20 13:55:34 UTC
Update on the latest fix from https://github.com/dashbuilder/dashbuilder/pull/173

Tried 2 patched jars provided by David and the results are:
It's working on WLS and EAP, but not working on tomcat8 (the container this bz was initially reported for).

The impact is as before: static dataset definitions deployed in business-central/WEB-INF/datasets are not loaded on tomcat8.

Comment 6 David Gutierrez 2016-04-20 15:23:57 UTC
PR submitted which basically rollbacks to the original solution.

https://github.com/dashbuilder/dashbuilder/pull/173

We will investigate later on a better way to discover the datasets deployment dir.

I've tested The solution on both Tomcat 8.0.33 & tomcat 8 bundled in JWS 3.0. In both case the datasets are deployed ok.

Comment 7 Jan Hrcek 2016-04-28 08:41:49 UTC
We've come the full circle and now we're back where we were in the beginning (see original description). The feature is now working on all the containers except for jws3/tomcat8. After debugging this with David we've found out there's a tomcat8 specific issue with locating WEB-INF/datasets directory