Cross-Site Websocket Hijacking question

2015-03-17 Thread Gergely Nagy
Hi fellow Wicketers,

I have a question regarding CSWH. I was reading this article recently:
http://www.notsosecure.com/blog/2014/11/27/how-cross-site-websocket-hijacking-could-lead-to-full-session-compromise/

It made me wondering how can I implement my protection against this kind of
attack? My tests show me that WebSocketBehavior is prone to this kind of
attack simply out-of-the-box.

I am using wicket-native-websocket-jetty9 version 7.0.0-M5.

I was thinking about implementing a custom WebSocketBehavior and overriding
the onConnect method, so I can get the Origin header and reject the
connection request if it's not matching the originator host.

But ConnectedMessage doesn't provide the headers. So does anybody have any
suggestions how to implement this? Or maybe I miss the point and this
should be implemented completely differently?

Thank you,
Gergely Nagy


Re: Problem with ModalWindowPage example

2015-03-17 Thread Martin Grigorov
Hi,

On Tue, Mar 17, 2015 at 3:04 PM, wicket556  wrote:

> Hi, thanks for a quick reply.
>
> The java code is the same as in
> http://www.wicket-library.com/wicket-examples/ajax/modal-window
>   . I'm
> only changed
>
> ModalWindowPage extends BasePage
>   to:
> ModalWindowPage extends WebPage
>
> and changed html for ModalWindowPage
>
> 
> http://wicket.apache.org";>
> Last modal window result:
>
> 
>  Show modal dialog with a page
> 
> 
>  Show modal dialog with panel
> 
>
>
> to:
>
> 
> 
> 
> Apache Wicket Quickstart
>  media="screen"
> title="Stylesheet" />
> 
> 
> Last modal window result:
>
> 
>  Show modal dialog with a page
> 
> 
>  Show modal dialog with panel
> 
> 
>
> I checked the javascript and i get error: Uncaught TypeError: undefined is
> not a function
> which shows me the line of code:
>
> *if (Wicket.Browser.isIELessThan7()) {*
>

This means that either wicket-ajax-jquery.js or wicket-event-jquery.js is
not loaded before modal.js.
Check what is the order in the generated HTML.
Make sure you call super.renderHead(response) wherever you override this
method.

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



>
> in modal-ver-1426596088944.js:1204
>
> When I click link I get this kind of ajax response:
>
>
>  id="modal25c" > > encoding="wicket1">
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Problem-with-ModalWindowPage-example-tp4670030p4670032.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Problem with ModalWindowPage example

2015-03-17 Thread wicket556
Hi, thanks for a quick reply.

The java code is the same as in 
http://www.wicket-library.com/wicket-examples/ajax/modal-window
  . I'm
only changed 

ModalWindowPage extends BasePage
  to:
ModalWindowPage extends WebPage

and changed html for ModalWindowPage 


http://wicket.apache.org";>
Last modal window result: 


 Show modal dialog with a page 


 Show modal dialog with panel 



to:




Apache Wicket Quickstart



Last modal window result: 


 Show modal dialog with a page 


 Show modal dialog with panel 



I checked the javascript and i get error: Uncaught TypeError: undefined is
not a function 
which shows me the line of code:

*if (Wicket.Browser.isIELessThan7()) {*

in modal-ver-1426596088944.js:1204

When I click link I get this kind of ajax response:






--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Problem-with-ModalWindowPage-example-tp4670030p4670032.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Problem with ModalWindowPage example

2015-03-17 Thread Martin Grigorov
Hi,

Check the JavaScript console for any errors.
Also in Dev Tools > Network tab for the actual Ajax response.
What looks suspicious to me is: . It
shouldn't be empty.
Please show us the related Java code.

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

On Tue, Mar 17, 2015 at 2:08 PM, wicket556  wrote:

> Hi I started to build my application with Wicket(7).
>
> And I have problem with ajax modal window example. Basically they don't
> show
> up.
>
> This is the message which I get from Wicket Ajax Debug Window. I don't see
> what can be wrong with this. Maybe someone would be able to help me with
> that.
>
> Thanks in advance.
>
>
> INFO: focus set on showModal139
> INFO: Received ajax response (2368 characters)
> INFO:
>  id="modal13c" > >
> INFO: returned focused element: javascript:;
> INFO: returned focused element: javascript:;
> INFO: Response processed successfully.
> INFO: refocus last focused component not needed/allowed
> INFO: focus removed from showModal139
> INFO: focus set on undefined
> INFO: focus set on showModal139
> INFO: focus removed from showModal139
> INFO: focus set on undefined
> INFO: focus set on showModal139
> INFO: focus removed from showModal139
> INFO: focus set on wicketDebugLink
> INFO: focus removed from wicketDebugLink
> INFO: focus set on showModal23a
> INFO: Received ajax response (7874 characters)
> INFO:
>  id="modal23e" > > encoding="wicket1">
> INFO: returned focused element: javascript:;
> INFO: returned focused element: javascript:;
> INFO: Response processed successfully.
> INFO: refocus last focused component not needed/allowed
> INFO: focus removed from showModal23a
> INFO: focus set on undefined
> INFO: focus removed from undefined
> INFO: focus set on undefined
> INFO: focus removed from undefined
> INFO: focus set on undefined
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Problem-with-ModalWindowPage-example-tp4670030.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Problem with ModalWindowPage example

2015-03-17 Thread wicket556
Hi I started to build my application with Wicket(7).

And I have problem with ajax modal window example. Basically they don't show
up.

This is the message which I get from Wicket Ajax Debug Window. I don't see
what can be wrong with this. Maybe someone would be able to help me with
that.

Thanks in advance.


INFO: focus set on showModal139
INFO: Received ajax response (2368 characters)
INFO: 

INFO: returned focused element: javascript:;
INFO: returned focused element: javascript:;
INFO: Response processed successfully.
INFO: refocus last focused component not needed/allowed
INFO: focus removed from showModal139
INFO: focus set on undefined
INFO: focus set on showModal139
INFO: focus removed from showModal139
INFO: focus set on undefined
INFO: focus set on showModal139
INFO: focus removed from showModal139
INFO: focus set on wicketDebugLink
INFO: focus removed from wicketDebugLink
INFO: focus set on showModal23a
INFO: Received ajax response (7874 characters)
INFO: 

INFO: returned focused element: javascript:;
INFO: returned focused element: javascript:;
INFO: Response processed successfully.
INFO: refocus last focused component not needed/allowed
INFO: focus removed from showModal23a
INFO: focus set on undefined
INFO: focus removed from undefined
INFO: focus set on undefined
INFO: focus removed from undefined
INFO: focus set on undefined


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Problem-with-ModalWindowPage-example-tp4670030.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: TextTemplateHeaderContributor from 1.4 to 6

2015-03-17 Thread Martin Grigorov
Yes, if you need to reuse it then put it in a Behavior!

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

On Tue, Mar 17, 2015 at 12:38 PM, David Kaufman 
wrote:

> Hi Martin,
>
> is it also eligible to put the body inside a behavior, i.e.:
>
>  protected void addJavaScriptFile() {
> add( new Behavior() {
> @Override
> public void renderHead( final Component component, final
> IHeaderResponse response ) {
> super.renderHead( component, response );
> PackageTextTemplate template = new
> PackageTextTemplate(ClassName.class,"filename.js");
> Map variables = 
> response.render(OnDomReadyHeaderItem.
> forScript(template.asString(variables)));
>
> The problem I'm facing is that the function addJavaScriptFile is accessable
> from subclasses which either call the function or not, i.e. only in a few
> cases the header should be actually added.
>
> Thanks,
> David
>
>
> 2015-03-16 15:16 GMT+01:00 Martin Grigorov :
>
> > Hi,
> >
> > #renderHead(IHeaderResponse response) {
> >   super.renderHead(response);
> >
> >   PackageTextTemplate template = new PackageTextTemplate(ClassName.class,
> > "filename.js");
> >   Map variables = 
> >   ...
> >
> >
> >
> response.render(OnDomReadyHeaderItem.forScript(template.asString(variables)));
> > }
> >
> > Martin Grigorov
> > Freelancer, available for hire!
> > Wicket Training and Consulting
> > https://twitter.com/mtgrigorov
> >
> > On Mon, Mar 16, 2015 at 2:14 PM, David Kaufman 
> > wrote:
> >
> > > Hello,
> > >
> > > I'm currently migrating a code snippet from version 1.4 to version 6:
> > >
> > >
> > > add( TextTemplateHeaderContributor.forJavaScript( ClassName.class,
> > > "filename.js", new LoadableDetachableModel > > Object>>() {
> > > @Override
> > > protected Map load() {
> > > final Map result = new
> > > HashMap();
> > > result.put( "id", "static string " );
> > > // more parameters here
> > > return result;
> > > }
> > > } ) );
> > >
> > > The migration documentation (
> > >
> > >
> >
> https://cwiki.apache.org/confluence/display/WICKET/Migration+to+Wicket+1.5#MigrationtoWicket1.5-RemovedTextTemplateHeaderContributor/StringHeaderContributor
> > > ) suggests using a custom template, e.g.
> > > private TextTemplate template = CssTemplate(new MyTextTemplate());
> > >
> > > Unfortunately, I can't find a TextTemplate which mimics the behavior in
> > my
> > > 1.4 code snippet. I found a JavaScriptTemplate, but I was unable to
> find
> > a
> > > way to use it, as it needs a TextTemplate instance in its constructor.
> > >
> > > Thanks,
> > > David
> > >
> >
>


Re: TextTemplateHeaderContributor from 1.4 to 6

2015-03-17 Thread David Kaufman
Hi Martin,

is it also eligible to put the body inside a behavior, i.e.:

 protected void addJavaScriptFile() {
add( new Behavior() {
@Override
public void renderHead( final Component component, final
IHeaderResponse response ) {
super.renderHead( component, response );
PackageTextTemplate template = new
PackageTextTemplate(ClassName.class,"filename.js");
Map variables = 
response.render(OnDomReadyHeaderItem.
forScript(template.asString(variables)));

The problem I'm facing is that the function addJavaScriptFile is accessable
from subclasses which either call the function or not, i.e. only in a few
cases the header should be actually added.

Thanks,
David


2015-03-16 15:16 GMT+01:00 Martin Grigorov :

> Hi,
>
> #renderHead(IHeaderResponse response) {
>   super.renderHead(response);
>
>   PackageTextTemplate template = new PackageTextTemplate(ClassName.class,
> "filename.js");
>   Map variables = 
>   ...
>
>
> response.render(OnDomReadyHeaderItem.forScript(template.asString(variables)));
> }
>
> Martin Grigorov
> Freelancer, available for hire!
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Mon, Mar 16, 2015 at 2:14 PM, David Kaufman 
> wrote:
>
> > Hello,
> >
> > I'm currently migrating a code snippet from version 1.4 to version 6:
> >
> >
> > add( TextTemplateHeaderContributor.forJavaScript( ClassName.class,
> > "filename.js", new LoadableDetachableModel > Object>>() {
> > @Override
> > protected Map load() {
> > final Map result = new
> > HashMap();
> > result.put( "id", "static string " );
> > // more parameters here
> > return result;
> > }
> > } ) );
> >
> > The migration documentation (
> >
> >
> https://cwiki.apache.org/confluence/display/WICKET/Migration+to+Wicket+1.5#MigrationtoWicket1.5-RemovedTextTemplateHeaderContributor/StringHeaderContributor
> > ) suggests using a custom template, e.g.
> > private TextTemplate template = CssTemplate(new MyTextTemplate());
> >
> > Unfortunately, I can't find a TextTemplate which mimics the behavior in
> my
> > 1.4 code snippet. I found a JavaScriptTemplate, but I was unable to find
> a
> > way to use it, as it needs a TextTemplate instance in its constructor.
> >
> > Thanks,
> > David
> >
>


Re: Wicket in web-fragments environment

2015-03-17 Thread Patrick Davids

> So /META-INF/web-fragment.xml and de.example.infrastructure.wicket.
> MyWicketApplication are in the same .jar file ?

Correct.

> It seems the code at ... doesn't work in this case.
Jepp, also have found this code part, and due to the mentioned 
bug-entry, my initial question "arises".


> Please create a quickstart and attach it to a ticket in JIRA.
Ok, but I think I am not able to do it before weekend.

Thanx so far...
Patrick

Am 17.03.2015 um 10:47 schrieb Martin Grigorov:

Oh, right!

So /META-INF/web-fragment.xml and de.example.infrastructure.wicket.
MyWicketApplication are in the same .jar file ?
It seems the code at
https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/protocol/http/ContextParamWebApplicationFactory.java#L64-L72
doesn't work in this case.
Please create a quickstart and attach it to a ticket in JIRA.
Thanks!



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

On Tue, Mar 17, 2015 at 11:24 AM, Patrick Davids <
patrick.dav...@nubologic.com> wrote:


I dont have a annotated WebFilter sub-class.

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


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">

 
 wicket.myapp
 org.apache.wicket.protocol.http.
WicketFilter
 
 applicationClassName
  de.example.infrastructure.wicket.
MyWicketApplication
 
 

 
 wicket.myapp
 /*
 




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 <
patrick.dav...@nubologic.com> 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.
(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)
  a

Re: Wicket in web-fragments environment

2015-03-17 Thread Martin Grigorov
Oh, right!

So /META-INF/web-fragment.xml and de.example.infrastructure.wicket.
MyWicketApplication are in the same .jar file ?
It seems the code at
https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/protocol/http/ContextParamWebApplicationFactory.java#L64-L72
doesn't work in this case.
Please create a quickstart and attach it to a ticket in JIRA.
Thanks!



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

On Tue, Mar 17, 2015 at 11:24 AM, Patrick Davids <
patrick.dav...@nubologic.com> wrote:

> I dont have a annotated WebFilter sub-class.
>
> I just splitted my web.xml into fragments.
> So, my web-fragment.xml looks like this.
>
>
> 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">
>
> 
> wicket.myapp
> org.apache.wicket.protocol.http.
> WicketFilter
> 
> applicationClassName
>  de.example.infrastructure.wicket.
> MyWicketApplication
> 
> 
>
> 
> wicket.myapp
> /*
> 
>
>
> 
>
> 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 <
>> patrick.dav...@nubologic.com> 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.
>>> (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(
>>> ApplicationFi

Re: Wicket in web-fragments environment

2015-03-17 Thread Patrick Davids

I dont have a annotated WebFilter sub-class.

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


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">


wicket.myapp

org.apache.wicket.protocol.http.WicketFilter

applicationClassName
		 
de.example.infrastructure.wicket.MyWicketApplication





wicket.myapp
/*





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 <
patrick.dav...@nubologic.com> 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.
(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.
(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:74

Re: Wicket in web-fragments environment

2015-03-17 Thread 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 <
patrick.dav...@nubologic.com> 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.
> (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.
> (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.
> wic

Re: Wicket in web-fragments environment

2015-03-17 Thread Maxim Solodovnik
Seems to be bad classpath
The main class for your application is not found

On Tue, Mar 17, 2015 at 3:01 PM, Patrick Davids <
patrick.dav...@nubologic.com> 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.
> (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.
> (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.loadCla

Re: Wicket in web-fragments environment

2015-03-17 Thread Patrick Davids

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.ContextParamWebApplicationFactory.createApplication(ContextParamWebApplicationFactory.java:86)
	at 
org.apache.wicket.protocol.http.ContextParamWebApplicationFactory.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.(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.ContextParamWebApplicationFactory.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.(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.ContextParamWebApplicationFactory.createApplication(ContextParamWebApplicationFactory.java:86)
	at 
org.apache.wicket.protocol.http.ContextParamWebApplicationFactory.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.ContextParamWebApplicationFactory.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 Trai