Jump to content
Changes to the Jaspersoft community edition download ×

gdmoreno

Members
  • Posts

    114
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

gdmoreno's Achievements

  1. Hi, It looks like you need to add the Microsoft SQL Server database driver to your 7.2 environment. Just grab the Driver JAR file from your 6.4 environment and put it in the TOMCAT_HOME/lib directory (server re-start required). Let me know if this helps.
  2. Hi, Installing JRS on JBoss is usually tricky ... did you manage to get past this problem? It usually requires a lot of troubleshooting to do it (it's much simpler on Tomcat). Contact me if you have questions. Gonzalo
  3. Hi, It's best for you to upgrade, I know that iReport is no longer supported by TIBCO, and you should use Jaspersoft Studio. What version of the server are you on?
  4. This looks like some kind of a classpath error. Maybe you didn't install Jaspersoft Studio correctly. What version of iReport are you using? Do you have these reports already deployed in a server already?
  5. It sounds like maybe you're not passing in a datasource correctly. If it's working in Studio, then it's a matter of properly deploying it to Tomcat. I'm going to guess that you have deployed other reports to Tomcat without a problem, so the next most likely thing is a datasource problem.
  6. Not enough information to tell you. I think you should file a ticket with Support.
  7. May she rest in peace, and my condolences. She will live on in your memories. Please accept my sympathies for your loss.
  8. IntroductionThe Jaspersoft out-of-the-box functionality does not include tenant and username information in the logs, but this simple customization leveraging web application filters and Log4J functionality allows you to capture this information too. You'll need to test and adapt to your particular situation. These are the high-level steps:Create a filter that takes the username and tenant information and adds it to the logging objectAdd this filter to the FilterChainProxyModify the log4j.properties file to reference the username and tenant information you want to logDeploy filter and re-start the serverStep 1 - Create the filterEither compile this Filter class or add the logic you find in the doFilter method to any other existing filter you may have developed. It leverages the MDC object from the Log4J package. package com.jaspersoft.custom.filters;import java.io.IOException;import javax.servlet.*;import javax.servlet.http.*;import com.jaspersoft.jasperserver.api.metadata.user.domain.impl.client.MetadataUserDetails;import org.springframework.security.core.Authentication;import org.springframework.security.core.context.SecurityContext;import org.springframework.security.core.context.SecurityContextHolder;import org.apache.log4j.MDC;/*** Created by gmoreno on 2/9/2016.*/public class AddTenantUsernameFilter implements Filter { public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException { HttpServletRequest request = (HttpServletRequest) req; SecurityContext context = SecurityContextHolder.getContext(); if (context != null) { MetadataUserDetails user = null; Authentication auth = context.getAuthentication(); if (auth != null && auth.getPrincipal() != null) { if (auth.getPrincipal() instanceof MetadataUserDetails) { user = (MetadataUserDetails) auth.getPrincipal(); //NDC.push("Username = " + user.getUsername() + "|" + user.getTenantId()); MDC.put("Username", user.getUsername() + "|" + user.getTenantId() + "n"); } } } chain.doFilter(req, res); //MDC.remove("Username"); } public void init (FilterConfig config) throws ServletException { } public void destroy () { }}[/code] Step 2 - add filter to Spring configuration fileAdd this: to the applicationContext-security-web.xml file found in the [TOMCAT_HOME]/webapps/jaspserver-pro/WEB-INF folder. Add that bean ID value to the security:filter-chain whose pattern is "/**" to the end of the filters attribute. Step 3 - Modify the Log4J properties fileFind the log4j.properties file in the [TOMCAT_HOME]/webapps/jasperserver-pro/WEB-INF folder, and open in a text editor. Change this:log4j.appender.fileout.layout.conversionPattern=%d{ISO8601} %5p %c{1},%t:%L - %m%n[/code]To this:log4j.appender.fileout.layout.conversionPattern=%d{ISO8601} %5p %c{1},%t:%L - %m%n -- %X{Username}[/code]the %X{Username} references the value that's store for the Username key. An example log line will now show up as:2016-02-09 13:16:14,927 DEBUG JRJdbcQueryExecuter,http-nio-8080-exec-3:144 - DB is PostgreSQL version 9.3.9 (9/3)-- jasperadmin|organization_1[/code]The default Log4J configuration doesn't contain that information. Step 4 - Final stepsMake sure that you've deployed the compiled class to /jasperserver-pro/WEB-INF/classes or packaged it up in JAR file in the /jasperserver-pro/WEB-INF/lib directory. Make sure to re-start your server. Resourceshttps://wiki.apache.org/logging-log4j/NDCvsMDC https://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/PatternLayout.html
  9. IntroductionIn this article, we take a look at how to set up a dedicated TIBCO JasperReports® Server job server, and the advantages of doing that. AdvantagesCustomer-facing TIBCO JasperReports Server instances dedicated to the on-demand experience are not burdened with scheduled job execution dutiesCan use existing version of TIBCO JasperReports Server you’re on, no need to upgradeIf you’re already used to working with load balancers and spinning up new instances, this isn’t going to be much more difficultIn terms of TIBCO JasperReports Server, there are only configuration file changes to makeProcedure for setting up a Dedicated Job ServerAdd new TIBCO JasperReports Server instance to clusterDon’t add the new instance to the load balancer rulesDisable the LB-facing TIBCO JasperReports Server instances from executing scheduled jobs Configuration Change to Disable the Job SchedulerComment out the quartzSchedulerControl bean in the Spring configuration filesFind the applicationContext-report-scheduling.xml file in the ../jasperserver-pro/WEB-INF directoryComment out the quartzSchedulerControl bean completely so it looks like this:– <!--bean id="quartzSchedulerControl" class="com.jaspersoft.jasperserver.api.engine.scheduling.quartz.QuartzSchedulerControl" depends-on="reportSchedulingService" init-method="start"> <property name="scheduler" ref="quartzScheduler"/> </bean-->[/code]You can further tune the Quartz propertiesIn the js.quartz.base.properties file, also in the WEB-INF directory:Configure the number of threads available for job execution via the org.quartz.threadPool.threadCount propertyConfigured to 2 concurrent threads by default, can be set much higherQuartz resource: http://quartz-scheduler.org/documentation/quartz-1.x/configuration/ConfigThreadPool
  10. IntroductionIt’s possible to use images stored in a database for your reports. Images stored in a database as stored as BLOBs, or in the case of Postgres as a BYTEA. The image gets stored as one of these binary data types. This article goes over an example that does this, and which you can download. File system vs. database storage for imagesThe usual strategy for storing images is to store image files on a file system and then have references to their file location in the database. Storing a reference in the database hardly takes up any space and having the file system host the images doesn’t require any extra processing when being served up by web servers. Also, applications that use images stored in databases need to generate the right query to pull the image and then may need to do some post-processing to use the image in an application, which adds to the response latency, as well as adding load to the database. On the other hand, storing images in a database has its advantages. It’s easier to backup the images using the database’s own functions, provide transactional integrity (if necessary), and storing them in a database adds an extra layer of security – it’s a lot harder to get at them if they’re in a database than if they’re in a file system. Most of the time, it will make more sense to have the images stored in the file system, but you should be aware of situations where it may be advantageous to store them in a database. What to do in the report designYou’ll design your report query as you normally would, selecting the image field as part of the SQL statement. Next, you’ll need to set the field class type to java.awt.Image. The screenshot below is from iReport, in Jaspersoft Studio, it’s a similar process. Next, add an Image element from the palette to the band in the report design and then modify the the Image Expression class to java.awt.Image (thus matching the field type), and set the Image expression to the field holding your image. As you can see in the image below, the expression class is set to java.awt.Image. ExampleThe example attached to this page requires you to download the ZIP file and unzip it to C:TEMP (if you don’t, you’ll need to modify the image-loading commands) and have either MySQL or Postgres. Choose the MySQL or Postgres scripts, which will create a sample table in the database and store the images in the database. Once you complete the database steps, open up the JRXML file and execute it – you’ll need to make sure you’re pointing at the right database, and you should be good to go.
  11. What kind of datasource is it? If it's a JDBC datasource, perhaps you can create a JNDI datasource instead.
  12. Although I couldn't find an example, I think that one approach would be to take advantage of JasperReports Server's web services functionality. I know that you can integrate web services call in Python, so that would be lightweight, loose coupling between the two. There's a web services guide under the docs folder where you installed JasperReports Server.
  13. For what you describe, you'll need a custom datasource. Your other alternative is to set up an ETL job that connects to the FTP site, and pulls the file over to a file system where iReport can reach it.
  14. Hi Benedikt - Unfortunately there's no support for JBoss 6.0 - take a look at this sheet: http://www.jaspersoft.com/sites/default/files/Jaspersoft%20Platform%20Support%20V4.7.pdf, page 2 has a list of supported application servers. It supports JBoss 5.1 and 7.1, but no 6.x.
  15. Jaspersoft also has some YouTube videos that showcase the different things the product can do - http://www.youtube.com/user/JaspersoftBISuite, including the self-service requirements you mention.
×
×
  • Create New...