Hi All I have defined a dynamic web project in Eclipse 3.6 to which i have added a user library that has all the Myfaces 2.0 jars as well as the el-api-1.1 and el-impl-1.1 jars.
When i publish the project under wtp to the reference tomcat, i get the following startup error: java.lang.LinkageError: loader constraint violation: when resolving interface method "javax.servlet.jsp.JspApplicationContext.getExpressionFactory()Ljavax/el/ExpressionFactory;" the class loader (instance of org/apache/catalina/loader/WebappClassLoader) of the current class, org/apache/myfaces/webapp/Jsp21FacesInitializer, and the class loader (instance of org/apache/catalina/loader/StandardClassLoader) for resolved class, javax/servlet/jsp/JspApplicationContext, have different Class objects for the type javax/el/ExpressionFactory used in the signature I have attached my catalina.out, web.xml and faces-config.xml... please help. Else please point me to the right direction. Puneet
Jul 23, 2010 10:18:54 PM org.apache.catalina.core.AprLifecycleListener init INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre6\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files/Java/jre6/bin/client;C:/Program Files/Java/jre6/bin;C:/Program Files/Java/jre6/lib/i386;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files\IBM\WebSphere MQ\Java\lib;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\IBM\WebSphere MQ\bin;C:\Program Files\IBM\WebSphere MQ\tools\c\samples\bin;C:\Program Files\Windows Imaging\;C:\Program Files\TortoiseSVN\bin;c:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\PROGRA~1\IBM\SQLLIB\BIN;C:\PROGRA~1\IBM\SQLLIB\FUNCTION;C:\PROGRA~1\IBM\SQLLIB\SAMPLES\REPL;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files\IDM Computer Solutions\UltraEdit\ Jul 23, 2010 10:18:54 PM org.apache.tomcat.util.digester.SetPropertiesRule begin WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:jsf-test' did not find a matching property. Jul 23, 2010 10:18:54 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 704 ms Jul 23, 2010 10:18:54 PM org.apache.catalina.core.StandardService startInternal INFO: Starting service Catalina Jul 23, 2010 10:18:54 PM org.apache.catalina.core.StandardEngine startInternal INFO: Starting Servlet Engine: Apache Tomcat/7.0.0 Jul 23, 2010 10:18:58 PM org.apache.catalina.core.StandardContext addApplicationListener INFO: The listener "org.apache.myfaces.webapp.StartupServletContextListener" is already configured for this context. The duplicate definition has been ignored. Jul 23, 2010 10:18:59 PM org.apache.myfaces.shared_impl.config.MyfacesConfig getBooleanInitParameter INFO: No context init parameter 'org.apache.myfaces.PRETTY_HTML' found, using default value true Jul 23, 2010 10:18:59 PM org.apache.myfaces.shared_impl.config.MyfacesConfig getBooleanInitParameter INFO: No context init parameter 'org.apache.myfaces.ALLOW_JAVASCRIPT' found, using default value true Jul 23, 2010 10:18:59 PM org.apache.myfaces.shared_impl.config.MyfacesConfig getBooleanInitParameter INFO: No context init parameter 'org.apache.myfaces.RENDER_CLEAR_JAVASCRIPT_FOR_BUTTON' found, using default value false Jul 23, 2010 10:18:59 PM org.apache.myfaces.shared_impl.config.MyfacesConfig getBooleanInitParameter INFO: No context init parameter 'org.apache.myfaces.SAVE_FORM_SUBMIT_LINK_IE' found, using default value false Jul 23, 2010 10:18:59 PM org.apache.myfaces.shared_impl.config.MyfacesConfig getBooleanInitParameter INFO: No context init parameter 'org.apache.myfaces.READONLY_AS_DISABLED_FOR_SELECTS' found, using default value true Jul 23, 2010 10:18:59 PM org.apache.myfaces.shared_impl.config.MyfacesConfig getBooleanInitParameter INFO: No context init parameter 'org.apache.myfaces.RENDER_VIEWSTATE_ID' found, using default value true Jul 23, 2010 10:18:59 PM org.apache.myfaces.shared_impl.config.MyfacesConfig getBooleanInitParameter INFO: No context init parameter 'org.apache.myfaces.STRICT_XHTML_LINKS' found, using default value true Jul 23, 2010 10:18:59 PM org.apache.myfaces.shared_impl.config.MyfacesConfig getLongInitParameter INFO: No context init parameter 'org.apache.myfaces.CONFIG_REFRESH_PERIOD' found, using default value 2 Jul 23, 2010 10:18:59 PM org.apache.myfaces.shared_impl.config.MyfacesConfig getBooleanInitParameter INFO: No context init parameter 'org.apache.myfaces.VIEWSTATE_JAVASCRIPT' found, using default value false Jul 23, 2010 10:18:59 PM org.apache.myfaces.shared_impl.config.MyfacesConfig getStringInitParameter INFO: No context init parameter 'org.apache.myfaces.REFRESH_TRANSIENT_BUILD_ON_PSS' found, using default value auto Jul 23, 2010 10:18:59 PM org.apache.myfaces.shared_impl.config.MyfacesConfig getBooleanInitParameter INFO: No context init parameter 'org.apache.myfaces.REFRESH_TRANSIENT_BUILD_ON_PSS_PRESERVE_STATE' found, using default value false Jul 23, 2010 10:18:59 PM org.apache.myfaces.shared_impl.config.MyfacesConfig getBooleanInitParameter INFO: No context init parameter 'org.apache.myfaces.VALIDATE_XML' found, using default value false Jul 23, 2010 10:18:59 PM org.apache.myfaces.shared_impl.config.MyfacesConfig createAndInitializeMyFacesConfig INFO: Tomahawk jar not available. Autoscrolling, DetectJavascript, AddResourceClass and CheckExtensionsFilter are disabled now. Jul 23, 2010 10:18:59 PM org.apache.catalina.core.StandardContext listenerStart SEVERE: Exception sending context initialized event to listener instance of class org.apache.myfaces.webapp.StartupServletContextListener java.lang.LinkageError: loader constraint violation: when resolving interface method "javax.servlet.jsp.JspApplicationContext.getExpressionFactory()Ljavax/el/ExpressionFactory;" the class loader (instance of org/apache/catalina/loader/WebappClassLoader) of the current class, org/apache/myfaces/webapp/Jsp21FacesInitializer, and the class loader (instance of org/apache/catalina/loader/StandardClassLoader) for resolved class, javax/servlet/jsp/JspApplicationContext, have different Class objects for the type javax/el/ExpressionFactory used in the signature at org.apache.myfaces.webapp.Jsp21FacesInitializer.initContainerIntegration(Jsp21FacesInitializer.java:70) at org.apache.myfaces.webapp.AbstractFacesInitializer.initFaces(AbstractFacesInitializer.java:113) at org.apache.myfaces.webapp.StartupServletContextListener.initFaces(StartupServletContextListener.java:186) at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:159) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4323) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4771) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:138) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:990) at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:772) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:138) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:990) at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:275) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:138) at org.apache.catalina.core.StandardService.startInternal(StandardService.java:424) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:138) at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:648) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:138) at org.apache.catalina.startup.Catalina.start(Catalina.java:576) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:415) Jul 23, 2010 10:18:59 PM org.apache.catalina.core.StandardContext startInternal SEVERE: Error listenerStart Jul 23, 2010 10:18:59 PM org.apache.catalina.core.StandardContext startInternal SEVERE: Context [/jsf-test] startup failed due to previous errors Jul 23, 2010 10:18:59 PM org.apache.myfaces.config.annotation.DefaultLifecycleProviderFactory getLifecycleProvider INFO: No ExternalContext using fallback LifecycleProvider. Jul 23, 2010 10:18:59 PM org.apache.myfaces.config.annotation.DefaultLifecycleProviderFactory getLifecycleProvider INFO: Using LifecycleProvider org.apache.myfaces.config.annotation.AllAnnotationLifecycleProvider Jul 23, 2010 10:18:59 PM org.apache.catalina.core.StandardContext listenerStop SEVERE: Exception sending context destroyed event to listener instance of class org.apache.myfaces.webapp.StartupServletContextListener java.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:172) at org.apache.myfaces.webapp.AbstractFacesInitializer.dispatchInitDestroyEvent(AbstractFacesInitializer.java:188) at org.apache.myfaces.webapp.AbstractFacesInitializer.destroyFaces(AbstractFacesInitializer.java:204) at org.apache.myfaces.webapp.StartupServletContextListener.contextDestroyed(StartupServletContextListener.java:215) at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4362) at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:4924) at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:214) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:146) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:990) at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:772) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:138) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:990) at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:275) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:138) at org.apache.catalina.core.StandardService.startInternal(StandardService.java:424) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:138) at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:648) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:138) at org.apache.catalina.startup.Catalina.start(Catalina.java:576) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:415)
<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_2_0.xsd" version="2.0"> <!-- Empty for this simple case. Managed bean name automatically derived from bean class name. Bean scope is request by default. Results pages automatically derived from return value of action controller. From JSF 2.0 tutorial at http://www.coreservlets.com/JSF-Tutorial/jsf2/ --> <managed-bean> <managed-bean-name>user</managed-bean-name> <managed-bean-class>com.jsftest.UserBean</managed-bean-class> <managed-bean-scope>session</managed-bean-scope> </managed-bean> <managed-bean> <managed-bean-name>d1bean</managed-bean-name> <managed-bean-class>com.jsftest.Databean</managed-bean-class> <managed-bean-scope>session</managed-bean-scope> </managed-bean> </faces-config>
<?xml version="1.0" encoding="UTF-8"?> <web-app version="3.0" 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_3_0.xsd"> <!-- setting the project stage to be DEVELOPMENT --> <context-param> <param-name>javax.faces.PROJECT_STAGE</param-name> <param-value>Development</param-value> </context-param> <context-param> <param-name>javax.faces.DEFAULT_SUFFIX</param-name> <param-value>.xhtml</param-value> </context-param> <context-param> <param-name>javax.faces.STATE_SAVING_METHOD</param-name> <param-value>client</param-value> </context-param> <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>*.jsf</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>Faces Servlet</servlet-name> <url-pattern>/*</url-pattern> </servlet-mapping> <session-config> <session-timeout>30</session-timeout> </session-config> <welcome-file-list> <welcome-file>index.jsf</welcome-file> </welcome-file-list> <listener> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class> </listener> </web-app>
--------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org