dsukhoroslov / bagri

XML/Document DB on top of distributed cache
Apache License 2.0
41 stars 5 forks source link

Getting ParseError while adding new XML documents #66

Closed mhalifax closed 8 years ago

mhalifax commented 8 years ago

Hi there,

Trying to add 9 HL7 type xml documents to the system, created a new schema called Healthcare in ../config/config.xml where pointed out xdm.schema.store.data.path to healthcare folder.

../data/healthcare

Also created a new starting profile (called it fourth) and started bagri like this. within ../bin/ ./bgcache.sh start fourth 0

After start in the log in /logs/fourth/cache/fourth-server-0.log getting this. It could be my files, but just wanted to make sure that this error is expected here.

I am attaching files and logs to this issue in two separate zip archive. files.zip fourth-server-0.log.zip

`2016-10-03 22:53:24.904 [cached8] ERROR com.bagri.xdm.cache.hazelcast.store.FileDocumentCacheStore - loadDocument.error
com.bagri.xdm.api.XDMException: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,1]
Message: Content is not allowed in prolog.
        at com.bagri.xdm.common.df.xml.XmlStaxParser.parse(XmlStaxParser.java:175) ~[bagri-xdm-1.0.0-EA2.jar:na]
        at com.bagri.xdm.common.df.xml.XmlStaxParser.parse(XmlStaxParser.java:128) ~[bagri-xdm-1.0.0-EA2.jar:na]
        at com.bagri.xdm.common.df.xml.XmlStaxParser.parse(XmlStaxParser.java:79) ~[bagri-xdm-1.0.0-EA2.jar:na]
        at com.bagri.xdm.cache.hazelcast.impl.DocumentManagementImpl.createDocument(DocumentManagementImpl.java:570) ~[bagri-server-hazelcast-1.0.0-EA2.jar:1.0.0-EA2]
        at com.bagri.xdm.cache.hazelcast.store.FileDocumentCacheStore.loadDocument(FileDocumentCacheStore.java:194) [bagri-server-hazelcast-1.0.0-EA2.jar:1.0.0-EA2]
        at com.bagri.xdm.cache.hazelcast.store.FileDocumentCacheStore.loadAll(FileDocumentCacheStore.java:225) [bagri-server-hazelcast-1.0.0-EA2.jar:1.0.0-EA2]
        at com.hazelcast.map.impl.MapStoreWrapper.loadAll(MapStoreWrapper.java:143) [hazelcast-all-3.6.4.jar:3.6.4]
        at com.hazelcast.map.impl.mapstore.AbstractMapDataStore.loadAll(AbstractMapDataStore.java:56) [hazelcast-all-3.6.4.jar:3.6.4]
        at com.hazelcast.map.impl.mapstore.writebehind.WriteBehindStore.loadAll(WriteBehindStore.java:205) [hazelcast-all-3.6.4.jar:3.6.4]
        at com.hazelcast.map.impl.recordstore.BasicRecordStoreLoader.loadAndGet(BasicRecordStoreLoader.java:170) [hazelcast-all-3.6.4.jar:3.6.4]
        at com.hazelcast.map.impl.recordstore.BasicRecordStoreLoader.doBatchLoad(BasicRecordStoreLoader.java:143) [hazelcast-all-3.6.4.jar:3.6.4]
        at com.hazelcast.map.impl.recordstore.BasicRecordStoreLoader.loadValuesInternal(BasicRecordStoreLoader.java:129) [hazelcast-all-3.6.4.jar:3.6.4]
        at com.hazelcast.map.impl.recordstore.BasicRecordStoreLoader.access$100(BasicRecordStoreLoader.java:54) [hazelcast-all-3.6.4.jar:3.6.4]
        at com.hazelcast.map.impl.recordstore.BasicRecordStoreLoader$GivenKeysLoaderTask.call(BasicRecordStoreLoader.java:112) [hazelcast-all-3.6.4.jar:3.6.4]
        at com.hazelcast.util.executor.CompletableFutureTask.run(CompletableFutureTask.java:67) [hazelcast-all-3.6.4.jar:3.6.4]
        at com.hazelcast.util.executor.CachedExecutorServiceDelegate$Worker.run(CachedExecutorServiceDelegate.java:212) [hazelcast-all-3.6.4.jar:3.6.4]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_40]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_40]
        at java.lang.Thread.run(Thread.java:745) [na:1.8.0_40]
        at com.hazelcast.util.executor.HazelcastManagedThread.executeRun(HazelcastManagedThread.java:76) [hazelcast-all-3.6.4.jar:3.6.4]
        at com.hazelcast.util.executor.HazelcastManagedThread.run(HazelcastManagedThread.java:92) [hazelcast-all-3.6.4.jar:3.6.4]
Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,1]
Message: Content is not allowed in prolog.
        at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.next(XMLStreamReaderImpl.java:601) ~[na:1.8.0_40]
        at com.sun.xml.internal.stream.XMLEventReaderImpl.nextEvent(XMLEventReaderImpl.java:83) ~[na:1.8.0_40]
        at com.bagri.xdm.common.df.xml.XmlStaxParser.parse(XmlStaxParser.java:173) ~[bagri-xdm-1.0.0-EA2.jar:na]
        ... 20 common frames omitted
2016-10-03 22:53:27.849 [cached11] INFO  com.bagri.xdm.cache.hazelcast.task.schema.SchemaPopulator - populateSchema; documents size after loadAll: 9
2016-10-03 22:53:27.851 [cached11] INFO  com.bagri.xdm.cache.hazelcast.task.schema.SchemaPopulator - call.exit; schema Healthcare populated: true
2016-10-03 22:54:39.822 [hz.hzInstance.IO.thread-Acceptor] INFO  com.hazelcast.nio.tcp.SocketAcceptorThread - [localhost]:3331 [system] [3.6.4] Accepting socket connection from /127.0.0.1:53757
2016-10-03 22:54:39.823 [cached1] INFO  com.hazelcast.nio.tcp`
dsukhoroslov commented 8 years ago

the file procedurenote_sample.xml is not valid. It starts with the following content:

riginal Filename: US_Realm_Header_Template.xml
    Version: 1.0
    Revision History:
    01/31/2011 bam created
    07/29/2011 RWM modified

-->
``
Please remove this invalid header or start it with valid XML comment tag: <!--
mhalifax commented 8 years ago

Oh God, yes, totally my fault, it got cut off when I was doing copy/paste through vim, now everything works.