This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JSF and the fly likes NoClassDefFoundError caused by tomahawk Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "NoClassDefFoundError caused by tomahawk" Watch "NoClassDefFoundError caused by tomahawk" New topic
Author

NoClassDefFoundError caused by tomahawk

liliane fahmy
Greenhorn

Joined: Aug 24, 2012
Posts: 22
Hi all
I want to add tomahawk component in Jsf via Netbean 7:
1-I added all needed jars:1-commons-validator-1.3.1.jar
2-oro-2.0.8.jar
3-commons-fileupload-1.2.1.jar
4-tomahawk-1.1.13.jar
2-I modified the web.xml:

<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>

<filter>
<filter-name>MyFacesExtensionsFilter</filter-name>
<filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
<init-param>
<param-name>uploadMaxFileSize</param-name>
<param-value>20m</param-value>

</init-param>
</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 serving page-independent resources (javascript, stylesheets, images, etc.) -->
<filter-mapping>
<filter-name>MyFacesExtensionsFilter</filter-name>
<url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
</filter-mapping>

3-and my jsf is:

<%--
Document : searchTrip
Created on : Sep 6, 2012, 12:07:09 AM
Author : HP
--%>
<html>
<%@page contentType="text/html" pageEncoding="UTF-8"%>

<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%@taglib prefix="t" uri="http://myfaces.apache.org/tomahawk" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<f:view>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>


<f:loadBundle basename="com.airline.bundles.LocalizationResources" var="pro"/>
<title><hutputText value="#{pro.SEARCH_TICK}"/></title>
</head>
<body>
<h1><hutputText value="search trip!"/></h1>
<h:form>
<t:panelTabbedPane bgcolor="#FFFFCC">
<t:panelTab label="Tab 1">
<f:verbatim><H1>Tab 1</H1></f:verbatim>
</t:panelTab>
<t:panelTab label="Tab 2">
<f:verbatim><H1>Tab 2</H1></f:verbatim>
</t:panelTab>
<t:panelTab label="Tab 3">
<f:verbatim><H1>Tab 3</H1></f:verbatim>
</t:panelTab>
<h:commandButton value="Common Button" />
</t:panelTabbedPane>
</h:form>
</body>

</f:view>
</html>

and the exception thrown in the page is java.lang.NoClassDefFoundError: org/apache/commons/lang/builder/HashCodeBuilder

PLease help me ,it 's serious


Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15951
    
  19

Be kind to our eyes. Use the "Code" tags to wrap sample Java and XML and produce formatted displays. There's a "Code" button in the message editor that will insert them.

My best guess is that you're not including the apache commons collections JAR in your build. I think that's where the missing class comes from.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
 
subject: NoClassDefFoundError caused by tomahawk
 
Similar Threads
When trying to deploy my JSF 2.0 JSP page I get this:
File upload
Calendar in jsf
JBoss, Tomahawk, Stack Overflow.
Simple panelTabbedPane