cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robby Pelssers <Robby.Pelss...@nxp.com>
Subject RE: question related to using servlet: in @src
Date Tue, 22 May 2012 09:16:29 GMT
Hi Francesco,

I am starting to get a suspicion I know the root cause.  I noticed that e.g. some artifacts
use a different version.

If you compare for instance the version of parent/pom.xml
      <dependency>
        <groupId>org.apache.cocoon</groupId>
        <artifactId>cocoon-servlet-service-impl</artifactId>
        <version>1.3.1-SNAPSHOT</version>
      </dependency>

With the one generated by the archetype
            <dependency>
                <groupId>org.apache.cocoon</groupId>
                <artifactId>cocoon-servlet-service-impl</artifactId>
        <!-- After upgrading to 1.2.1 fix the TODO in ServiceServletMonitor -->
                <version>1.2.0</version>
            </dependency>

Isn't there some clever way to keep the archetype in sync with cocoon dependencies used by
parent/pom.xml?

What is the best way on short notice for me to work around this discrepancy?

Robby
From: Robby Pelssers [mailto:Robby.Pelssers@nxp.com]
Sent: Tuesday, May 22, 2012 9:02 AM
To: dev@cocoon.apache.org
Subject: RE: question related to using servlet: in @src

Yes... I understand.  But I guess the snapshot version still remains the same, right?  And
I did still have prior versions of artifacts in my local repo. So I guess maven won't fetch
them in this case?!

Robby

From: Francesco Chicchiriccò [mailto:ilgrosso@apache.org]
Sent: Tuesday, May 22, 2012 8:59 AM
To: dev@cocoon.apache.org
Subject: Re: question related to using servlet: in @src

On 22/05/2012 08:53, Robby Pelssers wrote:
I am reinstalling all artifacts now and see if that was the culprit. Forgot to do so yesterday
evening probably because I followed your quick-start from latest mail discussion.  Will let
you know if it still fails afterwards.

Since Jenkins is redeploying SNAPSHOT artifacts at every build, there shouldn't be any difference
but the xercesImpl version correction that I've just committed.

Anyway..

From: Francesco Chicchiriccò [mailto:ilgrosso@apache.org]
Sent: Tuesday, May 22, 2012 8:50 AM
To: dev@cocoon.apache.org<mailto:dev@cocoon.apache.org>
Subject: Re: question related to using servlet: in @src

On 22/05/2012 08:42, Robby Pelssers wrote:
Hi Francesco,

My sitemap did declare the servlet namespace

<map:sitemap
        xmlns:map="http://apache.org/cocoon/sitemap"<http://apache.org/cocoon/sitemap>
        xmlns:servlet="http://apache.org/cocoon/servlet"<http://apache.org/cocoon/servlet>
        xmlns:controller="http://apache.org/cocoon/controller"<http://apache.org/cocoon/controller>>

But if you look more carefully that shouldn't even matter as I'm not using it as a namespace
prefix.  In the @src attribute I'm using it but there it's just a string.
<map:generate src="servlet:/testdata"/>

You only need to declare it when you use a tag in the servlet namespace like e.g.
      <map:match equals="redirect/sax-pipeline/simple-xml">
        <servlet:redirect-to uri="servlet:/sax-pipeline/simple-xml"/>
      </map:match>

So this is not causing the issue.

Ops, you are absolutely right :-)
It looks like the ServletURLStreamHandler does not get registered...



From: Francesco Chicchiriccò [mailto:ilgrosso@apache.org]
Sent: Tuesday, May 22, 2012 8:34 AM
To: dev@cocoon.apache.org<mailto:dev@cocoon.apache.org>
Subject: Re: question related to using servlet: in @src

On 21/05/2012 23:49, Robby Pelssers wrote:
Hi all,

I noticed the cocoon protocol got ditched in favour of the servlet protocol.

However something puzzles me as test1 is not working but test2 is.  I studied the sitemap
from sample block and they use it all over the place. What am I missing here?

      <map:match pattern="testdata">
        <map:generate src="data/PH3330L.xml"/>
        <map:serialize/>
      </map:match>

      <map:match pattern="test1">
        <map:generate src="servlet:/testdata"/>
        <map:transform src="xslt/test.xslt"/>
        <map:serialize/>
      </map:match>

      <map:match pattern="test2">
        <map:generate src="data/PH3330L.xml"/>
        <map:transform src="xslt/test.xslt"/>
        <map:serialize/>
      </map:match>


This is the stacktrace:

<exception-report class="java.net.URISyntaxException" timestamp="Mon, 21 May 2012 23:48:09
+0200"><message>Illegal character in scheme name at index 18: com.nxp.spider2.vp_generation.service+:/testdata</message><stacktrace>java.net.URISyntaxException:
Illegal character in scheme name at index 18: com.nxp.spider2.vp_generation.service+:/testdata

...did you declare xmlns:servlet="http://apache.org/cocoon/servlet"<http://apache.org/cocoon/servlet>?




                at java.net.URI$Parser.fail(URI.java:2810)

                at java.net.URI$Parser.checkChars(URI.java:2983)

                at java.net.URI$Parser.parse(URI.java:3010)

                at java.net.URI.<init>(URI.java:735)

                at org.apache.cocoon.servletservice.AbsoluteServletConnection.<init>(AbsoluteServletConnection.java:70)

                at org.apache.cocoon.servletservice.url.ServletURLConnection.<init>(ServletURLConnection.java:92)

                at org.apache.cocoon.servletservice.url.ServletURLStreamHandler.openConnection(ServletURLStreamHandler.java:30)

                at java.net.URL.openConnection(URL.java:945)

                at org.apache.cocoon.sax.component.XMLGenerator$URLGenerator.execute(XMLGenerator.java:433)

                at org.apache.cocoon.sax.component.XMLGenerator.execute(XMLGenerator.java:121)

                at org.apache.cocoon.pipeline.AbstractPipeline.invokeStarter(AbstractPipeline.java:150)

                at org.apache.cocoon.pipeline.CachingPipeline.execute(CachingPipeline.java:146)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

                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:318)

                at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)

                at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)

                at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:80)

                at org.apache.cocoon.servlet.collector.ResponseHeaderCollector.interceptInvoke(ResponseHeaderCollector.java:94)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

                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:621)

              at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610)

                at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:65)

                at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)

                at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:90)

                at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)

                at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)

                at $Proxy29.execute(Unknown Source)

                at org.apache.cocoon.sitemap.InvocationImpl.execute(InvocationImpl.java:163)

                at org.apache.cocoon.sitemap.node.PipelineNode.invoke(PipelineNode.java:68)

                at org.apache.cocoon.sitemap.node.AbstractSitemapNode.invoke(AbstractSitemapNode.java:100)

                at org.apache.cocoon.sitemap.node.PipelinesNode.invoke(PipelinesNode.java:49)

                at org.apache.cocoon.sitemap.node.AbstractSitemapNode.invoke(AbstractSitemapNode.java:100)

                at org.apache.cocoon.sitemap.node.Sitemap.invoke(Sitemap.java:42)

                at org.apache.cocoon.servlet.RequestProcessor.invoke(RequestProcessor.java:245)

                at org.apache.cocoon.servlet.RequestProcessor.sendSitemapResponse(RequestProcessor.java:313)

                at org.apache.cocoon.servlet.RequestProcessor.service(RequestProcessor.java:92)

                at org.apache.cocoon.servlet.XMLSitemapServlet.service(XMLSitemapServlet.java:54)

                at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

                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:318)

                at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)

                at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)

                at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:80)

                at org.apache.cocoon.jnet.URLHandlerFactoryCollector.installURLHandlers(URLHandlerFactoryCollector.java:37)

                at sun.reflect.GeneratedMethodAccessor14.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:621)

              at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610)

                at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:65)

                at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)

                at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:80)

                at org.apache.cocoon.jnet.URLHandlerFactoryCollector.installURLHandlers(URLHandlerFactoryCollector.java:37)

                at sun.reflect.GeneratedMethodAccessor14.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:621)

              at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610)

                at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:65)

                at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)

                at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:90)

                at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)

                at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)

                at $Proxy20.service(Unknown Source)

                at org.apache.cocoon.servletservice.ServletServiceContext$PathDispatcher.forward(ServletServiceContext.java:481)

                at org.apache.cocoon.servletservice.ServletServiceContext$PathDispatcher.forward(ServletServiceContext.java:455)

                at org.apache.cocoon.servletservice.spring.ServletFactoryBean$ServiceInterceptor.invoke(ServletFactoryBean.java:245)

                at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)

                at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)

                at $Proxy24.service(Unknown Source)

                at org.apache.cocoon.servletservice.DispatcherServlet.service(DispatcherServlet.java:106)

                at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

                at org.apache.cocoon.tools.rcl.wrapper.servlet.ReloadingServlet.service(ReloadingServlet.java:115)

                at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)

                at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1221)

                at org.apache.cocoon.tools.rcl.wrapper.servlet.ReloadingSpringFilter.doFilter(ReloadingSpringFilter.java:71)

                at org.apache.cocoon.tools.rcl.wrapper.servlet.ReloadingServletFilter.doFilter(ReloadingServletFilter.java:66)

                at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)

                at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:399)

                at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)

                at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)

                at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)

                at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)

                at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)

                at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)

                at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)

                at org.mortbay.jetty.Server.handle(Server.java:326)

                at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)

                at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)

                at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)

                at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)

                at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)

                at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)

                at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)

</stacktrace></exception-report>

--

Francesco Chicchiriccò



Apache Cocoon PMC and Apache Syncope PPMC Member

http://people.apache.org/~ilgrosso/

Mime
View raw message