List Info

Thread: premature end of file.




premature end of file.
user name
2006-09-30 12:31:53
Hello Damencho,

While running the unit tests i got the following exception:

> [Fatal Error] :-1:-1: Premature end of file.
> java.lang.RuntimeException: Error occured while parsing
XML document.
> 	at
net.java.sip.communicator.impl.history.HistoryImpl.getDocume
ntForFile(HistoryImpl.java:230)
> 	at
net.java.sip.communicator.impl.history.HistoryWriterImpl.cre
ateNewDoc(HistoryWriterImpl.java:175)
> 	at
net.java.sip.communicator.impl.history.HistoryWriterImpl.add
Record(HistoryWriterImpl.java:89)
> 	at
net.java.sip.communicator.impl.history.HistoryWriterImpl.add
Record(HistoryWriterImpl.java:63)
> 	at
net.java.sip.communicator.impl.msghistory.MessageHistoryServ
iceImpl.writeMessage(MessageHistoryServiceImpl.java:440)
> 	at
net.java.sip.communicator.impl.msghistory.MessageHistoryServ
iceImpl.messageReceived(MessageHistoryServiceImpl.java:411)
> 	at
net.java.sip.communicator.impl.protocol.jabber.OperationSetB
asicInstantMessagingJabberImpl.fireMessageEvent(OperationSet
BasicInstantMessagingJabberImpl.java:233)
> 	at
net.java.sip.communicator.impl.protocol.jabber.OperationSetB
asicInstantMessagingJabberImpl.access$500(OperationSetBasicI
nstantMessagingJabberImpl.java:27)
> 	at
net.java.sip.communicator.impl.protocol.jabber.OperationSetB
asicInstantMessagingJabberImpl$SmackMessageListener.processP
acket(OperationSetBasicInstantMessagingJabberImpl.java:313)
> 	at
org.jivesoftware.smack.PacketReader$ListenerWrapper.notifyLi
stener(PacketReader.java:822)
> 	at
org.jivesoftware.smack.PacketReader.processListeners(PacketR
eader.java:260)
> 	at
org.jivesoftware.smack.PacketReader.access$100(PacketReader.
java:43)
> 	at
org.jivesoftware.smack.PacketReader$2.run(PacketReader.java:
72)
> Caused by: org.xml.sax.SAXParseException: Premature end
of file.
> 	at org.apache.xerces.parsers.DOMParser.parse(Unknown
Source)
> 	at
org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown
Source)
> 	at
javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java
:151)
> 	at
net.java.sip.communicator.impl.history.HistoryImpl.getDocume
ntForFile(HistoryImpl.java:227)
> 	... 12 more

I checked the history files in test-msghistory and they
didn't seem to 
contain errors which makes me things there is a concurrent
access 
problem. I guess sync-ing history writes should fix this.

Cheers
Emil

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribesip-communicator.dev.java.net
For additional commands, e-mail: dev-helpsip-communicator.dev.java.net

premature end of file.
user name
2006-10-02 08:55:03
Hi Emil,

The strange thing is that writing to the xml is sync to the
Xml Document 
Object.

damencho

Emil Ivov wrote:
> Hello Damencho,
>
> While running the unit tests i got the following
exception:
>
>> [Fatal Error] :-1:-1: Premature end of file.
>> java.lang.RuntimeException: Error occured while
parsing XML document.
>>     at 
>>
net.java.sip.communicator.impl.history.HistoryImpl.getDocume
ntForFile(HistoryImpl.java:230) 
>>
>>     at 
>>
net.java.sip.communicator.impl.history.HistoryWriterImpl.cre
ateNewDoc(HistoryWriterImpl.java:175) 
>>
>>     at 
>>
net.java.sip.communicator.impl.history.HistoryWriterImpl.add
Record(HistoryWriterImpl.java:89) 
>>
>>     at 
>>
net.java.sip.communicator.impl.history.HistoryWriterImpl.add
Record(HistoryWriterImpl.java:63) 
>>
>>     at 
>>
net.java.sip.communicator.impl.msghistory.MessageHistoryServ
iceImpl.writeMessage(MessageHistoryServiceImpl.java:440) 
>>
>>     at 
>>
net.java.sip.communicator.impl.msghistory.MessageHistoryServ
iceImpl.messageReceived(MessageHistoryServiceImpl.java:411) 
>>
>>     at 
>>
net.java.sip.communicator.impl.protocol.jabber.OperationSetB
asicInstantMessagingJabberImpl.fireMessageEvent(OperationSet
BasicInstantMessagingJabberImpl.java:233) 
>>
>>     at 
>>
net.java.sip.communicator.impl.protocol.jabber.OperationSetB
asicInstantMessagingJabberImpl.access$500(OperationSetBasicI
nstantMessagingJabberImpl.java:27) 
>>
>>     at 
>>
net.java.sip.communicator.impl.protocol.jabber.OperationSetB
asicInstantMessagingJabberImpl$SmackMessageListener.processP
acket(OperationSetBasicInstantMessagingJabberImpl.java:313) 
>>
>>     at 
>>
org.jivesoftware.smack.PacketReader$ListenerWrapper.notifyLi
stener(PacketReader.java:822) 
>>
>>     at 
>>
org.jivesoftware.smack.PacketReader.processListeners(PacketR
eader.java:260) 
>>
>>     at 
>>
org.jivesoftware.smack.PacketReader.access$100(PacketReader.
java:43)
>>     at
org.jivesoftware.smack.PacketReader$2.run(PacketReader.java:
72)
>> Caused by: org.xml.sax.SAXParseException: Premature
end of file.
>>     at
org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
>>     at
org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown
Source)
>>     at
javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java
:151)
>>     at 
>>
net.java.sip.communicator.impl.history.HistoryImpl.getDocume
ntForFile(HistoryImpl.java:227) 
>>
>>     ... 12 more
>
> I checked the history files in test-msghistory and they
didn't seem to 
> contain errors which makes me things there is a
concurrent access 
> problem. I guess sync-ing history writes should fix
this.
>
> Cheers
> Emil
>
>
------------------------------------------------------------
---------
> To unsubscribe, e-mail: dev-unsubscribesip-communicator.dev.java.net
> For additional commands, e-mail: dev-helpsip-communicator.dev.java.net
>
>

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribesip-communicator.dev.java.net
For additional commands, e-mail: dev-helpsip-communicator.dev.java.net

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )