Jump to content

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


levas
Go to solution Solved by waal,

Recommended Posts

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"
                class="com.jaspersoft.jasperserver.api.engine.jasperreports.util.CustomDataSourceDefinition">
              <property name="factory" ref="customDataSourceServiceFactory"/>
              <property name="name" value="myCustomDataSource"/>
              <property name="serviceClassName" value="....MyCustomDataSource"/>
              <property name="propertyDefinitions">
                  <list>
                      <map>
                          <entry key="name" value="property1"/>
                          <entry key="default" value="some value"/>
                      </map>
                      <map>
                          <entry key="name" value="property2"/>
                          <entry key="default" value="some other value"/>
                      </map>
                      <map>
                          <entry key="name" value="repository"/>
                          <entry key="hidden" value="true"/>
                          <entry key="default" value-ref="repositoryService"/>
                      </map>
                      <map>
                          <entry key="name" value="beanForInterfaceImplementationFactory"/>
                          <entry key="hidden" value="true"/>
                          <entry key="default" value-ref="dataSourceServiceFactories"/>
                      </map>
                  </list>
              </property>
              <property name="queryExecuterMap">
                  <map>
                      <entry key="Custom" value="....MyCustomDataSourceQueryExecuterFactory"/>
                  </map>
              </property>
          </bean>

    <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"/>
    </bean>

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?

Thanks,

Rob

 

Link to comment
Share on other sites

  • 3 weeks later...
  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • Solution

It seems like you haven't added a line to your jasperreports.properties file (in the classes directory). It should look something like this:
net.sf.jasperreports.query.executer.factory.CXS_SQL=net.sf.jasperreports.engine.query.JRConnexysJdbcQueryExecuterFactory

where CXS_SQL should be replaced by your own language name.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...