Jump to content
We've recently updated our Privacy Statement, available here ×

ghudson_1

Members
  • Posts

    284
  • Joined

  • Last visited

  • Days Won

    3

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Everything posted by ghudson_1

  1. Issue DescriptionDomain security files can contain expressions for the resourceAccessGrant elements, and the syntax can be tricky if you need to parse a single profile attribute in which you are putting multiple values, such as comma-seperated values. ResolutionThe example below is just an idea to help foster your own code. I created a profile attribute named test. The value for it contains a comma: greg, hudson To parse this I tried the following in my domain security file: <resourceAccessGrant id="sales_join_ROLE_SUPERMART_MANAGER_row_grant"> <principalExpression> authentication.getPrincipal().getRoles().any{ it.getRoleName() in ['ROLE_SUPERMART_MANAGER'] } </principalExpression> <filterExpression> store1.store_country in ('USA') and store1.store_state in(groovy('attributesService.getAttribute("test", "USER", true) .attrValue.split(",") .collect{"''" + it + "''"} .join(",") .replaceFirst("^''","") .replaceFirst("''\$","")' )) </filterExpression> </resourceAccessGrant> Logging outputs the query as: select "store1"."store_type" as "store1_store_type" from "public"."store" "store1" where ("store1"."store_country" in ('USA')) and ("store1"."store_state" in ('greg',' hudson')) group by "store1"."store_type" Ref. Case 01560787
  2. Issue DescriptionSubreports can return values to a main report's variables but using a variable whose value is returned from a subreport (or a subdataset) to define another variable's value does not generally work because the calculation engine (which computes regular variable values) and the subreport execution are de-phased. Regular variable values are computed before the detail band is rendered, and at that moment the subreport has not yet been executed and the value has not been fed to the variable. ResolutionAn design approach needing to sum return values from various subreport levels is to use several return values with calculation=Sum and target variables with reset types. See an example attached in Sample1.zip which you can run with 10 empty records, for example set the query to Ref. Case 01523249
  3. Issue DescriptionCustomer is developing a report against a postgres datasource and encounters an error upon compile: java.lang.ClassNotFoundException: org.postgresql.util.PGobject ResolutionInspection of the jrxml shows one of the fields is class type org.postgresql.util.PGobject : <field name="object_changes" class="org.postgresql.util.PGobject"> That class isn't "known" to the JVM because it isn't in any library on the runtime classpath. This indicates the query is referencing an unknown field type, and the resolution is to try changing the class to java.lang.String or some other class type which exists in the JVM runtime classpath Ref. Case 01608925
  4. Issue DescriptionA customer had environmental changes and noticed their domains and adhocs based on VDS were no longer working. Additionally when they attempted to edit a domain they no longer were shown the "select schema" prompt and many of the tables returned for display in the leftside's tables list were system tables instead of tables specific to their user-schema ResolutionThe customer had upgraded to Postgres 10 but didn't upgrade the JDBC driver which was being used by TIBCO JasperReports® Server. Using a postgres JDBC driver that matched the DB release version resolved the problems Ref. Case 01647174
  5. Issue DescriptionGoogle maps occasionally releases an update to their API, is there a way to control which version is used in TIBCO JasperReports® Server ? ResolutionTwo javascript files need to be modified. Per google's API, add a 'v' parameter to the maps.google.com urls in the files below. For example for version 3.30, add v=3.30, like: You need to modify a file within the jasperreports-.jar found in WEB-INFlib: netsfjasperreportscomponentsmapresourcesrequirejasperreports-map.js And in JasperReports® Server modify: When modifying optimized-scripts directory, always heed this: https://community.jaspersoft.com/documentation/tibco-jasperreports-server-ultimate-guide/v640/customizing-javascript-files Ref. Case 01564500
  6. Issue DescriptionCustomer is attempting to create an organization via REST with name test-001. So they're using http://testhost/jasperserver-pro/rest_v2/organizations?createDefaultUsers=false with payload: {"alias": "test-001"}. This fails with "400 Bad Request" ResolutionThe Administration guide says following symbols are not allowed: Unfortunately character escaping won't help TIBCO JasperReports® Server simply attempts to prohibit the above symbols being in the name. You'd meet the same fate if you tried to use them via the JRS UI. Ref. Case 01479135
  7. Issue DescriptionCustomer is installing TIBCO JasperReports® Server and encounters "Cannot bind to URL [rmi://localhost:10990/jasperserver]" error seen in their jasperserver.log along with a 404 error from tomcat. This typically occurs when something is using the 10990 port, for example if another JasperReports® Server instance is already running on that machine and using that port. In this particular case the problem would occur even if the customer changed the port number in the config files, the error after restart would simply reflect a the new port number. ResolutionAnalysis of logs show the webapps defined in tomcat are being deployed twice. In the log you can search for "Deploying web application" and you'll see all of the the webapps like manager, ROOT, jasperserver-pro, host-manager, etc being deployed twice. The first deployment is able to attach to that port, but the second obviously cannot attach to that port, hence the error. The double-deployment was occurring due to a misconfiguration within the customer's Tomcat's server.xml. They switched to an "out of box" server.xml and the double-deployment went away. They suspect the presence of multiple 'Host' elements in their server.xml were the culprit. Ref. Case 01475105
  8. Issue DescriptionA customer has specific net.sf.jasperreports.exclude statements set at a server-wide level in their jasperserver.properties file, but in a few specific reports they need the exclude statements to ignored and not be respected. ResolutionThose properties can be specified at a report level which will override any server-level setting. In your jrxml, you can just set the value to empty, like: To make sure the property has no effect at all, you can specify an empty value in the report property, like: <property name="net.sf.jasperreports.export.xls.exclude.origin.band.1" value=""/> Ref. Case 01603086
  9. Issue DescriptionThe TIBCO JasperReports® Server WAR installer will call Regedit.exe during install, and some customers are curious why it is called and how to remove it's usage ResolutionWe read the HKEY_CURRENT_USERControl PanelInternational for the sake of getting the current day and time in the format that is specific for your OS locale, we use that value to write the day and time into the filename of the install log. The actual cmds are in date.bat, time.bat which are called by buildomaticbindo-js-setup.bat If needed you can customize the scripts, the result is that your log's file name might not be formatted to your system's exact day time and format. Ref. Case 01603192
  10. Issue DescriptionCustomer's first login after a restart takes several minutes. They aren't multi-tenant, don't have many users, no customization. The problem has always occurred since initial install ResolutionThread dumps showed the code is stuck or slow waiting for a file lock while trying to load a license related file from the file system. The code which was temporarily hanging was passing thru java.util.prefs.FileSystemPreferences.lockFile(FileSystemPreferences.java:918)[/code]Additionally we see this error in the logs java.util.prefs.FileSystemPreferences.checkLockFile0 ErrorCode Could not lock User prefs. Unix error code 2[/code]The error was occurring during the hang, thus indicating a system setup problem. Web search for this type of error in the logs reveals that the customer should double-check the appserver owner/user's home dir, or set -Djava.util.prefs.userRoot since the user running the application server likely has no home dir or has a home dir problem. Ref. Case 01556023
  11. Issue DescriptionCustomer is embedding report output from rest_v2/ReportExecutions and their hyperlinks aren't working. The hyperlink and anchor elements in Studio look appropriate, but clicking them does nothing in the embedded output ResolutionWhen using rest_v2/reportExecutions using defaults (allowInlineScripts = false) then the links come back as html span tags rather than a href tags, allowing the developer/embedder full control over link look & feel. If you add allowInlineScripts=true into your request body then you'll get a href tags in your html output. allowInlineScripts is listed with the other options here: https://community.jaspersoft.com/documentation/tibco-jasperreports-server-rest-api-reference/v64/reportexecutions-service
  12. Oracle WebLogic Critical Patch Update for April 2018 (WLS PSU 12.1.3.0.180417) results in the "Licence is corrupt" message when accessing home pageThe WebLogic CPU for April 2018 contains a problem (defect) which is impacting various versions of TIBCO JasperReports® Server in a negative way. The result of the defect within Weblogic's update is an error while JasperReports® Server is attempting to decode the license file. The error is related to a BouncyCastle API jar file problem the patch introduces. ResolutionThere are two options for a workaround. Option 1Use the following to force the usage of the BounceyCastle jar bundled with JasperReports Server rather than anything weblogic ships: edit weblogic.xml, find this section: <container-descriptor> <servlet-reload-check-secs>60</servlet-reload-check-secs> <prefer-application-packages> <package-name>antlr.*</package-name> <package-name>antlr.collections.*</package-name> <package-name>antlr.collections.impl.*</package-name> <package-name>antlr.debug.misc.*</package-name> <!-- START: added for weblogic 12-->[/code]add this line and restart the webapp: <package-name>org.bouncycastle.*</package-name>[/code]Option 2The bcprov-jdk16-1.45.jar apparently contains an unsigned .txt file which is breaking the library, so find that jar file within the Weblogic Patch and remove it via this command line action: zip -d bcprov-jdk16-1.45.jar readme.txt Ref. Case 01585003
  13. Issue DescriptionJasperReports map element will make calls to the Google maps API. You can specify which version of the Google Maps API you desire ResolutionSpecify net.sf.jasperreports.components.map.google.version in WEB-INFclassesjasperreports.properties or within a jrxml individually: or a general release, like value="3" Ref. Case 01564500
  14. Issue DescriptionIn some circumstances users might not like the validation of 'mysql' schema which occurs during the js-upgrade-samedb script, and this can be configured to not occur. Often the upgrade process will need to drop and recreate the db entirely due to large changes (removal of tables, or major table changes, etc). So this is why the upgrade process is doing this validation of 'mysql' schema js-upgrade-samedb script. In some particular version combinations, 'samedb' isn't dropping or creating, rather it is just updating, therefore it does not need access to the 'mysql' schema. If the validation is problematic for you because it is failing due to permissions issues (for example if changed after initial install) you can change the scripts. ResolutionIf the validation of 'mysql' schema, aka admin, is problematic for you, edit <install>buildomaticvalidation.xml and comment out the line below From: validateDB systemName="admin" phase="test" failOnDBNotExists="true" />[/code]To: <!-- <validateDB systemName="admin" phase="test" failOnDBNotExists="true" /> -->[/code]Ref. Case 01540154
  15. Issue Descriptionrest_v2/Reports and rest_v2/ReportExecution will have session-bound image references in the html output by default. Whether or not you specify an attachmentsPrefix, the full path provided will require login, so it is ephemeral. In some cases customers might want something more static. There are potential workarounds within the TIBCO JasperReports® API that can help. ResolutionThere are three options for changing the default behavior 1. isLazy=true is the nicest approach for referencing static url. Note, this results in CSS background-image output potentially in scheduler output, rest output, etc. So you might see: <div style="width: 100%; height: 100%; background-image: url('http://images.greg.com/dm/Icon_sm.png'); background-repeat: no-repeat; background-position: right top;background-size: contain;"></div></div></td> instead of: <img src="http://images.greg...... CSS background-image will NOT be used if the image has hAlign="Left" vAlign="Top" (which are the default image alignment attributes) and scaleImage="Clip" or scaleImage="FillFrame" (alignment doesn't apply). 2. The following property will cause binary data representing the image to be nested directly within the html's image tags: net.sf.jasperreports.export.html.embed.image=true This would appear in html tags like: <img src=3D"data:image/png;base64,iVBORw0KGgoAAAANS= UhEUgAAABQAAAAUCAYAAACNiR0NAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccll= PAAAAStJREFUeNqsVEEOATEUVXGAsbfgBtxgboCFPXuJcQJHQGKPtYWZE+AE5gZG4gCO4P3kVYp=... 3. Finally you can fetch image files individually via rest and then save the images permanently into directories or files while using attachmentPrefix (see REST documentation) to help specify the img urls in the rest output. For example, if using the output to create an email with html-embedded content, fetch and create MIME (multipart) parts to attach the images, and reference them in the HTML via "cid:.." URIs. Use attachmentPrefix of "cid:" to ensure cid syntax is generated in the response output: <img src="cid:img_0_0_3.png" style... Ref. Case 01559046
  16. Issue DescriptionWhen creating font extensions in Studio, there is a checkbox for "Embed this font in PDF Document". We explain its purpose below As indicated in the Studio User Guide link below, font extensions are helpful in forcing proper associations of fonts with PDF files created by JasperReports Server and the JasperReports API https://community.jaspersoft.com/documentation/tibco-jaspersoft-studio-user-guide/v640/fonts . When creating font extensions in Studio, there is a checkbox for "Embed this font in PDF Document". We explain its purpose below ResolutionThe documentation describes the checkbox as a "Flag that specifies whether to embed the font in a generated PDF or not. Embedding fonts is recommended to ensure consistency across platforms" During generation of the PDF, the java libraries comprising JRS, iText api and the JVM require a font. If they can't find a specified physical font (.TTF file for example) they find a logical find using their best approximation, or guess or a mapping that has been defined within the JVM on the server. So if the font defined in the jrxml tags either has not been installed via a font extension or has not been added to the JVM running the appserver, then a default font will be used and this will be evident when you hit File -> Properties -> Font within the pdf file. You will see that the PDF references a font different from your jrxml tags unless your are using one of the PDF core specification default fonts (these are the families of Helvetica, Courier, Symbol, Times Roman, ZapfDingbats). Of course visually you'll see a different font than expected too. If using font extension or your font happens to be installed in the JVM then the PDF is created with references to that specific font. Optionally the data representing the font can be embedded within the file which the PDF client program (adobe acrobat desktop application or browser plugin for example) will use for graphical rendering once the PDF is opened. If the it is not embedded, then you are reallying on the PDF client program to 'find' the physical font within the client OS. If it doesn't exist (for example of the Microsoft oriented font Arial hasn't been installed on a Mac or Linux desktop), then the PDF will be graphically rendered with something else (one of the core fonts). But if you embed the font via the checkbox, then the font will be graphically correct regardless of whether or not the client has had that font/ttf installed. Do determine what font is being referenced in our PDF and whether or not it is embedded, see the File -> Properties -> Font tab. Note the "embedded subset" in the first image vs the second. The files with "embed" will also be slightly larger in file-size. SummaryUnless you are okay with your PDF potentially being rendered with a default/native PDF specification font, or unless you are confident your client machines will always have the fonts installed, you need to use the "embed..." checkbox while creating your font extension Ref. Case 01468397
  17. yes - the JVM's ram/memory/heap It is asynchronous and are parts are session-bound. For example the specific IDs in /<requestId>/exports/<id> are only accessible via the user-session which originated the request. Session expiration set to zero would be bad, don't do that or you'll eventually encounter an out of memory exception (and wonky stuff will occur prior).
  18. When using reportExecutions the report stays in memory on the server, similar to the filled JRPrint object that gets filled before being flushed out during an export in JRS UI use-cases, for example from the UI ReportViewer to PDF. The JRPrints stay in memory entirely unless they are so huge page-wise that virtualization kicks in (and you can search wiki/community for details on virtualization if needed). It stays for the duration of the user-session which made the reportExecutions call. (see web.xml for session timeout)
  19. If you have a commercial (aka professional) license, you can create a case for Tibco Jaspersoft technical support in your portal - http://support.tibco.com
  20. Issue DescriptionOut of box, JasperReports Server does not list content resources in the Library. Fortunately this is configurable. Resolution-Edit WEB-INFapplicationContext-search-pro.xml -Find <util:list id="libraryResourceTypeFilterOptionsPro"> (line 132 in 6.3.0) - note the property name="id". Then check out the entry list for key resourceTypeFilter-reports-views-dashboards on line 85 . It lists several types but is missing content resources. - So clone this entry list to create a new key containing all the required types in addition to content resources and update the name="id" in libraryResourceTypeFilterOptionsPro with your new key. The value for content resources is: <value>com.jaspersoft.jasperserver.api.metadata.common.domain.ContentResource</value> - Backup the orig file, save, then restart. Ref. Case 01475063
  21. Issue DescriptionA customer wants to use values from series item contributors in the highcharts api function yAxis.stackLabels.formatter. https://api.highcharts.com/highcharts/yAxis.stackLabels.formatter Their attempts fail for anything other than totals, like: function() {return this.total;} ResolutionWithin the highcharts object the data model is complex due to the "stacking". So you need to iterate thru the individual items of the objects in our function. For example, if fruit is setup as the series contributor like: Then a function could be: <![CDATA["function() {var list = '', x = this.x, series = this.axis.chart.options.series, s; for (s = 0; s < series.length; ++s) if (series[s].data[x].y != null) list += series[s].data[x].fruit + ' '; return list;}"]]>[/code]Ref. Case 01525594
  22. Issue DescriptionOracle 12c with CDB/PDB configured requires particular users for TIBCO JasperReports® Server installation. The first symptom is that during js-install.bat (or other buildomatic commands) you encounter an error with message: "username should starts with c##". ResolutionOracle CDB/PDB provides a multi-tenant architecture. If you are seeing the "username should starts with c##" message this is a sign that you are using a local or regular user to connect to the CDB. If you connect directly to the PDB via a specific SID, then the local or regular user should be fine, but you can't connect regular or local user to the CDB per Oracle, see https://docs.oracle.com/database/121/DBSEG/users.htm#DBSEG573 To connect to the CDB follow the instructions in the Installation Guide: https://community.jaspersoft.com/documentation/tibco-jasperreports-server-installation-guide/v630/installing-war-file-using-js . It states that for Oracle 12c with CDB/PDB a common user should be specified in the default_master.properties file using the ## syntax as specified by Oracle: Use settings for Oracle, except for the following changes: dbUsername=c##jasperserver sid=cdb1[/code]Ref. Case 01533066
  23. Issue DescriptionA linux kernel update prevents the JVM from properly starting TIBCO JasperReports® Server. The first symptom is that after booting into the new linux kernel, startup scripts don't start TIBCO JasperReports Server and nothing is written to the appserver logs. Startup commands show /opt/jasperreports-server-6.1.1/apache-tomcat/scripts/ctl.sh : tomcat could not be started root@whatever ~# /etc/init.d/jaspersoft status tomcat not running postgresql already running More analysis shows the JVM is crashing prior to being able to start Tomcat. ResolutionJava.exe is crashing prior to even getting into Tomcat code. This is a problem between the OS and JRE, beyond the realm of TIBCO Jaspersoft®, and apparently due to a bug in linux. See: https://access.redhat.com/solutions/3091371https://www.cloudlinux.com/cloudlinux-os-blog/entry/jvm-crashes-occurring-after-upgrading-to-a-kernel-with-the-fix-for-stack-clashOne workaround is to increase the Thread stack size of the JVM using -Xss2m in the JAVA_OPTS arguments you set for your appserver. For information on setting JAVA_OPTS. See the Installation Guide: http://community.jaspersoft.com/documentation/tibco-jasperreports-server-community-project-installation-guide/v630/setting-jvm Ref. Case 01481057
  24. Issue DescriptionDuring test, or interesting use-cases some customers prefer to disable the security feature known as the CSRF Guard (see Security Guide for details on this feature). ResolutionWarning - these steps disable a security feature edit WEB-INF/web.xml and comment out both of these below so that the CSRF guard is skipped entirely. A restart of the webapp is required: <filter> <filter-name>CsrfGuardFilter</filter-name> <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class> <init-param> <param-name>targetBeanName</param-name> <param-value>csrfGuardFilter</param-value> </init-param> </filter> and <filter-mapping> <filter-name>CsrfGuardFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping>
  25. Issue DescriptionA customer attempted to switch buildomatic installation processes to use the jdbc driver from JTDS. They encountered an error when running buildomatic commands, "Error invoking getDriver() method". The error means the jar file is found, but we're using the wrong class name to try and load the driver "class" from within the jar The TIBCO JasperReports® Server Installation Guide reviews steps for using the default TIBCO jdbc driver for Microsoft Sql Server, as well as Microsoft's own jdbc driver which we refer to as native. These are described in the Installation guide in section titled "Working With JDBC Drivers". It does not review steps for using a third-party driver like the JTDS driver ResolutionIf you simply want JasperReports Server (the webapp) to use JTDS you could just update META-INFcontext.xml and stick the jar in Tomcat/lib. If you want the buildomatic process to use JTDS then one solution, in addition to the things you've already done within your default_master.properties file is to do: Comment-out the jdbcDriverMaker=native in default_master.properties, these steps won't use the native. Edit 6.3.0binbuildomaticconf_sourcedbsqlserverdb.properties, commenting out the initial driver value and adding a new driver, like: # driver class # jdbcDriverClass=tibcosoftware.jdbc.sqlserver.SQLServerDriver jdbcDriverClass=net.sourceforge.jtds.jdbc.Driver Edit 6.3.0binbuildomaticconf_sourcedbsqlserverdb.templates.properties, commenting out the initial url and add a new one, like: # port or instance are appended to host name in dbHost property during setup # admin.jdbcUrl=jdbc:tibcosoftware:sqlserver://${dbHostOrInstance};sendTimestampEscapeAsString=false # js.jdbcUrl=jdbc:tibcosoftware:sqlserver://${dbHostOrInstance};databaseName=${js.dbName};sendTimestampEscapeAsString=false admin.jdbcUrl=jdbc:jtds:sqlserver://${dbHostOrInstance};sendTimestampEscapeAsString=false js.jdbcUrl=jdbc:jtds:sqlserver://${dbHostOrInstance};databaseName=${js.dbName};sendTimestampEscapeAsString=false NOTE, you should double-check whether or not sendTimeStampEscapeAsString is a valid option/param for the jtds driver. js-ant clean-config, followed by js-ant gen-config (to save and rebuild the associated configuration values and files) The .jar needs to be in 6.3.0binbuildomaticconf_sourcedbsqlserverjdbc Save and restart. Ref. Case 01528977
×
×
  • Create New...