geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From PaJaSoft <janou...@fonet.cz>
Subject Re: Geronimo 2.1.x, standard MyFaces bundle, org.apache.myfaces.ERROR_HANDLER in web.xml - classloading problem
Date Fri, 27 Feb 2009 10:18:24 GMT


Ivan-65 wrote:
> 
> Hi, in Geronimo, JFace API related classes is loaded by Jee-spec
> classloader.
> From my view, this should be a defect of MyFace, I guess it load your
> customized exception handler classes using Class.forName, so the
> ClassNotFoundException error occured
> Could you please try to add the dependcy of MyFaces in your
> geronimo-web.xml
> file
> -----
> <dep:environment>
>         <dep:moduleId>
>             <dep:groupId>default</dep:groupId>
>             <dep:artifactId>TestWeb</dep:artifactId>
>             <dep:version>1.0</dep:version>
>             <dep:type>car</dep:type>
>         </dep:moduleId>
>         <dep:dependencies>
>             <dep:dependency>
>                 <dep:groupId>org.apache.myfaces.core</dep:groupId>
>                 <dep:artifactId>myfaces-api</dep:artifactId>
>                 <dep:type>jar</dep:type>
>             </dep:dependency>
>         </dep:dependencies>
>         <dep:hidden-classes>
>             <dep:filter>javax.faces</dep:filter>
>         </dep:hidden-classes>
>     </dep:environment>
> 
> It should have the same effect with copying those myfaces jars into the
> lib
> folder.
> 
> Ivan
> 
> 

Hello Ivan,

without dependency of myfaces-api and impl (or including their jars in
WEB-INF/lib dir) deploying process always fail:

2009-02-27 11:05:49,556 ERROR [[/NPKWebShop-WEB]] Servlet /NPKWebShop-WEB
threw load() exception
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:106)
	at javax.faces.webapp.FacesServlet.init(FacesServlet.java:105)
	at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1064)
	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966)
.
.
.


I try this plan as you suggest (and remove myfaces-api and impl jars from
WEB-INF/lib directory):

	<dep:environment>
		<dep:moduleId>
			<dep:groupId>NPKWebShop</dep:groupId>
			<dep:artifactId>NPKWebShop-WEB</dep:artifactId>
			<dep:version>1.0</dep:version>
			<dep:type>war</dep:type>
		</dep:moduleId>
		<dep:dependencies>
			<dep:dependency>
				<dep:groupId>com.sun</dep:groupId>
				<dep:artifactId>facelets</dep:artifactId>
				<dep:type>jar</dep:type>
			</dep:dependency>
			
			<dep:dependency>
				<dep:groupId>org.apache.myfaces.core</dep:groupId>
				<dep:artifactId>myfaces-api</dep:artifactId>
				<dep:type>jar</dep:type>
			</dep:dependency>

<!-- 			
			<dep:dependency>
				<dep:groupId>org.apache.myfaces.core</dep:groupId>
				<dep:artifactId>myfaces-impl</dep:artifactId>
				<dep:type>jar</dep:type>
			</dep:dependency>
-->
		</dep:dependencies>
		
		<dep:hidden-classes>
			<dep:filter>javax.faces</dep:filter>
<!-- 
 			<dep:filter>org.apache.myfaces</dep:filter>
-->
		</dep:hidden-classes>
		
	</dep:environment>

(facelets are deployed to repository by me because I'm using it) and I got
the same java.lang.IllegalStateException as on top of my post... so I try to
specify listener in web.xml as suggested, but the results is the same -
IllegalStateException.

Any idea?

Pavel

-- 
View this message in context: http://www.nabble.com/Geronimo-2.1.x%2C-standard-MyFaces-bundle%2C-org.apache.myfaces.ERROR_HANDLER-in-web.xml---classloading-problem-tp22239524s134p22242981.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Mime
View raw message