26.02.2013 01:02, Егор Егоров пишет:
Hello, Jena developers!

I am trying to load the BTC-2009 dataset from SemSearch-2011 into tdb. (Jena 2.7.4)

In chunk 13 there are some interesting quads:
http://www.swop-project.eu/swop-solutions/ontologies/wagemaker/lambda-mini_ligger.owl http://www.swop-project.eu/ontologies/wagemaker/lambda-mini_ligger.owl#minimaleBreedte http://www.swop-project.eu/ontologies/pmo/product.owl#defaultValue "190"^^http://www.w3.org/2001/XMLSchema#anySimpleType

http://www.swop-project.eu/swop-solutions/ontologies/wagemaker/lambda-mini_ligger.owl http://www.swop-project.eu/ontologies/wagemaker/lambda-mini_ligger.owl#diffWerkendeEffectieveBreedte http://www.swop-project.eu/ontologies/pmo/product.owl#defaultValue "10"^^http://www.w3.org/2001/XMLSchema#anySimpleType

... etc.
They have xsd:anySimpleType.

riot --validate tells me that there are no errors, so this file can be loaded into tdb, right?

But when I try to load it via tdbloader, I get the following:

http://www.swop-project.eu/swop-solutions/ontologies/wagemaker/lambda-mini_ligger.owl http://www.swop-project.eu/ontologies/wagemaker/lambda-mini_ligger.owl#diffWerkendeEffectieveBreedte http://www.swop-project.eu/ontologies/pmo/product.owl#defaultValue "10"^^http://www.w3.org/2001/XMLSchema#anySimpleType
java.lang.NullPointerException
at com.hp.hpl.jena.datatypes.xsd.XSDDatatype.getFoundingType(XSDDatatype.java:525) at com.hp.hpl.jena.datatypes.xsd.XSDDatatype.isBaseTypeCompatible(XSDDatatype.java:508) at com.hp.hpl.jena.datatypes.xsd.impl.XSDBaseNumericType.isValidLiteral(XSDBaseNumericType.java:70)
    at com.hp.hpl.jena.tdb.store.NodeId.inline(NodeId.java:208)
at com.hp.hpl.jena.tdb.nodetable.NodeTableInline.getAllocateNodeId(NodeTableInline.java:49) at com.hp.hpl.jena.tdb.nodetable.NodeTupleTableConcrete.addRow(NodeTupleTableConcrete.java:84) at com.hp.hpl.jena.tdb.store.bulkloader.LoaderNodeTupleTable.load(LoaderNodeTupleTable.java:110) at com.hp.hpl.jena.tdb.store.bulkloader.BulkLoader$2.send(BulkLoader.java:291) at com.hp.hpl.jena.tdb.store.bulkloader.BulkLoader$2.send(BulkLoader.java:261)
    at org.openjena.riot.lang.LangNTuple.runParser(LangNTuple.java:71)
    at org.openjena.riot.lang.LangBase.parse(LangBase.java:43)
    at org.openjena.riot.RiotReader.parseQuads(RiotReader.java:134)
    at org.openjena.riot.RiotReader.parseQuads(RiotReader.java:121)
    at org.openjena.riot.RiotReader.parseQuads(RiotReader.java:107)
at com.hp.hpl.jena.tdb.store.bulkloader.BulkLoader.loadQuads$(BulkLoader.java:160) at com.hp.hpl.jena.tdb.store.bulkloader.BulkLoader.loadDataset(BulkLoader.java:121)
    at com.hp.hpl.jena.tdb.TDBLoader.loadDataset$(TDBLoader.java:283)
    at com.hp.hpl.jena.tdb.TDBLoader.loadDataset(TDBLoader.java:196)
    at com.hp.hpl.jena.tdb.TDBLoader.load(TDBLoader.java:75)
    at tdb.tdbloader.loadQuads(tdbloader.java:163)
    at tdb.tdbloader.exec(tdbloader.java:122)
    at arq.cmdline.CmdMain.mainMethod(CmdMain.java:101)
    at arq.cmdline.CmdMain.mainRun(CmdMain.java:63)
    at arq.cmdline.CmdMain.mainRun(CmdMain.java:50)
    at tdb.tdbloader.main(tdbloader.java:53)

I suppose that in method getFoundingType() there is no base type for xsd:anySimpleType, so we have null.

/**
* Return the most specific type below xsd:anySimpleType that this type is derived from.
     */
private XSTypeDefinition getFoundingType() {
        XSTypeDefinition founding = typeDeclaration;
        XSTypeDefinition parent = founding.getBaseType();
        while (parent.getBaseType() != null) {
            founding = parent;
            parent = founding.getBaseType();
        }
        return founding;

Is it a bug? I think jena should throw another exception.

Thanks.
Please, answer. Using xsd:anySimpleType is legal, riot --validate shows no ERROR strings. But tdbload crashes with NullPointerException. Is it Jena's problem or just invalid data?

Thank you.

--
Egor Egorov

Reply via email to