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

yohei.onishi

Members
  • Posts

    7
  • Joined

  • Last visited

yohei.onishi's Achievements

  1. Now you can download http://community.jaspersoft.com/project/ireport-designer/releases
  2. ProblemIf JasperReports Server is behind a proxy server that requests user/password authentication, exporting a report with google map to PDF fails with authentication error (HTTP 407). This happens because JVM runtime option does not support user/password as a default. SolutionChange authentication method in a code by executing Authenticator.setDefault method.http://stackoverflow.com/questions/1626549/authenticated-http-proxy-with-java/1626616#1626616You can execute this code when JRS starts without modifying JasperReports Server source code by adding ServletContextLisner.http://www.mkyong.com/servlet/what-is-listener-servletcontextlistener-example/Steps for implementationBuild code to change Default AuthenticatorBuild this code and create jar file. The method "contextInitialized" is called when the application starts, then it change default authentication for proxy. package com.sample; import java.io.FileOutputStream; import java.io.InputStream; import java.io.OutputStream; import java.net.Authenticator; import java.net.MalformedURLException; import java.net.PasswordAuthentication; import java.net.URL; import javax.servlet.ServletContextListener; import javax.servlet.ServletContextEvent; public class ProxyAuthenticator implements ServletContextListener { public void contextInitialized(ServletContextEvent e) { final String proxyHost = e.getServletContext().getInitParameter("proxyHost"); final String proxyPort = e.getServletContext().getInitParameter("proxyPort"); final String proxyUser = e.getServletContext().getInitParameter("proxyUser"); final String proxyPassword = e.getServletContext().getInitParameter("proxyPassword"); System.setProperty("http.proxyHost", proxyHost); System.setProperty("http.proxyPort", proxyPort); System.setProperty("http.proxyUser", proxyUser); System.setProperty("http.proxyPassword", proxyPassword); Authenticator.setDefault( new Authenticator() { public PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthentication(proxyUser, proxyPassword.toCharArray()); } } ); System.out.println("ProxyAuthenticator"); } public void contextDestroyed(ServletContextEvent e) { } } Add jar file to classpathLocate jar file that you created at the step 1 into tomcatwebappsjasperserver-proWEB-INFlib. Add settings for listner and proxy to web.xmlAdd this code to change default authentication when JasperReports Server runs. Please note that you need specify correct proxy settings. <listener> <listener-class>com.sample.ProxyAuthenticator</listener-class> </listener> <context-param> <param-name>proxyHost</param-name> <param-value>proxy.xxx.com</param-value> </context-param> <context-param> <param-name>proxyPort</param-name> <param-value>8080</param-value> </context-param> <context-param> <param-name>proxyUser</param-name> <param-value>username</param-value> </context-param> <context-param> <param-name>proxyPassword</param-name> <param-value>pass</param-value> </context-param> Run JasperReports Server.Make sure that you can export PDF from a report with google map - e.g. /organizations/organization_1/reports/interactive/MapReport
  3. It seems that iReport 5.5.1 was released in the following URL but there are not links for 5.5.1 but 5.5.0. http://community.jaspersoft.com/project/ireport-designer/releases
  4. I found the same error on Stackoverflow. This might help you. http://stackoverflow.com/questions/18192521/ora-12505-tnslistener-does-not-currently-know-of-sid-given-in-connect-descript
  5. You do not need to specify different database. It seems that you do not have an authority to access to the postgres database from localhost with "my_user" user. Please check your configuration of pg_hba.conf. http://www.postgresql.org/docs/9.1/static/auth-pg-hba-conf.html
×
×
  • Create New...