9 Replies Latest reply on Nov 11, 2014 7:42 AM by pcrownov

    Failed to parse gadget ... for locale pl

    chris.wilkinson.csa

      We're getting a strange error when deploying an addon to our Jive-Hosted dev instance.  When we upload our extension.zip, Jive reaches out to our server to pull our app.xml file from here:

      http://register.csa.ca/demo.sap.com~jive~javaaddon/apps/poc-app/app.xml

       

      Jive then complains that it can't parse the xml file because it's in Polish.  I've opened this file in multiple text editors per Ryan Rutan's comment here: Problems with Jive SDK (nodejs) Example.  From what I can tell the app.xml file is legit but I could be wrong.  Any suggestions?

       

      I've attached our app.xml file as an attachment, you can also follow the link above which is publicly accessible.

       

      This is error message and stack trace that I'm getting in my browser (via inspecting network traffic):

      "data":["Content is not allowed in prolog.\njava.lang.RuntimeException: Failed to parse gadget [http://register.csa.ca:80/demo.sap.com~jive~javaaddon/apps/poc-app/app.xml] for locale pl\n\tat com.jivesoftware.community.app.impl.AppActionAnalyzer.extractAppActions(AppActionAnalyzer.java:86)\n\tat com.jivesoftware.community.app.impl.AppActionManagerImpl.rebuildAppActions(AppActionManagerImpl.java:237)\n\tat com.jivesoftware.community.app.impl.AppManagerImpl.doInsert(AppManagerImpl.java:173)\n\tat com.jivesoftware.community.app.impl.AppManagerImpl.doInsert(AppManagerImpl.java:1)\n\tat com.jivesoftware.community.objecttype.impl.AbstractJiveObjectManager.insert(AbstractJiveObjectManager.java:129)\n\tat com.jivesoftware.community.app.impl.AppManagerImpl.createOrUpdateApp(AppManagerImpl.java:238)\n\tat com.jivesoftware.community.app.proxy.AppManagerProxy.createOrUpdateApp(AppManagerProxy.java:50)\n\tat com.jivesoftware.community.extension.updater.appliers.OSAppDataApplier.applyData(OSAppDataApplier.java:65)\n\tat com.jivesoftware.community.integration.ClientAppDataApplier.applyData(ClientAppDataApplier.java:66)\n\tat com.jivesoftware.community.integration.ClientAppDataApplier.applyData(ClientAppDataApplier.java:41)\n\tat com.jivesoftware.community.extension.updater.impl.DeferredApplier.run(DeferredApplier.java:77)\n\tat com.jivesoftware.community.extension.updater.impl.UpdateSessionImpl.executeUpdate(UpdateSessionImpl.java:95)\n\tat com.jivesoftware.community.integration.adaptor.impl.ClientAppExtensionInstallerImpl.done(ClientAppExtensionInstallerImpl.java:151)\n\tat com.jivesoftware.community.extension.impl.ExtensionManagerImpl$Installer.done(ExtensionManagerImpl.java:1662)\n\tat com.jivesoftware.extension.utils.JivePackageUtils$StateChecker.done(JivePackageUtils.java:124)\n\tat com.jivesoftware.extension.utils.impl.PackageParser.parse(PackageParser.java:94)\n\tat com.jivesoftware.extension.utils.JivePackageUtils.parse(JivePackageUtils.java:47)\n\tat com.jivesoftware.community.extension.impl.ExtensionManagerImpl.installExtension(ExtensionManagerImpl.java:504)\n\tat com.jivesoftware.community.extension.proxy.ExtensionManagerProxy.installExtension(ExtensionManagerProxy.java:170)\n\tat com.jivesoftware.community.addons.impl.AddonsServiceImpl.uploadPackage(AddonsServiceImpl.java:313)\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.lang.reflect.Method.invoke(Method.java:606)\n\tat org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)\n\tat org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)\n\tat org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:198)\n\tat org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:100)\n\tat org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)\n\tat org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:94)\n\tat org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271)\n\tat org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)\n\tat org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:239)\n\tat org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:223)\n\tat org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:203)\n\tat org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:137)\n\tat org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:158)\n\tat org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:243)\n\tat org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:163)\n\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:646)\n\tat org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:219)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)\n\tat org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)\n\tat com.jivesoftware.community.web.filter.NoCacheDevModeFilter.doFilterInternal(NoCacheDevModeFilter.java:39)\n\tat org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)\n\tat com.jivesoftware.community.web.struts.JiveFilterDispatcher.doFilter(JiveFilterDispatcher.java:87)\n\tat org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)\n\tat org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)\n\tat com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:119)\n\tat com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:55)\n\tat org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)\n\tat org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)\n\tat org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:99)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)\n\tat com.jivesoftware.community.web.filter.ActivityRequestFilter.doFilter(ActivityRequestFilter.java:100)\n\tat org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)\n\tat org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)\n\tat org.directwebremoting.servlet.DwrWebContextFilter.doFilter(DwrWebContextFilter.java:91)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)\n\tat com.jivesoftware.community.robots.RobotDetectorFilter.doFilterInternal(RobotDetectorFilter.java:62)\n\tat org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\n\tat org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)\n\tat org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)\n\tat org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)\n\tat org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)\n\tat com.jivesoftware.community.aaa.UserResponseHeaderFilter.doFilter(UserResponseHeaderFilter.java:45)\n\tat org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)\n\tat org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)\n\tat org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:368)\n\tat org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:368)\n\tat com.jivesoftware.mobile.filters.APIContentTypeFilter.doFilter(APIContentTypeFilter.java:48)\n\tat org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)\n\tat com.jivesoftware.mobile.filters.JCAPITokenFilter.doFilter(JCAPITokenFilter.java:50)\n\tat org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)\n\tat com.jivesoftware.mobile.redirector.RedirectFilter.doFilter(RedirectFilter.java:140)\n\tat org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)\n\tat org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:169)\n\tat org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)\n\tat com.jivesoftware.community.webservices.RestExceptionTranslatorFilter.doFilter(RestExceptionTranslatorFilter.java:40)\n\tat org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)\n\tat com.jivesoftware.community.aaa.JiveRememberMeAuthenticationFilter.doFilter(JiveRememberMeAuthenticationFilter.java:79)\n\tat org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)\n\tat org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:368)\n\tat org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:187)\n\tat org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)\n\tat org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:169)\n\tat org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)\n\tat org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79)\n\tat org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)\n\tat org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:163)\n\tat org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)\n\tat com.jivesoftware.community.aaa.stateless.filter.NodeFailoverTestModeFilter.doFilter(NodeFailoverTestModeFilter.java:36)\n\tat org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)\n\tat org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:169)\n\tat org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)\n\tat org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)\n\tat com.jivesoftware.base.profiling.http.RequestProfilingFilter.doFilter(RequestProfilingFilter.java:47)\n\tat org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)\n\tat org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)\n\tat com.jivesoftware.community.web.filter.P3PCompactPolicyFilter.doFilter(P3PCompactPolicyFilter.java:48)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)\n\tat com.jivesoftware.community.web.filter.RemoveJsessionIdFilter.doFilter(RemoveJsessionIdFilter.java:40)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)\n\tat com.jivesoftware.community.web.filter.ApplicationStateFilter.doFilter(ApplicationStateFilter.java:157)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)\n\tat com.jivesoftware.community.web.filter.XFrameOptionsFilter.doFilter(XFrameOptionsFilter.java:50)\n\tat org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)\n\tat org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)\n\tat com.jivesoftware.base.plugin.PluginFilter.doFilter(PluginFilter.java:54)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)\n\tat com.jivesoftware.community.web.filter.ResourceRoutingFilter.doFilter(ResourceRoutingFilter.java:44)\n\tat org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)\n\tat org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)\n\tat com.jivesoftware.base.profiling.http.ServerLatencyFilter.doFilter(ServerLatencyFilter.java:62)\n\tat org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)\n\tat org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)\n\tat com.jivesoftware.community.web.security.XHRTokenFilter.doFilter(XHRTokenFilter.java:42)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)\n\tat com.jivesoftware.community.web.filter.MetricsFilter.doFilter(MetricsFilter.java:120)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)\n\tat com.jivesoftware.community.web.filter.SetRequestCharacterEncodingFilter.doFilter(SetRequestCharacterEncodingFilter.java:75)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)\n\tat com.jivesoftware.community.web.filter.DispatchContextResetFilter.doFilter(DispatchContextResetFilter.java:39)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)\n\tat org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)\n\tat org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)\n\tat org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)\n\tat org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:683)\n\tat org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)\n\tat org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)\n\tat org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)\n\tat org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)\n\tat org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)\n\tat org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)\n\tat org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1721)\n\tat org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1679)\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)\n\tat java.lang.Thread.run(Thread.java:744)\nCaused by: org.apache.shindig.gadgets.spec.SpecParserException: org.apache.shindig.common.xml.XmlException: Content is not allowed in prolog. At: (1,1)\n\tat org.apache.shindig.gadgets.AbstractSpecFactory.fetchFromNetwork(AbstractSpecFactory.java:148)\n\tat com.jivesoftware.community.opensocial.gadgets.JiveGadgetSpecFactory.getSpec(JiveGadgetSpecFactory.java:117)\n\tat com.jivesoftware.community.opensocial.gadgets.JiveGadgetSpecFactory.getSpec(JiveGadgetSpecFactory.java:1)\n\tat org.apache.shindig.gadgets.DefaultGadgetSpecFactory.getGadgetSpec(DefaultGadgetSpecFactory.java:75)\n\tat org.apache.shindig.gadgets.process.Processor.process(Processor.java:104)\n\tat com.jivesoftware.community.opensocial.gadgets.impl.GadgetInfoProviderImpl.getGadgetSpecImpl(GadgetInfoProviderImpl.java:612)\n\tat com.jivesoftware.community.opensocial.gadgets.impl.GadgetInfoProviderImpl.getGadgetSpec(GadgetInfoProviderImpl.java:601)\n\tat com.jivesoftware.community.opensocial.gadgets.impl.GadgetInfoProviderImpl.getGadgetMetadata(GadgetInfoProviderImpl.java:500)\n\tat com.jivesoftware.community.app.impl.AppManagerImpl.getMetaDataByLocale(AppManagerImpl.java:355)\n\tat com.jivesoftware.community.app.impl.AppManagerImpl.rebuildJiveI18nTexts(AppManagerImpl.java:369)\n\tat com.jivesoftware.community.app.impl.AppManagerImpl.doInsert(AppManagerImpl.java:171)\n\t... 173 more\nCaused by: org.apache.shindig.common.xml.XmlException: Content is not allowed in prolog. At: (1,1)\n\tat org.apache.shindig.common.xml.XmlUtil.parse(XmlUtil.java:324)\n\tat com.jivesoftware.community.opensocial.gadgets.JiveGadgetSpecFactory.parse(JiveGadgetSpecFactory.java:222)\n\tat org.apache.shindig.gadgets.DefaultGadgetSpecFactory.parse(DefaultGadgetSpecFactory.java:40)\n\tat org.apache.shindig.gadgets.AbstractSpecFactory.fetchFromNetwork(AbstractSpecFactory.java:146)\n\t... 183 more\nCaused by: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.\n\tat org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)\n\tat org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)\n\tat org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)\n\tat org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)\n\tat org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)\n\tat org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)\n\tat org.apache.xerces.impl.XMLDocumentScannerImpl$PrologDispatcher.dispatch(Unknown Source)\n\tat org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)\n\tat org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)\n\tat org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)\n\tat org.apache.xerces.parsers.XMLParser.parse(Unknown Source)\n\tat org.apache.xerces.parsers.DOMParser.parse(Unknown Source)\n\tat org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)\n\tat org.apache.shindig.common.xml.XmlUtil.parse(XmlUtil.java:322)\n\t... 186 more\n"],"class":"class com.jivesoftware.community.extension.ExtensionException$ErrorMessage","key":"addons.error.clientapp.install.problems"}

       

      Surya Metla Erick Dovale Venkat Iyer

        • Re: Failed to parse gadget ... for locale pl
          Ryan Rutan

          Which example did you use?  We've seen this before and it's limited to a specific example.  We need to dig into this and will, could you share your jive sdk create statement?  If you can try the example-todo project, that template should work for an app if memory serves me correctly.

            • Re: Re: Failed to parse gadget ... for locale pl
              smetla

              Hi Ryan

               

              We developed sample app and deployed the war file in SAP J2EE server. Web app is  using the Structs framework. We did simplified our app instead using the examples provided.

               

              Here’s what we’ve seen so far:

              1. If we run Jive locally and connect to my local Struts/Addon server(tomcat) it works
              2. If we run Jive locally and connect to  remote Struts/Addon server(SAP J2EE's server) it fails with the Polish language problem
              3. If we try to Connect Jive/Dev(hosted jive server)  to remote Struts/Addon server(SAP J2EE server)  it fails with the Polish language problem

               

              Attached both extension zip and deployed war file.

               

              Thank you for looking into this.

               

              Have a good day.

               

              Thanks

              Suri

            • Re: Failed to parse gadget ... for locale pl
              chris.wilkinson.csa

              I was able to reproduce this locally by configuring the addon (hosted on our remote SAP/J2EE server) to run with my local Jive 7.0.1.0 Instance running with maven.  I set a breakpoint on line 145 of JiveGadgetSpecFactory.java and noticed that requesting our app.xml resulted in a response that was was gzipped rather than plain text.  The parsing code does not take into account the content-encoding header so it fails to parse.  The exception then bubbles up to AppActionAnalyzer line 86 which dumps a misleading error message to the logs - since this has nothing to do with locale.

               

              The root cause appears to be the gzip issue.  I'll try to fix this with Struts config on our Addon server and post my results to this case.

               

              Here is the raw HTTP Response for pulling app.xml from the URL noted in the discussion:

               

              HTTP/1.1 200

               

              cache-control: max-age=604800

              content-encoding: gzip

              content-length: 674

              Content-Type: text/xml; charset=ISO-8859-1

              date: Tue, 22 Jul 2014 16:34:10 GMT

              last-modified: Fri, 18 Jul 2014 18:29:10 GMT

              server: SAP NetWeaver Application Server 7.20 / AS Java 7.30

              set-cookie: saplb_*=(J2EE306639420)306639451; Version=1; Path=/

               

              ‹UmkÛ0þìü

              Õßm7í(#$ÙBc£ee-Û‡R†bŸãkmI•dwþø¬¸MÚ$Þ`"àXzžç^tw_Ȭ.)æ˜r‹Rümè1 ‡át0`´Æv©!7Ì¢-aίfìRK™3úÍ¥HAY6S*l[+“jT¶ýŠ

              8+¤±1)ص¬Èò"¯m!5Ù*4öË{FŠ½HžçX"÷†œƒŸµ¬wyäáPq,'aêÔãÇNýcjøÒñb©—]Ú,œ£¸gˆ’óSrÄm”•Iˆ_‚IÜîð,Vb²dº‹ú¥ãý;õ2¬+/ð†úîý!ê9×KX›~kõä
              ûB>Š"º×ª’¢\±ÚÐUåÀmÁ°(Ú0òjÔНNÂl%x
              iT.»íÑ^ð#f¶èÁÞQéD)Ý[ÔœôAjЫhŸõ¥á

              öùèáÑô#%åz¨Õ²²~+ÐÔ[¦ÏÅRWö}ѺÂWRQSü¿T¿@O{Y¡À

              µW›ËAìU‚â1QãFP@¸K®yŨT©ÅÍ(•èÓ³ã§özF®áçë]FÛì

              4µ)ånêTGÆ¿Ž’d³Ã“

              ¡„jáC³ÃqÒZõãdíëÇy›³ËßöÄe5.ê5Œ±AÀž×øèfþiv=»ÙÚužÍ0£AexijLŠXÉ4VµVÒ@^—‘*y

              ákj ¸-|FË&iaôÐòŽ²¾†—|áFE;Ø¿Íßʹ

              §Käè«lûôöÖÞå,ØJXI²ñéöèÃaAXfWŠ2Uت™·“rÑpÓ

              :ÿ{€ë!в_~ÄL“cZÏuz@Õ{ï5Ýÿ¿PtŽOÿŸr.

               

              Here is the parsing code from JiveGadgetSpecFactory:

              
              protected GadgetSpec parse(String content, Query query) throws XmlException, GadgetException {
                      // Allow BOM entity as first item on stream and ignore it:
                      if (content.length() >= BOM_ENTITY.length() &&
                          content.substring(0, BOM_ENTITY.length()).equalsIgnoreCase(BOM_ENTITY)) {
                        content = content.substring(BOM_ENTITY.length());
                      }
                      Element element = XmlUtil.parse(content);
              
                      decorateOAuth(element);
                      decorateOpensocial(element);
              
                      String hash = StringUtils.hash(content);
                      GadgetSpec gadgetSpec = new GadgetSpec(query.getSpecUri(), element, content);
                      gadgetSpec.setAttribute(CONTENT_HASH_ATTRIBUTE, hash );
                      return gadgetSpec;
                  }
              

               

              XmlUtil.parse takes a simple String and does not attempt to deflate gzipped content.

                • Re: Failed to parse gadget ... for locale pl
                  chris.wilkinson.csa

                  It looks like we have a resolution to this.

                   

                  As I expected above, our server was returning all of our resources (app.xml, html files, js files etc) compressed with gzip.  Our server is an instance of SAP Composition Environment which supports J2EE.  It has a setting called AlwaysCompress which takes a list of mime-types - xml, js, html were all in this list.  It also has a setting called NeverCompress which does the opposite.

                   

                  It was my understanding that a web server was supposed to serve content as requested, or return an appropriate 400 series error code.  In our case, Jive is making a GET request to SAP/CE with no Accept-Encoding header (default should be uncompressed?), SAP/CE is compressing the response anyway and setting the response header content-encoding: gzip.  Jive ignores the content-encoding header and can't parse the response. 

                   

                  Someone's breaking the HTTP protocol here but I'm not sure which side is the culprit:

                  1. By forcing compression, SAP/CE is returning a response in a manner which was not requested.  This might be wrong but I'm not sure.
                  2. Maybe Jive (the agent in the case) is responsible to read the content-encoding header in all cases, even if it wasn't asked for.  Or maybe Jive is right to say it can't parse the response because it wasn't returned as requested.

                   

                  Anyway, the error about Polish locale settings is misleading.  If Jive fails to parse app.xml for any reason the exception will bubble up and that's the error you'll see in the logs.

                • Re: Failed to parse gadget ... for locale pl
                  aron.racho

                  Hi, we investigated this problem, and it turns out to be a legitimate bug. We we're checking for the content-type header properly, accounting for case (Content-Type, content-type, etc).