Menu

#1 Boca 2.0 - Error pushing data to server

open
Boca (3)
5
2007-02-26
2007-02-26
Anonymous
No

Reading rdf from a owl file, I have an error when I tried to push all the transactions to server (datasetService.getDatasetReplicator().replicate(true);)

Please find attached the example code and data that I use to produce this error:

Exception in thread "main" com.ibm.adtech.boca.common.exceptions.TransportExcept
ion: ErrorCode[4097:10] Unknown AXIS error:; nested exception is:
org.xml.sax.SAXParseException: Premature end of file.
at com.ibm.adtech.boca.common.exceptions.BocaException.createException(B
ocaException.java:117)
at com.ibm.adtech.boca.services.impl.WSModelService.updateServer(WSModel
Service.java:123)
at com.ibm.adtech.boca.client.DatasetServiceReplicator.commitTransaction
Queue(DatasetServiceReplicator.java:440)
at com.ibm.adtech.boca.client.DatasetServiceReplicator.doReplicateWithSe
rver(DatasetServiceReplicator.java:486)
at com.ibm.adtech.boca.client.DatasetServiceReplicator.doReplicateWithSe
rver(DatasetServiceReplicator.java:287)
at com.ibm.adtech.boca.client.DatasetServiceReplicator.replicate(Dataset
ServiceReplicator.java:1715)
at com.ibm.adtech.boca.sample.EasaierFullModelEmbedded.main(EasaierFullM
odelEmbedded.java:119)

Discussion

  • Nobody/Anonymous

    data and example code

     
  • Matthew Roy

    Matthew Roy - 2007-02-26

    Logged In: YES
    user_id=1640701
    Originator: NO

    Without seeing the boca server log file, it looks at first glance that this is a timeout on the replicate. Looking at the example code, the parser is creating a new transaction for every triple in the owl file, so the server has to process each of those changes as an atomic transaction. A better approach would be to do the begin and commit during the startRdf() and endRdf() like:
    public void startRDF() {
    System.out.println("Start Rdf");
    try {
    datasetService.begin();
    }catch(BocaException be) {
    throw new RuntimeException(be);
    }
    }
    public void endRDF() {
    System.out.println("End Rdf");
    try {
    datasetService.commit();
    }catch(BocaException be) {
    throw new RuntimeException(be);
    }
    }

    I tested your example with the latest Boca and it passes without problem. If you still see a problem, please attach the boca.log, stderr and stdout from your server.

     

Log in to post a comment.