Hmm still trying to get it work since about 6 hours :-(. No solution yet. The strange thing is the line 94 of the MyfacesConfig.java in Tomahawk which throws the Exception:
------------------------
static
    {
        boolean tomahawkAvailable;
        try
                {
ClassUtils.classForName("org.apache.myfaces.webapp.filter.ExtensionsFilter"); // line 94 ^^
                        tomahawkAvailable = true;
                }
                catch (ClassNotFoundException e)
                {
                        tomahawkAvailable = false;
                }
                TOMAHAWK_AVAILABLE = tomahawkAvailable;
    }
-------------------------

The ExtensionFilter is also part of the tomahawk.jar, so normally should be loadable. Also strange for me is the thrown ClassNotFoundException, because you see there is a catch block... so I'm at my wits' end :-(.

I'll attach my config as well, to get this point clearer. Did I hit a serious bug in Tomahawk? I also tried to compile a Tomahawk snapshot from svn for MyFaces 1.2 but got the same error :-(.

Cheers,
Michael

Michael Obster schrieb:
Hi,

again a problem after migration to 1.2.0 which I cannot solve :-(.

My application (MyFaces 1.2.0 Tomahawk 1.1.6 Trinidad 1.2.2) get started correctly by JBoss 4.2.1 but when I'm lodaing a JSF page I got the attached error.

Also I've searched already in the MyFaces wiki and Google but don't find a solution :-(. The only anomaly is that I'm using Tiles in the application.

If you need the configs, please let me know, because I don't want to send them on the list.

Cheers,
Michael


<?xml version="1.0"?>
<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
                              "http://java.sun.com/dtd/web-facesconfig_1_0.dtd";>
<faces-config>
	<managed-bean>
		<managed-bean-name>test</managed-bean-name>
		<managed-bean-class>de.eposcat.raki.ui.beans.Test</managed-bean-class>
		<managed-bean-scope>session</managed-bean-scope>
	</managed-bean>
	<managed-bean>
		<managed-bean-name>rakicontroller</managed-bean-name>
		<managed-bean-class>
			de.eposcat.raki.ui.actions.RakiController
		</managed-bean-class>
		<managed-bean-scope>session</managed-bean-scope>
	</managed-bean>
	<managed-bean>
		<managed-bean-name>pagedSort</managed-bean-name>
		<managed-bean-class>
			de.eposcat.raki.ui.actions.PagedSortableRequestList
		</managed-bean-class>
		<managed-bean-scope>request</managed-bean-scope>
	</managed-bean>
	<managed-bean>
		<managed-bean-name>requestParam</managed-bean-name>
		<managed-bean-class>
			de.eposcat.raki.ui.beans.RequestParamBean
		</managed-bean-class>
		<managed-bean-scope>session</managed-bean-scope>
	</managed-bean>
	<managed-bean>
		<managed-bean-name>zebraconnector</managed-bean-name>
		<managed-bean-class>
			de.eposcat.raki.ui.actions.ZebraHandler
		</managed-bean-class>
		<managed-bean-scope>session</managed-bean-scope>
	</managed-bean>
	<managed-bean>
		<managed-bean-name>brequestaction</managed-bean-name>
		<managed-bean-class>
			de.eposcat.raki.ui.actions.BRequestAction
		</managed-bean-class>
		<managed-bean-scope>session</managed-bean-scope>
	</managed-bean>
	<managed-bean>
		<managed-bean-name>order</managed-bean-name>
		<managed-bean-class>
			de.eposcat.raki.ui.beans.BRequestBean
		</managed-bean-class>
		<managed-bean-scope>session</managed-bean-scope>
	</managed-bean>
	<managed-bean>
		<managed-bean-name>orderHandler</managed-bean-name>
		<managed-bean-class>
			de.eposcat.raki.ui.actions.OrderHandler
		</managed-bean-class>
		<managed-bean-scope>session</managed-bean-scope>
	</managed-bean>
	<managed-bean>
		<managed-bean-name>disposal</managed-bean-name>
		<managed-bean-class>
			de.eposcat.raki.ui.beans.DisposalRequestBean
		</managed-bean-class>
		<managed-bean-scope>session</managed-bean-scope>
	</managed-bean>
	<managed-bean>
		<managed-bean-name>disposalaction</managed-bean-name>
		<managed-bean-class>
			de.eposcat.raki.ui.actions.DisposalRequestAction
		</managed-bean-class>
		<managed-bean-scope>session</managed-bean-scope>
	</managed-bean>
	<managed-bean>
		<managed-bean-name>messages</managed-bean-name>
		<managed-bean-class>
			de.eposcat.raki.ui.beans.MessageBean
		</managed-bean-class>
		<managed-bean-scope>session</managed-bean-scope>
	</managed-bean>
	<managed-bean>
		<managed-bean-name>menucontrol</managed-bean-name>
		<managed-bean-class>
			de.eposcat.raki.ui.beans.MenuControlBean
		</managed-bean-class>
		<managed-bean-scope>session</managed-bean-scope>
	</managed-bean>
<!-- <managed-bean>
		<managed-bean-name>confirm</managed-bean-name>
		<managed-bean-class>
			de.eposcat.raki.ui.beans.ConfirmBean
		</managed-bean-class>
		<managed-bean-scope>session</managed-bean-scope>
	</managed-bean> -->
	
	<!-- State driven navigation -->
	<navigation-rule>
		<navigation-case>
			<from-outcome>logout</from-outcome>
			<to-view-id>/pages/security/logout.jsf</to-view-id>
		</navigation-case>
	</navigation-rule>
	<navigation-rule>
		<from-view-id>/zebrasearch.jsp</from-view-id>
		<navigation-case>
			<from-outcome>listusers</from-outcome>
			<to-view-id>/listusers.jsf</to-view-id>
		</navigation-case>
	</navigation-rule>
	<navigation-rule>
		<from-view-id>/zebrasearchfordisposal.jsp</from-view-id>
		<navigation-case>
			<from-outcome>listusersfordisposal</from-outcome>
			<to-view-id>/listusersfordisposal.jsf</to-view-id>
		</navigation-case>
	</navigation-rule>
	<navigation-rule>
		<navigation-case>
			<from-outcome>showOrder</from-outcome>
			<to-view-id>/showorder.jsf</to-view-id>
		</navigation-case>
	</navigation-rule>
	<navigation-rule>
		<navigation-case>
			<from-outcome>showDisposal</from-outcome>
			<to-view-id>/showdisposal.jsf</to-view-id>
		</navigation-case>
	</navigation-rule>
	
	<!-- menu driven navigation -->
	<navigation-rule>
		<navigation-case>
			<from-outcome>main</from-outcome>
			<to-view-id>/main.jsf</to-view-id>
		</navigation-case>
	</navigation-rule>
	<navigation-rule>
		<navigation-case>
			<from-outcome>disposalmain</from-outcome>
			<to-view-id>/disposalmain.jsf</to-view-id>
		</navigation-case>
	</navigation-rule>
	<navigation-rule>
		<navigation-case>
			<from-outcome>zebrasearch</from-outcome>
			<to-view-id>/zebrasearch.jsf</to-view-id>
		</navigation-case>
	</navigation-rule>
	<navigation-rule>
		<navigation-case>
			<from-outcome>zebrasearchfordisposal</from-outcome>
			<to-view-id>/zebrasearchfordisposal.jsf</to-view-id>
		</navigation-case>
	</navigation-rule>
	<navigation-rule>
		<navigation-case>
			<from-outcome>buyrequest</from-outcome>
			<to-view-id>/buyrequest.jsf</to-view-id>
		</navigation-case>
	</navigation-rule>
	<navigation-rule>
		<navigation-case>
			<from-outcome>disposalrequest</from-outcome>
			<to-view-id>/disposalrequest.jsf</to-view-id>
		</navigation-case>
	</navigation-rule>
	
	<converter>
		<converter-id>agConverter</converter-id>
		<converter-class>de.eposcat.raki.ui.converters.ArticleGroupIDConverter</converter-class>
	</converter>
	
	<application>
		<message-bundle>
			resources.application
		</message-bundle>
		<default-render-kit-id>
			org.apache.myfaces.trinidad.core
		</default-render-kit-id>
	</application>
</faces-config>
<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE jboss-web PUBLIC
          "-//JBoss//DTD Web Application 2.3V2//EN"
          "http://www.jboss.org/j2ee/dtd/jboss-web_3_2.dtd";>
<jboss-web>
  <security-domain>java:/jaas/rakiDomain</security-domain>
</jboss-web>
<!DOCTYPE tiles-definitions 
	[
        <!ELEMENT component-definitions (definition+)>
        <!ELEMENT tiles-definitions (definition+)>
        <!ELEMENT definition (put*, putList*)>
        <!ATTLIST definition
            name CDATA #REQUIRED
            page CDATA #IMPLIED
            path CDATA #IMPLIED
            extends CDATA #IMPLIED
            role CDATA #IMPLIED
            template CDATA #IMPLIED
            controllerClass CDATA #IMPLIED
            controllerUrl CDATA #IMPLIED>
        <!ELEMENT put (#PCDATA)>
        <!ATTLIST put
            name CDATA #REQUIRED
            value CDATA #IMPLIED
            type (string | page | template | definition) #IMPLIED
            content CDATA #IMPLIED
            direct (true | false) #IMPLIED>
        <!ELEMENT putList ( (add* | item* | bean* | putList*)+) >
        <!ATTLIST putList
            name CDATA #REQUIRED>
        <!ELEMENT putListElements (add | item | bean)>
        <!ELEMENT add (#PCDATA)>
        <!ATTLIST add
            value CDATA #IMPLIED
            type (string | page | template | definition) #IMPLIED
            content CDATA #IMPLIED
            direct (true | false) #IMPLIED>
        <!ELEMENT bean (#PCDATA)>
        <!ATTLIST bean
            classtype CDATA #REQUIRED>
        <!ELEMENT item (#PCDATA)>
        <!ATTLIST item
            value CDATA #REQUIRED
            link CDATA #REQUIRED
            classtype CDATA #IMPLIED
            icon CDATA #IMPLIED
            tooltip CDATA #IMPLIED>
    ]>

<tiles-definitions>
    <definition name="base.layout" path="/pages/tpl/template.jsp" >
        <put name="title" type="string" value="RAKI Kauf" />
        <put name="topnavi" type="string" value="RAKI Kauf" />
        <put name="navi" value="/pages/navi/menu.jsp" />
        <put name="footer" value="/pages/tpl/footer.jsp" />
    </definition>

	<definition name="/main.tiles" extends="base.layout" >
        <put name="topnavi" type="string" value="Antragsübersicht" />
        <put name="content" value="/pages/content/main.jsp" />
    </definition>
    <definition name="/disposalmain.tiles" extends="base.layout" >
        <put name="topnavi" type="string" value="Entsorgungsübersicht" />
        <put name="content" value="/pages/content/disposalmain.jsp" />
    </definition>

	<definition name="/zebrasearch.tiles" extends="base.layout" >
        <put name="topnavi" type="string" value="Anwender Suche" />
        <put name="content" value="/pages/content/zebrasearch.jsp" />
    </definition>
    <definition name="/zebrasearchfordisposal.tiles" extends="base.layout" >
        <put name="topnavi" type="string" value="Anwender Suche" />
        <put name="content" value="/pages/content/zebrasearchfordisposal.jsp" />
    </definition>

	<definition name="/listusers.tiles" extends="base.layout" >
        <put name="topnavi" type="string" value="Anwender Suche - Ergebnis" />
        <put name="content" value="/pages/content/listusers.jsp" />
    </definition>
    <definition name="/listusersfordisposal.tiles" extends="base.layout" >
        <put name="topnavi" type="string" value="Anwender Suche - Ergebnis" />
        <put name="content" value="/pages/content/listusersfordisposal.jsp" />
    </definition>

    <definition name="/buyrequest.tiles" extends="base.layout" >
        <put name="topnavi" type="string" value="Antrag stellen" />
        <put name="content" value="/pages/content/buyrequestform.jsp" />
    </definition>
    
    <definition name="/showorder.tiles" extends="base.layout" >
        <put name="topnavi" type="string" value="Antrag zeigen" />
        <put name="content" value="/pages/content/showorder.jsp" />
    </definition>
    <definition name="/showdisposal.tiles" extends="base.layout" >
        <put name="topnavi" type="string" value="Antrag zeigen" />
        <put name="content" value="/pages/content/showdisposal.jsp" />
    </definition>
    
    <definition name="/confirm.tiles" extends="base.layout" >
        <put name="topnavi" type="string" value="Antrag bestätigen" />
        <put name="content" value="/pages/content/confirm.jsp" />
    </definition>

	<definition name="/disposalrequest.tiles" extends="base.layout" >
        <put name="topnavi" type="string" value="Entsorgungsantrag stellen" />
        <put name="content" value="/pages/content/disposalrequestform.jsp" />
    </definition>
    

<!-- workaround for non-tiles JSF pages-->
    <definition name="non.tiles1" path="/non-tile.jsp" />	

<!-- nested tiles definition
    <definition name="nested.example" path="/template/template2.jsp" >
        <put name="nested1" value="/common/nested1.jsp" />
        <put name="nested2" value="/common/nested2.jsp" />
    </definition>
    <definition name="/page4.tiles" extends="layout.example" >
        <put name="body" value="nested.example" />
    </definition>
 -->



</tiles-definitions>
<?xml version="1.0"?>
<trinidad-config xmlns="http://myfaces.apache.org/trinidad/config";>
  <!-- Enable debug output -->
  <debug-output>true</debug-output>

  <!-- Pick accessibility options based on a per-user managed bean -->
  <accessibility-mode>#{user.accessibilityMode}</accessibility-mode>

</trinidad-config>
<?xml version="1.0"?>
<!--
	* Copyright 2004 The Apache Software Foundation.
	*
	* Licensed under the Apache License, Version 2.0 (the "License");
	* you may not use this file except in compliance with the License.
	* You may obtain a copy of the License at
	*
	*      http://www.apache.org/licenses/LICENSE-2.0
	*
	* Unless required by applicable law or agreed to in writing, software
	* distributed under the License is distributed on an "AS IS" BASIS,
	* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
	* See the License for the specific language governing permissions and
	* limitations under the License.
-->
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee";
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
	xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>
	<display-name>rakikauf</display-name>
	<context-param>
		<description>
			State saving method: "client" or "server" (= default) See
			JSF Specification 2.5.2
		</description>
		<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
		<param-value>server</param-value>
	</context-param>
	<context-param>
		<description>
			This parameter tells MyFaces if javascript code should be
			allowed in the rendered HTML output. If javascript is
			allowed, command_link anchors will have javascript code that
			submits the corresponding form. If javascript is not
			allowed, the state saving info and nested parameters will be
			added as url parameters. Default: "true"
		</description>
		<param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
		<param-value>true</param-value>
	</context-param>
	<context-param>
		<description>
			This parameter tells MyFaces if javascript code should be
			allowed in the rendered HTML output. If javascript is
			allowed, command_link anchors will have javascript code that
			submits the corresponding form. If javascript is not
			allowed, the state saving info and nested parameters will be
			added as url parameters. Default: "false"

			Setting this param to true should be combined with
			STATE_SAVING_METHOD "server" for best results.

			This is an EXPERIMENTAL feature. You also have to enable the
			detector filter/filter mapping below to get JavaScript
			detection working.
		</description>
		<param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
		<param-value>false</param-value>
	</context-param>
	<context-param>
		<description>
			If true, rendered HTML code will be formatted, so that it is
			"human readable". i.e. additional line separators and
			whitespace will be written, that do not influence the HTML
			code. Default: "true"
		</description>
		<param-name>org.apache.myfaces.PRETTY_HTML</param-name>
		<param-value>true</param-value>
	</context-param>
	<context-param>
		<description>
			If true, a javascript function will be rendered that is able
			to restore the former vertical scroll on every request.
			Convenient feature if you have pages with long lists and you
			do not want the browser page to always jump to the top if
			you trigger a link or button action that stays on the same
			page. Default: "false"
		</description>
		<param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
		<param-value>false</param-value>
	</context-param>

	<!-- Tiles ViewHandler config file -->
	<context-param>
		<description>
			Tiles configuration definition files and a listener need to
			be defined. the listener will initialize
			JspTilesViewHandlerImpl with tiles definitions.
		</description>
		<param-name>tiles-definitions</param-name>
		<param-value>/WEB-INF/tiles.xml</param-value>
	</context-param>

	<!-- Some options for Trinidad -->
	<context-param>
        <param-name>org.apache.myfaces.trinidad.ALTERNATE_VIEW_HANDLER</param-name>
        <param-value>org.apache.myfaces.tomahawk.application.jsp.JspTilesViewHandlerImpl</param-value>
    </context-param>
    
	<context-param>
		<description>
			Apache Trinidad by default obfuscates the Javascript it delivers to the client, as well as stripping
			comments and whitespace. This dramatically reduces the size of our Javascript download, but also 
			makes it tricky to debug the Javascript. This flag can be set to true to turn off the obfuscation.
		</description>
		<param-name>org.apache.myfaces.trinidad.DEBUG_JAVASCRIPT</param-name>
		<param-value>true</param-value>
	</context-param>
	<context-param>
		<description>
			If this parameter is enabled by setting to "true", Apache Trinidad will automatically check the 
			modification date of your JSPs, and discard saved state when they change; this makes development 
			easier, but adds overhead that should be avoided when your application is deployed.
		</description>
		<param-name>org.apache.myfaces.trinidad.CHECK_FILE_MODIFICATION</param-name>
		<param-value>true</param-value>
	</context-param>

	<!-- Listener, that does all the startup work (configuration, init). -->
	<listener>
		<listener-class>
			org.apache.myfaces.webapp.StartupServletContextListener
		</listener-class>
	</listener>
	<!-- Faces Servlet -->
	<servlet>
		<servlet-name>Faces Servlet</servlet-name>
		<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
		<load-on-startup>1</load-on-startup>
	</servlet>
	<servlet>
		<servlet-name>resources</servlet-name>
		<servlet-class>org.apache.myfaces.trinidad.webapp.ResourceServlet</servlet-class>
	</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>/faces/*</url-pattern>
	</servlet-mapping>
	<servlet-mapping>
		<servlet-name>resources</servlet-name>
		<url-pattern>/adf/*</url-pattern>
	</servlet-mapping>
	<!-- RAKI System -->
	<security-constraint>
		<web-resource-collection>
			<web-resource-name>Rakikauf</web-resource-name>
			<url-pattern>*.jsf</url-pattern>
			<url-pattern>/faces/*</url-pattern>
			<http-method>POST</http-method>
			<http-method>GET</http-method>
		</web-resource-collection>

		<auth-constraint>
			<role-name>AdminUser</role-name>
			<role-name>RegularUser</role-name>
		</auth-constraint>
		<!-- do not encrypt. -->
		<user-data-constraint>
			<transport-guarantee>NONE</transport-guarantee>
		</user-data-constraint>
	</security-constraint>

	<security-role>
		<role-name>AdminUser</role-name>
	</security-role>
	<security-role>
		<role-name>RegularUser</role-name>
	</security-role>

	<login-config>
		<auth-method>FORM</auth-method>
		<form-login-config>
			<form-login-page>/pages/security/login.jsf</form-login-page>
			<form-error-page>
				/pages/security/loginFailed.jsf
			</form-error-page>
		</form-login-config>
	</login-config>

	<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>20m</param-value>
		</init-param>
	</filter>
	<filter>
		<filter-name>trinidad</filter-name>
		<filter-class>org.apache.myfaces.trinidad.webapp.TrinidadFilter</filter-class>
	</filter>
	<filter>
		<filter-name>initFilter</filter-name>
		<filter-class>
			de.eposcat.raki.cfg.InitializationFilter
		</filter-class>
	</filter>

	<!-- extension mapping for adding <script/>, <link/>, and other resource tags to JSF-pages  -->
	<filter-mapping>
		<filter-name>MyFacesExtensionsFilter</filter-name>
		<!-- servlet-name must match the name of your javax.faces.webapp.FacesServlet entry -->
		<servlet-name>Faces Servlet</servlet-name>
	</filter-mapping>

	<!-- extension mapping for adding <script/>, <link/>, and other resource tags to JSF-pages  -->
	<filter-mapping>
		<filter-name>MyFacesExtensionsFilter</filter-name>
		<url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
	</filter-mapping>
	<filter-mapping>
		<filter-name>MyFacesExtensionsFilter</filter-name>
		<url-pattern>*.jsf</url-pattern>
	</filter-mapping>
	<filter-mapping>
		<filter-name>trinidad</filter-name>
		<servlet-name>faces</servlet-name>
	</filter-mapping>

	<filter-mapping>
		<filter-name>initFilter</filter-name>
		<url-pattern>/*</url-pattern>
	</filter-mapping>

	<!-- Standard Action Servlet Mapping -->

	<session-config>
		<session-timeout>25</session-timeout>
	</session-config>

	<welcome-file-list>
		<welcome-file>index.jsp</welcome-file>
	</welcome-file-list>

	<!-- RakiException are handled by the RakiWebExceptionHandler!
		The rakiFilter throws an exception which is not handled - 
		this RakiException is handled here!
	-->
	<!-- <error-page>
		<exception-type>de.eposcat.raki.RakiException</exception-type>
		<location>/pages/security/loginFailed.jsp</location>
	</error-page>-->
</web-app>

Reply via email to