Bug 1275334 - dashbuilder: Static data set definitions in WEB-INF/datasets dir not loaded on JWS3 (tomcat 8)
dashbuilder: Static data set definitions in WEB-INF/datasets dir not loaded o...
Status: ASSIGNED
Product: JBoss BPMS Platform 6
Classification: JBoss
Component: BAM (Show other bugs)
6.2.0
Unspecified Unspecified
high Severity urgent
: CR1
: 6.3.0
Assigned To: David Gutierrez
Jan Hrcek
: TestBlocker
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-10-26 10:29 EDT by Jan Hrcek
Modified: 2016-05-02 07:15 EDT (History)
3 users (show)

See Also:
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:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Static data set definitions (2.20 KB, application/zip)
2015-10-26 10:29 EDT, Jan Hrcek
no flags Details

  None (edit)
Description Jan Hrcek 2015-10-26 10:29:31 EDT
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 06:15:10 EDT
It is been reported & fixed upstream:

https://issues.jboss.org/browse/DASHBUILDE-98
Comment 2 Jan Hrcek 2016-03-31 03:38:47 EDT
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 08:41:28 EDT
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 09:55:34 EDT
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 11:23:57 EDT
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 04:41:49 EDT
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

Note You need to log in before you can comment on or make changes to this bug.