Hi,
Maven should handle your dependencies. Have you added the wicket
extensions dependency to your pom.xml?
Add this to the 'dependencies' tag of your pom.xml. The Wicket
dependency should already be there.
<dependency>
<groupId>org.apache.wicket</groupId>
<artifactId>wicket-extensions</artifactId>
<version>1.3.5</version>
</dependency>
Change the 'version' according to which version of Wicket you use.
Eclipse should add Wicket extensions to your classpath when you have
this dependency. (maybe with a mvn clean eclipse command)
Regards,
Daan van Etten
Op 8 apr 2009, om 12:49 heeft Branden Tanga het volgende geschreven:
Ok, I've been racking my brain for the past few days, and I still
cannot
solve this.
I've even added wicket-extensions.jar to my .m2/repository and
rebuilt my
eclipse project with the mvn clean and mvn eclipse commands given in
the
wicket quickstart. When I open up my eclipse project, under m2_repo
I can
find my wicket-extensions.jar
I still get a noclassdeffound runtime error for AbstractTab. It
seems as if
the classpath that eclipse uses for compiling has nothing to do with
the
classpath that wicket uses at runtime. How can I print my classpath
from
within wicket?
(note: I've already added the directory that contains wicket-
extensions.jar
to my classpath variable in my .bash_profile, still the same runtime
error).
Thanks,
Branden Tanga
Programmer / EHR Systems Engineer
On Mon, Apr 6, 2009 at 1:24 AM, mailingl...@jorgenpersson.se <
mailingl...@jorgenpersson.se> wrote:
Hi.
Seems like you're missing a jar file. The
"java.lang.NoClassDefFoundError"
means just what it sais. The class can not be found in the classpath.
It has nothing to do whether the class is abstract or not.
/Jörgen
Branden Tanga skrev:
Hello all,
I'm trying to follow the examples given on wicketstuff.org for
TabbedPanel
here: http://tinyurl.com/cpzkas
My code compiles fine, but when I run it I get a noclassdeffound
error for
AbstractTab. Here's my snippet of code:
import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.extensions.ajax.markup.html.tabs.*;
import org.apache.wicket.extensions.markup.html.tabs.*;
import org.apache.wicket.markup.html.panel.*;
import org.apache.wicket.model.*;
import java.util.*;
public class MainMenu extends WebPage{
/*Constructor*/
public MainMenu() {
List<ITab> tabs = new ArrayList<ITab>();
tabs.add(new AbstractTab(new Model("first tab")) {
@Override
public Panel getPanel(String panelID) {
return new MyPanel(panelID);
}
});
} // end constructor
and here's the corresponding runtime error:
WicketMessage: Method onFormSubmitted of interface
org.apache.wicket.markup.html.form.IFormSubmitListener targeted at
component [MarkupContainer [Component id = loginForm]] threw an
exception
Root cause:
java.lang.NoClassDefFoundError:
org/apache/wicket/extensions/markup/html/tabs/AbstractTab
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:
675)........
This makes sense, as you can't directly instantiate an abstract
class
right?
You have to extend it and then implement the subclass. But I am
following
the code example as closely as I can, and I still do not
understand what I
am doing wrong.
Thanks,
Branden Tanga
Programmer / EHR Systems Engineer
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org