I dont have a annotated WebFilter sub-class.

I just splitted my web.xml into fragments.
So, my web-fragment.xml looks like this.


<web-fragment xmlns="http://java.sun.com/xml/ns/javaee";
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-fragment_3_0.xsd";
     version="3.0"
     id="myApp">

        <filter>
                <filter-name>wicket.myapp</filter-name>
                
<filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class>
                <init-param>
                        <param-name>applicationClassName</param-name>
<param-value>de.example.infrastructure.wicket.MyWicketApplication</param-value>
                </init-param>
        </filter>

        <filter-mapping>
                <filter-name>wicket.myapp</filter-name>
                <url-pattern>/*</url-pattern>
        </filter-mapping>


</web-fragment>

Patrick

Am 17.03.2015 um 10:10 schrieb Martin Grigorov:
Please share also the code of the @WebFilter class.

Martin Grigorov
Freelancer, available for hire!
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Tue, Mar 17, 2015 at 11:01 AM, Patrick Davids <
[email protected]> wrote:

Hi Martin,
sorry, for delay...

This is the stacktrace.

kind regards
Patrick

Information: Starting Servlet Engine: Apache Tomcat/7.0.59
ERROR [WicketFilter] - The initialization of an application with name
'wicket.myapp' has failed.
org.apache.wicket.WicketRuntimeException: Unable to create application of
class de.example.infrastructure.wicket.MyWicketApplication
         at org.apache.wicket.protocol.http.ContextParamWebApplicationFact
ory.createApplication(ContextParamWebApplicationFactory.java:86)
         at org.apache.wicket.protocol.http.ContextParamWebApplicationFact
ory.createApplication(ContextParamWebApplicationFactory.java:50)
         at org.apache.wicket.protocol.http.WicketFilter.init(
WicketFilter.java:387)
         at org.apache.wicket.protocol.http.WicketFilter.init(
WicketFilter.java:353)
         at org.apache.catalina.core.ApplicationFilterConfig.initFilter(
ApplicationFilterConfig.java:279)
         at org.apache.catalina.core.ApplicationFilterConfig.getFilter(
ApplicationFilterConfig.java:260)
         at org.apache.catalina.core.ApplicationFilterConfig.<init>
(ApplicationFilterConfig.java:105)
         at org.apache.catalina.core.StandardContext.filterStart(
StandardContext.java:4854)
         at org.apache.catalina.core.StandardContext.startInternal(
StandardContext.java:5542)
         at org.apache.catalina.util.LifecycleBase.start(
LifecycleBase.java:150)
         at org.apache.catalina.core.ContainerBase$StartChild.call(
ContainerBase.java:1575)
         at org.apache.catalina.core.ContainerBase$StartChild.call(
ContainerBase.java:1565)
         at java.util.concurrent.FutureTask.run(FutureTask.java:262)
         at java.util.concurrent.ThreadPoolExecutor.runWorker(
ThreadPoolExecutor.java:1145)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(
ThreadPoolExecutor.java:615)
         at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.ClassNotFoundException: de.example.infrastructure.
wicket.MyWicketApplication
         at org.apache.catalina.loader.WebappClassLoader.loadClass(
WebappClassLoader.java:1720)
         at org.apache.catalina.loader.WebappClassLoader.loadClass(
WebappClassLoader.java:1571)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:270)
         at org.apache.wicket.protocol.http.ContextParamWebApplicationFact
ory.createApplication(ContextParamWebApplicationFactory.java:72)
         ... 15 more
Mrz 17, 2015 8:22:57 AM org.apache.catalina.core.StandardContext
filterStart
Schwerwiegend: Exception starting filter wicket.myapp
javax.servlet.ServletException: org.apache.wicket.WicketRuntimeException:
Unable to create application of class de.example.infrastructure.
wicket.MyWicketApplication
         at org.apache.wicket.protocol.http.WicketFilter.init(
WicketFilter.java:452)
         at org.apache.wicket.protocol.http.WicketFilter.init(
WicketFilter.java:353)
         at org.apache.catalina.core.ApplicationFilterConfig.initFilter(
ApplicationFilterConfig.java:279)
         at org.apache.catalina.core.ApplicationFilterConfig.getFilter(
ApplicationFilterConfig.java:260)
         at org.apache.catalina.core.ApplicationFilterConfig.<init>
(ApplicationFilterConfig.java:105)
         at org.apache.catalina.core.StandardContext.filterStart(
StandardContext.java:4854)
         at org.apache.catalina.core.StandardContext.startInternal(
StandardContext.java:5542)
         at org.apache.catalina.util.LifecycleBase.start(
LifecycleBase.java:150)
         at org.apache.catalina.core.ContainerBase$StartChild.call(
ContainerBase.java:1575)
         at org.apache.catalina.core.ContainerBase$StartChild.call(
ContainerBase.java:1565)
         at java.util.concurrent.FutureTask.run(FutureTask.java:262)
         at java.util.concurrent.ThreadPoolExecutor.runWorker(
ThreadPoolExecutor.java:1145)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(
ThreadPoolExecutor.java:615)
         at java.lang.Thread.run(Thread.java:744)
Caused by: org.apache.wicket.WicketRuntimeException: Unable to create
application of class de.example.infrastructure.wicket.MyWicketApplication
         at org.apache.wicket.protocol.http.ContextParamWebApplicationFact
ory.createApplication(ContextParamWebApplicationFactory.java:86)
         at org.apache.wicket.protocol.http.ContextParamWebApplicationFact
ory.createApplication(ContextParamWebApplicationFactory.java:50)
         at org.apache.wicket.protocol.http.WicketFilter.init(
WicketFilter.java:387)
         ... 13 more
Caused by: java.lang.ClassNotFoundException: de.example.infrastructure.
wicket.MyWicketApplication
         at org.apache.catalina.loader.WebappClassLoader.loadClass(
WebappClassLoader.java:1720)
         at org.apache.catalina.loader.WebappClassLoader.loadClass(
WebappClassLoader.java:1571)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:270)
         at org.apache.wicket.protocol.http.ContextParamWebApplicationFact
ory.createApplication(ContextParamWebApplicationFactory.java:72)
         ... 15 more

Am 16.03.2015 um 09:16 schrieb Martin Grigorov:

  Hi,

What is the actual stacktrace ?

Martin Grigorov
Freelancer, available for hire!
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Mon, Mar 16, 2015 at 10:05 AM, Patrick Davids <
[email protected]> wrote:

  Hi all,
does someone have some experiences concerning wicket and web-fragments?

I set up a project with two jars, having both a web-fragments.xml.

One of the web-fragments.xml defines a filter starting a
WicketApplication, but I run into a ClassNotFoundExceptions, while it
gets
initilaized.

The WicketApplication sub-class class is contained in the jar, so I'm
wondering why its not working.

Are there any further classloader configurations I have to do in tomcat
or
somewhere else?

(tested with wicket7)

kind regards
Patrick

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]




--
Mit freundlichen Grüßen,

Patrick Davids

nuboLOGIC GmbH & Co. KG
Südportal 1 • 22848 Norderstedt

Tel.: +49 40 228539 732
Email: [email protected]

http://www.nubologic.com

Handelsregister: HRA6819 Pi  | Amtsgericht Pinneberg

Geschäftsführung der Verwaltungsgesellschaft
Christian Capelle

HRB10145Pi | Amtsgericht Pinneberg


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]




--
Mit freundlichen Grüßen,

Patrick Davids

nuboLOGIC GmbH & Co. KG
Südportal 1 • 22848 Norderstedt

Tel.: +49 40 228539 732
Email: [email protected]

http://www.nubologic.com

Handelsregister: HRA6819 Pi  | Amtsgericht Pinneberg

Geschäftsführung der Verwaltungsgesellschaft
Christian Capelle

HRB10145Pi | Amtsgericht Pinneberg

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to