Avatar
Please consider registering
guest
sp_LogInOut Log Insp_Registration Register
Register | Lost password?
Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Feed Topic RSSsp_TopicIcon
[Fatal Error] :1:1: Content is not allowed in prolog.
August 12, 2014
21:05, EEST
Avatar
gjevremovic
Member
Members
Forum Posts: 49
Member Since:
January 30, 2014
sp_UserOfflineSmall Offline

Hi,

I am using sdk 1.4.8-8731. I don’t know what is the reason but I was successful in browsing Unified Automation demo server address space.
But now when I run program which browse starting from root I am receiving next error:

???? StaticString: BaseDataVariableType (InverseReferenceType=Organizes, BrowseName=4:StaticString)
???? StaticDateTime: BaseDataVariableType (InverseReferenceType=Organizes, BrowseName=4:StaticDateTime)
???? StaticGuid: BaseDataVariableType (InverseReferenceType=Organizes, BrowseName=4:StaticGuid)
???? StaticByteString: BaseDataVariableType (InverseReferenceType=Organizes, BrowseName=4:StaticByteString)
???? StaticXmlElement: BaseDataVariableType (InverseReferenceType=Organizes, BrowseName=4:StaticXmlElement)
[Fatal Error] :1:1: Content is not allowed in prolog.
Exception in thread “Thread-180” java.lang.RuntimeException: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
at org.opcfoundation.ua.builtintypes.XmlElement.getNode(Unknown Source)
at org.opcfoundation.ua.builtintypes.XmlElement.toString(Unknown Source)
at org.opcfoundation.ua.builtintypes.Variant.toString(Unknown Source)
at org.opcfoundation.ua.builtintypes.Variant.toString(Unknown Source)
at java.lang.String.valueOf(String.java:2981)
at java.lang.StringBuilder.append(StringBuilder.java:131)
at org.opcfoundation.ua.builtintypes.DataValue.toString(Unknown Source)
at java.lang.String.valueOf(String.java:2981)
at java.lang.StringBuilder.append(StringBuilder.java:131)
at com.prosysopc.ua.client.AddressSpace.readAttributes(Unknown Source)
at com.prosysopc.ua.client.AddressSpace.readNode(Unknown Source)
at com.prosysopc.ua.client.AddressSpace.getNode(Unknown Source)
at com.prosysopc.ua.client.AddressSpace.getNode(Unknown Source)
at at.keba.viewedit.opcua.browser.OpcUaServerBrowser.dumpOpcUaAddressSpace(OpcUaServerBrowser.java:531)

This is part of code where it throws exception:
for (ReferenceDescription ref : listOfReferences) {
logger.debug(referenceToString(ref));
ExpandedNodeId expandedNodeId = ref.getNodeId();
NodeId nodeId = addressSpace.getNamespaceTable().toNodeId(expandedNodeId);
531: UaNode uaNode = addressSpace.getNode(expandedNodeId);

It stucked on geting ExpandedNodeId from refernce on variable of type XmlElement. And reference looks OK.
If anybody experienced same problem please help.

Thank you,
Goran

August 13, 2014
7:10, EEST
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 1044
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

It looks like there is an XmlElement, which contains the BOM in the beginning that causes the error. Java classes do not support the BOM in UTF-8 files without some special trick, which seems to be missing from the Java stack.

Also it looks like this error (and the toString conversion) should also occur when the logging level for the AddressSpace class is set to DEBUG. Is that the case for you?

August 13, 2014
7:40, EEST
Avatar
gjevremovic
Member
Members
Forum Posts: 49
Member Since:
January 30, 2014
sp_UserOfflineSmall Offline

Maybe update to stack 1.02 and sdk 2.0 will resolve it.
It was set:
log4j.logger.com.prosysopc.ua=ERROR
log4j.logger.org.opcfoundation.ua=ERROR
I am receiving the same error without these lines too.
Anyway I will suspend support for XmlElement related types as it is not necessary currently.

Thank you,
Goran

August 13, 2014
8:59, EEST
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 1044
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

No, it’s not fixed in the new stack yet either. But I have reported it and it will probably be fixed in the next stack version.

Thanks for the note.

Forum Timezone: Europe/Helsinki
Most Users Ever Online: 1919
Currently Online:
Guest(s) 43
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Heikki Tahvanainen: 402
hbrackel: 144
rocket science: 100
pramanj: 86
Francesco Zambon: 83
Ibrahim: 78
Sabari: 62
kapsl: 57
gjevremovic: 49
Xavier: 43
Member Stats:
Guest Posters: 0
Members: 773
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1558
Posts: 6567
Newest Members:
aracelyhaley4, raphaelschonell, Ashmag, kathyreimann56, brittanylemos, dorthycundiff76, PromotionToold, CHHinrichs, rodricklienhop, jose_Wanderlei
Moderators: Jouni Aro: 1039, Pyry: 1, Petri: 1, Bjarne Boström: 1054, Jimmy Ni: 26, Matti Siponen: 359, Lusetti: 0
Administrators: admin: 1