flowable/flowable-engine · warning
Error while generating decision requirements diagram, image…
Error message
Error while generating decision requirements diagram, image will not be stored in repository
What it means
A WARN-level message logged by DecisionRequirementsDiagramHelper.createDiagramForDecision when any Throwable occurs while generating the DRD (decision requirements diagram) PNG during DMN deployment. The deployment itself succeeds and the decision remains executable; only the generated diagram resource is not stored in the repository (the method returns null).
Solutions
- Install AWT/font support in the runtime environment (e.g. fontconfig + DejaVu fonts in the container) and re-deploy.
- Inspect the nested Throwable in the log to fix the actual root cause (e.g. correct the DMNDI section of the .dmn XML).
- If diagrams are not needed, ignore the warning safely — deployment and execution are unaffected.
- Remove or fix invalid <DMNDI> elements, or regenerate the DMN file with a modeler that emits valid DI.
Example fix
// Dockerfile before (minimal JRE) FROM eclipse-temurin:17-jre // after (fonts for AWT diagram generation) FROM eclipse-temurin:17-jre RUN apt-get update && apt-get install -y fontconfig fonts-dejavu-core && rm -rf /var/lib/apt/lists/*
Defensive patterns
Strategy: try-catch
Validate before calling
try { java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(); } catch (Throwable t) { /* headless/AWT unavailable: expect no diagram */ } Try / catch
try { repositoryService.createDeployment().addClasspathResource("decision.dmn").deploy(); } catch (Exception e) { log.error("DMN deployment failed", e); } // diagram loss is only a WARN inside deployment; check resource==null via repository queries Prevention
- Install fontconfig/fonts in container images
- Validate DMNDI sections of .dmn files before deploying
- Treat the warning as cosmetic: verify decisions deploy via repository queries
When it happens
Trigger: Calling the DMN deployer (e.g. RepositoryService.createDeployment().deploy() on a .dmn file, or Spring auto-deployment) when diagram generation throws: headless JVM without fonts/AWT classes, invalid DI (diagram interchange) sections in the DMN XML, or a NullPointerException from missing decision/DI metadata.
Common situations: Running in a minimal Docker image without fontconfig/AWT libraries; DMN XML with missing or malformed DMNDI diagram/shape elements; custom classloaders that cannot load icon resources; any JVM where java.awt initialization fails.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- Error while generating case diagram, image will not be…
- byte array for resource
- Could not find deployment with id
- Could not find deployment with id
- could not get byte array from resource
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/f91e572f15cd3054.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/deployer/DecisionRequirementsDiagramHelper.java:65
try {
byte[] diagramBytes = IoUtil.readInputStream(
dmnEngineConfiguration.getDecisionRequirementsDiagramGenerator().generateDiagram(dmnDefinition, "png",
dmnEngineConfiguration.getDecisionFontName(),
dmnEngineConfiguration.getLabelFontName(),
dmnEngineConfiguration.getAnnotationFontName(),
dmnEngineConfiguration.getClassLoader()), null);
String diagramResourceName = ResourceNameUtil.getDecisionRequirementsDiagramResourceName(
decision.getResourceName(), decision.getKey(), "png");
resource.setName(diagramResourceName);
resource.setBytes(diagramBytes);
resource.setDeploymentId(decision.getDeploymentId());
// Mark the resource as 'generated'
resource.setGenerated(true);
} catch (Throwable t) { // if anything goes wrong, we don't store the image (the decision will still be executable).
LOGGER.warn("Error while generating decision requirements diagram, image will not be stored in repository", t);
resource = null;
}
return resource;
}
protected DmnResourceEntity createResourceEntity() {
return CommandContextUtil.getDmnEngineConfiguration().getResourceEntityManager().create();
}
public boolean shouldCreateDiagram(DecisionEntity decision, EngineDeployment deployment) {
if (deployment.isNew() && decision.hasGraphicalNotation()
&& CommandContextUtil.getDmnEngineConfiguration().isCreateDiagramOnDeploy()) {
// If the 'getDecisionRequirementsDiagramResourceNameFromDeployment' call returns null, it means
// no diagram image for the decision was provided in the deployment resources.
return ResourceNameUtil.getDecisionRequirementsDiagramResourceNameFromDeployment(decision, deployment.getResources()) == null;
}View on GitHub (pinned to d6d39ce1c6)