eraskin Posted March 13, 2017 Share Posted March 13, 2017 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 More sharing options...
reportdev Posted March 13, 2017 Share Posted March 13, 2017 I believe there is no easy workaround this situation.but we have placed the datasource xml file with the hard coded password in the WEB-INF folder of the serverand no one can access that xml file from a direct URL. Link to comment Share on other sites More sharing options...
eraskin Posted March 14, 2017 Author Share Posted March 14, 2017 OK, so if I can make it accessible to the report and NOT accessible to the web, I can use the plain text password. How to I configure the library so it will accept the plain text password? Link to comment Share on other sites More sharing options...
reportdev Posted March 14, 2017 Share Posted March 14, 2017 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 pathand 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.xmlpush 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.xmlCheck this documentation on default data adaptershttp://community.jaspersoft.com/documentation/tibco-jaspersoft-studio-user-guide/v611/using-data-adapters-reports-and-datasets Link to comment Share on other sites More sharing options...
eraskin Posted March 14, 2017 Author Share Posted March 14, 2017 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 More sharing options...
reportdev Posted March 15, 2017 Share Posted March 15, 2017 I'm sorry i did not read the post properly. i dont use jasper library as such.http://community.jaspersoft.com//system/files/restricted-docs/jasperreports-server-admin-guide_8.pdffrom the above documentation, it looks like you need to have jasper server to encrypt the passwords and decrypt it. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now