0

我正在使用教程中列出的 Hello World 示例测试 JWPL API:

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。爪哇

但我收到以下 MySQL 连接异常:

02:11:31,057 信息 AbstractPoolBackedDataSource:462 - 初始化 c3p0 池... com.mchange.v2.c3p0.PoolBackedDataSource@f56923d7 [ connectionPoolDataSource -> com.mchange.v2.c3p0.WrapperConnectionPoolDataSource@76380f40 [acquireIncrement -> 3,acquireRetryAttempts - > 30,acquireRetryDelay -> 1000,autoCommitOnClose -> false,automaticTestTable -> null,breakAfterAcquireFailure -> false,checkoutTimeout -> 0,connectionCustomizerClassName -> null,

我安装了 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)

4

1 回答 1

0

您的问题非常不清楚您实际遵循了哪些步骤。您提到的唯一步骤是让 MySQL 运行。那你要查询什么数据??

JWPL 文档一团糟,但这似乎是带有说明的页面:https ://code.google.com/p/jwpl/wiki/DataMachine 您必须导入维基百科数据(或任何其他 MediaWiki wiki 转储,我希望)是的,这包括创建一些表格。

于 2015-08-20T07:50:03.603 回答