It looks as if you'd have several versions of MyFaces-jars around, and
some class gets loaded from a different class-loader and this is why
you get a ClassCast-exception.
Did you clean out everything?
Tried to get rid of the MyFaces jars included in JBoss?
regards,
Martin
On 9/12/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
I tried to add this to my web.xml:
<filter>
<filter-name>MyFacesExtensionsFilter</filter-name>
<filter-class>org.apache.myfaces.component.html.util.ExtensionsFilter</filte
r-class>
<init-param>
<param-name>maxFileSize</param-name>
<param-value>20m</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>MyFacesExtensionsFilter</filter-name>
<url-pattern>/faces/*</url-pattern>
</filter-mapping>
But I am still getting the same error (I apparently don't need these
filters, the problem comes from somewhere else I guess):
ERROR
[org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/alfresco].
[jsp]] Servlet.service() for servlet jsp threw exception
java.lang.ClassCastException: org.apache.myfaces.config.MyfacesConfig
at
org.apache.myfaces.config.MyfacesConfig.getCurrentInstance(MyfacesConfig.jav
a:45)
at
org.apache.myfaces.renderkit.html.HtmlRendererUtils.writePrettyLineSeparator
(HtmlRendererUtils.java:462)
at
org.apache.myfaces.renderkit.html.HtmlTableRendererBase.encodeBegin(HtmlTabl
eRendererBase.java:71)
at
org.apache.myfaces.renderkit.html.ext.HtmlTableRenderer.encodeBegin(HtmlTabl
eRenderer.java:38)
at
javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:307)
at javax.faces.component.UIData.encodeBegin(UIData.java:360)
at
javax.faces.component.html.HtmlDataTable.encodeBegin(HtmlDataTable.java:36)
at
org.apache.myfaces.component.html.ext.HtmlDataTableHack.encodeBegin(HtmlData
TableHack.java:126)
at
org.apache.myfaces.component.html.ext.HtmlDataTable.encodeBegin(HtmlDataTabl
e.java:312)
at
javax.faces.webapp.UIComponentTag.encodeBegin(UIComponentTag.java:337)
at
javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:250)
at
org.apache.myfaces.taglib.UIComponentBodyTagBase.doEndTag(UIComponentBodyTag
Base.java:55)
at org.apache.jsp.jsp. EF.
EF_005fEmployee_005fProceduresAccess_jsp._jspx_meth_t_dataTable_0(org.apache
.jsp.jsp. EF. EF_005fEmployee_005fProceduresAccess_jsp:1616)
at org.apache.jsp.jsp.EF.
EF_005fEmployee_005fProceduresAccess_jsp._jspService(org.apache.jsp.jsp. EF.
EF_005fEmployee_005fProceduresAccess_jsp:512)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3
22)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:173)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.
java:672)
at
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDis
patcher.java:463)
at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatch
er.java:398)
at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher
.java:301)
at
org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(Servl
etExternalContextImpl.java:415)
at
org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHand
lerImpl.java:234)
at
org.jenia.faces.template.handler.ViewHandler.renderView(ViewHandler.java:74)
at
org.jenia.faces.template.handler.ViewHandler.renderView(ViewHandler.java:74)
at
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:106)
at
org.alfresco.web.app.servlet.AlfrescoFacesServlet.service(AlfrescoFacesServl
et.java:49)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:173)
at
org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsF
ilter.java:122)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:202)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:173)
at
org.alfresco.web.app.servlet.AuthenticationFilter.doFilter(AuthenticationFil
ter.java:73)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:202)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:173)
at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.ja
va:81)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:202)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:178)
at
org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalVal
ve.java:39)
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssoci
ationValve.java:159)
at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:
59)
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:856)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:744)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.jav
a:527)
at
org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThre
ad.java:112)
at java.lang.Thread.run(Thread.java:595)
That does not help me much this errors log :-(
Thanks,
Sophie
-----Message d'origine-----
De: Gerald Müllan [mailto:[EMAIL PROTECTED]
Envoyé: mardi 12 septembre 2006 14:07
À: [EMAIL PROTECTED]; MyFaces Discussion
Objet: Re: RichList and SelectBooleanCheckbox
If you only use standard components you shouldn`t need it. But if it
comes down to stuff which needs serving of resources then extensions
filter is obligatory.
If you have configured it the common way:
http://myfaces.apache.org/tomahawk/extensionsFilter.html
There should be no problem.
But it sounds that there is still some problem with your web.xml.
Any deeper infos coming from the exception?
cheers,
Gerald
On 9/12/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Thanks again. For sure MyClass is declared.
> But if I want to use tomahawk do I need something like this in my web.xml:
>
> <filter-mapping>
> <filter-name>MyFacesExtensionsFilter</filter-name>
> <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
> </filter-mapping>
>
> I keep having the error: org.apache.myfaces.config.MyfacesConfig
> Is it possible that tomahawk is not compatible with the program I am using
> Alfresco with JBoss?
>
> Thanks,
> Sophie
>
> -----Message d'origine-----
> De: Gerald Müllan [mailto:[EMAIL PROTECTED]
> Envoyé: mardi 12 septembre 2006 12:45
> À: MyFaces Discussion; [EMAIL PROTECTED]
> Objet: Re: RichList and SelectBooleanCheckbox
>
> Hi,
>
> sure, MyClass has to be declared as a managed bean in your
faces-config.xml.
>
> The t:updateActionListener should be used as follows:
>
> <t:updateActionListener property="#{managedBean.itemId}"
> value="#{item.id}"/>
>
> Just use it inside a commandLink like:
>
> <h:commandLink value="someText" action="#{managedBean.goNextPage}">
> <t:updateActionListener property="#{managedBean.itemId}"
> value="#{item.id}"/>
> </h:commandLink>
>
> With the help of this component, you know (via the id) in the backend
> which entry was clicked on. You can also use an ActionListener to
> accomplish this task.
>
> cheers,
>
> Gerald
>
> On 9/12/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > Hi!
> >
> > Thanks for your help.
> > I tried to use this dataTable tag as follow:
> >
> > <t:dataTable value="#{MyClass.listToDisplay}"
> > var="item">
> >
> > <f:facet name="Name">
> > <f:verbatim>&#160;</f:verbatim>
> > </f:facet>
> > <h:column>
> > <h:outputText value="#{item.name}"/>
> > </h:column>
> > <h:column>
> > <h:outputText value="#{item.firstname}"/>
> > </h:column>
> > </t:dataTable>
> >
> > But I am getting this error: javax.faces.FacesException:
> > org.apache.myfaces.config.MyfacesConfig
> >
> > Do I need to declare a bean or something in my xml configuration files
to
> > use it?
> >
> > And thus this t:updateActionListener will allow me to set a property of
> the
> > current item? For exemple if I have a list of person and this person has
a
> > property Boolean authorized then this authorized for this precise person
> > will be set to true for example?
> >
> > Thanks
> > Sophie
> >
> > -----Message d'origine-----
> > De: Thorbjørn Ravn Andersen [mailto:[EMAIL PROTECTED]
> > Envoyé: lundi 11 septembre 2006 21:25
> > À: MyFaces Discussion
> > Objet: Re: RichList and SelectBooleanCheckbox
> >
> > [EMAIL PROTECTED] skrev den 11-09-2006 17:02:
> > > The problem I have now is that I would like the user to select some
> > persons
> > > in this list and getting the list of selected persons in my program. I
> was
> > > thinking of putting a SelectBooleanCheckbox in front of each row of
this
> > > table but then I cannot get back the node associated to the checkbox.
If
> I
> > > am doing something like this:
> > >
> > > H:selectBooleanCheckbox id=ok value="#{r.personAuthorized}"
> > >
> > > Then this checkbox will be checked if r.personAuthorized is true but I
> > will
> > > not get the value of this checkbox in my nodes when leaving this page
> no?
> > >
> > >
> > If you were using a h:dataTable I would suggest using the
> > t:updateActionListener tag which allows you to set a property where the
> > variable is available from the loop.
> >
> > Maybe it will work inside your package too?
> >
> > --
> > THorbjørn
> >
> >
>
>
> --
> http://www.irian.at
>
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>
--
http://www.irian.at
Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German
Professional Support for Apache MyFaces
--
http://www.irian.at
Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German
Professional Support for Apache MyFaces