• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

NoClassDefFoundError caused by tomahawk

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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><h:outputText value="#{pro.SEARCH_TICK}"/></title>
</head>
<body>
<h1><h:outputText 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


 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic