Foren

Error al lazar Servicio Web: Content is not allowed in prolog

thumbnail
kitie vbr, geändert vor 12 Jahren.

Error al lazar Servicio Web: Content is not allowed in prolog

Junior Member Beiträge: 39 Beitrittsdatum: 05.08.10 Neueste Beiträge
Al lanzar el servicio web de me aparece el siguente mensaje en el log.

Servicio web: /tunnel-web/secure/axis/Portlet_Journal_JournalArticleService

com.liferay.portal.kernel.xml.DocumentException: Error on line 1 of document  : Content is not allowed in prolog.




 ERROR [JournalArticleLocalServiceImpl:2203]
com.liferay.portal.kernel.xml.DocumentException: Error on line 1 of document  : Content is not allowed in prolog. Nested exception: Content is not allowed in prolog.
        at com.liferay.portal.xml.SAXReaderImpl.read(SAXReaderImpl.java:377)
        at com.liferay.portal.xml.SAXReaderImpl.read(SAXReaderImpl.java:365)
        at com.liferay.portal.xml.SAXReaderImpl.read(SAXReaderImpl.java:382)
        at com.liferay.portal.kernel.xml.SAXReaderUtil.read(SAXReaderUtil.java:150)
        at com.liferay.portlet.journal.service.impl.JournalArticleLocalServiceImpl.format(JournalArticleLocalServiceImpl.java:2192)
        at com.liferay.portlet.journal.service.impl.JournalArticleLocalServiceImpl.addArticle(JournalArticleLocalServiceImpl.java:259)
        at com.liferay.portlet.journal.service.impl.JournalArticleLocalServiceImpl.addArticle(JournalArticleLocalServiceImpl.java:176)
        at com.liferay.portlet.journal.service.impl.JournalArticleLocalServiceImpl.addArticle(JournalArticleLocalServiceImpl.java:149)
        at sun.reflect.GeneratedMethodAccessor1112.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
        at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:77)
        at com.liferay.portal.mirage.aop.MirageInvoker.invoke(MirageInvoker.java:47)
        at com.liferay.portal.mirage.aop.ContentInvoker.invoke(ContentInvoker.java:47)
        at com.liferay.portal.mirage.service.ContentServiceImpl.process(ContentServiceImpl.java:247)
        at com.liferay.portal.mirage.service.ContentServiceImpl.createContent(ContentServiceImpl.java:111)
        at sun.reflect.GeneratedMethodAccessor1111.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
        at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:77)
        at com.liferay.portal.spring.aop.LogAdvice.invoke(LogAdvice.java:73)
        at sun.reflect.GeneratedMethodAccessor1025.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:627)
        at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:616)
        at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:64)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
        at $Proxy424.createContent(Unknown Source)
        at com.liferay.portal.mirage.aop.JournalArticleLocalServiceAdvice.doInvoke(JournalArticleLocalServiceAdvice.java:60)
        at com.liferay.portal.mirage.aop.BaseMirageAdvice.invoke(BaseMirageAdvice.java:47)
        at sun.reflect.GeneratedMethodAccessor1024.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:627)
        at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:616)
        at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:64)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
        at $Proxy367.addArticle(Unknown Source)
        at com.liferay.portlet.journal.service.impl.JournalArticleServiceImpl.addArticle(JournalArticleServiceImpl.java:65)
        at sun.reflect.GeneratedMethodAccessor1110.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
        at $Proxy368.addArticle(Unknown Source)
        at com.liferay.portlet.journal.service.JournalArticleServiceUtil.addArticle(JournalArticleServiceUtil.java:63)
        at com.liferay.portlet.journal.service.http.JournalArticleServiceSoap.addArticle(JournalArticleServiceSoap.java:99)
        at sun.reflect.GeneratedMethodAccessor1109.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:397)
        at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:186)
        at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
        at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
        at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
        at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
        at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:454)
        at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
        at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
        at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
        at com.liferay.portal.servlet.AxisServlet.service(AxisServlet.java:79)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at com.liferay.portal.kernel.servlet.PortalClassLoaderServlet.service(PortalClassLoaderServlet.java:108)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
        at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:282)
        at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:91)
        at com.liferay.portal.kernel.servlet.PortalClassLoaderFilter.doFilter(PortalClassLoaderFilter.java:78)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
        at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
        at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
        at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
        at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)
        at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
        at java.lang.Thread.run(Thread.java:619)
13:38:49,350 ERROR [JournalArticleLocalServiceImpl:2203]




A que es debido??? Colo se puede solucionar???
Ivan Merino, geändert vor 12 Jahren.

RE: Error al lazar Servicio Web: Content is not allowed in prolog

New Member Beitrag: 1 Beitrittsdatum: 30.01.12 Neueste Beiträge
Hola,

Este error me lo encontré un hace un tiempo y el problema estaba en el fichero que estaba intentando leer / parsear.

Al parecer el primer carácter del fichero era este [] (esto lo descubrí abriendo el fichero en un editor de texto y marcando que se mostraran todos los caracteres y símbolos). Tras eliminar ese carácter y guardar el fichero de nuevo... el error se solucionó.

Quizás es posible que te esté pasando algo similar.
thumbnail
kitie vbr, geändert vor 12 Jahren.

RE: Error al lazar Servicio Web: Content is not allowed in prolog

Junior Member Beiträge: 39 Beitrittsdatum: 05.08.10 Neueste Beiträge
He hecho un system.out.println del código xml de la estructura con los campos específicos:
A simple vista el xml es correcto, veis algun error??


<!--?xml version="1.0" encoding="UTF-8"?-->
<root>
        <dynamic-element instance-id="7UJPSqx3" name="Categoria" type="list">
                <dynamic-content>9</dynamic-content>
        </dynamic-element>
        <dynamic-element instance-id="vNKul6XB" name="Cabecera" type="text">
                <dynamic-content>"Los peces no vuelan"</dynamic-content>
        </dynamic-element>
        <dynamic-element instance-id="4BCnc1ev" name="Fecha" type="text">
                <dynamic-content>07/12/2011</dynamic-content>
        </dynamic-element>
        <dynamic-element instance-id="S51sVG7A" name="DescripcionCorta" type="text_box">
                <dynamic-content>"Los peces no vuelan"</dynamic-content>
        </dynamic-element>
        <dynamic-element instance-id="HV18Usut" name="DescripcionLarga" type="text_area">
                <dynamic-content>En esta productora trabaja Juliapegada a un pasado en forma de urna con las cenizassp; a 14:00 h. y</dynamic-content>
        </dynamic-element>
        <dynamic-element instance-id="WT0f2pDw" name="Imagen" type="image">
                <dynamic-content id="96811">/image/journal/article?img_id=96811&amp;t=1323266070056</dynamic-content>
        </dynamic-element>
        <dynamic-element instance-id="EZSMiao6" name="EnlacesRelacionados" type="text">
                <dynamic-content>http://www.google.com</dynamic-content>
        </dynamic-element>
        <dynamic-element instance-id="RoebKX9g" name="DescripcionEnlaces" type="text">
                <dynamic-content>Venta entradas on line</dynamic-content>
        </dynamic-element>
        <dynamic-element instance-id="Zd7KRBv7" name="NombreDocumentoDescarga" type="text">
                <dynamic-content></dynamic-content>
        </dynamic-element>
        <dynamic-element instance-id="x3YXFyRy" name="Facebook" type="text">
                <dynamic-content>http://www.facebook.com/</dynamic-content>
        </dynamic-element>
        <dynamic-element instance-id="GTxuDN5b" name="Twitter" type="text">
                <dynamic-content>www.twitter.com/</dynamic-content>
        </dynamic-element>
        <dynamic-element instance-id="7Jr3hQOi" name="Video" type="text">
                <dynamic-content></dynamic-content>
        </dynamic-element>
        <dynamic-element instance-id="4PTmPb0W" name="Imagen360Grados" type="text">
                <dynamic-content></dynamic-content>
        </dynamic-element>
        <dynamic-element instance-id="M1sVvA3G" name="ReservasHoteleras" type="text">
                <dynamic-content></dynamic-content>
        </dynamic-element>
        <dynamic-element instance-id="y3X4nGYA" name="galeria" type="image_gallery">
                <dynamic-content>/image/image_gallery?uuid=6f3a26e9-991e-4eef-874f-72d85ca92a93&amp;groupId=10167&amp;t=1323266147360</dynamic-content>
        </dynamic-element></root>