JWPL exception in accessing Wikipedia

244 views Asked by At

I am testing the JWPL API with the Hello World example listed in the tutorials:

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

But I am receiving the following MySQL connection exception:

02:11:31,057 INFO AbstractPoolBackedDataSource:462 - Initializing c3p0 pool... 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,

I have MySQL 5.6.24 installed, and it's running correctly. Before I run the tutorials, do I have to create some tables in MySQL to run these examples?

Edit for clarity:

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)

1

There are 1 answers

0
Nemo On

Your question is very unclear as to what steps you actually followed. The only step you mention is making MySQL run. What data are you querying, then??

The JWPL documentation is a total mess, but this seems to be the page with instructions: https://code.google.com/p/jwpl/wiki/DataMachine Your have to import the Wikipedia data (or any other MediaWiki wiki dump, I hope) and yes, that includes creating some tables.