• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JBoss 4.2 and MyFaces

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello All,

I'm pretty newbie to JSF and i'm trying to use the tomahawk's tree2 structure. But when i start my Jboss with the tomahawk-1.1.3.jar along with myfaces-api-1.1.5.jar and myfaces-impl-1.1.5.jar, it is giving me the following error. Actually i got many suggesstions on this issue but all end in vain. Please share your thoughts and any help will really appreciate.

server: Jboss4.2.1GA

web.xml
-------
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5"
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-app_2_5.xsd">

<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>client</param-value>
</context-param>
<context-param>
<param-name>org.apache.myfaces.ADD_RESOURCE_CLASS</param-name>
<param-value>org.apache.myfaces.renderkit.html.util.DefaultAddResource</param-value>
</context-param>
<filter>
<filter-name>MyFacesExtensionsFilter</filter-name>
<filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
<init-param>
<param-name>maxFileSize</param-name>
<param-value>100m</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>MyFacesExtensionsFilter</filter-name>
<url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>MyFacesExtensionsFilter</filter-name>
<url-pattern>/faces/*</url-pattern>
</filter-mapping>
<listener>
<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
</listener>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>faces/index.jsp</welcome-file>
</welcome-file-list>
</web-app>

Following error from Jboss console
----------------------------------
15:27:28,578 INFO [FacesConfigurator] Starting up MyFaces-package : tomahawk in version : 1.1.3 from path : file:/D:/Softwares/Servers/jboss-4.2.1.GA/server/default/deploy/ER-Tree.war/WEB-INF/lib/tomahawk-1.1.3.jar
15:27:28,718 WARN [LocaleUtils] Locale name in faces-config.xml null or empty, setting locale to default locale : en_US
15:27:30,171 INFO [FacesConfigurator] Serialization provider : class org.apache.myfaces.shared_impl.util.serial.DefaultSerialFactory
15:27:30,187 INFO [StartupServletContextListener] ServletContext 'D:\Softwares\Servers\jboss-4.2.1.GA\server\default\.\deploy\ER-Tree.war\' initialized.
15:27:30,187 WARN [JBossJSFConfigureListener] MyFaces JSF implementation found! This version of JBoss AS ships with the java.net implementation of JSF. There are known issues when mixing JSF implementations. This warning does not apply to MyFaces component libraries such as Tomahawk. However, myfaces-impl.jar and myfaces-api.jar should not be used without disabling the built-in JSF implementation. See the JBoss wiki for more details.
15:27:30,796 FATAL [config] null MessageFactory
15:27:30,796 ERROR [STDERR] java.lang.ClassCastException: org.apache.myfaces.renderkit.html.util.ExtensionsPhaseListener
15:27:30,796 ERROR [STDERR] at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:825)
15:27:30,796 ERROR [STDERR] at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:486)
15:27:30,796 ERROR [STDERR] at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:381)
15:27:30,796 ERROR [STDERR] at org.jboss.web.jsf.integration.config.JBossJSFConfigureListener.contextInitialized(JBossJSFConfigureListener.java:69)
15:27:30,796 ERROR [STDERR] at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3854)
15:27:30,796 ERROR [STDERR] at org.apache.catalina.core.StandardContext.start(StandardContext.java:4359)
15:27:30,796 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:761)
15:27:30,796 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:741)
15:27:30,796 ERROR [STDERR] at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:553)
15:27:30,796 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
15:27:30,796 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
15:27:30,796 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
15:27:30,796 ERROR [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
15:27:30,796 ERROR [STDERR] at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)
15:27:30,796 ERROR [STDERR] at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
15:27:30,796 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
15:27:30,796 ERROR [STDERR] at org.apache.catalina.core.StandardContext.init(StandardContext.java:5310)
15:27:30,796 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
15:27:30,796 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
15:27:30,796 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
15:27:30,796 ERROR [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
15:27:30,796 ERROR [STDERR] at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)
15:27:30,796 ERROR [STDERR] at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)

Thanks in advance.
 
Ranch Hand
Posts: 495
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You have to disable the JSf that came with Jboss, Copy the myfaces JSF Libraries from myfaces into the lib folder of Jboss and this should hopefully resolve your problem
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Good answer.

This is a JBoss question, so I am going to move this to that forum.

Thanks

Mark
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have a look at this
 
Elizabath Lima
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear Abiodun,

I copied myfaces-api-1.1.5.jar and myfaces-impl-1.1.5.jar to server\default\lib. Then also i'm getting the same exception.
Can you explain a bit more on how to disable JSF that comes with JBoss?
I could execute the JSF sample applications without Myfaces jars.
This exception comes when i add the those two jars.
actually i need to use JSF along with tree2 structure of Tomahawk.
Please help.
 
Ranch Hand
Posts: 1179
Mac OS X Eclipse IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Using MyFaces Core with JBoss 4.2 and JBoss 5.x
 
What could go wrong in a swell place like "The Evil Eye"? Or with this tiny ad?
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic