Getting "No query executer factory registered for the 'plsql' language" Exception from Java code -
Getting "No query executer factory registered for the 'plsql' language" Exception from Java code -
i have simple study displays fields database. have setup info adapter in jasper , set query. can preview study jasper, when comes java couldn't compile study , show next exceptions
jun 18, 2014 3:17:49 pm org.apache.commons.digester.digester endelement severe: end event threw exception
caused by: net.sf.jasperreports.engine.jrruntimeexception: no query executer mill registered 'plsql' language.
java.lang.reflect.invocationtargetexception jun 18, 2014 3:17:49 pm me.jasper.print.statementprint generatereport severe: null
net.sf.jasperreports.engine.jrexception: org.xml.sax.saxparseexception; linenumber: 7; columnnumber: 16; error @ line 7 char 16: no query executer mill registered 'plsql' language.
caused by: org.xml.sax.saxparseexception; linenumber: 7; columnnumber: 16; error @ line 7 char 16: no query executer mill registered 'plsql' language.
here jasper study query setting
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="testdataadapter"/> <querystring language="plsql"> <![cdata[call getstatementdetails(250001 , "2012-01-01" , "2015-01-01" , 0 , 0)]]> </querystring>
here java code
jasperdesign jasperdesign = jrxmlloader.load(new file("/home/mint/jaspersoftworkspace/myreports/ar/plsql.jrxml")); jasperreport jasperreport = jaspercompilemanager.compilereport(jasperdesign); jasperprint print = jasperfillmanager.fillreport(jasperreport, new hashmap<>()); jasperviewer jasperviewer = new jasperviewer(print, false); jasperviewer.setvisible(true);
you must specify query executer mill because back upwards plsql not included default in jasperreports library. in ireport (at to the lowest degree in older versions), believe setup default. can verify in ireport gui via:
menu tools -> options -> query executers specifically: language = plsql, factory class = com.jaspersoft.jrx.query.plsqlqueryexecuterfactory fields provider class = com.jaspersoft.ireport.designer.data.fieldsproviders.sqlfieldsproviderto same in java, must something like:
jasperreport.setproperty( "net.sf.jasperreports.query.executer.factory.plsql" ,"com.jaspersoft.jrx.query.plsqlqueryexecuterfactory"); //maybe too, not positive jrproperties.setproperty( jrqueryexecuterfactory.query_executer_factory_prefix+"plsql" ,"com.jaspersoft.jrx.query.plsqlqueryexecuterfactory");
note class names have changed in recent versions. so, instead of jrqueryexecuterfactory
, might need utilize queryexecuterfactory
. (if not help, should specify version of jasperreports using.) need create sure jasperreports extension library in classpath. can find jar in ireports lib directory.
external resources:
jrqueryexecuterfactory how execute oracle stored procedures in jasper reports no query executer mill registered 'plsql' language in jasperserver 5.1 java plsql jasper-reports
Comments
Post a Comment