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

How to use JDBC data adapter without JasperReports Server - password encryption issue?


eraskin

Recommended Posts

Hi:

I'm building a web application using Tomcat that uses the jasperreports library.  My JRXML file contains a reference to a JDBC data adapter like this:

<property name="net.sf.jasperreports.data.adapter" value="http://localhost:8080/app-core/Vitalmax.xml"/>

The Vitalmax.xml file contains the password in plain text.  When I execute the report, I get this error:

JRRuntimeException: No secret found for "vitalmaxowner" key in "net.sf.jasperreports.data.adapter" category.

How do I encrypt the password WITHOUT JasperReports Server, since I am not running that?   I would prefer NOT to deploy with plain text passwords, as the XML has to be visible to the web.

Thanks in advance...

   Eric Raskin
  eraskin at paslists dot com

 

Link to comment
Share on other sites

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

By default, jasper server accepts plain text passwords from the XMLs.

In the Dataset options, you can find the options to set default data adapters.

  • just place your datasource xml in the C:JasperSoftapache-tomcat-7.0.67webappsjasperserverWEB-INFdatasource.xml path
  • and put this same path on the default data adapter.
  • jasper server needs the jdbc driver. so place the respective jdbc driver in WEB-INFlib folder  (referred in the datasource.xml
  • push the report to the server and it should be running with the default data adapter.

one more thing to be considered while going through this process : if your report uses any SQL for parameter lists, then this methodology wont work as the report parameters are stored in the XML format and it cannot access this datasource.xml

Check this documentation on default data adapters

http://community.jaspersoft.com/documentation/tibco-jaspersoft-studio-user-guide/v611/using-data-adapters-reports-and-datasets

Link to comment
Share on other sites

Hmmm...  You are referencing webapps/jasperserver?  I'm not running Jasper Server.  I'm running my own application (based on Cuba Platform - http://www.cuba-platform.com) and integrating Jasper Library based reports into that.  

As you can see from my original post, I can reference the datasource xml file generated by Jasper Studio in my JRXML file, but for some reason it is looking for an encrypted password.  How do I tell Jasper Library (NOT Jasper Server) that the password is in plain text?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...