Errors with new demo

130 views
Skip to first unread message

rick.c...@gmail.com

unread,
Aug 21, 2012, 1:07:17 PM8/21/12
to ope...@googlegroups.com
Hi,

I installed version 1.0 and copied the demo files to the corresponding directories. After firing up the openhab server i see the following error:

ERROR:  'Content is not allowed in prolog.'
ERROR:  'com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: Content is not allowed in prolog.'
19:05:12.744 ERROR o.o.c.t.i.s.XsltTransformationService[:105] - transformation throws exception
javax.xml.transform.TransformerException: javax.xml.transform.TransformerException: com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: Content is not allowed in prolog.
......

WHen I google for this I see someone else also had this in his own version of the XLS file. In my case, however, I did not change a thing in the files. The content of my demo.google.xls file is:

<?xml version="1.0" ?> 

- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> 

<xsl:output indent="yes" method="xml" encoding="UTF-8" omit-xml-declaration="yes" /> 

- <xsl:template match="/"> 

<xsl:value-of select="//current_conditions/temp_c/@data" /> 

</xsl:template> 

</xsl:stylesheet>


Any ideas what could have been wrong?

Rick

Kai Kreuzer

unread,
Aug 21, 2012, 4:27:18 PM8/21/12
to ope...@googlegroups.com
Hi,

if you look a bit further in the log it says:

21:58:14.385 ERROR o.o.b.h.internal.HttpInBinding[:147] - transformation throws exception [transformation=XSLT(demo_google_weather.xsl), response=Unsupported API]

"response" is what comes back from the HTTP request and goes into the XSLT transformation. So it seems that the Google Weather server sometimes returns "Unsupported API" - I have no idea why it does that, most of the time, the exactly same request works like a charm.
But we have experienced some instabilities with this URL in the last weeks; I have also seen a couple of HTTP 403 codes coming back. Maybe Google is restricting the number of calls to this url in some way?

Can you confirm that this only happens sometimes, but works in many cases as well? The demo setup does a call every minute. If everything goes well, you should simple see this in your console:

22:16:23.539 INFO  runtime.busevents[:46] - Weather_Temperature state updated to 25

Best regards,
Kai

--
You received this message because you are subscribed to the Google Groups "openhab" group.
To view this discussion on the web visit https://groups.google.com/d/msg/openhab/-/6XVk85OfR4IJ.
To post to this group, send email to ope...@googlegroups.com.
To unsubscribe from this group, send email to openhab+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/openhab?hl=en.

Thomas Eichstädt-Engelen

unread,
Aug 21, 2012, 4:48:38 PM8/21/12
to ope...@googlegroups.com
it's the same with the demo-server at the moment! Google seems to limit the requests (probably based on the user agent?!)

rick.c...@gmail.com

unread,
Aug 21, 2012, 5:48:20 PM8/21/12
to ope...@googlegroups.com
Correct.... sometimes only I get this error. Not always if it checks for the weather every minute.

I think it is better to change the cron to check weather every 5 to 10 minutes and reduce the call load and possible conflicts between calls from different users.

Rick

Op dinsdag 21 augustus 2012 22:48:38 UTC+2 schreef Thomas E.-E. het volgende:
Reply all
Reply to author
Forward
0 new messages