WikiPageNotFoundException: No page with name Hello_world was found.

6 views
Skip to first unread message

Xiaochen Zheng

unread,
Mar 21, 2018, 11:17:23 AM3/21/18
to jwpl-users
Hi,
I am a new user of JWPL. When I was testing the Tutorial example T1c_HelloWorld.java, I got the following exception:

Exception in thread "main" de.tudarmstadt.ukp.wikipedia.api.exception.WikiPageNotFoundException: No page with name Hello_world was found.
at de.tudarmstadt.ukp.wikipedia.api.Page.fetchByTitle(Page.java:210)
at de.tudarmstadt.ukp.wikipedia.api.Page.<init>(Page.java:132)
at de.tudarmstadt.ukp.wikipedia.api.Wikipedia.getPage(Wikipedia.java:105)
at de.tudarmstadt.ukp.wikipedia.api.tutorial.T1a_HelloWorld.main(T1a_HelloWorld.java:50)

I was querying from a remote MySQL server and the connection was built correctly but no result was returned. The same exception appeared when I was testing the other examples. 
And I also tried using different page names and even pageId numbers to query, but the result was the same.
The database was running well and I can get the correct result with R or other querying tools.

Any help would be appreciated.
Thanks.
Xiaochen



The complete output log is attached below in case you need to get more information:

15:21:49,183  INFO Wikipedia:70 - Creating Wikipedia object.
15:21:49,620  INFO MLog:80 - MLog clients using log4j logging.
15:21:49,720  INFO C3P0Registry:204 - Initializing c3p0-0.9.1 [built 16-January-2007 14:46:42; debug? true; trace: 10]
15:21:49,789  INFO AbstractPoolBackedDataSource:462 - Initializing c3p0 pool... com.mchange.v2.c3p0.PoolBackedDataSource@e1ce3b44 [ connectionPoolDataSource -> com.mchange.v2.c3p0.WrapperConnectionPoolDataSource@f9ef9c5f [ acquireIncrement -> 3, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, debugUnreturnedConnectionStackTraces -> false, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, identityToken -> z8kfsx9uk8jutq108yg0e|292b08d6, idleConnectionTestPeriod -> 300, initialPoolSize -> 3, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 1000, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 15, maxStatements -> 10, maxStatementsPerConnection -> 0, minPoolSize -> 3, nestedDataSource -> com.mchange.v2.c3p0.DriverManagerDataSource@7797518f [ description -> null, driverClass -> null, factoryClassLocation -> null, identityToken -> z8kfsx9uk8jutq108yg0e|3e58a80e, jdbcUrl -> jdbc:mysql://35.224.219.162:3306/wikipedia, properties -> {useUnicode=true, user=******, password=******, characterEncoding=UTF-8} ], preferredTestQuery -> null, propertyCycle -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, usesTraditionalReflectiveProxies -> false; userOverrides: {} ], dataSourceName -> null, factoryClassLocation -> null, identityToken -> z8kfsx9uk8jutq108yg0e|44c03695, numHelperThreads -> 3 ]
15:21:53,136  INFO SchemaUpdate:182 - HHH000228: Running hbm2ddl schema update
15:21:53,136  INFO SchemaUpdate:193 - HHH000102: Fetching database metadata
15:21:53,685  INFO SchemaUpdate:205 - HHH000396: Updating schema
15:21:54,836  INFO TableMetadata:65 - HHH000261: Table found: wikipedia.Category
15:21:54,837  INFO TableMetadata:66 - HHH000037: Columns: [name, id, pageid]
15:21:54,838  INFO TableMetadata:68 - HHH000108: Foreign keys: []
15:21:54,840  INFO TableMetadata:69 - HHH000126: Indexes: [nameindex, pageid, primary]
15:21:55,868  INFO TableMetadata:65 - HHH000261: Table found: wikipedia.MetaData
15:21:55,869  INFO TableMetadata:66 - HHH000037: Columns: [maincategory, nrofcategories, nrofdisambiguationpages, disambiguationcategory, language, id, nrofredirects, version, nrofpages]
15:21:55,870  INFO TableMetadata:68 - HHH000108: Foreign keys: []
15:21:55,871  INFO TableMetadata:69 - HHH000126: Indexes: [primary]
15:21:57,120  INFO TableMetadata:65 - HHH000261: Table found: wikipedia.Page
15:21:57,128  INFO TableMetadata:66 - HHH000037: Columns: [isdisambiguation, name, id, text, pageid]
15:21:57,130  INFO TableMetadata:68 - HHH000108: Foreign keys: []
15:21:57,132  INFO TableMetadata:69 - HHH000126: Indexes: [nameindex, pageid, primary]
15:21:58,266  INFO TableMetadata:65 - HHH000261: Table found: wikipedia.PageMapLine
15:21:58,267  INFO TableMetadata:66 - HHH000037: Columns: [name, lemma, id, pageid, stem]
15:21:58,267  INFO TableMetadata:68 - HHH000108: Foreign keys: []
15:21:58,268  INFO TableMetadata:69 - HHH000126: Indexes: [name_index, primary]
15:21:59,628  INFO TableMetadata:65 - HHH000261: Table found: wikipedia.category_inlinks
15:21:59,629  INFO TableMetadata:66 - HHH000037: Columns: [inlinks, id]
15:21:59,630  INFO TableMetadata:68 - HHH000108: Foreign keys: []
15:21:59,630  INFO TableMetadata:69 - HHH000126: Indexes: [fk3f433773bb482769, fk3f433773e46a97cc, fk3f4337732a72a718]
15:22:00,563  INFO TableMetadata:65 - HHH000261: Table found: wikipedia.category_outlinks
15:22:00,564  INFO TableMetadata:66 - HHH000037: Columns: [outlinks, id]
15:22:00,565  INFO TableMetadata:68 - HHH000108: Foreign keys: []
15:22:00,565  INFO TableMetadata:69 - HHH000126: Indexes: [fk9885334c2a72a718, fk9885334ce46a97cc, fk9885334cbb482769]
15:22:01,721  INFO TableMetadata:65 - HHH000261: Table found: wikipedia.category_pages
15:22:01,722  INFO TableMetadata:66 - HHH000037: Columns: [pages, id]
15:22:01,723  INFO TableMetadata:68 - HHH000108: Foreign keys: []
15:22:01,723  INFO TableMetadata:69 - HHH000126: Indexes: [fk71e8d943e46a97cc, fk71e8d9432a72a718, fk71e8d943bb482769]
15:22:02,762  INFO TableMetadata:65 - HHH000261: Table found: wikipedia.page_categories
15:22:02,763  INFO TableMetadata:66 - HHH000037: Columns: [pages, id]
15:22:02,764  INFO TableMetadata:68 - HHH000108: Foreign keys: []
15:22:02,764  INFO TableMetadata:69 - HHH000126: Indexes: [fk72fb59ccf9e0a429, fk72fb59cc1e350edd, fk72fb59cc75dcf4fa]
15:22:03,925  INFO TableMetadata:65 - HHH000261: Table found: wikipedia.page_inlinks
15:22:03,926  INFO TableMetadata:66 - HHH000037: Columns: [inlinks, id]
15:22:03,926  INFO TableMetadata:68 - HHH000108: Foreign keys: []
15:22:03,927  INFO TableMetadata:69 - HHH000126: Indexes: [fk91c2bc041e350edd, fk91c2bc04f9e0a429, fk91c2bc0475dcf4fa]
15:22:04,952  INFO TableMetadata:65 - HHH000261: Table found: wikipedia.page_outlinks
15:22:04,953  INFO TableMetadata:66 - HHH000037: Columns: [outlinks, id]
15:22:04,953  INFO TableMetadata:68 - HHH000108: Foreign keys: []
15:22:04,954  INFO TableMetadata:69 - HHH000126: Indexes: [fk95f640db75dcf4fa, fk95f640dbf9e0a429, fk95f640db1e350edd]
15:22:05,999  INFO TableMetadata:65 - HHH000261: Table found: wikipedia.page_redirects
15:22:05,999  INFO TableMetadata:66 - HHH000037: Columns: [redirects, id]
15:22:06,000  INFO TableMetadata:68 - HHH000108: Foreign keys: []
15:22:06,001  INFO TableMetadata:69 - HHH000126: Indexes: [fk1484ba6775dcf4fa, fk1484ba67f9e0a429, fk1484ba671e350edd]
15:22:06,002  INFO SchemaUpdate:240 - HHH000232: Schema update complete
Page Autism does not exist
de.tudarmstadt.ukp.wikipedia.api.exception.WikiPageNotFoundException: No page with page id 12 was found.
at de.tudarmstadt.ukp.wikipedia.api.Page.fetchByPageId(Page.java:182)
at de.tudarmstadt.ukp.wikipedia.api.Page.<init>(Page.java:94)
at de.tudarmstadt.ukp.wikipedia.api.Wikipedia.getPage(Wikipedia.java:152)
at de.tudarmstadt.ukp.wikipedia.api.tutorial.T1c_HelloWorld.main(T1c_HelloWorld.java:55)
 

Torsten Zesch

unread,
Mar 22, 2018, 7:25:36 AM3/22/18
to jw...@googlegroups.com
This looks strange. Maybe the transformation process was incomplete or the database import?
--
You received this message because you are subscribed to the Google Groups "jwpl-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jwpl+uns...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Zheng Xiaochen

unread,
Mar 22, 2018, 7:51:16 AM3/22/18
to jw...@googlegroups.com
Hi Torsten, Thanks for the reply. 
This database was in a local computer of a colleague. It was exported and imported to a cloud server. Now it is stored in Google cloud server.
I tried to query some data using MySQL workbench and I could get the data normally. But when I was running the java examples the above exception appeared. It is really strange to me too.
BTW, what do you mean "transformation process was incomplete" in your comment?
Thanks





To unsubscribe from this group and stop receiving emails from it, send an email to jwpl+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "jwpl-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jwpl/YFn7B2FQe78/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jwpl+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Xiaochen Zheng 

Department of Industrial Engineering, Business Administration and Statistic

E.T.S Industrial Engineering, Universidad Politécnica de Madrid

C/José Gutiérrez Abascal, 2, 28006, Madrid, Spain

Email: hellozhen...@gmail.com

           xiaoche...@alumnos.upm.es

Tel: (+34) 657640836

Zheng Xiaochen

unread,
Mar 22, 2018, 9:00:13 AM3/22/18
to jw...@googlegroups.com
One more detail. I just tried using JDBC to query directly from the database and it also got the value successfully.
Still no idea why it doesn't work in my JWPL example.

On Thu, Mar 22, 2018 at 12:25 PM, Torsten Zesch <torste...@gmail.com> wrote:
To unsubscribe from this group and stop receiving emails from it, send an email to jwpl+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "jwpl-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jwpl/YFn7B2FQe78/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jwpl+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Torsten Zesch

unread,
Mar 22, 2018, 10:10:05 AM3/22/18
to jwpl-users
Did you try the exact query that JWPL is using?
You could try to decrease the log level a bit to get more information about what is going on internally.
If the dataset with the ID mentioned in the error message actually exists in the database, I don't see why JWPL should not find it.

Zheng Xiaochen

unread,
Mar 22, 2018, 10:22:41 AM3/22/18
to jw...@googlegroups.com
Hi, I just found some difference. 
In JWPL, we are using "session.createQuery("from Page where pageId = :id").setParameter("id", pageID, IntegerType.INSTANCE).uniqueResult();"
here the table name is "Page" with capital latter P. Then I checked the database and found out that there are 2 tables "Page" and "page". The "page" table should be the correct one with large size while the "Page" is almost empty. I tried to rename "Page" to something else and change the "page" into "Page" instead, but I failed. It seems that the "Page" table was created automatically. 
Then I noticed that "MySQL database and table names are not case sensitive in Windows, and case sensitive in most varieties of Unix or Linux". I am using Linux system while the database was created with MacOS. 
Do you believe this is the root cause for this problem?



Torsten Zesch

unread,
Mar 22, 2018, 10:52:36 AM3/22/18
to jwpl-users
JWPL should only use these tables:
"Page" is the correct one. "page" should not be used.

Zheng Xiaochen

unread,
Mar 22, 2018, 11:09:15 AM3/22/18
to jw...@googlegroups.com
Thanks. I just checked and confirmed that the case sensitive issue is the cause of this problem.

My guess is: during the database creating or export and import process, the table names were all changed to lower cases. When my colleague was trying to query using JWPL Wikipedia API using windows systems which is not case sensitive, it worked just fine,  but when I did the same from Linux, the API couldn't find the correct table and create a new one with the correct name. No error was produced and only a "NotFoundException" appeared.

I solved this problem by renaming all the wrong table names to the correct ones. It works well now.

Thanks for all the help @Torsten Zesch.
Reply all
Reply to author
Forward
0 new messages