Save the context.xml file, then close it. Verify that the validationQuery parameter for your database is set to: validationQuery="select 1". If your purpose is just for study, you can download XAMPP for using MySQL DB.
If not, the DB connection speed will be slower and slower. This article will show you examples of how to use JDBC to connect to a MySQL database server. Please note do not forget to close the object after use it.
You can see java code comments for detailed explanations.
Name), and port numbers to match the correct values for your environment.Ĭomment out any resource references that refer to other databases. Below is the Complete MySQL JDBC Connection java code.
Modify the username, password, driver class information, IP address (or domain Navigate to the server/pentaho-server/tomcat/webapps/pentaho/META-INF directory and open the context.xml file with any text editor.Īdd the following code to the file if it does not already exist. 4) JDBC Driver and MYSQL connection libraries.
I set the timeout to 24h.A different port or different password, make sure that you change the To prevent this problem, i have to login on PUC befor mysql close the connection.
MySql closed the connection and the bi-server tried to use this closed connection.Īt the moment the only solution is to restart the server. I ask google for the problem and it seams that there is a problem whith the connectionpooling. MESSAGE: Communications link failure due to underlying exception:Īt 0(Native Method)Īt (SocketOutputStream.java:92)Īt (SocketOutputStream.java:136)Īt java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)Īt java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)Īt .send(MysqlIO.java:2744)Īt .sendCommand(MysqlIO.java:1612)Īt .sqlQueryDirect(MysqlIO.java:1723)Īt .execSQL(Connection.java:3256)Īt .executeInternal(PreparedStatement.java:1313)Īt .executeQuery(PreparedStatement.java:1448)Īt .getResultSet(AbstractBatcher.java:186)Īt .getResultSet(Loader.java:1787)Īt .doQuery(Loader.java:674)Īt .doQueryAndInitializeNonLaz圜ollections(Loader.java:236)Īt .doList(Loader.java:2213)Īt .listUsingQuer圜ache(Loader.java:2136)Īt .list(Loader.java:2096)Īt .QueryLoader.list(QueryLoader.java:378)Īt .QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)Īt .HQLQueryPlan.performList(HQLQueryPlan.java:172)Īt .list(SessionImpl.java:1121)Īt .list(QueryImpl.java:79)Īt .(UserSettingDAO.java:40)Īt .(UserSettingService.java:83)Īt .MantleServlet.getBookmarks(MantleServlet.java:1213)Īt 0(Native Method)Īt (NativeMethodAccessorImpl.java:39)Īt (DelegatingMethodAccessorImpl.java:25)Īt .invoke(Method.java:597)Īt .(RPC.java:527)Īt .(RemoteServiceServlet.java:166)Īt .(RemoteServiceServlet.java:86)Īt .service(HttpServlet.java:710)Īt .service(HttpServlet.java:803)Īt (Unknown Source) Code: Last packet sent to the server was 2 ms ago.Ġ9:50:25,422 ERROR No operations allowed after connection closed.Connection was implicitly closed due to underlying exception/error: