No query executer factory registered for the ... language.

I am trying to create and install a custom data source for Jasper Reports Server 4.7.0.  According what I have been reading all I need to do is

  • Create implementations of the following:
    • JRDataSource
    • ReportDataSourceService
    • JRQueryExecuter
    • JRQueryExecuterFactory
  • Create a resource bundle (to be placed in .../WEB-INF/bundles) for the data source creation screen
  • Create an applicationContext-???.xml file (to be placed in .../WEB-INF) containing the following:
    •     <bean id="myCustomDataSource"
              <property name="factory" ref="customDataSourceServiceFactory"/>
              <property name="name" value="myCustomDataSource"/>
              <property name="serviceClassName" value="....MyCustomDataSource"/>
              <property name="propertyDefinitions">
                          <entry key="name" value="property1"/>
                          <entry key="default" value="some value"/>
                          <entry key="name" value="property2"/>
                          <entry key="default" value="some other value"/>
                          <entry key="name" value="repository"/>
                          <entry key="hidden" value="true"/>
                          <entry key="default" value-ref="repositoryService"/>
                          <entry key="name" value="beanForInterfaceImplementationFactory"/>
                          <entry key="hidden" value="true"/>
                          <entry key="default" value-ref="dataSourceServiceFactories"/>
              <property name="queryExecuterMap">
                      <entry key="Custom" value="....MyCustomDataSourceQueryExecuterFactory"/>

    <bean class="com.jaspersoft.jasperserver.api.common.util.spring.GenericBeanUpdater">
        <property name="definition" ref="addMessageCatalog"/>
        <property name="value" value="WEB-INF/bundles/myCustomDataSource_messages"/>
        <property name="valueType" value="stringList"/>

After doing this and getting the files in the correct place on the server, I am able to create instances of my data source; however when I go to run a repor that uses my data source, I get

net.sf.jasperreports.engine.JRException: net.sf.jasperreports.engine.JRRuntimeException: No query executer factory registered for the '...' language

The report unit in question has my custom data source as its configured data source, and the report template specified my custom language as the query language. 

Walking through the Jasper Reports Server souce code, I found that when attemting to get the relevant QueryExecuterFactory from net.sf.jasperreports.engine.util.JRQueryExecuterUtils.getExecuterFactory(...), my factory is not found. This is becuase my custom language is not in the relevant ExecuterFactoryBundle map. 

Can anyone shed some light as to what I need to do to get my custom laguage (and associated QueryExecuterFactory) into that bundle/map?




levas's picture
Joined: Dec 18 2008 - 7:53am
Last seen: 9 years 1 month ago
No answers... Is is that no one has been creating custom datasources, or no one has experienced the issue I am having?
levas - 10 years 4 months ago
Actually we only added a jar file to the lib folder, with the custom executer classes. and a line in the file.
waal - 10 years 4 months ago

1 Answer:

It seems like you haven't added a line to your file (in the classes directory). It should look something like this:

where CXS_SQL should be replaced by your own language name.

waal's picture
Joined: Nov 6 2012 - 2:22pm
Last seen: 8 years 7 months ago
You are exactly correct. I just found this a day or so ago in updated documentation I found on the JasperSoft support site. I meant to post this answer but got busy and planned to do so when I got a chance. Thanks, Rob
levas - 10 years 4 months ago