How to set TRANSFORMER_KEY argument in my Java client code? - html

I am working jasperserver for past few days. I want to export the jasper report to HTML page using webservice(SOAP). If I run the client code I got the following exception:
com.jaspersoft.jasperreports.license.LicenseException: No license provider found
at com.jaspersoft.jasperreports.license.LicenseManager.requireProvider(LicenseManager.java:94)
at com.jaspersoft.jasperreports.license.LicenseManager.requireFeature(LicenseManager.java:112)
at com.jaspersoft.jasperreports.fusion.FusionUtils.requireFusionFeature(FusionUtils.java:50)
at com.jaspersoft.jasperreports.fusion.BaseHtmlHandler.getHtmlFragment(BaseHtmlHandler.java:48)
at net.sf.jasperreports.engine.export.HtmlExporter.writeGenericElement(HtmlExporter.java:1414)
at net.sf.jasperreports.engine.export.HtmlExporter$CellElementVisitor.visit(HtmlExporter.java:2595)
at net.sf.jasperreports.engine.export.HtmlExporter$CellElementVisitor.visit(HtmlExporter.java:2513)
at net.sf.jasperreports.engine.fill.JRTemplateGenericPrintElement.accept(JRTemplateGenericPrintElement.java:164)
at net.sf.jasperreports.engine.export.HtmlExporter$TableVisitor.visit(HtmlExporter.java:2484)
at net.sf.jasperreports.engine.export.HtmlExporter$TableVisitor.visit(HtmlExporter.java:2468)
at net.sf.jasperreports.engine.export.tabulator.ElementCell.accept(ElementCell.java:57)
at net.sf.jasperreports.engine.export.HtmlExporter.exportTable(HtmlExporter.java:583)
at net.sf.jasperreports.engine.export.HtmlExporter.writeLayers(HtmlExporter.java:1461)
at net.sf.jasperreports.engine.export.HtmlExporter$TableVisitor.visit(HtmlExporter.java:2508)
at net.sf.jasperreports.engine.export.HtmlExporter$TableVisitor.visit(HtmlExporter.java:2468)
at net.sf.jasperreports.engine.export.tabulator.LayeredCell.accept(LayeredCell.java:65)
at net.sf.jasperreports.engine.export.HtmlExporter.exportTable(HtmlExporter.java:583)
at net.sf.jasperreports.engine.export.HtmlExporter.writeLayers(HtmlExporter.java:1461)
at net.sf.jasperreports.engine.export.HtmlExporter$TableVisitor.visit(HtmlExporter.java:2508)
at net.sf.jasperreports.engine.export.HtmlExporter$TableVisitor.visit(HtmlExporter.java:2468)
at net.sf.jasperreports.engine.export.tabulator.LayeredCell.accept(LayeredCell.java:65)
at net.sf.jasperreports.engine.export.HtmlExporter.exportTable(HtmlExporter.java:583)
at net.sf.jasperreports.engine.export.HtmlExporter.exportPage(HtmlExporter.java:486)
at net.sf.jasperreports.engine.export.HtmlExporter.exportReportToWriter(HtmlExporter.java:378)
at net.sf.jasperreports.engine.export.HtmlExporter.exportReport(HtmlExporter.java:236)
at flying.JSClientTest.main(JSClientTest.java:87)
I just google this error and got a reference from jasper community. They said to pass an argument named TRANSFORMER_KEY having net.sf.jasperreports.transformer.html as value.
Ref links:
http://community.jaspersoft.com/wiki/jasperreports-server-license-issue-when-invoked-web-service
http://community.jaspersoft.com/wiki/how-execute-reports-containing-fusion-charts-web-services
But I have no idea how to pass this argument in my client code.

Related

How to correctly annotate a csv file for uploading into a bucket in InfluxDB

I am trying to evaluate InfluxDB as a real time, time series data visualization tool. I have an account with InfluDB and I have created a bucket for data storage. I now want to upload a csv file into the bucket via the click to upload feature but I keep getting errors associated with incorrect annotations. The last error I received was:
'Failed to upload the selected CSV: error in csv.from(): failed to read metadata: failed to read header row: wrong number of fields'
I have tried to decipher their docs and examples on how to annotate a csv file and have tried many different combinations of #datatype, #group and #default but nothing works.
This is the latest attempt that generated the error above.
#datatype,string,string,double,dateTime
#group,true,true,false,false
#default,,,,
_measurement,station,_value,_time
device,MBL,-0.814075542,1.65E+18
device,MBL,-0.837942395,1.65E+18
device,MBL,-0.862699339,1.65E+18
device,MBL,-0.891686336,1.65E+18
device,MBL,-0.891492408,1.65E+18
device,MBL,-0.933193098,1.65E+18
device,MBL,-0.933193098,1.65E+18
device,MBL,-0.976859072,1.65E+18
device,MBL,-0.981019863,1.65E+18
device,MBL,-1.011647128,1.65E+18
device,MBL,-1.017813258,1.65E+18
Any thoughts would be greatly appreciated. Thanks.
From the sample data above, I assume "device" is the name of a measurement and "MBL" is a tag whose name is station. Hence, there is 1 measurement and 1 tag, 1 field and a timestamp.
And you are mixing data types and line protocol elements when using annotated CSV. You could try following version:
#datatype,measurement,tag,double,dateTime
#default device,MBL,
thisIsYouMeasurementName,station,thisIsYourFieldKeyName,time
device,MBL,-0.814075542,1652669077000000000
device,MBL,-0.837942395,1652669077000000001
device,MBL,-0.862699339,1652669077000000002
device,MBL,-0.891686336,1652669077000000003
device,MBL,-0.891492408,1652669077000000004
device,MBL,-0.933193098,1652669077000000005
device,MBL,-0.933193098,1652669077000000006
device,MBL,-0.976859072,1652669077000000007
device,MBL,-0.981019863,1652669077000000008
device,MBL,-1.011647128,1652669077000000009
device,MBL,-1.017813258,1652669077000000010
Note that time column should avoid using "1.65E+18". See more details here.

Working on migration of SPL 3.0 to 4.2 (TEDA)

I am working on migration of 3.0 code into new 4.2 framework. I am facing a few difficulties:
How to do CDR level deduplication in new 4.2 framework? (Note: Table deduplication is already done).
Where to implement PostDedupProcessor - context or chainsink custom? In either case, do I need to remove duplicate hashcodes from the list or just reject the tuples? Here I am also doing column updating for a few tuples.
My file is not moving into archive. The temporary output file is getting generated and that too empty and outside load directory. What could be the possible reasons? - I have thoroughly checked config parameters and after putting logs, it seems correct output is being sent from transformer custom, so I don't know where it is stuck. I had printed TableRowGenerator stream for logs(end of DataProcessor).
1. and 2.:
You need to select the type of deduplication. It is not a big difference if you choose "table-" or "cdr-level-deduplication".
The ite.businessLogic.transformation.outputType does affect this. There is one Dedup only. You can not have both.
Select recordStream for "cdr-level-deduplication", do the transformation to table row format (e.g. if you like to use the TableFileWriter) in xxx.chainsink.custom::PostContextDataProcessor.
In xxx.chainsink.custom::PostContextDataProcessor you need to add custom code for duplicate-handling: reject (discard) tuples or set special column values or write them to different target tables.
3.:
Possibly reasons could be:
Missing forwarding of window punctuations or statistic tuple
error in BloomFilter configuration, you would see it easily because PE is down and error log gives hints about wrong sha2 functions be used
To troubleshoot your ITE application, I recommend to enable the following debug sinks if checking the StreamsStudio live graph is not sufficient:
ite.businessLogic.transformation.debug=on
ite.businessLogic.group.debug=on
ite.businessLogic.sink.debug=on
Run a test with a single input file only and check the flow of your record and statistic tuples. "Debug sinks" write punctuations markers also to debug files.

a session error after updating to laravel 5.4

After updating from laravel 5.3 to 5.4, I encountered an error in vendor. The error is:
Symfony\Component\Debug\Exception\FatalThrowableError: Call to undefined method Illuminate\Session\Store::set() in /var/www/ostadbank.com/vendor/laravel/framework/src/Illuminate/Support/Manager.php:137
But when I go to my error is:
fatal error exception in Manager.php line 137:call to undefined method Illuminate\session\store::set()
I go to manager.php line 137 and I see the line below:
public function __call($method, $parameters) { return $this->driver()->$method(...$parameters); }
I am not sure where to start to modify.
See the screenshots below:
I solve it, for more information read this: https://laravel.com/docs/5.4/upgrade
All calls to the ->set() method should be changed to ->put(). Typically, Laravel applications would never call the set method since it has never been documented within the Laravel documentation. However, it is included here out of caution.

Jasper string functions method undefined error

Using Jasper Reports 5.6.1. Added some text functions to a previously working text field jrxml (just want to truncate if longer than 75 chars). Works in iReport Studio, but not in Java.
<textFieldExpression><![CDATA[IF(LEN($F{AccountName})<75,$F{AccountName},LEFT($F{AccountName},75)+"...")]]></textFieldExpression>
Error message:
Error occured while trying to fetch the HTML Output from the Jasper Service (Errors were encountered when compiling report expressions class file:
1. The method LEN(String) is undefined for the type ICC_1422636250096_198427
value = IF(LEN(((java.lang.String)field_AccountName.getValue()))<75,((java.lang.String)field_AccountName.getValue()),LEFT(((java.lang.String)field_AccountName.getValue()),75)+"..."); //$JR_EXPR_ID=9$
<->
2. The method LEFT(String, int) is undefined for the type ICC_1422636250096_198427
value = IF(LEN(((java.lang.String)field_AccountName.getValue()))<75,((java.lang.String)field_AccountName.getValue()),LEFT(((java.lang.String)field_AccountName.getValue()),75)+"..."); //$JR_EXPR_ID=9$
<-->
3. The method LEN(String) is undefined for the type ICC_1422636250096_198427
value = IF(LEN(((java.lang.String)field_AccountName.getOldValue()))<75,((java.lang.String)field_AccountName.getOldValue()),LEFT(((java.lang.String)field_AccountName.getOldValue()),75)+"..."); //$JR_EXPR_ID=9$
<->
4. The method LEFT(String, int) is undefined for the type ICC_1422636250096_198427
value = IF(LEN(((java.lang.String)field_AccountName.getOldValue()))<75,((java.lang.String)field_AccountName.getOldValue()),LEFT(((java.lang.String)field_AccountName.getOldValue()),75)+"..."); //$JR_EXPR_ID=9$
<-->
5. The method LEN(String) is undefined for the type ICC_1422636250096_198427
value = IF(LEN(((java.lang.String)field_AccountName.getValue()))<75,((java.lang.String)field_AccountName.getValue()),LEFT(((java.lang.String)field_AccountName.getValue()),75)+"..."); //$JR_EXPR_ID=9$
<->
6. The method LEFT(String, int) is undefined for the type ICC_1422636250096_198427
value = IF(LEN(((java.lang.String)field_AccountName.getValue()))<75,((java.lang.String)field_AccountName.getValue()),LEFT(((java.lang.String)field_AccountName.getValue()),75)+"..."); //$JR_EXPR_ID=9$
<-->
6 errors
)
I checked packages in jasperreports-5.6.1.jar file, includes functions package. Exhaustive web search turned up nothing. What could it be?
I have a similar error message. Where you able to resolve this? Works fine in Jaspersoft Studio 6.0.1, but throws this when compiling w/ Java:
The method IF(boolean, BigDecimal, BigDecimal) is undefined for the type Blank_A4_1_1423164610392_674232
Update: I was able to solve this by including the functions jar on my classpath. See that if that works for you. See jasperreports-functions-5.6.1.jar at http://sourceforge.net/projects/jasperreports/files/jasperreports/JasperReports%205.6.1/
When using GlassFish, verify that you have all jasper libraries on your production server. They should be under glassfish/domains/domain1/lib/ext. If the jars are not there (or some of them, such as the fonts or some other not non-requisite lib) you might experience the behavior you are describing.

Jmeter CSV issue

Please help me with following issue:
I have a simple Jmeter test with where variables are stored in CSV file. There is only one request in the test:
Get .../api/${page} , where ${page} is a variable from CSV
Everything goes well with thread properties for ex. 10 threads x30 loop count
If i increase any parameter, for ex. in 10x40 or 15x30, i receive at least one error and looks like this is jmeter issue:
one request (random) isn't able to take variable from CSV and i got an error:
-.../api/page returns 404 error
So the question is - is there any limit in jmeter's connection to CSV file?
Thanks in advance.
A key point to focus on is the way your application manage the case when 2 different users require the same page.
There are few checks that I would recommend:
be sure that the "Recycle on EOF" property is true
be sure that you have more lines on CSV than the number of threads you are firing
use a "View result tree" controller to investigate the kind of error you are getting
Let us know