2015-06-04 70 views
0

我測試與教程列出的Hello World示例的JWPL API:JWPL例外,在訪問維基百科

https://code.google.com/p/jwpl/source/browse/trunk/de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/api/tutorial/T1a_HelloWorld.java

但是我收到下面的MySQL連接異常:

02 :11:31,057 INFO AbstractPoolBackedDataSource:462 - 初始化c3p0池... [email protected] [connectionPoolDataSource - > [email protected] [acquireIncrement - > 3,acquireRetryAttempts - > 30,acquireRetr yDelay - > 1000,autoCommitOnClose - >假,automaticTestTable - >空,breakAfterAcquireFailure - >假,checkoutTimeout - > 0,connectionCustomizerClassName - >空,

我已經安裝了MySQL 5.6.24,它的正常運行。在我運行這些教程之前,我是否必須在MySQL中創建一些表來運行這些示例?

編輯爲清楚: The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server. at sun.reflect.GeneratedConstructorAccessor6.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at com.mysql.jdbc.Util.handleNewInstance(Util.java:411) at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1117) at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:350) at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2393) at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2430) at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2215) at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:813) at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47) at sun.reflect.GeneratedConstructorAccessor9.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

+0

這對我來說不是例外。如果你真的得到一個異常,它的類型,消息和堆棧跟蹤是什麼? – svick

+0

有何評論?謝謝。 – marlon

回答

0

你的問題是你真正遵循哪些步驟很不清楚。你提到的唯一一步就是讓MySQL運行。你要查詢哪些數據,然後?

的JWPL文檔是一團糟,但這似乎與說明頁面:您必須進口維基百科的數據https://code.google.com/p/jwpl/wiki/DataMachine (或任何其他鏈接到MediaWiki維基轉儲,我希望),是的,這包括創建一些表格。