Jaspersoft ireport designer 4.5.1 /4.6.0 & hive - jasper-reports

I am trying to design a report using hive connection.
I created hive connection and tested it is working ok.
Is there anything i am doing wrong. I am new to iReport.
jdbc:hive://192.168.254.132:10000/default
I am using report designer, I typed in my HiveQL it gives REPORT_CONNECTION parameter not specified.
I have specified the hive connection.
i tried simple query, select * from iptable.
message:
net.sf.jasperreports.engine.JRException: Parameter "REPORT_CONNECTION" does not exist.
Level:
SEVERE
Stack Trace:
Parameter "REPORT_CONNECTION" does not exist.
com.jaspersoft.hadoop.hive.HiveFieldsProvider.getFields(HiveFieldsProvider.java:88)
com.jaspersoft.ireport.hadoop.hive.designer.HiveFieldsProvider.getFields(HiveFieldsProvider.java:32)
com.jaspersoft.ireport.hadoop.hive.connection.HiveConnection.readFields(HiveConnection.java:154)
com.jaspersoft.ireport.designer.wizards.ConnectionSelectionWizardPanel.validate(ConnectionSelectionWizardPanel.java:146)
org.openide.WizardDescriptor$7.run(WizardDescriptor.java:1357)
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)

Well, this is a little embarrassing. The wizard worked fine in iReport 4.5.0. But it broke in 4.5.1, and somehow no one noticed it. Reports still work fine, so the bug evaded tests. It seems to affect only the Fields Provider. So it shows up in the wizard but not when running the report.
I uploaded a fixed version of the plugin seconds ago. You'll need to uninstall the existing Hadoop Hive plugin, then restart iReport, then install the updated plugin. Then all should be well.
Here's the general project link. Here's the new file linked directly. This should all be obsolete when the next version of iReport ships with the fixed Hive plugin.

Related

Jasper server error when referencing a custom function

I am using JasperStudio v6.3.1 and I followed the tutorial on how to create a custom Java function that I can use in my report. Everything works fine in Jasper Studio, but when I publish the report to the Jasper Server, then it fails. The report does exist on the Server, but does not run after publishing the latest changes.
"Errors were encountered when compiling report expressions class file: 1. The method CURRENT_MONTH_BEGINNING() is undefined for the type TotalTaskHrsOnly..."
This error is generated because the custom Java functions that I made in Jasper Studio did not get published to the remote Jasper Server. I need help with getting these files onto the Jasper Server, but I'm not sure how to do that within Jasper Studio, Jasper Server, or if I need to log into the remote server, and drop the java files in there somewhere. Can someone please tell me how I can add the custom functionality onto the Jasper Server?
I worked with custom Java functions in Jasperserver reports for quite awhile. Some of the things you will need to ensure:
You import the java class at the top of the Jasper report .jrxml file
The Jar is deployed to the server and is labeled as a resource in the repository. It looks like this is the part you're getting stuck on. If you log into Jasperserver and go to the repository, you can open a folder and upload a new file/resource.
The report references the jar in the repository as a resource
Does this help?

Some Q2A plugins are not compatible with PhP 7 and MySQL 5.7

I updated PHP 5.6 to 7 and MySQL 5.5 to 5.7.
Everything was fine in the older versions, however since I updated the server some plugins such as: Custom 404 page, gregorian2jalali face problems. Some pages goes blank and the Inspect Element, Console section nothing shows. up. For example, if I activate gregorian2jalali plugin, User Profie page doesn't show up.
Also in the Custom 404 page plugin, the following error comes up in 404 pages:
A Question2Answer database query failed when generating this page. A full description of the failure is available in the web server's error log file.
There was a related question for an earlier problem here: When adding page link, database query error occurs.
In the Apache Error Log, a message similar to this message comes up:
PHP Question2Answer MySQL query error 1146: Table 'qa.qa_options' doesn't exist - Query: (SELECT 'options' AS selectkey, title, content FROM qa_options) UNION ALL (SELECT 'time', 'db_time', UNIX_TIMESTAMP(NOW()))
Also, there was an earlier problem here at this question: is there a way to manually create the database tables ?
Now that the plugin is not updated, how I can fix this problem ?
Thanks
Q2A version: 1.7.4
There are two possibilities I can think of:
You are using a different table prefix (e.g. abc_ instead of qa_) in your qa-config.php file, and a plugin is putting qa_options in their SQL queries instead of ^options as they should (which automatically adds the correct prefix).
Or, you are using the unstable 1.8 version from GitHub which currently has a few issues regarding plugins. If so, make sure you're using the stable 1.7.4 version that you get from the main Q2A site.

Can not start container in Drools workbench when rules generated from spreadsheet

In a project of Drools workbench, when rules are input with "Guided Rule", I can start the container correctly. But when rules are generated from spreadsheet (an *.xls file), I got the following error:
org.kie.server.services.impl.KieServerImpl createContainer
SEVERE: Error creating container 'firstApplicationTestCon' for module 'ppdrools:firstApplicationTestProj:1.0'
java.lang.IllegalArgumentException: Unable to instantiate service for Class 'org.drools.compiler.compiler.DecisionTableProvider'
Did I miss something? Why did I fail to start the container while I can build the project successfully?
Hmm, it's a known bug. See the posts below:
[ENG] (6.1.z) Decision Table Spreadsheet on Execution Server
BZ-1214927: adding decision tables jar dependency to kie-server
And a duplicated bug report here on 2015-05-28:
Bug 1225979 - Kie sever starting error - ClassNotFoundException: org.drools.decisiontable.DecisionTableProviderImpl
Since this bug is reported and verified after 2015-03-05, which is the day 6.2 released, I think it's not solved yet. I'll have a try on 6.3.0.Beta2 later.

Crystaldecisions ReportSDKIllegalArgumentException

I am currently working on a migration of BO 4.1 related tool.
The tool is used to deploy the crystal reports from drop location to BO Server. The tool was developed using BO XI 3.1 Java SDK code and will be migrated to BI 4.1.
In the code it is getting IInfoObjects instance by querying infoStore.
Query used
"SELECT TOP 1 * FROM CI_INFOOBJECTS WHERE SI_KIND='CrystalReport' AND SI_NAME ='XXXX' AND SI_INSTANCE = 0"
There is no infoObjects available currently and the code hence create a new infoObjects collection by using
infoStore.newInfoObjectCollection();
Further the code will create IReport using the following code
IReport report = (IReport) infoObjects.add(pluginInfo);
During this execution I am getting following exception
Exception in thread "main" java.lang.NoClassDefFoundError:
com/crystaldecisions/sdk/occa/report/lib/ReportSDKIllegalArgumentException
at
com.crystaldecisions.sdk.plugin.desktop.report.internal.ReportFactory.makePlugin(ReportFactory.java:83)
at
com.crystaldecisions.sdk.occa.pluginmgr.internal.PluginMgr.getPluginInterface(PluginMgr.java:349)
at
com.crystaldecisions.sdk.occa.infostore.internal.InfoObjects.add_aroundBody0(InfoObjects.java:775)
at
com.crystaldecisions.sdk.occa.infostore.internal.InfoObjects.add_aroundBody1$advice(InfoObjects.java:512)
at
com.crystaldecisions.sdk.occa.infostore.internal.InfoObjects.add(InfoObjects.java:1)
I searched around for the exception and it appears some jar mismatch issue, but could not understand which jar and where can I find those jars.
Any suggestion will be helpful.
Include CrystalReportsSDK.jar in your project.
There are a number of utilities to help with finding jar files for missing classes. I prefer the cheap approach -- just do unzip -l *.jar > jars.txt from a jar directory, then search jars.txt for the missing class.
Thanks! Adding the jar helped me to resolve the problem.
To answer the second question that I asked, about the location of the jars
{Installation loc}/opt/businessobjects/bo41/sap_bobj/enterprise_xi40/java/lib

cvc-complex-type.3.2.2 attribute 'uuid' is not allowed to appear in element 'jasperreport'

Downloaded iReport-4.6.0 for Linux and when creating a new report via the File->New... menu, the new report is not shown in the preview, but the error message cvc-complex-type.3.2.2 attribute 'uuid' is not allowed to appear in element 'jasperreport' instead.
The same error message happens even when choosing compatibility 4.5.0 in the options.
The same error message happens also when opening a report file that was being produced by other users of iReport-4.6.0 (Windows).
The report files have their schema to http://jasperreports.sourceforge.net/xsd/jasperreport.xsd, but this schema file doesn't mention any uuid.
What could be the problem?
In iReport Designer, in the options window you can change compatibility mode to the version you prefer.
For me if I put compatibility to jasperreport 3.5.1, when I save the report again, the uuid are all removed.
Regards
I found an answer:
I opened the JRXML file with notepad++ and did a "Search and Replace" of uuid="\w*-\w*-\w*-\w*-\w*", and selected REGULAR EXPRESSION, with empty string then all the occurrences of this wrong tag were removed.
Worked for me.
Open report in the notpad++ and just only remove uuid and it's number.. After You will compile proper and generate report.... I have same problem and I solveby this way..
I do not use Linux .But you create report use iReport Designer-xx. You add Same version jasperreport(jasperreport-XX) jar in your project.
I just suggested my coworker who also run into the problem this:
sed -i 's/ uuid="[^"]*"//g' $(find * -name \*.jrxml)
I don’t normally use sed(1)-i but she’s on GNU/Linux so it wasn’t a problem here. The more professional Unix way of solving this is:
find * -name \*.jrxml -print0 | while IFS= read -d '' -r file; do
ed -s "$file" <<-'EOF'
1,$g/ uuid="[^"]*"/s///g
w
q
EOF
done
(These four spaces are tabs, otherwise it won’t work, and you need mksh(1) or another shell that can read NUL-separated input.)
You could also use Perl:
find * -name \*.jrxml -print0 | xargs -0 perl -pi -e 's/ uuid="[^"]*"//g'
Or something like that, anyway, depending on your needs, your xargs(1), etc. ;-)
If you're using ireport 4.6 or greater, the best way to solve the issue with uuid is, use the similar ireport 4.6 or greater, as the uuid attribute is newly introduce from version 4.6.
otherwise If you remove the uuid manually from the jrxml file, the uuid will again be placed in corresponding tags on the next compilation...
This problem occurred in my case because of duplicated class path entries, more specifically entries from older versions of jasperreports-core-renderer.jar and jasperreports-extensions.jar (in Options -> Classpath).
These duplicated entries appeared after importing settings during an upgrade of iReport. Apparently this is due to a bug in iReport due to which old versions are not removed from the classpath.
So either avoid the import of settings from previous versions or manually remove outdated .jars.
I have a good easy solution.
I am supporting reports on Jasper Server 4.5, with Jasper Studio 5.5
In Jasper Studio, delete the server reference if there is one.
Recreate the connection. When you create the server connection, go to "Advanced Settings > Jasper Server Library Version" and select your server version from the list.
Open your report, check that the uuid tags have been removed, Deploy
In my case I just removed uuid="63f04b11-4b7e-4cf1-99b5-a5ec6db799d6"
I generated a sample report for testing it worked perfectly
So you can try by removing uuid=" "
You can always set the Compability to an older version, It worked for me.
Tools > Options > iReport > General > Compability
After this go to xaml and change any thing and save again then run report to remove all uuid .
Strictly speaking this fix is only for Jaspersoft Studio, however this question is the first result when searching for the attribute 'uuid' is not allowed error.
For Jasper Server version <= 4.5.0 and Jaspersoft Studio 6.11:
Right click on the jrxml file in the Project Explorer -> Properties -> Jaspersoft Studio -> Compatibility -> Source .jrxml Version -> JasperReports 4.5.0
Right click on the server in the Repository Explorer -> Edit JasperReports Server Connection -> Advanced Settings -> JasperReports Library Version -> JasperReports 4.5.0
The second step is important if you are using Jaspersoft Studio to publish to the server.