#1 2015-06-10 17:48:14

rjames43
Member
Registered: 2015-06-10

could not open connection error

After completing the installation, (of RS2.2.2-5639-reportserver-x64-bundle) on a server running MySql 5.6.2 and using the included Tomcat installation, I get this error when trying to run ReportServer.html.

null
org.hibernate.exception.GenericJDBCException: Could not open connection
null
javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Could not open connection
<br>Caused by: org.hibernate.exception.GenericJDBCException: Could not open connection
<br>Caused by: java.sql.SQLException: Connections could not be acquired from the underlying database!
<br>Caused by: com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primary factory or source.


Can someone tell me where I am going wrong?

Offline

#2 2015-06-10 19:51:03

Thorsten J. Krause
Guest

Re: could not open connection error

Hi,

if you choose to use an existing database you would need to manually create the database tables as well as set up connection properties in the persistence.xml file.

Please take a look at the config guide available here: http://sourceforge.net/projects/dw-rs/files/
"Setup the database" on page 9 describes the necessary steps.

Cheers,
Thorsten

#3 2015-06-10 20:04:18

rjames43
Member
Registered: 2015-06-10

Re: could not open connection error

This is what I have in the persistance.xml file

- <!--  Connection properties   -->

<property name="hibernate.dialect" value="net.datenwerke.rs.utils.hibernate.MySQL5Dialect" />
<property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver" />
<property name="hibernate.connection.url" value="jdbc:mysql://192.168.100.12:3306/DatabaseName=reportserver_pe" />
<property name="hibernate.connection.username" value="****" />
<property name="hibernate.connection.password" value="********" />

Offline

#4 2015-06-10 20:14:19

Thorsten J. Krause
Guest

Re: could not open connection error

Are you sure about the DatabaseName=reportserver in the connection.url?
As far as I know the syntax should be:
jdbc:mysql://192.168.100.12:3306/reportserver_pe

#5 2015-06-10 21:12:54

rjames43
Member
Registered: 2015-06-10

Re: could not open connection error

Thank you... I fixed the mistake in the persistence.xml file and just to be safe re-started the server, and still I get.

null
org.hibernate.exception.GenericJDBCException: Could not open connection
null
javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Could not open connection
...

Offline

#6 2015-06-11 07:48:36

Thorsten J. Krause
Guest

Re: could not open connection error

Okay, can you please check the other tomcat logfiles? There should be a localhost....log which contains additional information.

Cheers,
Thorsten

#7 2015-06-11 17:12:00

Thorsten J. Krause
Guest

Re: could not open connection error

Hi,

I looked through your logfiles (and deleted them afterwards) but I wasn't able to find anything helpful.
Can you please send the logfiles again, but this time:

- stop the server
- delete the contents of the log directory
- start the server again and wait a few minutes

then zip the entire log folder and send it to thorsten.krause@datenwerke.net

Perhaps you can also test if you can otherwise establish a connection to the database with the information you entered into the persistence.xml file from this server.

Thanks,
Thorsten

#8 2015-06-11 19:31:21

Thorsten J. Krause
Guest

Re: could not open connection error

For everyone else who ends up here with a similar error message: As it turned out the username for the mysql database was incorrect (it's case sensitive)
So even (or especially) if there is no hint in the error logs it's worth to verify you connection data.

Board footer

Powered by FluxBB