Open GoogleCodeExporter opened 9 years ago
There is a similar Exception if there is a problem with the imported data:
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.apache.wicket.session.DefaultPageFactory.createPage(DefaultPageFactory.java:192)
... 27 more
Caused by: com.hp.hpl.jena.rdf.model.LiteralRequiredException: Apache UGH
metadata library
at com.hp.hpl.jena.rdf.model.impl.StatementImpl.getLiteral(StatementImpl.java:101)
at com.hp.hpl.jena.rdf.model.impl.StatementBase.getString(StatementBase.java:127)
at uk.ac.osswatch.simal.model.jena.Resource.getLiteralValue(Resource.java:198)
at uk.ac.osswatch.simal.model.jena.DoapResource.getName(DoapResource.java:77)
at uk.ac.osswatch.simal.wicket.panel.ProjectSummaryPanel.populatePage(ProjectSummaryPanel.java:83)
at uk.ac.osswatch.simal.wicket.panel.ProjectSummaryPanel.<init>(ProjectSummaryPanel.java:65)
at uk.ac.osswatch.simal.wicket.UserHomePage.<init>(UserHomePage.java:32)
... 32 more
This is caused by malformed date as described here[1].
[1] http://jira.codehaus.org/browse/MDOAP-27
Original comment by cmah...@googlemail.com
on 17 Sep 2010 at 1:13
Comment 1 is unrelated to this issue, but the reason of the error is the fact
that it's a resource reference:
<name rdf:resource="Apache UGH metadata library"/>
whereas the range of the "name" property in DOAP is literal [1]. If you're
requesting additional checks on import to make sure these errors are spotted
on import please create a new issue for that.
[1] http://usefulinc.com/ns/doap
Original comment by sander.v...@oucs.ox.ac.uk
on 17 Sep 2010 at 2:16
Just before this exception a log message records where the database will be
created :
DEBUG uk.ac.osswatch.simal.model.jena.simal.JenaSimalRepository - Creating TDB
database with URL /opt/simal/data/simal_TDB
A check should be added here if the path is writable.
Note that there is no IOException thrown anywhere. Jena throws a
NullPointerException and that one is wrapped and logged. Other than assuring
the path is valid and writable there's not very much sensible we can do here.
Original comment by sander.v...@oucs.ox.ac.uk
on 17 Sep 2010 at 2:59
Ok, this probably a problem (the IOException) of Jena then. I'll think I first
have to check if there already is a issue regarding the import. I'm probably
not the first one seeing this.
Original comment by cmah...@googlemail.com
on 17 Sep 2010 at 4:12
There's no IOException. In Jena, class atlas.lib.FileOps, this method is
executed:
/** See if there are any files in this directory */
public static boolean existsAnyFiles(String dir)
{
File d = new File(dir) ;
File[] entries = d.listFiles() ;
return entries.length > 0 ;
}
d.listFiles() returns null, in according with the javadoc [1], which leads to
the NPE.
[1] http://download.oracle.com/javase/6/docs/api/java/io/File.html#listFiles()
Original comment by sander.v...@oucs.ox.ac.uk
on 17 Sep 2010 at 5:34
Original issue reported on code.google.com by
cmah...@googlemail.com
on 17 Sep 2010 at 11:05