[JBoss Seam] - problem with booking example in jboss-seam-1.2.1.GA.zip
by plchen65
I am new in Seam. I downloaded jboss-seam-1.2.1.GA.zip in 07/26/07 and unzipped it. I followed the instructions and deployed booking example. JBoss came up fine.
I could go to app by http://localhost:8080/seam-booking/. I then clicked "Register New User" link and tried to register. I typed Username. As soon as I moved the cursor to Real Name, the debug page appeared with the following message.
Do I need to do anything before I can run this example??
Any help is highly appreciated.
javax.naming.NameNotFoundException: RegisterAction not bound
[org.jnp.server.NamingServer.getBinding(NamingServer.java:529), org.jnp.server.NamingServer.getBinding(NamingServer.java:537), org.jnp.server.NamingServer.getObject(NamingServer.java:543), org.jnp.server.NamingServer.lookup(NamingServer.java:267), org.jnp.server.NamingServer.lookup(NamingServer.java:270), org.jnp.interfaces.NamingContext.lookup(NamingContext.java:625), org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587), javax.naming.InitialContext.lookup(InitialContext.java:351), org.jboss.seam.Component.instantiateSessionBean(Component.java:1107), org.jboss.seam.Component.instantiate(Component.java:1093), org.jboss.seam.Component.newInstance(Component.java:1736), org.jboss.seam.Component.getInstance(Component.java:1643), org.jboss.seam.Component.getInstance(Component.java:1610), org.jboss.seam.jsf.SeamVariableResolver.resolveVariable(SeamVariableResolver.java:53), org.apache.myfaces.config.LastVariableResolverInChain.resolveVariable(LastVariableResolverInChain.java:42), com.sun.facelets.el.LegacyELContext$LegacyELResolver.getValue(LegacyELContext.java:134), com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:73), com.sun.el.parser.AstValue.getTarget(AstValue.java:67), com.sun.el.parser.AstValue.getType(AstValue.java:56), com.sun.el.ValueExpressionImpl.getType(ValueExpressionImpl.java:183), com.sun.facelets.el.TagValueExpression.getType(TagValueExpression.java:60), com.sun.facelets.el.LegacyValueBinding.getType(LegacyValueBinding.java:94), org.apache.myfaces.shared_impl.renderkit._SharedRendererUtils.findUIOutputConverter(_SharedRendererUtils.java:55), org.apache.myfaces.shared_impl.renderkit.RendererUtils.findUIOutputConverter(RendererUtils.java:316), org.apache.myfaces.shared_impl.renderkit.RendererUtils.getConvertedUIOutputValue(RendererUtils.java:636), org.apache.myfaces.shared_impl.renderkit.html.HtmlSecretRendererBase.getConvertedValue(HtmlSecretRendererBase.java:106), javax.faces.component.UIInput.getConvertedValue(UIInput.java:395), javax.faces.component.UIInput.validate(UIInput.java:349), javax.faces.component.UIInput.processValidators(UIInput.java:183), javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:624), javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:624), javax.faces.component.UIForm.processValidators(UIForm.java:70), javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:624), javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:146), org.ajax4jsf.framework.ajax.AjaxViewRoot.access$201(AjaxViewRoot.java:53), org.ajax4jsf.framework.ajax.AjaxViewRoot$3.invokeRoot(AjaxViewRoot.java:302), org.ajax4jsf.framework.ajax.JsfOneOneInvoker.invokeOnRegionOrRoot(JsfOneOneInvoker.java:54), org.ajax4jsf.framework.ajax.AjaxContext.invokeOnRegionOrRoot(AjaxContext.java:176), org.ajax4jsf.framework.ajax.AjaxViewRoot.processValidators(AjaxViewRoot.java:315), org.apache.myfaces.lifecycle.LifecycleImpl.processValidations(LifecycleImpl.java:262), org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:76), javax.faces.webapp.FacesServlet.service(FacesServlet.java:137), org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252), org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173), org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63), org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:60), org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49), org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45), org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49), org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57), org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49), org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79), org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49), org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84), org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202), org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173), org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:96), org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:220), org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202), org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173), org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96), org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202), org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173), org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213), org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178), org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175), org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74), org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126), org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105), org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156), org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107), org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148), org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869), org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664), org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527), org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112), java.lang.Thread.run(Thread.java:595)]
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4068853#4068853
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4068853
18Â years, 8Â months
[JBoss Seam] - IllegalStateException after redeploy
by dietmaier
Hi,
this error has bugged me for 2 days now:
I get an
java.lang.IllegalStateException: pageflow is not currently at a or <start-page> node (note that pageflows that begin during the RENDER_RESPONSE phase should use <start-page> instead of <start-state>)
when accessing the start-page of the pageflow, but only after redeploying the EAR into the server. Said exception is also thrown when accessing the splash.seam page from a newly started browser after having deleted all cookies and history. Behaivour is as expected after the server is restarted.
I am using: Seam 2.0.0.BETA1, Jbpm 3.2.1, JBoss 4.2.1
This worked well back in the good old days (seam 1.2.0.PATCH1, Jbpm 3.2GA on JBoss 4.0.5GA)
>From reading the code I gather that the FacesManager is under the impression that there is some pageflow active, but the pageflow itself ist not currently at a page node -- how can this be?
Any pointers are much appreciated.
regards,
Thomas.
The pageflow definition:
| <?xml version="1.0" encoding="UTF-8"?>
|
| <pageflow-definition name="main">
| <start-page name="splash" view-id="/mde/splash.xhtml" login-required="false">
| <redirect/>
| <transition name="next" to="login"></transition>
| </start-page>
| <page name="login" view-id="/mde/login.xhtml" login-required="false">
| [...]
| </pageflow-definition>
|
and also my pages.xml:
| <pages no-conversation-view-id="/mde/splash.xhtml">
| <page view-id="/mde/splash.xhtml" login-required="false">
| <begin-conversation pageflow="main" join="true"/>
| </page>
| [...]
|
Here is the complete stacktrace:
| 20:27:28,701 ERROR [SeamPhaseListener] uncaught exception
| java.lang.IllegalStateException: pageflow is not currently at a <page> or <start-page> node (note that pageflows that begin during the RENDER_RESPONSE phase should use <start-page> instead of <start-state>)
| at org.jboss.seam.pageflow.Pageflow.getPage(Pageflow.java:215)
| at org.jboss.seam.faces.FacesManager.prepareBackswitch(FacesManager.java:239)
| at org.jboss.seam.jsf.SeamPhaseListener.beforeRender(SeamPhaseListener.java:488)
| at org.jboss.seam.jsf.SeamPhaseListener.beforeServletPhase(SeamPhaseListener.java:146)
| at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:116)
| at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:222)
| at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at at.dataphone.logis2.system.UiProtocol.doFilter(UiProtocol.java:28)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at at.dataphone.logis2.system.RequestLogger.doFilter(RequestLogger.java:25)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
| at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:87)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:63)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:46)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
| at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
| at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:40)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:140)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| 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:230)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
| at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
| at java.lang.Thread.run(Unknown Source)
| 20:27:28,717 ERROR [SeamPhaseListener] swallowing exception
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4068849#4068849
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4068849
18Â years, 8Â months
[JBoss Portal] - JSF Portlet tutorial out of date?
by desropolis
I have been following the Portlet Tutorials that I downloaded with JBoss Portal 2.6.1 and have hit a snag. The HelloWorldJSFPortlet should extend a MyFaces portlet. JBoss AS 4.2.1 ships with Sun's RI, not MyFaces.
I get this error:
14:30:37,096 ERROR [[/helloworldjsfportlet]] Error configuring application listener of class org.apache.myfaces.webapp.StartupServletContextListener
java.lang.ClassNotFoundException: org.apache.myfaces.webapp.StartupServletContextListener
Looking at the logs I see that Portal DOES use MyFaces, though. How do I bundle my portlet war to access MyFaces? Where do I deploy it?
Thanks,
Dean
PS I am using the downloaded jboss-portal-2.6.1.GA. It bundled JBoss AS (4.2.1?). I'm not using a db apart from whatever Portal uses OOTB. SUsE 10.x.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4068848#4068848
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4068848
18Â years, 8Â months
[JBoss Portal] - Re: Portal Authentication with Acegi
by FunkyWalker
Okay, I was able to make it work. There is one thing not mentionned anywhere and it's crucial to do it before it can work. You have to activate the SynchronizingLoginModule in login-config.xml.
<login-module code="org.jboss.portal.identity.auth.SynchronizingLoginModule" flag="optional">
| <module-option name="synchronizeIdentity">true</module-option>
| <module-option name="synchronizeRoles">true</module-option>
| <module-option name="additionalRole">Authenticated</module-option>
| <module-option name="defaultAssignedRole">User</module-option>
| <module-option name="userModuleJNDIName">java:/portal/UserModule</module-option>
| <module-option name="roleModuleJNDIName">java:/portal/RoleModule</module-option>
| <module-option name="membershipModuleJNDIName">java:/portal/MembershipModule</module-option>
| <module-option name="userProfileModuleJNDIName">java:/portal/UserProfileModule</module-option>
| </login-module>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4068847#4068847
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4068847
18Â years, 8Â months
[JBoss Seam] - Re: Seam 2, pages.xml and pageflow
by rlhr
So I'm still struggling with that issue. I created a small example based on the numberguess example that reproduce the problem (zip file available if needed).
I have the following classes:
| @Name("user")
| @Scope(ScopeType.CONVERSATION)
| public class User implements Serializable {
|
| private String pet;
|
| public String getPet() {
| return pet;
| }
|
| public void setPet(String pet) {
| this.pet = pet;
| }
| }
|
| @Name("navigation")
| @Scope(ScopeType.CONVERSATION)
| public class Navigation implements Serializable {
|
| @In(required=true)
| User user;
|
| @Logger
| private Log log;
|
| public String animalOutcome(){
| if (user == null){
| return "Dog"; // Just to make sure we don't return null
| }
| log.info("********* Outcome: " + user.getPet());
| return user.getPet();
| }
|
| public User getUser() {
| return user;
| }
|
| public void setUser(User user) {
| this.user = user;
| }
| }
|
| @Name("animals")
| public class AnimalList
| {
|
| private List<String> animals;
|
| @Unwrap
| public List<String> unwrap()
| {
| if (animals == null)
| {
| animals = new ArrayList<String>();
| animals.add("Dog");
| animals.add("Cat");
| animals.add("Goldfish");
| animals.add("Rabbit");
| animals.add("Snake");
| animals.add("Parrot");
| }
| return animals;
| }
| }
|
Pages.xhtml is defined as followed:
| <pages xmlns="http://jboss.com/products/seam/pages"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.0.xsd">
|
| <page view-id="/pageOne.xhtml">
| <begin-conversation join="true" pageflow="navigation" />
| </page>
|
| <page view-id="/animalPage.xhtml" action="#{navigation.animalOutcome}">
| <navigation>
| <rule if-outcome="Dog">
| <redirect view-id="/animal/dog.xhtml"/>
| </rule>
| <rule if-outcome="Cat">
| <redirect view-id="/animal/cat.xhtml"/>
| </rule>
| <rule if-outcome="Goldfish">
| <redirect view-id="/animal/goldfish.xhtml"/>
| </rule>
| <rule if-outcome="Rabbit">
| <redirect view-id="/animal/rabbit.xhtml"/>
| </rule>
| <rule if-outcome="Snake">
| <redirect view-id="/animal/snake.xhtml"/>
| </rule>
| <rule if-outcome="Parrot">
| <redirect view-id="/animal/parrot.xhtml"/>
| </rule>
| </navigation>
| </page>
|
| </pages>
|
The pageflow is defined as:
| <pageflow-definition
| xmlns="http://jboss.com/products/seam/pageflow"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://jboss.com/products/seam/pageflow http://jboss.com/products/seam/pageflow-2.0.xsd"
| name="navigation">
|
| <start-page name="displayChoice" view-id="/pageOne.xhtml">
| <redirect/>
| <transition name="next" to="animalPage" />
| </start-page>
|
| <page name="animalPage" view-id="/animalPage.xhtml">
| <end-conversation/>
| <redirect/>
| </page>
|
| </pageflow-definition>
|
And finally the pageOne.xhtml:
| <html xmlns="http://www.w3.org/1999/xhtml"
| xmlns:c="http://java.sun.com/jstl/core"
| xmlns:ui="http://java.sun.com/jsf/facelets"
| xmlns:h="http://java.sun.com/jsf/html"
| xmlns:f="http://java.sun.com/jsf/core"
| xmlns:s="http://jboss.com/products/seam/taglib">
|
| <head>
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
| <title>Test Navigation</title>
| </head>
|
| <body>
| <div id="container">
| <h3>Choose an animal</h3>
| <h:form>
| <h:selectOneMenu value="#{user.pet}">
| <s:selectItems value="#{animals}" var="animal" label="#{animal}" noSelectionLabel="Select your pet"/>
| </h:selectOneMenu>
|
| <h:commandButton value="Go To Pet Page" action="next" />
| </h:form>
| </div>
| </body>
| </html>
|
When I select an animal, I get the following stacktrace:
| INFO: Added Library from: jar:file:/C:/Jboss/jboss-4.2.0.GA/server/default/tmp/d
| eploy/tmp50163navigation.ear-contents/navigation-exp.war/WEB-INF/lib/jsf-facelet
| s.jar!/META-INF/jstl-core.taglib.xml
| 13:23:07,046 INFO [Navigation] ********* Outcome: Cat
| 13:23:07,218 INFO [Navigation] ********* Outcome: Cat
| 13:23:07,281 INFO [Navigation] ********* Outcome: Cat
| 13:23:07,359 INFO [Navigation] ********* Outcome: Cat
| 13:23:07,437 INFO [Navigation] ********* Outcome: Cat
| 13:23:07,515 INFO [Navigation] ********* Outcome: Cat
| 13:23:07,609 INFO [Navigation] ********* Outcome: Cat
| 13:23:07,687 INFO [Navigation] ********* Outcome: Cat
| 13:23:07,781 INFO [Navigation] ********* Outcome: Cat
| 13:23:07,859 INFO [Navigation] ********* Outcome: Cat
|
This is the stacktrace using firefox (FF detects the loop and stop the recursion). On IE, the loop never ends.
I tried to debug but I didn't really find where the problem lies. I also tried to change the pages.xml definition and played around quite bit.
If I move the outcome definition in faces-config.xml, I get the same problem. That problem occurs only with Seam 2 (Seam 1.2.2 works fine).
So as a conclusion, I'm stuck :)
Do I do anything wrong? Is that a bug?
If someone want to code, I can upload a zip of the files somewhere.
Thanks.
Richard
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4068844#4068844
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4068844
18Â years, 8Â months