coriane / jwpl

Automatically exported from code.google.com/p/jwpl
0 stars 0 forks source link

Problems with CategoryDescendants #9

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. I've imported an english wikipedia dump 20110115
2. And I'm running the code from CategoryList.java (see attached)

What is the expected output? What do you see instead?
The expected output should be a list of all articles descending from one input 
category as defined in the code (Finance)

What version of the product are you using? On what operating system?
I'm using the jwpl.jar downloaded from this side as I couldn't manage to build 
it with maven. (Maven install requires to run the tests, which fail because I 
can't access the DB of TUDarmstadt and I didn't figure out how to switch of the 
tests)

The IDE I am using is eclipse on an OpenSUSE 64bit machine
MySQL is the latest from OpenSuse provided version.

Please provide any additional information below.
I've attached the outputfile created with the attached code I was running.
There are some (from my point of view) weird things going on which I don't 
understand.

Here is the thrown exception:

17:19:11,660  INFO SchemaUpdate:160 - schema update complete
17:21:44,121 ERROR PageDAO:107 - get failed
org.hibernate.PropertyAccessException: Null value was assigned to a property of 
primitive type setter of 
de.tudarmstadt.ukp.wikipedia.api.hibernate.Page.isDisambiguation
    at org.hibernate.property.BasicPropertyAccessor$BasicSetter.set(BasicPropertyAccessor.java:85)
    at org.hibernate.tuple.entity.AbstractEntityTuplizer.setPropertyValues(AbstractEntityTuplizer.java:337)
    at org.hibernate.tuple.entity.PojoEntityTuplizer.setPropertyValues(PojoEntityTuplizer.java:200)
    at org.hibernate.persister.entity.AbstractEntityPersister.setPropertyValues(AbstractEntityPersister.java:3566)
    at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:129)
    at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:854)
    at org.hibernate.loader.Loader.doQuery(Loader.java:729)
    at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
    at org.hibernate.loader.Loader.loadEntity(Loader.java:1860)
    at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:48)
    at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:42)
    at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:3044)
    at org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:395)
    at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:375)
    at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:139)
    at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:195)
    at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:103)
    at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:878)
    at org.hibernate.impl.SessionImpl.get(SessionImpl.java:815)
    at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    at org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:301)
    at $Proxy0.get(Unknown Source)
    at de.tudarmstadt.ukp.wikipedia.api.hibernate.PageDAO.findById(PageDAO.java:99)
    at de.tudarmstadt.ukp.wikipedia.api.Page.fetchPage(Page.java:89)
    at de.tudarmstadt.ukp.wikipedia.api.Page.<init>(Page.java:51)
    at de.tudarmstadt.ukp.wikipedia.api.Wikipedia.getPage(Wikipedia.java:119)
    at de.tudarmstadt.ukp.wikipedia.api.Category.getArticles(Category.java:287)
    at uk.ac.uuc.cidbio.wikipedia.CategoryList.main(CategoryList.java:109)
Caused by: java.lang.IllegalArgumentException
    at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    at org.hibernate.property.BasicPropertyAccessor$BasicSetter.set(BasicPropertyAccessor.java:42)
    ... 29 more
Exception in thread "main" org.hibernate.PropertyAccessException: Null value 
was assigned to a property of primitive type setter of 
de.tudarmstadt.ukp.wikipedia.api.hibernate.Page.isDisambiguation
    at org.hibernate.property.BasicPropertyAccessor$BasicSetter.set(BasicPropertyAccessor.java:85)
    at org.hibernate.tuple.entity.AbstractEntityTuplizer.setPropertyValues(AbstractEntityTuplizer.java:337)
    at org.hibernate.tuple.entity.PojoEntityTuplizer.setPropertyValues(PojoEntityTuplizer.java:200)
    at org.hibernate.persister.entity.AbstractEntityPersister.setPropertyValues(AbstractEntityPersister.java:3566)
    at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:129)
    at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:854)
    at org.hibernate.loader.Loader.doQuery(Loader.java:729)
    at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
    at org.hibernate.loader.Loader.loadEntity(Loader.java:1860)
    at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:48)
    at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:42)
    at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:3044)
    at org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:395)
    at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:375)
    at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:139)
    at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:195)
    at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:103)
    at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:878)
    at org.hibernate.impl.SessionImpl.get(SessionImpl.java:815)
    at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    at org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:301)
    at $Proxy0.get(Unknown Source)
    at de.tudarmstadt.ukp.wikipedia.api.hibernate.PageDAO.findById(PageDAO.java:99)
    at de.tudarmstadt.ukp.wikipedia.api.Page.fetchPage(Page.java:89)
    at de.tudarmstadt.ukp.wikipedia.api.Page.<init>(Page.java:51)
    at de.tudarmstadt.ukp.wikipedia.api.Wikipedia.getPage(Wikipedia.java:119)
    at de.tudarmstadt.ukp.wikipedia.api.Category.getArticles(Category.java:287)
    at uk.ac.uuc.cidbio.wikipedia.CategoryList.main(CategoryList.java:109)
Caused by: java.lang.IllegalArgumentException
    at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    at org.hibernate.property.BasicPropertyAccessor$BasicSetter.set(BasicPropertyAccessor.java:42)
    ... 29 more

From what I understand until now the only two reasons why I am getting 
exceptions are either there are problems with the database entries or there is 
a bug in the code. But I can be wrong of course.

Thank you for any support

Original issue reported on code.google.com by scholi...@googlemail.com on 24 Feb 2011 at 5:34

Attachments:

GoogleCodeExporter commented 9 years ago
You can set this issue as solved.
I used the fat jar available as download in which the DataMachine seems to a 
few bugs.

The error above happens because of wrong or missing entries in the converted 
files produced by DataMachine.
The latest version from svn works fine.

Original comment by scholi...@googlemail.com on 14 Mar 2011 at 4:17

GoogleCodeExporter commented 9 years ago

Original comment by oliver.ferschke on 1 Jun 2011 at 6:05

GoogleCodeExporter commented 9 years ago

Original comment by oliver.ferschke on 16 Feb 2012 at 1:24