berlin.brown Posted April 8, 2019 Share Posted April 8, 2019 I am trying to connect to the hsqldb database that is running on localhost. I can connect through the runManager fine, but when I try to connect through a jasper reports adapter and hit "Test" I get an error below.When using the runmanager for hsqldb:HSQL Database Engine Serverorg.hsqldb.jdbcDriverjdbc:hsqldb:hsql://localhost/user: sapassword: emptyBut when connecting through the database jdbc connector, this does not work:jdbc:hsqldb:hsql://localhost/Username:saPassword: emptyIn the jasper client:net.sf.jasperreports.engine.JRException: java.sql.SQLTransientConnectionException: connection exception: connection failure: java.io.EOFException at net.sf.jasperreports.data.jdbc.JdbcDataAdapterService.contributeParameters(JdbcDataAdapterService.java:130) at net.sf.jasperreports.data.AbstractDataAdapterService.test(AbstractDataAdapterService.java:122) at com.jaspersoft.studio.data.wizard.AbstractDataAdapterWizard$3.runOperations(AbstractDataAdapterWizard.java:162) at com.jaspersoft.studio.utils.jobs.CheckedRunnableWithProgress$1.run(CheckedRunnableWithProgress.java:59) at java.lang.Thread.run(Thread.java:745)Caused by: java.sql.SQLTransientConnectionException: connection exception: connection failure: java.io.EOFException at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source) at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source) at org.hsqldb.jdbc.JDBCConnection.<init>(Unknown Source) at org.hsqldb.jdbc.JDBCDriver.getConnection(Unknown Source) at org.hsqldb.jdbc.JDBCDriver.connect(Unknown Source) at net.sf.jasperreports.data.jdbc.JdbcDataAdapterService.getConnection(JdbcDataAdapterService.java:168) at net.sf.jasperreports.data.jdbc.JdbcDataAdapterService.contributeParameters(JdbcDataAdapterService.java:128) ... 4 moreCaused by: org.hsqldb.HsqlException: connection exception: connection failure: java.io.EOFException at org.hsqldb.error.Error.error(Unknown Source) at org.hsqldb.error.Error.error(Unknown Source) at org.hsqldb.ClientConnection.execute(Unknown Source) at org.hsqldb.ClientConnection.<init>(Unknown Source) ... 9 more And even on the server side, I see this error on the hsql [java] Exception in thread "HSQLDB Connection @56f3bb82" java.lang.NullPointerException [java] at org.hsqldb.ServerConnection.close(Unknown Source) [java] at org.hsqldb.ServerConnection.run(Unknown Source) [java] at java.lang.Thread.run(Thread.java:748) Link to comment Share on other sites More sharing options...
hozawa Posted April 8, 2019 Share Posted April 8, 2019 I was able to create a jdbc data adapter with the following settings and connect and print values from address table in a report. I've tested using Jaspersoft Studio 6.6.0 and hsqldb in JasperReports 6.8.0.Note that hsqldb in JasperReports 6.8.0 is version 2.4.0. Jaspersoft Studio 6.6.0 is also using 2.4.0. They should match. If the server and client version do not match, you may get error.JDBC Driver: org.hsqldb.jdbcDriverJDBC Url: jdbc:hsqldb:hsql://localhostUsername: saPassword:1. I open a console in demo/hsqldb directory2. Execute "ant"3. Open Jaspersoft Studio 6.6.0 and create a Data Adapter with the above information and clicked on the "Test" button. Returned "Success".4. Created JasperReports report and used the created data adapter with "SELECT * FROM address".5. Put all fields in the details band.6. Did a preview and all data were displayed in my report. Link to comment Share on other sites More sharing options...
berlin.brown Posted April 9, 2019 Author Share Posted April 9, 2019 I am using the "demo" samples from jasper reports. It is clear that the hsqldb is running as standalone server. For example:https://github.com/TIBCOSoftware/jasperreports/blob/master/jasperreports/demo/samples/charts/src/ChartsApp.java https://github.com/TIBCOSoftware/jasperreports/blob/master/jasperreports/src/net/sf/jasperreports/engine/util/AbstractSampleApp.java //Change these settings according to your local configuration String driver = "org.hsqldb.jdbcDriver"; String connectString = "jdbc:hsqldb:hsql://localhost"; String user = "sa"; String password = ""; Link to comment Share on other sites More sharing options...
Solution kkumlien Posted September 22, 2021 Solution Share Posted September 22, 2021 Further options in the 2 answers here: https://community.jaspersoft.com/questions/501094/where-do-we-get-sample-db-used 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