Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Tomcat - JSP/Servlet container
Struts - A MVC web framework
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
JSP - A mailing list about Java Server Pages specification and reference
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Servlet : Session invalidate
Oracle Connection Pooling in 3 2 2
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Running a Simple JMS Example
Tomcat and webapplication specific java library path
Mapping in workers2 properties
org apache jasper JasperException
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action
   MESSAGE
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
Value attribute of <html:checkbox
url string for connecting jboss to oracle
javax servlet ServletException: BeanUtils populate
5 0 18: Windows XP Pro vs Windows 2000
HTTP Status 404 The requested resource is not available
 
-none-

-none-

2007-09-03       - By Ghodmode

 Back
This is related to my previous email thread, but slightly different
circumstances.

Apache Tomcat 6.0.14
Java 1.6.0_02-b05
Wicket 1.3.0-beta3

I'm trying to run a Wicket application and it's not working.  I'm getting a
NoClassDefFoundError:

java.lang.NoClassDefFoundError:
org/apache/wicket/protocol/http/WebApplication

I think I must be misunderstanding something basic about Tomcat web
application deployment.

So, I create a basic "HelloWorld" type servlet to try and troubleshoot the
problem.

I've double- and triple-checked the package against the documentation and
even verified it by listing the contents of the JAR with unzip.

What am I doing wrong?

The Wicket JAR file and two of its dependencies are in WEB-INF/lib:
@(protected):~/dev/tomcat/webapps/HelloWicket/WEB-INF/classes$ ls -ltr ../lib
total 1648
-rw-r--r-- 1 vince vince 1657246 2007-09-04 10:00 wicket-1 (See http://ket-1.ora-code.com).3.0-beta3.jar
-rw-r--r-- 1 vince vince    7449 2007-09-04 10:00 slf4j-simple-1 (See http://ple-1.ora-code.com).4.3.jar
-rw-r--r-- 1 vince vince   15345 2007-09-04 10:00 slf4j-api-1 (See http://api-1.ora-code.com).4.3.jar


Here's my web.xml:
@(protected):~/dev/tomcat/webapps/HelloWicket/WEB-INF$ cat web.xml
<?xml version="1.0" encoding="UTF-8 (See http://UTF-8.ora-code.com)"?>
<!DOCTYPE web-app PUBLIC
  "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
  "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
       <context-param>
               <param-name>configuration</param-name>
               <param-value>development</param-value>
       </context-param>

       <servlet>
               <servlet-name>HelloWicket</servlet-name>
               <servlet-class>org.apache.wicket.protocol.http.WicketServlet
</servlet-class>
               <init-param>
                       <param-name>applicationClassName</param-name>
                       <param-value>mypackage.HelloWicketApp</param-value>
               </init-param>
               <load-on-startup>1</load-on-startup>
       </servlet>

       <servlet-mapping>
               <servlet-name>HelloWicket</servlet-name>
               <url-pattern>/helloWicket/*</url-pattern>
       </servlet-mapping>
</web-app>

Here's the layout of my servlet's directory:
@(protected):~/dev/tomcat/webapps/HelloWicket$ ls -ltrR
.:
total 8
-rw-r--r-- 1 vince vince   44 2007-09-04 10:00 index.html
drwxr-xr-x 4 vince vince 4096 2007-09-04 10:27 WEB-INF

./WEB-INF:
total 12
drwxr-xr-x 2 vince vince 4096 2007-09-04 10:00 lib
drwxr-xr-x 3 vince vince 4096 2007-09-04 10:05 classes
-rwxr-xr-x 1 vince vince  755 2007-09-04 10:08 web.xml

./WEB-INF/lib:
total 1648
-rw-r--r-- 1 vince vince 1657246 2007-09-04 10:00 wicket-1 (See http://ket-1.ora-code.com).3.0-beta3.jar
-rw-r--r-- 1 vince vince    7449 2007-09-04 10:00 slf4j-simple-1 (See http://ple-1.ora-code.com).4.3.jar
-rw-r--r-- 1 vince vince   15345 2007-09-04 10:00 slf4j-api-1 (See http://api-1.ora-code.com).4.3.jar

./WEB-INF/classes:
total 8
-rw-r--r-- 1 vince vince  601 2007-09-04 10:04 HelloWicket.html
drwxr-xr-x 2 vince vince 4096 2007-09-04 10:20 mypackage

./WEB-INF/classes/mypackage:
total 16
-rw-r--r-- 1 vince vince 238 2007-09-04 10:06 HelloWicket.java
-rw-r--r-- 1 vince vince 192 2007-09-04 10:20 HelloWicketApp.java
-rw-r--r-- 1 vince vince 468 2007-09-04 10:20 HelloWicket.class
-rw-r--r-- 1 vince vince 347 2007-09-04 10:20 HelloWicketApp.class


Thank you,
   Vince

©2008 junlu.com - Jax Systems, LLC, U.S.A.