[jboss-user] [JBoss Seam] - Re: Seam 1.2.1, AS 4.2.1, @Restricted method gives NoClassDe

tynor do-not-reply at jboss.com
Wed Aug 1 14:02:26 EDT 2007


I am seeing exactly the same bizzare behavior. My app works fine (s:hasRole() apparently working since my menu.xhtml is evaluating ok), until I click on a Save button (though oddly, I can click Delete on the same form without any trouble).  Exception at the bottom of this post.

I have a Seam 1.2.1GA based app (originally created via seamgen) that I'm trying to run on AS 4.2.1 and have made the following changes thus far: 

Added files:
lib/jsf-impl.jar
  | lib/jsf-api.jar
  | 
Removed files: 
lib/el-api.jar
  | lib/myfaces-impl-1.1.4.jar
  | lib/myfaces-api-1.1.4.jar
  | 

and various edits: 

Index: build.properties
  | ===================================================================
  | --- build.properties	(revision 186)
  | +++ build.properties	(working copy)
  | @@ -1 +1,2 @@
  | -jboss.home = C:/Program Files/jboss-4.0.5.GA
  | +jboss.home = C:/Program Files/jboss-4.2.1.GA
  | Index: build.xml
  | ===================================================================
  | --- build.xml	(revision 203)
  | +++ build.xml	(working copy)
  | @@ -211,7 +212,11 @@
  |                                  <include name="drools-*.jar"/>
  |                                  <include name="janino-*.jar"/>
  |                                  <include name="antlr-*.jar"/>
  | +                                <include name="commons-beanutils-*.jar"/>
  | +                                <include name="commons-collections-*.jar"/>
  | +                                <include name="commons-digester-*.jar"/>
  |                                  <include name="commons-jci-*.jar"/>
  | +                                <include name="commons-lang-*.jar"/>
  |                                  <include name="stringtemplate-*.jar"/>
  |                          </fileset>
  |                  </copy>
  | Index: resources/WEB-INF/faces-config.xml
  | ===================================================================
  | --- resources/WEB-INF/faces-config.xml	(revision 186)
  | +++ resources/WEB-INF/faces-config.xml	(working copy)
  | @@ -1,9 +1,8 @@
  |  <?xml version='1.0' encoding='UTF-8'?>
  | -<!DOCTYPE faces-config PUBLIC
  | -          "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
  | -          "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
  | -
  | -<faces-config>
  | +<faces-config version="1.2"
  | +   xmlns="http://java.sun.com/xml/ns/javaee"
  | +   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  | +   xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
  |  
  |     <application>
  |        <message-bundle>messages</message-bundle>
  | @@ -11,6 +10,7 @@
  |        <!--
  |        <view-handler>org.jboss.seam.ui.facelet.SeamFaceletViewHandler</view-handler>
  |        -->
  | +        <el-resolver>org.jboss.seam.jsf.SeamELResolver</el-resolver>
  |     </application>
  |  
  |     <!-- Seam transaction management -->
  | Index: resources/WEB-INF/web.xml
  | ===================================================================
  | --- resources/WEB-INF/web.xml	(revision 186)
  | +++ resources/WEB-INF/web.xml	(working copy)
  | @@ -63,11 +63,11 @@
  |        <url-pattern>/seam/resource/*</url-pattern>
  |     </servlet-mapping>
  |     
  | -   <!-- MyFaces -->   
  | -
  | +<!-- required for jboss prior to 4.2.x 
  |     <listener>
  |        <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
  |     </listener>
  | +-->
  |     
  |     <!-- Facelets development mode (disable in production) -->
  |     
  | Index: resources/META-INF/application.xml
  | ===================================================================
  | --- resources/META-INF/application.xml	(revision 186)
  | +++ resources/META-INF/application.xml	(working copy)
  | @@ -21,9 +21,11 @@
  |     <module>
  |         <java>jboss-seam.jar</java>
  |     </module>   
  | +<!-- disable for Sun RI / JBoss 4.2.x 
  |     <module>
  |        <java>el-api.jar</java>
  |     </module>
  | +-->
  |     <module>
  |        <java>el-ri.jar</java>
  |     </module>
  | @@ -56,6 +58,18 @@
  |        <java>commons-jci-janino-2.4.3.jar</java>
  |     </module>
  |     <module>
  | +      <java>commons-digester-1.6.jar</java>
  | +   </module>
  | +   <module>
  | +      <java>commons-collections-3.1.jar</java>
  | +   </module>
  | +   <module>
  | +      <java>commons-beanutils-1.7.0.jar</java>
  | +   </module>
  | +   <module>
  | +      <java>commons-lang-2.1.jar</java>
  | +   </module>
  | +   <module>
  |        <java>stringtemplate-2.3b6.jar</java>
  |     </module>


Here's the exception:
javax.faces.FacesException: javax.el.ELException: /WEB-INF/facelets/templates/mainmenu.xhtml @17,87 rendered="#{s:hasRole('ROLE_INVESTMENTS')}": Function 's:hasRole' not found
  | 	at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:373)
  | 	at org.ajax4jsf.framework.renderer.RendererBase.renderChild(RendererBase.java:276)
  | 	at org.richfaces.renderkit.html.ToolBarGroupRenderer.encodeChildren(ToolBarGroupRenderer.java:68)
  | 	at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
  | 	at org.ajax4jsf.framework.renderer.RendererBase.renderChild(RendererBase.java:282)
  | 	at org.richfaces.renderkit.html.ToolBarRendererBase.encodeChildren(ToolBarRendererBase.java:81)
  | 	at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
  | 	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
  | 	at javax.faces.render.Renderer.encodeChildren(Renderer.java:137)
  | 	at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
  | 	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
  | 	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
  | 	at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:571)
  | 	at org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
  | 	at org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:233)
  | 	at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
  | 	at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
  | 	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 org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
  | 	at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:60)
  | 	at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
  | 	at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
  | 	at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
  | 	at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
  | 	at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
  | 	at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79)
  | 	at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
  | 	at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84)
  | 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  | 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  | 	at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
  | 	at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
  | 	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(Thread.java:595)
  | Caused by: javax.el.ELException: /WEB-INF/facelets/templates/mainmenu.xhtml @17,87 rendered="#{s:hasRole('ROLE_INVESTMENTS')}": Function 's:hasRole' not found
  | 	at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:76)
  | 	at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:370)
  | 	... 53 more
  | 
  | 

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

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



More information about the jboss-user mailing list