jaspersoft creating custom data adapter for jdbc connection - jdbc

I'm using japsersoft studio, I want to create my own custom data adapter for jdbc connection, so that connection details will be stored in file or class or package we can say.... and using this file I"m going to connect with data source in jaspersoft.
I have searched on internet but found nothing.
So if there is any way to create our own custom adapter for jdbc connection in jaspsersoft studio it will very helpful.
Or any way through which I can store jdbc(data source) credentials in file and can use that file for accessing database connection in jasper studio. so if i modify details in file then database source should also be modified in jaspersoft.
Thank you.

You may be interested in exporting your DataAdapter defined in JSS to an XML file and reference that one instead. More info here: Importing and Exporting Data Sources.
Be warned, that if you want to share the adapter file you will be, most likely, saving the credentials in clear text which is totally unsafe. A more secure way would be to enable the Secure Storage for credentials. This way, instead of the password, your file will contain the encrypted password.
If you export and save the adapter file inside your JSS project you can pick it from the DataAdapter drop-down when previewing the report.

Related

Oracle Apex,is it possible to connect an excel file or csv from a remote server?

I am creating a web app using Oracle apex and I need to draw data from an excel file or CSV file from a remote server, is the remote server option of oracle apex capable of that, is it possible to be done and how? thanks in advance.
If you are talking about the "Data Loading" page type, then yes - the Wizard creates several pages; one of them lets you browse for the source file. If the remote server's directory is mapped on your computer, you'll see it while browsing for the file and use it as data source.

Using a oracle data adapter to deploy and fill reports on jasperserver

I have a oracle dataadapter that is a datasource on jasperserver.
But when I create a report using this adapter, it does not preview or fill the report on Jaspersoft Studio and JasperReports Server. Is there anyway I can create a new oracle dataadapter for testing purposes. I have downloaded odjc7.jar. But when I create a driver path to this file. I recieve a error Reason:java.sql.SQLRecoverableException: IO Error: Unknown host specified
Any details to whether oracle datasource can fill reports would be much appreciated and any details to creating a new oracle dataadapter.
If your link is correct and already works on other pcs/servers, then the error is in the connection to the database.
Check your connection to the database. Open a SQL-Developer tool and try to connect to the database.
Check if you really did add the driver to the data adapter:
It should look like this:
If you didn't provide the right driver it will not work!
Recheck your ojdbc7.jar. Maybe download it again from an official source. Also sometimes the ojdbc7.jar leads to some unknown errors. At a Jaspersoft Roadshow they recommended to still use the ojdbc6.jar.

Using BigQuery in DataGrip with JDBC

Has anyone been able to use the new JDBC drivers for BigQuery in JetBrains DataGrip?
I've followed the these steps
Created a driver in DataGrip with all the jar files
Created a database with a connection string with a service account file
The connection test says successful, but once I try to query something I receive an error:
java.lang.ClassNotFoundException: com.google.api.client.json.JsonFactory
I've added the following files from the Simba ZIP into the DataGrip driver:
GoogleBigQueryJDBC42.jar
jackson-core-2.1.3.jar
google-api-client-1.22.0.jar
google-api-services-bigquery-v2-rev320-1.22.0.jar
google-http-client-1.22.0.jar
google-http-client-jackson2-1.22.0.jar
google-oauth-client-1.22.0.jar
So I'm not sure what to do next. I tried changing their order in DataGrip but it didn't seem to make a different.
My connection string also looks OK I think:
jdbc:bigquery://https://www.googleapis.com/bigquery/v2:443;ProjectId=...;OAuthType=0;OAuthPvtKeyPath=...;OAuthServiceAcctEmail=...;
You may get this error when the driver JAR files are not referenced correctly in the tool. I have listed out the steps I used to connect to BigQuery via DataGrip.
Add a new driver by adding all the JAR files from the zip. The correct class name should be selected from the "Class" drop down in this step.
Add a new data source by selecting the newly created BigQuery JDBC driver. Provide the correct connection URL in this step.
If the test connection succeeds, create a new query for the same datasource.
Make sure your query uses the correct format "dataset.tablename" and is running on the data source you just tested.
For me replacing P12 with Json worked. But, cannot use DataGrip or in general JDBC to access BigQuery because of various query/incompatibility issues.
This video can be referred : https://www.youtube.com/watch?v=r9l2c_aQPoQ&ab_channel=JetBrainsTV
to use the new simba jdbc drivers for BigQuery in JetBrains DataGrip. It covers all steps one by one for working setup.
Here is the blog which refers this video: https://blog.jetbrains.com/datagrip/2018/07/10/using-bigquery-from-intellij-based-ide/
Drivers can be downloaded at : https://cloud.google.com/bigquery/providers/simba-drivers
Note: Make sure to go through comments on blog to authenticate without creating service account on gcp.
Hope this is helpful!

Password is not being Saved in SSIS for Oracle based Connection Manager

My problem is , I am talking to Oracle database from my SSIS package. The Connection Manager is not saving Password and it fails on Run time. I have changed it and tried to use XML based Config file to store connection string. I have manually updated Connection string in Config file and added Password=[Something] but it's still not working.
Can anyone please advise me to solve this puzzle
Thanks,

What is the best way of using dynamic JDBC username and password?

We are creating an XPages application with an MySQL backend. Application will be used by several customers. Each has their own NSF database and a corresponding MySQL database. Each customer will have their own MySQL username. We are using the Extension Library JDBC components (ConnectionManager).
We were planning to store the username and password in a NotesDocument. This way the NSF's design can be easily updated from NTF template without affecting this data. However, the ConnectionManager component and #GetJdbcConnection SSJS function both read the username, password and other connection info from a file stored in WEB-INF/jdbc folder. Files stored there will be overwritten when the NSF design is updated, thus losing the customer-specific information.
There seems to be no way of making these files dynamic (WEB-INF is by specification read-only) or to include dynamic elements inside them (see my previous question).
We could use a dynamic JDBC URL in the ConnectionManager, however the ExtLib book warns against this practice. It seems that we then lose the connection pooling. And besides, the #GetJdbcConnection function does not accept JDBC URLS.
So, what is the best way of storing NSF-specific JDBC connection information?
EDIT: SOLVED
I created a subclass of the jdbcConnectionManager component. The procedure is detailed here: http://lazynotesguy.net/blog/2013/08/09/subclassing-an-extlib-component/
Best is to subclass the Extlib classes. Since the extlib source is provided it should be not too hard.
The other option is to use the version control system to maintain branches per customer that only differ in that config file

Resources