cancel
Showing results for 
Search instead for 
Did you mean: 

amp install in alfresco.war

anto
Champ in-the-making
Champ in-the-making
hi,

In my project, i have created new beans and overriden Browsebean in META-INF/faces-config.xml.
In my amp file , i have placed this file in lib/jar/meta-inf.When i install my amp file in alfresco.war and test custom functionalities in the webclient i have this exception:


org.alfresco.error.AlfrescoRuntimeException: Failed to start wizard as managed bean 'CreateMeetingFolderWizard' has not been defined



org.alfresco.error.AlfrescoRuntimeException: Failed to start wizard as managed bean 'CreateMeetingFolderWizard' has not been defined
at org.alfresco.web.bean.wizard.WizardManager.setCurrentWizard(WizardManager.java:100)
at org.alfresco.web.app.AlfrescoNavigationHandler.handleWizardOpen(AlfrescoNavigationHandler.java:575)
at org.alfresco.web.app.AlfrescoNavigationHandler.handleNavigation(AlfrescoNavigationHandler.java:115)
at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:84)
at javax.faces.component.UICommand.broadcast(UICommand.java:106)
at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:90)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:164)
at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:316)
at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:105)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.alfresco.web.app.servlet.AuthenticationFilter.doFilter(AuthenticationFilter.java:81)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)


Is there anyone who can help me?
Thanks.
anto
4 REPLIES 4

berkie
Champ in-the-making
Champ in-the-making
The amp package should contain a jar file in the lib folder, containing all classes.
The faces-config.xml file should be in the META-INF/ folder of your jar file.

If you inject the amp file in the war, the beans will be loaded automatically by alfresco.

anto
Champ in-the-making
Champ in-the-making
The amp package should contain a jar file in the lib folder, containing all classes.
The faces-config.xml file should be in the META-INF/ folder of your jar file.

If you inject the amp file in the war, the beans will be loaded automatically by alfresco.

In my amp package i have a lib folder containing the jar file.In the jar file i have  a meta-inf folder containing two files :faces-config.xml and MANIFEST.MF.I also have all the .classes in the jar file with this structure:

meeting-extension.jar\com\atosorigin\meeting\beans\CreateMeetingFolderWizard.class

I have installed my amp file in the war successfully but it seems like the beans are not loaded.
Am I missing something?

Thanks.
Anto.

berkie
Champ in-the-making
Champ in-the-making
The structure you describe looks correct. I do this the same way and my beans are loaded correctly.

Are you sure the amp file is installed correctly? Check the WEB-INF/lib folder of the resulting alfresco war to make sure the jar file is present.

Are you sure you don't have a typo in you bean or wizard definition?

To make sure the faces bean is loaded, enable debug logging after deploying alfresco.

In log4j.xml (WEB-INF/classes):
Replace
log4j.logger.org.apache.myfaces.util.DebugUtils=info
log4j.logger.org.apache.myfaces.el.VariableResolverImpl=error
log4j.logger.org.apache.myfaces.application.jsp.JspViewHandlerImpl=error
log4j.logger.org.apache.myfaces.taglib=error
by
log4j.logger.org.apache.myfaces=debug

In the server startup you should see something like this:
11:43:50,976 INFO  [myfaces.config.FacesConfigurator] Reading config jar:file:/C:/Alfresco/tomcat/webapps/alfresco/WEB-INF/lib/tax
onomy.jar!/META-INF/faces-config.xml

anto
Champ in-the-making
Champ in-the-making
I have repeated all the steps with a clean alfresco, and this is what happens:
1)  After running ModuleManager.bat

C:\Progs\alfresco-community-tomcat-2.0.0\extras\Module-Management>ModuleManager.bat install C:\devel\workspace\Alfrenda\build\dist\meeeting-extension.amp C:\Pro
gs\alfresco-community-tomcat-2.0.0\tomcat\webapps\alfresco.war  -verbose
Installing AMP 'C:\devel\workspace\Alfrenda\build\dist\meeeting-extension.amp' into WAR 'C:\Progs\alfresco-community-tomcat-2.0.0\tomcat\webapps\alfresco.war'
log4j:WARN No appenders could be found for logger (org.alfresco.repo.extension.ModuleManagementTool).
log4j:WARN Please initialize the log4j system properly.
WAR has been backed up to 'C:\Progs\alfresco-community-tomcat-2.0.0\tomcat\webapps\alfresco.war-1178274538800.bak'
Adding files relating to version '1.0' of module 'meetingAmp'
   - File '/WEB-INF/lib/meeting-extension.jar' added to war from amp


2)I have checked WEB-INF/lib in the resulting alfresco.war and  the jar file has been added and  contains the faces-config.xml file in meta-inf folder

3) i have enabled debug in log4j.properties in WEB-INF/classes and i don't have any information about loading faces-config.xml:

INFO: Deploying web application archive alfresco.war
13:36:29,576 DEBUG [myfaces.webapp.StartupServletContextListener] Initializing MyFaces
13:36:30,014 INFO  [myfaces.config.FacesConfigurator] Reading standard config org/apache/myfaces/resource/standard-faces-config.xml
13:36:30,530 INFO  [myfaces.config.FacesConfigurator] Reading config /WEB-INF/faces-config-app.xml
13:36:30,577 INFO  [myfaces.config.FacesConfigurator] Reading config /WEB-INF/faces-config-beans.xml
13:36:31,140 INFO  [myfaces.config.FacesConfigurator] Reading config /WEB-INF/faces-config-navigation.xml
13:36:31,187 INFO  [myfaces.config.FacesConfigurator] Reading config /WEB-INF/faces-config-common.xml
13:36:31,250 INFO  [myfaces.config.FacesConfigurator] Reading config /WEB-INF/faces-config-repo.xml
13:36:31,281 INFO  [myfaces.config.FacesConfigurator] Reading config /WEB-INF/faces-config-wcm.xml
13:36:31,297 INFO  [myfaces.config.FacesConfigurator] Reading config WEB-INF/faces-config-custom.xml
13:36:31,312 INFO  [myfaces.config.FacesConfigurator] Reading config /WEB-INF/faces-config-enterprise.xml

What do you think is wrong?What is a "typo"(cfr. your previous post)?

Thanks.
Anto.