Problem Description:
This article is written for a problem reported on Jasperserver version 8.0.2. Below is a workaround.
When trying to connect to jasperserver repository from Jaspersoft Studio, you get the following error on Windows but not on a Mac.
java.lang.StringIndexOutOfBoundsException: begin 0, end -1, length 74 at java.base/java.lang.String.checkBoundsBeginEnd(Unknown Source) at java.base/java.lang.String.substring(Unknown Source) at com.amazon.redshift.Driver.getJdbcIniFile(Driver.java:926) at com.amazon.redshift.Driver.connect(Driver.java:264) at net.sf.jasperreports.data.jdbc.JdbcDataAdapterService.getConnection(JdbcDataAdapterService.java:164) at net.sf.jasperreports.data.jdbc.JdbcDataAdapterService.contributeParameters(JdbcDataAdapterService.java:124) at net.sf.jasperreports.data.AbstractDataAdapterService.test(AbstractDataAdapterService.java:120) at com.jaspersoft.studio.data.wizard.AbstractDataAdapterWizard$3.runOperations(AbstractDataAdapterWizard.java:155) at com.jaspersoft.studio.utils.jobs.CheckedRunnableWithProgress$1.run(CheckedRunnableWithProgress.java:51) at java.base/java.lang.Thread.run(Unknown Source)
Workaround:
The problem is in the AWS driver. We have also submitted a problem report to AWS. Here is the link if you want to see the details. https://github.com/aws/amazon-redshift-jdbc-driver/issues/78
You can get around the problem by using the component jars. See attached screenshot. You can download these jars from here. https://github.com/aws/amazon-redshift-jdbc-driver/issues/78 Look for this section: If you use the Amazon Redshift JDBC driver for database authentication, make sure that you have AWS SDK for Java 1.11.118 or later in your Java class path. If you don't have AWS SDK for Java installed, download the ZIP file with JDBC 4.2–compatible driver and driver dependent libraries for the AWS SDK: JDBC 4.2–compatible driver version 2.1 and AWS SDK driver–dependent libraries <https://s3.amazonaws.com/redshift-downloads/drivers/jdbc/2.1.0.10/redshift-jdbc42-2.1.0.10.zip>
Recommended Comments
There are no comments to display.
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