No markup processor factory specified for "HTML" markup error on JaspeReports Server

4.8k Views Asked by At

I am working on a JasperReports report that works totally fine when I compile it on the Jaspersoft Studio but when I deploy it on the JR Server 6.3.0 it gives me an error that no markup processor specified for the the HTML markup:

No markup processor factory specified for "HTML" markup

I used the html markup to add few font effects to some text parts in the report. I am attaching a screenshot of the error.

enter image description here

How I can fix this error?

1

There are 1 best solutions below

0
On BEST ANSWER

The Java code that looking for a processor is a case sensitive.

package net.sf.jasperreports.engine.fill;
// ...
public abstract class JRFillTextElement extends JRFillElement implements JRTextElement {
// ...
private static final Map<String, MarkupProcessor> markupProcessors = new HashMap<String, MarkupProcessor>(); 
// ...
protected MarkupProcessor getMarkupProcessor(String markup) {
    MarkupProcessor markupProcessor = markupProcessors.get(markup); // it is just a Map. The key is case sensetive

In default.jasperreports.properties file the processor for html markup is registered with lower case. Look at the end of name (factory.html):

net.sf.jasperreports.markup.processor.factory.html=net.sf.jasperreports.engine.util.JEditorPaneMarkupProcessor.HtmlFactory

You should use the name at lower case, like this:

<textField>
    <reportElement x="0" y="0" width="100" height="10"/>
    <textElement markup="html">