I've been blogging about my experience with Dandelion Datatables with Spring and everything was good in development when running the app with Gradle BootRun. Then I created a Fat War to deploy the site on Staging (that's why we have Staging, you know) and encountered a big fat NullPointerException in Dandelion Core.
To save time for you I circled where I suspected the trouble started, in the BowerPreLoader which eventually called up a Resource Scan and the NullPointerException shown below.
The above screenshot is from the Dandelion Core GitHub repo and is yet another reason we use Open Source software, so we can track down issues like this.
BowerPreLoader was particularly suspicious because I wasn't using Bower. I dug into the Dandelion Documentation which thankfully is very good.
Since v1.1.0, new pre-loaders have been introduced to provide integration with package managers such as Bower. All pre-loaders are invoked first. Pre-loaders will scan for all components downloaded using package managers and convert all these components to vendor bundles.
Note that all pre-loaders can be disabled with the bundle.pre.loaders option.
Ahhh, okay. Maybe we can fix this with a configuration setting.
One of the key features of Dandelion-Core is that it is highly configurable. Plenty of options, with default values depending on the active profile, are at your disposal to configure the framework.
By default, Dandelion-Core expects a file called dandelion.properties to be located in the classpath-root/dandelion folder. Example: /resources/dandelion/dandelion.properties.
Happy, happy ending! I added
to a new dandelion.properties file and we were back in business. BootRun, Fat War, it's all good.
Keywords in the Stack: Dandelion, FileSystemLocationResourceScanner, ClasspathResourceScanner, BowerPreLoader, getExtraBundles