[jboss-user] [JBoss Portal] - Can't get Seam application to work as a Portlet

javajedi do-not-reply at jboss.com
Mon Jul 24 20:31:21 EDT 2006


Sorry for the duplicate posting.  The topic somehow got truncated in my last post.

JBoss Portal 2.4.0-CR2
Seam 1.0.0
JBoss 4.0.4

I've got a Seam app that works fine on its own. When I deploy it as a portlet, the initial page of the portlet displays fine, but when I submit a form from that first page, the Seam action doesn't get invoked. The page is just redisplayed.

I've changed FaceletViewHandler and  SeamExtendedManagedPersistencePhaseListener to FaceletPortletViewHandler and SeamExtendedManagedPersistencePortletPhaseListener in faces-config.xml.

I've added very simple jboss-portlet.xml, portlet-instances.xml, portlet.xml, and myapp-object.xml files.

I've commented StartupServletContextListener out of my web.xml.

These are the only changes that I've made to the app from when it was working fine as a standalone Seam application.

Here is the debug output from Seam when the app is running as a portlet, and not working:

2006-07-24 17:14:28,807 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.nami
  | ng.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.n
  | aming:org.jnp.interfaces}
  | 2006-07-24 17:14:28,808 DEBUG [org.jboss.seam.jsf.SeamExtendedManagedPersistencePortletPhaseListener
  | ] beginning transaction prior to phase: RESTORE_VIEW(1)
  | 2006-07-24 17:14:28,808 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.nami
  | ng.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.n
  | aming:org.jnp.interfaces}
  | 2006-07-24 17:14:28,808 DEBUG [org.jboss.seam.contexts.Lifecycle] >>> Begin web request
  | 2006-07-24 17:14:28,808 DEBUG [org.jboss.seam.Component] instantiating Seam component: localeSelecto
  | r
  | 2006-07-24 17:14:28,808 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.nami
  | ng.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.n
  | aming:org.jnp.interfaces}
  | 2006-07-24 17:14:28,809 DEBUG [org.jboss.seam.jsf.SeamExtendedManagedPersistencePortletPhaseListener
  | ] committing transaction after phase: RESTORE_VIEW(1)
  | 2006-07-24 17:14:28,809 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.nami
  | ng.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.n
  | aming:org.jnp.interfaces}
  | 2006-07-24 17:14:28,809 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.sea
  | m.core.manager
  | 2006-07-24 17:14:28,809 DEBUG [org.jboss.seam.core.Manager] No stored conversation
  | 2006-07-24 17:14:28,809 DEBUG [org.jboss.seam.contexts.Contexts] found in application context: org.j
  | boss.seam.core.init
  | 2006-07-24 17:14:28,809 DEBUG [org.jboss.seam.jsf.AbstractSeamPhaseListener] After restoring convers
  | ation context: ConversationContext(2)
  | 2006-07-24 17:14:28,978 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.nami
  | ng.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.n
  | aming:org.jnp.interfaces}
  | 2006-07-24 17:14:28,978 DEBUG [org.jboss.seam.jsf.SeamExtendedManagedPersistencePortletPhaseListener
  | ] beginning transaction prior to phase: RENDER_RESPONSE(6)
  | 2006-07-24 17:14:28,978 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.nami
  | ng.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.n
  | aming:org.jnp.interfaces}
  | 2006-07-24 17:14:28,978 DEBUG [org.jboss.seam.contexts.Lifecycle] >>> Begin web request
  | 2006-07-24 17:14:28,978 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.sea
  | m.core.manager
  | 2006-07-24 17:14:28,978 DEBUG [org.jboss.seam.core.Manager] No stored conversation
  | 2006-07-24 17:14:28,978 DEBUG [org.jboss.seam.contexts.Contexts] found in application context: org.j
  | boss.seam.core.init
  | 2006-07-24 17:14:28,978 DEBUG [org.jboss.seam.jsf.AbstractSeamPhaseListener] After restoring convers
  | ation context: ConversationContext(3)
  | 2006-07-24 17:14:28,979 DEBUG [org.jboss.seam.Component] instantiating Seam component: facesMessages
  | 
  | 2006-07-24 17:14:28,980 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: uploadBean
  | 2006-07-24 17:14:28,980 DEBUG [org.jboss.seam.Component] instantiating Seam component: uploadBean
  | 2006-07-24 17:14:28,980 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolved name to seam compon
  | ent
  | 2006-07-24 17:14:28,981 DEBUG [org.jboss.seam.core.Manager] Discarding conversation state: 3
  | 2006-07-24 17:14:28,981 DEBUG [org.jboss.seam.contexts.Lifecycle] flushing page context
  | 2006-07-24 17:14:28,983 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.nami
  | ng.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.n
  | aming:org.jnp.interfaces}
  | 2006-07-24 17:14:28,983 DEBUG [org.jboss.seam.jsf.SeamExtendedManagedPersistencePortletPhaseListener
  | ] committing transaction after phase: RENDER_RESPONSE(6)
  | 2006-07-24 17:14:28,983 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.nami
  | ng.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.n
  | aming:org.jnp.interfaces}
  | 2006-07-24 17:14:28,983 DEBUG [org.jboss.seam.contexts.Lifecycle] After render response, destroying 
  | contexts
  | 2006-07-24 17:14:28,983 DEBUG [org.jboss.seam.contexts.Lifecycle] destroying event context
  | 2006-07-24 17:14:28,983 DEBUG [org.jboss.seam.contexts.Contexts] destroying: uploadBean
  | 2006-07-24 17:14:28,983 DEBUG [org.jboss.seam.contexts.Contexts] destroying: org.jboss.seam.core.man
  | ager
  | 2006-07-24 17:14:28,984 DEBUG [org.jboss.seam.contexts.Lifecycle] destroying conversation context
  | 2006-07-24 17:14:28,984 DEBUG [org.jboss.seam.contexts.Contexts] destroying: facesMessages
  | 2006-07-24 17:14:28,984 DEBUG [org.jboss.seam.contexts.Lifecycle] flushing server-side conversation 
  | context
  | 2006-07-24 17:14:28,984 DEBUG [org.jboss.seam.contexts.Lifecycle] <<< End web request
  | 2006-07-24 17:18:08,577 DEBUG [org.jboss.seam.contexts.Lifecycle] destroying event context
  | 2006-07-24 17:18:08,577 DEBUG [org.jboss.seam.contexts.Lifecycle] destroying event context	



Here is the same debug output from the working, non-portlet version of the same app:

2006-07-24 17:21:55,963 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.nami
  | ng.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.n
  | aming:org.jnp.interfaces}
  | 2006-07-24 17:21:55,963 DEBUG [org.jboss.seam.jsf.SeamExtendedManagedPersistencePhaseListener] begin
  | ning transaction prior to phase: RESTORE_VIEW(1)
  | 2006-07-24 17:21:55,963 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.nami
  | ng.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.n
  | aming:org.jnp.interfaces}
  | 2006-07-24 17:21:55,964 DEBUG [org.jboss.seam.contexts.Lifecycle] >>> Begin web request
  | 2006-07-24 17:21:56,517 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.sea
  | m.core.manager
  | 2006-07-24 17:21:56,518 DEBUG [org.jboss.seam.core.Manager] No stored conversation
  | 2006-07-24 17:21:56,518 DEBUG [org.jboss.seam.contexts.Contexts] found in application context: org.j
  | boss.seam.core.init
  | 2006-07-24 17:21:56,518 DEBUG [org.jboss.seam.jsf.AbstractSeamPhaseListener] After restoring convers
  | ation context: ConversationContext(2)
  | 2006-07-24 17:21:56,519 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: uploadBean
  | 2006-07-24 17:21:56,519 DEBUG [org.jboss.seam.Component] instantiating Seam component: uploadBean
  | 2006-07-24 17:21:56,519 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolved name to seam compon
  | ent
  | 2006-07-24 17:21:56,520 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: uploadBean
  | 2006-07-24 17:21:56,520 DEBUG [org.jboss.seam.contexts.Contexts] found in event context: uploadBean
  | 2006-07-24 17:21:56,520 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolved name to seam compon
  | ent
  | 2006-07-24 17:21:56,523 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: perfImportUp
  | loadAction
  | 2006-07-24 17:21:56,523 DEBUG [org.jboss.seam.Component] instantiating Seam component: perfImportUpl
  | oadAction
  | 2006-07-24 17:21:56,523 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.nami
  | ng.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.n
  | aming:org.jnp.interfaces}
  | 2006-07-24 17:21:56,523 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolved name to seam compon
  | ent
  | 2006-07-24 17:21:56,538 DEBUG [org.jboss.seam.Component] instantiating Seam component: fooPerfImport
  | er
  | 2006-07-24 17:21:56,538 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.nami
  | ng.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.n
  | aming:org.jnp.interfaces}
  | 2006-07-24 17:21:56,539 DEBUG [org.jboss.seam.contexts.Contexts] found in event context: uploadBean
  | 2006-07-24 17:21:56,539 INFO  [MyActionBean] 
  | HERE IS WHERE THE SEAM ACTION GETS INVOKED
  | 
  | 2006-07-24 17:21:56,542 DEBUG [org.jboss.seam.Component] instantiating Seam component: hibSession
  | 2006-07-24 17:21:56,551 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.nami
  | ng.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.n
  | aming:org.jnp.interfaces}
  | 2006-07-24 17:21:56,756 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.nami
  | ng.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.n
  | aming:org.jnp.interfaces}
  | 2006-07-24 17:21:56,757 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.nami
  | ng.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.n
  | aming:org.jnp.interfaces}
  | 2006-07-24 17:21:56,757 DEBUG [org.jboss.seam.jsf.SeamExtendedManagedPersistencePhaseListener] commi
  | tting transaction after phase: INVOKE_APPLICATION(5)
  | 2006-07-24 17:21:56,757 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.nami
  | ng.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.n
  | aming:org.jnp.interfaces}
  | 2006-07-24 17:21:56,758 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.nami
  | ng.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.n
  | aming:org.jnp.interfaces}
  | 2006-07-24 17:21:56,759 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.nami
  | ng.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.n
  | aming:org.jnp.interfaces}
  | 2006-07-24 17:21:56,759 DEBUG [org.jboss.seam.jsf.SeamExtendedManagedPersistencePhaseListener] begin
  | ning transaction prior to phase: RENDER_RESPONSE(6)
  | 2006-07-24 17:21:56,759 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.nami
  | ng.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.n
  | aming:org.jnp.interfaces}
  | 2006-07-24 17:21:56,760 DEBUG [org.jboss.seam.Component] instantiating Seam component: facesMessages
  | 
  | 2006-07-24 17:21:56,762 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: uploadBean
  | 2006-07-24 17:21:56,762 DEBUG [org.jboss.seam.contexts.Contexts] found in event context: uploadBean
  | 2006-07-24 17:21:56,762 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolved name to seam compon
  | ent
  | 2006-07-24 17:21:56,763 DEBUG [org.jboss.seam.core.Manager] Discarding conversation state: 2
  | 2006-07-24 17:21:56,767 DEBUG [org.jboss.seam.contexts.Lifecycle] flushing page context
  | 2006-07-24 17:21:56,776 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.nami
  | ng.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.n
  | aming:org.jnp.interfaces}
  | 2006-07-24 17:21:56,777 DEBUG [org.jboss.seam.jsf.SeamExtendedManagedPersistencePhaseListener] commi
  | tting transaction after phase: RENDER_RESPONSE(6)
  | 2006-07-24 17:21:56,777 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.nami
  | ng.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.n
  | aming:org.jnp.interfaces}
  | 2006-07-24 17:21:56,778 DEBUG [org.jboss.seam.jsf.SeamExtendedManagedPersistencePhaseListener] Trans
  | action: org.jboss.tm.usertx.client.ServerVMClientUserTransaction at be8dd0, UserTransaction
  | 2006-07-24 17:21:56,778 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.nami
  | ng.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.n
  | aming:org.jnp.interfaces}
  | 2006-07-24 17:21:56,778 DEBUG [org.jboss.seam.contexts.Lifecycle] After render response, destroying 
  | contexts
  | 2006-07-24 17:21:56,778 DEBUG [org.jboss.seam.contexts.Lifecycle] destroying event context
  | 2006-07-24 17:21:56,778 DEBUG [org.jboss.seam.contexts.Contexts] destroying: uploadBean
  | 2006-07-24 17:21:56,779 DEBUG [org.jboss.seam.contexts.Contexts] destroying: org.jboss.seam.core.man
  | ager
  | 2006-07-24 17:21:56,779 DEBUG [org.jboss.seam.contexts.Lifecycle] destroying conversation context
  | 2006-07-24 17:21:56,779 DEBUG [org.jboss.seam.contexts.Contexts] destroying: hibSession
  | 2006-07-24 17:21:56,779 DEBUG [org.jboss.seam.contexts.Contexts] destroying: facesMessages
  | 2006-07-24 17:21:56,780 DEBUG [org.jboss.seam.contexts.Lifecycle] flushing server-side conversation 
  | context
  | 2006-07-24 17:21:56,780 DEBUG [org.jboss.seam.contexts.Lifecycle] <<< End web request
  | 2006-07-24 17:21:56,780 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.nami
  | ng.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.n
  | aming:org.jnp.interfaces}	
  | 
  | 

Any suggestions as to what I might be doing wrong? Is there some extra missing piece of glue between Seam and Portal that I need?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3960552#3960552

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3960552



More information about the jboss-user mailing list