java.lang.IllegalStateException: No Factories configured for this Applicati

hi

i am developing very simple JSF application.I am using JBOSS 4.0.5GA as application server.I am getting following exception:

ava.lang.IllegalStateException: No Factories configured for this Application. This happens if the faces-initialization does not work at all - make sure that you properly include all configuration settings necessary for a basic faces application and that all the necessary libs are included. Also check the logging output of your web application and your container for any exceptions!

If you did that and find nothing, the mistake might be due to the fact that you use some special web-containers which do not support registering context-listeners via TLD files and a context listener is not setup in your web.xml.

A typical config looks like this;

<listener>

<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>

</listener>

at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:90)

at javax.faces.webapp.FacesServlet.init(FacesServlet.java:88)

at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)

at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)

at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3951)

at org.apache.catalina.core.StandardContext.start(StandardContext.java:4225)

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)

at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)

at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)

at sun.reflect.GeneratedMethodAccessor79.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:585)

at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)

at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)

at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)

at org.apache.catalina.core.StandardContext.init(StandardContext.java:5052)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:585)

at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)

at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)

at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)

at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeployInternal(TomcatDeployer.java:297)

at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeploy(TomcatDeployer.java:103)

at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:371)

at org.jboss.web.WebModule.startModule(WebModule.java:83)

at org.jboss.web.WebModule.startService(WebModule.java:61)

at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)

at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:585)

at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)

at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)

at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)

at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)

at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)

at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)

at $Proxy0.start(Unknown Source)

at org.jboss.system.ServiceController.start(ServiceController.java:417)

at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:585)

at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)

at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)

at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)

at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)

at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)

at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)

at $Proxy42.start(Unknown Source)

at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:466)

at sun.reflect.GeneratedMethodAccessor89.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:585)

at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)

at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)

at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)

at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)

at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)

at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)

at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)

at org.jboss.ws.integration.jboss.DeployerInterceptor.start(DeployerInterceptor.java:92)

at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)

at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)

at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)

at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)

at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)

at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)

at $Proxy43.start(Unknown Source)

at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)

at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)

at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)

at sun.reflect.GeneratedMethodAccessor19.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:585)

at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)

at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)

at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)

at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)

at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)

at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)

at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)

at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)

at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)

at $Proxy8.deploy(Unknown Source)

at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)

at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)

at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)

at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)

at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)

18:44:35,500 ERROR [[/jsfSample]] Servlet /jsfSample threw load() exception

please anybody help me in resolving this. should i include any listener

or factory into my web.xml?

this is my faces-config.xml

<faces-config 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"

version="1.2">

<managed-bean>

<managed-bean-name>StoreNameBean</managed-bean-name>

<managed-bean-class>roseindia.PersonBean</managed-bean-class>

<managed-bean-scope>request</managed-bean-scope>

</managed-bean>

<navigation-rule>

<from-view-id>/pages/inputname.jsp</from-view-id>

<navigation-case>

<from-outcome>result</from-outcome>

<to-view-id>/pages/result.jsp</to-view-id>

</navigation-case>

</navigation-rule>

</faces-config>

regards

shruthi

[9501 byte] By [patel123a] at [2007-11-27 6:43:26]
# 1

A couple of things. First, JBoss ships with MyFaces (http://myfaces.apache.org) by default. Also, MyFaces is on version 1.1 of JSF, it looks like you are using 1.2. You can swap out MyFaces and use the Sun RI with JBoss, see the JBoss documentation if that is the way to go. If you are going to stick with MyFaces, you need to changes your faces-config to use the 1.1 schema. You will also need to add the listener as indicated in the error message to you web.xml.

RaymondDeCampoa at 2007-7-12 18:14:15 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
yes i am using JSF 1.2 version.i have included listener tag in web.xml.But still i am getting same error.Sorry i didnt get couple of things that u explained about myfaces.could u explain more eloberately?
patel123a at 2007-7-12 18:14:15 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3

> yes i am using JSF 1.2 version.

> i have included listener tag in web.xml.But still i

> am getting same error.

> Sorry i didnt get couple of things that u explained

> about myfaces.

> could u explain more eloberately?

JBoss comes with MyFaces as it's JSF implementation. If you wish to use JSF 1.2, you need to uninstall MyFaces and install Sun's RI of JSF (or another one if you prefer). It is not hard to do, see the JBoss documentation:

http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossWithIntegratedMyFaces

RaymondDeCampoa at 2007-7-12 18:14:15 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...