Wicket on glassfish v3

I was hoping this would be easier, because I just want to do a simple test run with Wicket inside an EAR on GlassFish v3. However, now that I have added the Wicket libraries through the netbeans plugin to my WAR project

  • gate 1.4.10.jar
  • extension gate-1.4.10.jar
  • SLF4J-api-1.4.2.jar
  • SLF4J-jdk14-1.4.2.jar

I get this error on startup when I try to run my GlassFish web application:

exceptions

javax.servlet.ServletException: PWC1243: filter execution caused a root cause exception

java.lang.NoClassDefFoundError: org / apache / speed / application / speed

Is wicket speed required depending on addiction? I checked the default project structure created by maven and found no dependency. I also checked the + ejb wicket guide, which also does not mention speed.

Now that I have added speed to my classpath, I get this error:

http://jira.codehaus.org/browse/MSITE-286

This seems to be a problem resolved in 2008 (I, of course, used the latest version).

Any ideas on what I'm doing wrong?

early

+4
source share
1 answer

The gate does not require speed, although it can interact with it through the .jar calibration speed library.

Fully stacktrace can help determine what is trying to load it, although problems with running web applications can be painful for diagnosis.

EDIT:

The relevant piece of stacktrace seems

java.lang.NoClassDefFoundError: org/apache/velocity/app/Velocity at org.apache.wicket.velocity.Initializer.init(Initializer.java:63) at org.apache.wicket.Application.callInitializers(Application.java:843) at org.apache.wicket.Application.initializeComponents(Application.java:678) at org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:725) 

Thus, the gate application is certainly trying to load speed, and we cannot blame the glass fish. I will go to a machine where I have a gate source, and maybe more ideas will come back, but it seems to me that your web.xml may also have useful information about the gate configuration.

Diagnostics

Not a web.xml problem.

The problem is that Application.callInitializers() loads initializers from all wicket.properties files into the classpath and tries to initialize related components.

You have wicket-velocity.jar on your way to the class, although you are not using speed, and the gate tries to initialize it, because it contains a wicket.properties file that calls org.apache.wicket.velocity.Initializer.init() ( which is also located at the wickets -velocity.jar). This method attempts to call the static init method in Velocity, which is not in the classpath.

If you get wicket-velocity.jar from your class path, this problem should go away.

+3
source

All Articles