Hello,

at first I became suspicious of the error mail when I was looking at the error 
mails I got from the server. Bots could not be forwarded:

I am using Magnolia 4.5.9-MAGNOLIA-5057)

[code]
 Magnolia
 Version: 
 Server: idfvo2
 Url: /verein/TSV-Jesenwang
 Referer: 
 User-Agent: Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_1 like Mac OS X; en-us) 
AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8B117 
Safari/6531.22.7 (compatible; Googlebot-Mobile/2.1; 
+http://www.google.com/bot.html)
 Remote-Host: 127.0.0.1
 Session Id: 
 Userid: 
 Number of occurrences: 1
 ===================================
         
[idfvo2] ERROR 24.06.2013 17:50:03 info.magnolia.cms.util.RequestDispatchUtil 
?(?:?) - Failed to forward to /index/verein?club=TSV-Jesenwang - 
NullPointerException:null

===================================
[/code]

but I ignored it. Now I can exactly reproduce the error. I visit my author 
instance, go to the preview mode and set parameter mgnlChannel to smartphone. 
Now this NPE is being thrown.

After a long debug session, I found out who is doing this.

RequestDispatchUtil is calling the forward() of ServletRequestWrapper which 
leads to the RequestFilters. Magnolia has it main request filter (calling the 
configured filters?).

At the end 
info.magnolia.module.templatingkit.filters.SiteMergeFilter.doFilter() was doing 
following:

[code]
log.debug("Serving site variation '{}'", variation.getName());

                // TODO dlipp - workaround until SCRUM-835 is solved. The 
fakeSiteWithProperName will no longer be
                // needed then. Right now not creating/merging the fakeSite 
would result in mgnl searching for various
                // resources under <webappName>/variation-siteName instead of 
<webappName>/currentSiteName.
                final Site fakeSiteWithProperName = new Site();
                fakeSiteWithProperName.setName(currentSite.getName());
[/code]

now (version 2.0.10)

[code]
 // See SCRUM-835. Creating/merging the fakeSite would result in mgnl searching 
for various
                // resources under <webappName>/variation-siteName instead of 
<webappName>/currentSiteName.
                final Site fakeSiteWithProperName = 
Components.newInstance(currentSite.getClass());
                fakeSiteWithProperName.setName(currentSite.getName());
[/code]


The problem is/may be Components.newInstance(currentSite.getClass()) gives 
null. I am saying this, because the NPE happens at the line 87 
([code]fakeSiteWithProperName.setName(currentSite.getName());[/code]).



Now I really have no idea what to do. Setting stk to 2.0.9 does not seem work, 
because there is pop 2.0.10 depending on stk 2.0.10.
Maybe I didn't see a configuration point in the update from 4.5.8 (I don't know 
sadly exactly if the problem existed there too) to 4.5.9.



Thanks for your response
Wolle

-- 
Context is everything: 
http://forum.magnolia-cms.com/forum/thread.html?threadId=eb86c05f-84f7-43e5-9b5a-e041b4efa8d2


----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to