cancel
Showing results for 
Search instead for 
Did you mean: 

Strange Error Message

cfe
Champ in-the-making
Champ in-the-making
Hello everyone,

out of nowhere i am receiving a strange error messages.
Unfortunaetly i dont know at all where to look.

Can anyone help me out with the possible origin of this error message?


11:32:11,375 ERROR [org.springframework.extensions.surf.mvc.PageView] The current PageView does not have its "page" property set. Please ensure that the associated view resolver is calling the setPage() method when building the view!
11:32:11,516 ERROR [org.alfresco.wcm.client.exceptionresolver.RepositoryExceptionResolver] org.alfresco.wcm.client.exception.PageNotFoundException
org.alfresco.wcm.client.exception.PageNotFoundException
   at org.alfresco.wcm.client.controller.GenericTemplateAssetController.handleRequestInternal(GenericTemplateAssetController.java:72)
   at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
   at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
   at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:771)
   at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716)
   at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:647)
   at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:552)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
   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 org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
   at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
   at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
   at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
   at org.tuckey.web.filters.urlrewrite.NormalRewrittenUrl.doRewrite(NormalRewrittenUrl.java:213)
   at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:171)
   at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
   at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
   at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:381)
   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:127)
   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:298)
   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
   at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
   at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
   at java.lang.Thread.run(Thread.java:619)
11:32:11,544 ERROR [org.springframework.extensions.surf.mvc.PageView] The current PageView does not have its "page" property set. Please ensure that the associated view resolver is calling the setPage() method when building the view!


Thanks in advance,
greetings
Chris
8 REPLIES 8

bremmington
Champ on-the-rise
Champ on-the-rise
When you say "out of nowhere" do you mean that it was working fine but now isn't?

cfe
Champ in-the-making
Champ in-the-making
Yes, i regularily check the logs and i never saw this one before.
It seem to show up, when one visits the editorial page.

bremmington
Champ on-the-rise
Champ on-the-rise
I can't see any way that this particular error can occur unless you've made some code changes in the web tier - perhaps a new controller or view resolver?

cfe
Champ in-the-making
Champ in-the-making
Hello,

i havent touched any controller or view resolver.

Actually it seems to be linked to me trying to include a CSS-Stylesheet residing in the repository.
In head.ftl i added:

<link href="${url.context}/stylesheets/custom_styles.css" type="text/css" rel="stylesheet" />

I removed it and, and now i dont get the errormessage.
But how do i manage to include the stylesheet?

bremmington
Champ on-the-rise
Champ on-the-rise
Apologies for the delay in coming back to you. I'm still not sure what would be causing the exact error you originally posted, but I think I can help with your requirement to deliver a stylesheet from the repo.

In order to do that you will need a template that purely returns the content of the asset as-is. I have previously described an approach to doing this on this forum in response to a question about returning raw XML. Basically it involves registering a new template (I've called it "raw") and associating it with your stylesheets section. Have a read through it and see if it helps you.

cfe
Champ in-the-making
Champ in-the-making
Hello Brian,

thank you for your help. I had succes with an approach not much different than the one you suggest. ( inserted a component-representation in the preexisting templates like twoblock, and parse the raw content in the header.ftl)
Custom stylesheets do work fine now, and the error message is gone (but im still not sure if there's a direct link).

The funny thing is, accesing the css by link (with the src="" tag) the content is displayed in firebug, and it even does work on my development-enivironment (winxp). But not on the server (it was still displayed, but the styles werent applied).


Thanks again,

Chris

bremmington
Champ on-the-rise
Champ on-the-rise
I'm not certain if you mean that everything's now working as you want or not. If not then please let me know if I can help any further.

Anyway, I've been thinking about this a little more (along with others who have had similar questions), and I've decided to make a small change to how template resolution works. This will make it onto HEAD soon, but HEAD is currently very "dynamic", so I'll describe what I'm going to do here in case you want to make use of the idea.

The class that deals with the template resolution is in the WQS client API project - "DynamicPageViewResolver". This class has a method called "buildView" that asks the resolved asset which template should be used. If for some reason the asset returns null at this point, we take evasive action by creating and returning a "StreamedAssetView" that causes the asset to be streamed "raw" (no template).

What I intend to do is to change the code that is currently:

            if (template == null)
            {
                return createStreamView(asset);
            }
so that it becomes:

            if (template == null || "raw".equalsIgnoreCase(template))
            {
                return createStreamView(asset);
            }
This small change will mean that you can force any asset (or any type of asset below a given section) to be streamed back without a template simply by including an appropriate template mapping to the "special" template name of "raw". One advantage of this is that the MIME type of the asset in the repo will be guaranteed to be the one that is used in the HTTP response. The previous dummy template approach probably wouldn't do the same, and I wonder if that may be causing any remaining issues that you're seeing with your current solution.

cfe
Champ in-the-making
Champ in-the-making
Hello Brian,

thank you for the information and the additional input!

I didnt get any more error message with the that solution, and i get the results i want, so the problem is solved. Ill mark it accordingly.

Your suggestion sounds very promising. Looking forward to have it in use 🙂


greetings
Chris