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

gdmoreno

Members
  • Posts

    114
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Security Advisories

Downloads

Posts posted by gdmoreno

  1. You can set the compatibility mode on iReport to match the version of JasperReports that's running on your server. So in your example, you would set the iReport compabitility to JasperReports 3.0.0, so that it matches your server.

    To set the compatibility, go to "Tools -> Options -> iReport -> General -> Compatibility" and choose the version you need from the drop-down list.

  2. Your driver class is right, and so is the JDBC URL (the one with the : character -  jdbc:mysql://localhost:3306/stat_development) . The next thing I would check is whether or not you have the MySQL driver deployed in the right place. If you're using Tomcat, check the [TOMCAT_HOME]/lib directory, there should be a file called mysql-connector.jar (something like that, it might also contain a version number in the filename).

    If it's not there, download the thin driver JAR file that works with your version of MySQL, and copy that JAR file to [TOMCAT_HOME]/lib. Then re-start the server, and test again.

    If you've done this already, then I would suggest looking at the log file and seeing if there's a clue in there. The log file is in /jasperserver/WEB-INF/logs/jasperserver.log

     

     

  3. Hi, there could be a few things going on here, so let's do it step-by-step. The first thing I would suggest is to create a datasource straight in the server itself, and then test the connection. If it passes, then you know that there's nothing wrong with the connection from the server to the database.

    If the datasource you create works, then at that point try changing the datasource for that report to the one you just saved in the repository.

  4. I think you're on the right track. If you have low concurrency, then the sizing you're describing should be fine. I would allocate as much memory as you can to your application server's JVM; I would start by setting your heap size at 8 GB and setting your PermGen space to 256 MB. You'll want to optimize the server startup scripts and configuration files to tune garbage collection settings and the size of your database connection pools.

     

  5. Hi, iReport isn't for ad hoc reporting, you can only do that with the commercial version of JasperReports Server. You can't schedule reports in iReport, but you can schedule reports using the server, and that functionality is available in both the commercial and community editions of JRS.

     

  6. I think you're on the right track. It could be something like your parameter value is incorrect, I don't know. I would try checking your ireport logs for the query that it's trying to execute. Here's ho to enable the logs in iReport:

    - add the log4j JAR to the iReport classpath (Tools -> Options -> Ireport -> Classpath)

    - Modify the ireport.conf file and add this bit of text to the default_options variable at the end: "-J-Dlog4j.configuration=file:/C:/TEMP/2012-07-25/log4j.properties". This tells ireport to use the log settings in that file. You'll have to change the directory to something that makes sense for your system.

    - Create the log4j.properties file, and enable the DEBUG setting for the class that builds the SQL query. Take what you see below, and copy it as-is. You may want to change the location of the iReport.log file.

    log4j.logger.net.sf.jasperreports.engine.query.JRJdbcQueryExecuter=DEBUG,fileout

    log4j.appender.fileout=org.apache.log4j.RollingFileAppender

    log4j.appender.fileout.File=C:\\TEMP\\2012-07-25\\iReport.log

    log4j.appender.fileout.MaxFileSize=1024KB

    log4j.appender.fileout.MaxBackupIndex=1

    log4j.appender.fileout.layout=org.apache.log4j.PatternLayout

    log4j.appender.fileout.layout.conversionPattern=%d{ABSOLUTE} %5p %c{1},%t:%L - %m%n

    - restart your ireport

    - Run your report

    - Check the logs in the ireport.log file, where it may give you some clues.

     

  7.  Try the code below instead - the getYear() method unfortunately returns year minus 1900, which is why you're seeing 112 for 2012. So you have to 1900 back to the value that getYear() returns.

    The other solution would be to put the date in its own text field (instead of mixing it with String values like you're currently doing), and then set the pattern to MM/dd/yyyy, and the pattern would then take hold.

     

    Code:
    "Agreement will commence on <b>"+ $F{EXPECTEDSTARTDATE}.getMonth()+ "/" + $F{EXPECTEDSTARTDATE}.getDay()+ "/" + $F{EXPECTEDSTARTDATE}.getYear()+ "</b> and end on <b>"+ $F{EXPECTEDSTARTDATE}.getMonth()+ "/" + $F{EXPECTEDSTARTDATE}.getDay()+ "/" + String.valueOf(1900 + $F{EXPECTEDSTARTDATE}.getYear())+ "</b>."
  8. Instead of creating an images folder here:

    C:\Program Files\jasperreports-server-cp-4.5.0\apache-tomcat\webapps\jasperserver\WEB-INF\images

    try creating one here:

    C:\Program Files\jasperreports-server-cp-4.5.0\apache-tomcat\webapps\jasperserver\images

    I'm not sure that putting image files in the WEB-INF directory is that great; it's better to put images in their own folder outside of WEB-INF. Later on, you could even externalize the whole thing by having a web server (instead of Tomcat) serve up the static images, and it would be easy to put in place, if you've got your image files organized in one place.

    To then reference the image in that folder in your report, you'll need to use iReport. Use the "Image" element from the palette, and drag it over to the place in the report where you want the image to appear. A pop-up will show up, but just hit cancel. Then select the image element, and in the properties box, for the image expression, paste in the URL of where your image is located (make sure to put it in double quotes: "http://localhost/jasperserver/images/example.gif").

     

  9. The "Cannot create PoolableConnectionFactory" could be due to a lot of different things, some things to check are:

    - is your repository database running? Maybe the database that Tomcat is trying to connect to isn't running. Check the context.xml file for the jasperserver application, which contains the database connection information, and see if you can connect to the database via some other tool.

    - if the database is running, maybe there's something else that blocking connections to the database - like a firewall, for instance. In which case you would have to allow traffic on the database port.

    P.S.: How did you install jasperserver? Are you having these problems on your own machine?

     

  10. Hi - yes, you can use MySQL instead of Postgres. There is a manual installation process where you can specify MySQL as the database. Check Chapter 5 of the Installation Guide (titled "Installing the WAR File Distribution"). You can find the Install Guide under the docs directory.

    That chapter will tell you how to install JasperReports Server with MySQL - essentially you have to modify a configuration file so that it points to MySQL, and run some scripts that will create databases and load data to your MySQL, and will also install the WAR file to an existing Tomcat.

     

  11. Hi, it sounds like you're close. Set the "Hyperlink type" to "ReportExecution", and add the "_report" parameter, and then give that parameter the expression of where in the repository the target report is. Something like "/Public/reports/myreport" (or whatever the URI for your report is). It wasn't clear in your post whether you tried that.

    It would also be helpful if you posted a stack trace, if you're getting one.

  12. Another option you could try is this. In the same pop-up window where you see the query, there's a button toward the bottom labelled "Filter Expression...". Click on it, and there you can choose the field that you want to filter on, and in the expression editor, you'll need to build an expression to exclude the companies you don't want. Something like this:

    !$F{$company_name}.equals("Company1") && !$F{$company_name}.equals("Company2")

    Yes, it's a programming statement. The thing about iReport is that it's meant for someone who's comfortable with SQL and/or Java, unfortunately it's not a pure end-user type of an application. To maintain and occasionally update these reports, you're going to need someone with that skillset.

     

  13.  I think you have two options to do a silent install of iReport:

     
    - The Windows installer is based on Nullsoft, so could use the case-sensitive options /S for silent install and /D to specify the installation directory. Check with NullSoft documentation for /D usage ( http://nsis.sourceforge.net/Docs/Chapter4.html#4.12
     
    - another option is to use the .zip iReport distribution. All you need to do is unpack it, and start using iReport by executing <iReport>\bin\ireportpro.exe
  14. ok, it's good that you're familiar with the iReport tool. When you open up the JRXML file in the Designer Mode, you should "Designer", "XML", and "Preview" - click on the button that's right next to the "Preview" button, it looks like a cylinder with an arrow coming out of it.

    When you click on that button, do you see a query? If you do, I'm thinking you could add a WHERE clause to exclude the companies you don't want to see.

     

  15. Do you know if those reports were developed using iReport?

    If so, then what you can do is connect to the server using iReport (using the repository navigator), browse to the report's location in the repository, and then open it up using iReport.

    Then, you can modify the query that the report is using, and you can add the necessary filter to the query itself. Once you're satisfied with the report data, you can upload the report back to the server.

     

  16. I think you have some possibilities here. Here's one way, it has a lot of steps. The first thing to do is to back up your current Postgres repository, which you will then import later to another MySQL database.

    - Make sure you've shutdown your Tomcat server

    - Go to the buildomatic directory and do this from the command line:

    ./js-export.sh --everything --output-zip postgresbackup.zip

    That zip file will contain everything (organizations, users, reports, schedules, etc) that JRS needs to run. Once you have the MySQL database ready to go, you'll use another script to import it to your new database.

    I'm assuming that you don't want to redeploy your JRS web application, and that all you want to do is migrate over to a different database.

    - Next, in the buildomatic directory, modify the default_master.properties file

    This file will contain information about what database you're using. The easiest thing to do is to copy the mysql_master.properties file in the sample_conf directory, copy it to the buildomatic directory, and rename it default_master.properties, to replace the other file. Next edit that file, and put the specific details about your MySQL database in there.

    - Next, run the buildomatic scripts to create the MySQL repository

    These steps are the ones that you find in the installation guide. You only need to run those steps that deal with the database, so that means all of them except the last one that actually deploys the web application

    ./js-ant create-js-db

    ./js-ant create-sugarcrm-db 

    ./js-ant create-foodmart-db

    ./js-ant load-sugarcrm-db 

    ./js-ant load-foodmart-db

    ./js-ant update-foodmart-db

    ./js-ant init-js-db-pro

    ./js-ant import-minimal-pro

    ./js-ant import-sample-data-pro

    Only the commands in bold are absolutely necessary; the others load sample databases and reports. It's up to you whether you want them or not.

    - Next, run the import script to populate your MySQL database

    From the same buildomatic directory, do this from the command line:

    ./js-import.sh --input-zip postgresbackup.zip

    The script now uses your modified default_master.properties file, and imports the backup file to 

    - Next, modify your context.xml file

    Your context.xml file, which is under [TOMCAT_HOME]/webapps/jasperserver/META-INF, will contain JNDI entries that point to the old Postgres database. You'll need to modify the entries there with the right JDBC URL's,  and the right username/password.

    Also, make sure to delete the [TOMCAT_HOME]/conf/Catalina/localhost/jasperserver.xml file (if it's there), because Tomcat will check for the existence of this file before reading in the context.xml file you just modified.

    - Start up your Tomcat server

    - Log in (Hopefully this works)

    - Modify JDBC datasources where necessary

    If you used the Postgres database as a datasource as well as a repository, you'll need to modify JDBC datasources and modify them so that they point to your MySQL databases.

    As you can see, it's a lot of manual steps, with potential room for mistakes

     

  17. 1.  Hi, my servlet class definition looks slightly different, try this and see what you get:

     

      <servlet>

        <servlet-name>Axis2Servlet</servlet-name>

        <!--display-name>Apache-Axis2 Servlet</display-name-->

        <servlet-class>org.apache.axis.transport.http.AxisServlet</servlet-class>

        <!--<init-param>

                <param-name>repository</param-name>

                <param-value>/WEB-INF</param-value>

            </init-param>-->

        <load-on-startup>1</load-on-startup>

      </servlet>

    2. Yup, those JAR files look fine

    3. No, you don't need to activated Axis at the Tomcat level to get it working. I only have it activated at the jasperserver level.

    4. You don't need to deploy Axis as a separate web application. And yes, Axis is part of the JasperReports Server application, so you don't need an extra deployment like that.

     

  18. Regarding the JNDI problems you're having: I would suggest that you check to see if there's a duplicate of the context.xml in one of Tomcat's other directories. I say this because I know that Tomcat sometimes keeps a duplicate of the context.xml in this directory:

    [TOMCAT_HOME]/conf/Catalina/localhost

    You'll often see a set of XML files in there, including one called jasperserver.xml or jasperserver-pro.xml. If it's there's then delete it. When Tomcat starts up, it first checks in that directory for the existence of an application context file. If it finds it there, then it won't look in the [TOMCAT_HOME]/webapps/jasperserver/META-INF directory for context.xml, even if you've modified it.

    After you delete the XML file in that localhost directory, start Tomcat. Tomcat will then look for the application context file in the localhost directory and not find it. It will then look for the context file in the META-INF directory, find it, and then make a copy of it and put the copy in the localhost directory.

    Tomcat 6 seems to do this by default, and Tomcat 7 seems to go directly to the META-INF directory.

     

  19. Interesting, I'm wondering if there's something wrong with your web.xml file. Your URL says http://localhost:8080/jasperserver-pro/services/repository, but your message says "Servlet Axis2Servlet is not available."

    So that means that the servlet mapping is right. It then looks up the servlet class associated with the servlet name "Axis2Servlet". I'm wondering if perhaps your servlet class is incorrect? Mine is org.apache.axis.transport.http.AxisServlet, and it's in axis-1.3.jar under WEB-INF/lib. That's all I can think of.

×
×
  • Create New...