Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional Alfresco: Practical Solutions for Enterprise Content Management
This is the forum to discuss the Wrox book Professional Alfresco: Practical Solutions for Enterprise Content Management by David Caruana, John Newton, Mike Farman, Michael Uzquiano, Kevin Roast; ISBN: 9780470571040
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Alfresco: Practical Solutions for Enterprise Content Management section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 4th, 2010, 12:57 AM
Registered User
 
Join Date: May 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 15/16 Example

You have written a fantastic book. I am really enjoying it.

This is probably my mistake, but I just do not know where I made the goof. I am using the Alfresco Community 3.3 on Windows 7 if that makes a difference. Alfresco opens fine with the example, but when I open Share, I get the following message:

A problem has occurred.
This page could not be rendered:
slingshot-login
Please notify your system administrator.

Here is the alfresco.log

22:46:57,918 ERROR [org.springframework.extensions.surf.render.RenderS ervice] Unable to process template: slingshot-login
22:46:57,918 ERROR [org.springframework.extensions.surf.FrameworkUtil] An exception occurred while rendering a page: slingshot-login
22:46:57,918 ERROR [org.springframework.extensions.surf.FrameworkUtil] org.springframework.extensions.surf.exception.Rend ererExecutionException: WebTemplateProcessor failed to process template uri: org/alfresco/global/slingshot-login
at org.springframework.extensions.webscripts.WebTempl ateProcessor.executeBody(WebTemplateProcessor.java :344)
at org.springframework.extensions.surf.render.Abstrac tProcessor.execute(AbstractProcessor.java:79)
at org.springframework.extensions.surf.render.RenderS ervice.processTemplate(RenderService.java:582)
at org.springframework.extensions.surf.render.bean.Te mplateInstanceRenderer.calculateComponentDependenc ies(TemplateInstanceRenderer.java:68)
at org.springframework.extensions.surf.render.bean.Te mplateInstanceRenderer.body(TemplateInstanceRender er.java:116)
at org.springframework.extensions.surf.render.Abstrac tRenderer.render(AbstractRenderer.java:131)
at org.springframework.extensions.surf.render.bean.Pa geRenderer.body(PageRenderer.java:70)
at org.springframework.extensions.surf.render.Abstrac tRenderer.render(AbstractRenderer.java:131)
at org.springframework.extensions.surf.render.RenderS ervice.startPageRenderer(RenderService.java:664)
at org.springframework.extensions.surf.render.RenderS ervice.renderPage(RenderService.java:641)
at org.springframework.extensions.surf.render.Present ationUtil.renderPage(PresentationUtil.java:95)
at org.springframework.extensions.surf.mvc.PageView.d ispatchPage(PageView.java:349)
at org.springframework.extensions.surf.mvc.PageView.r enderView(PageView.java:231)
at org.springframework.extensions.surf.mvc.AbstractWe bFrameworkView.renderMergedOutputModel(AbstractWeb FrameworkView.java:132)
at org.springframework.web.servlet.view.AbstractView. render(AbstractView.java:250)
at org.springframework.web.servlet.DispatcherServlet. render(DispatcherServlet.java:1060)
at org.springframework.web.servlet.DispatcherServlet. doDispatch(DispatcherServlet.java:798)
at org.springframework.web.servlet.DispatcherServlet. doService(DispatcherServlet.java:716)
at org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:647)
at org.springframework.web.servlet.FrameworkServlet.d oGet(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.in ternalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invo ke(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.invok e(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.servic e(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:845)
at org.apache.coyote.http11.Http11Protocol$Http11Conn ectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run( JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.util.MissingResourceException: Can't find bundle for base name alfresco.messages.webscripts, locale en_US
at java.util.ResourceBundle.throwMissingResourceExcep tion(ResourceBundle.java:836)
at java.util.ResourceBundle.getBundleImpl(ResourceBun dle.java:726)
at java.util.ResourceBundle.getBundle(ResourceBundle. java:576)
at org.springframework.extensions.surf.util.I18NUtil. getLocaleProperties(I18NUtil.java:445)
at org.springframework.extensions.surf.util.I18NUtil. getMessage(I18NUtil.java:329)
at org.springframework.extensions.surf.util.I18NUtil. getMessage(I18NUtil.java:359)
at org.springframework.extensions.surf.util.I18NUtil. getMessage(I18NUtil.java:346)
at org.springframework.extensions.surf.exception.Plat formRuntimeException.resolveMessage(PlatformRuntim eException.java:126)
at org.springframework.extensions.surf.exception.Plat formRuntimeException.<init>(PlatformRuntimeExcepti on.java:99)
at org.springframework.extensions.webscripts.WebScrip tException.<init>(WebScriptException.java:54)
at org.springframework.extensions.webscripts.processo r.FTLTemplateProcessor.process(FTLTemplateProcesso r.java:160)
at org.springframework.extensions.webscripts.WebTempl ateProcessor.executeBody(WebTemplateProcessor.java :312)
... 33 more
Reply With Quote
  #2 (permalink)  
Old June 17th, 2010, 03:02 PM
Registered User
 
Join Date: Jun 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I've run into the same problem on OS X (10.6.3). Does anyone have a solution?
Reply With Quote
  #3 (permalink)  
Old June 17th, 2010, 07:48 PM
Registered User
 
Join Date: Jun 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I was finally able to get the chapter 14/15 Knowledge Base app running. My problem appears to have to do with internationalization. I should preface the rest of this post by saying that I'm new to Alfresco and I'm not a Java dev. If anyone can offer a suggestion as to how to properly solve this problem, I'm all ears.

I narrowed down my issue to to custom-slingshot-application-context.xml inside tomcat/shared/classes/alfresco/web-extension. There you will find the following bean:

Code:
  <bean id="webscripts.resources" class="org.alfresco.i18n.ResourceBundleBootstrapComponent">
      <property name="resourceBundles">
         <list>
            <value>alfresco.messages.webscripts</value>
            <value>alfresco.messages.slingshot</value>            
            <value>alfresco.web-extension.messages.kbsite</value>
         </list>
      </property>
   </bean>
I changed this to the following:

Code:
   <bean id="webscripts.resources" class="org.springframework.extensions.surf.util.ResourceBundleBootstrapComponent">
      <property name="resourceBundles">
         <list>
            <value>webscripts.messages.webscripts</value>
            <value>alfresco.messages.common</value>
            <value>alfresco.messages.slingshot</value>
            <value>alfresco.web-extension.messages.kbsite</value>
         </list>
      </property>
   </bean>
I believe this will simply override the webscripts.resources bean inside slingshot-application-context.xml. Obviously it will not support i18n, but the KB app works and the default kbsite message bundle is utilized.

So, what have I done wrong such that the org.alfresco.i18n.ResourceBundleBootstrapComponent class is causing a problem?
Reply With Quote
  #4 (permalink)  
Old June 24th, 2010, 05:00 AM
Registered User
 
Join Date: May 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 15 on V3.3

I get after installing Chapter 15 (14 worked) I get
A problem has occurred.
This page could not be rendered:
slingshot-login
Please notify your system administrator.
In the Log:
INFO: Server startup in 104445 ms
09:20:35,929 ERROR [surf.render.RenderService] Unable to process template: slingshot-login
09:20:35,929 ERROR [extensions.surf.FrameworkUtil] An exception occurred while rendering a page: slingshot-login
09:20:35,930 ERROR [extensions.surf.FrameworkUtil] org.springframework.extensions.surf.exception.Rend ererExecutionException: WebTemplateProcessor failed to process template uri: org/alfresco/global/slingshot-login
Reply With Quote
  #5 (permalink)  
Old July 2nd, 2010, 04:20 AM
Registered User
 
Join Date: Jul 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

If you are using Alfresco 3.3 then the correct I18N class is:
org.springframework.extensions.surf.util.ResourceB undleBootstrapComponent

This is part of the changes of moving to SpringSurf.

Thanks,

Kev
Reply With Quote
  #6 (permalink)  
Old November 22nd, 2010, 12:01 AM
Registered User
 
Join Date: Nov 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Question Chapter 15: Alf 3.3.3 Still not working

Kev,

I ave modified the "custom-slingshot-application-context.xml" to folowing as per your suggestion:
Code:
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>

<beans>
   
   <!-- Override - Add in the custom Knowledge Base Site Messages -->
   <bean id="webscripts.resources" class="org.springframework.extensions.surf.util.ResourceBundleBootstrapComponent">
      <property name="resourceBundles">
         <list>
			<value>alfresco.messages.webscripts</value>
            <value>alfresco.messages.slingshot</value>            
            <value>alfresco.web-extension.messages.kbsite</value>			
         </list>
      </property>
   </bean>
   
</beans>
When i start the server get the error :

A problem has occurred.
This page could not be rendered:
slingshot-login
Please notify your system administrator.


Any help in this regard is appreciated.
Reply With Quote
  #7 (permalink)  
Old November 22nd, 2010, 02:52 AM
Registered User
 
Join Date: Nov 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Thumbs up Solved Chapter 15 in Alf 3.3.3

Modify the custom-slingshot-application-context.xml to

Code:
<!-- Override - Add in the custom Knowledge Base Site Messages -->
   <bean id="webscripts.resources" class="org.springframework.extensions.surf.util.ResourceBundleBootstrapComponent">
      <property name="resourceBundles">
         <list>
	    <value>webscripts.messages.webscripts</value>
            <value>alfresco.messages.common</value>
            <value>alfresco.messages.slingshot</value>
	    <value>alfresco.web-extension.messages.kbsite</value>			
					
         </list>
      </property>
   </bean>
thanks
Balaji
Reply With Quote
  #8 (permalink)  
Old August 22nd, 2011, 11:02 AM
Registered User
 
Join Date: Aug 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy Kev's fix didn't work for me; still get slingshot msg

Well, I copied and pasted the code suggested by Balaji and rebooted, but I still get the message identified by bsampath on Nov 21 2010. I'm on CE 3.4.d so maybe there's something else going on and I should retrograde to 3.3 for purposes of getting through the book. Any suggestions are welcome; but it appears that the rate at which these questions are answered means I'll have either have moved on or given up by the time I see an answer. It's great to have forums and share answers; to bad they're not more "timely". Thanks to Kev for suggesting a solution.

bsampath: did you ever figure out a fix?

Later entry:
I've de-installed 3.4.d and installed 3.3.g and worked through Chapter 14 fine (actually, just 5 and 14). But after I run the bat file for Chapter 15 mods, I cannot launch Share; still get:

A problem has occurred.
This page could not be rendered:
slingshot-login
Please notify your system administrator.

So this definitely seems related to something in the Ch 15 code snippets; but as noted above, the changes (and variations of them) suggested for "custom-slingshot-application-context.xml" don't fix it. Maybe I'll try to plow through Ch 15 anyway.

Dave

Last edited by dkenned; August 22nd, 2011 at 05:25 PM.. Reason: Additional testing
Reply With Quote
  #9 (permalink)  
Old November 24th, 2011, 03:03 PM
Registered User
Points: 3, Level: 1
Points: 3, Level: 1 Points: 3, Level: 1 Points: 3, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Solved for 3.4d

A (seamingly) working custom-slingshot-application-context.xml in community 3.4d is:

Code:
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>

<beans>
  <bean id="webscripts.kb.resources" class="org.springframework.extensions.surf.util.ResourceBundleBootstrapComponent">
      <property name="resourceBundles">
         <list>
            <value>alfresco.web-extension.messages.kbsite</value>
         </list>
      </property>
   </bean>   
</beans>
Regards
Hans Höök
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 16 Fig 16-11 krsouthern BOOK: Professional SharePoint 2007 Development ISBN: 978-0-470-11756-9 1 July 8th, 2008 12:11 PM
Problems in chapter 15 and 16 sgeorgiev BOOK: Ivor Horton's Beginning Visual C++ 2008 ISBN: 978-0-470-22590-5 0 May 7th, 2008 11:57 PM
Chapter 16 czambran BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 3 April 11th, 2005 11:01 AM
Chapter 16 ioda006 JSP Basics 3 August 21st, 2004 07:28 PM
Help in Chapter 16 aldwincusi VB.NET 2002/2003 Basics 2 June 4th, 2003 09:52 AM



All times are GMT -4. The time now is 03:17 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.