Re: Error "no application attached to current thread main" with AnnotApplicationContextMock

2010-08-02 Thread david_

I receive this exception also on method Application.get();
It happens on Tomcat after a redeploy. When I remove the "work" directory of
Tomcat, and do a restart, the error is gone.


2010/8/2 Sam Grönblom [via Apache Wicket] <
ml-node+2309949-1951419770-232...@n4.nabble.com
>

> On 07/29/2010 06:21 PM, Igor Vaynberg wrote:
>
> > what version of wicket?
> >
> > -igor
> >
> > On Thu, Jul 29, 2010 at 1:54 AM, Sam Grönblom<[hidden 
> > email]<http://user/SendEmail.jtp?type=node&node=2309949&i=0>>
>  wrote:
> >
> >> Getting this error when trying to use AnnotApplicationContextMock.
> Judging
> >> by the example shown in the latest javadocs:
> >>
> http://wicketbyexample.com/api/wicket-spring/latest/org/apache/wicket/spring/injection/annot/test/AnnotApplicationContextMock.html
> >> you should create the application context mock before initializing
> >> WicketTester. However then you get the error mentioned in the subject,
> ie.
> >> "no application attached to current thread main".
> >>
> >> However if I initialize the WicketTester before the
> >> AnnotApplicationContextMock I get null pointer errors which are caused
> when
> >> the Panel or Page to be tested tries to access a service, which seems to
>
> >> apply that they don't get injected correctly in this case either.
> >>
> >> -
> >> To unsubscribe, e-mail: [hidden 
> >> email]<http://user/SendEmail.jtp?type=node&node=2309949&i=1>
> >> For additional commands, e-mail: [hidden 
> >> email]<http://user/SendEmail.jtp?type=node&node=2309949&i=2>
> >>
> >>
> >>
> > -
> > To unsubscribe, e-mail: [hidden 
> > email]<http://user/SendEmail.jtp?type=node&node=2309949&i=3>
> > For additional commands, e-mail: [hidden 
> > email]<http://user/SendEmail.jtp?type=node&node=2309949&i=4>
> >
> >
> 1.4.9
>
> ---------------------
> To unsubscribe, e-mail: [hidden 
> email]<http://user/SendEmail.jtp?type=node&node=2309949&i=5>
> For additional commands, e-mail: [hidden 
> email]<http://user/SendEmail.jtp?type=node&node=2309949&i=6>
>
>
>
> --
>  View message @
> http://apache-wicket.1842946.n4.nabble.com/Error-no-application-attached-to-current-thread-main-with-AnnotApplicationContextMock-tp2306157p2309949.html
> To start a new topic under Wicket - User, email
> ml-node+1842947-1066186228-232...@n4.nabble.com
> To unsubscribe from Wicket - User, click 
> here<http://apache-wicket.1842946.n4.nabble.com/subscriptions/Unsubscribe.jtp?code=bWV1bGVtYW5zLmRhdmlkQGdtYWlsLmNvbXwxODQyOTQ3fC0xOTcyOTcxMjQ2>.
>
>
>

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Error-no-application-attached-to-current-thread-main-with-AnnotApplicationContextMock-tp2306157p2309964.html
Sent from the Wicket - User mailing list archive at Nabble.com.


Re: Error "no application attached to current thread main" with AnnotApplicationContextMock

2010-08-02 Thread Sam Grönblom

On 07/29/2010 06:21 PM, Igor Vaynberg wrote:

what version of wicket?

-igor

On Thu, Jul 29, 2010 at 1:54 AM, Sam Grönblom  wrote:
   

Getting this error when trying to use AnnotApplicationContextMock. Judging
by the example shown in the latest javadocs:
http://wicketbyexample.com/api/wicket-spring/latest/org/apache/wicket/spring/injection/annot/test/AnnotApplicationContextMock.html
you should create the application context mock before initializing
WicketTester. However then you get the error mentioned in the subject, ie.
"no application attached to current thread main".

However if I initialize the WicketTester before the
AnnotApplicationContextMock I get null pointer errors which are caused when
the Panel or Page to be tested tries to access a service, which seems to
apply that they don't get injected correctly in this case either.

-
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

   

1.4.9

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



Re: Error "no application attached to current thread main" with AnnotApplicationContextMock

2010-07-29 Thread Igor Vaynberg
what version of wicket?

-igor

On Thu, Jul 29, 2010 at 1:54 AM, Sam Grönblom  wrote:
> Getting this error when trying to use AnnotApplicationContextMock. Judging
> by the example shown in the latest javadocs:
> http://wicketbyexample.com/api/wicket-spring/latest/org/apache/wicket/spring/injection/annot/test/AnnotApplicationContextMock.html
> you should create the application context mock before initializing
> WicketTester. However then you get the error mentioned in the subject, ie.
> "no application attached to current thread main".
>
> However if I initialize the WicketTester before the
> AnnotApplicationContextMock I get null pointer errors which are caused when
> the Panel or Page to be tested tries to access a service, which seems to
> apply that they don't get injected correctly in this case either.
>
> -
> 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



Error "no application attached to current thread main" with AnnotApplicationContextMock

2010-07-29 Thread Sam Grönblom
Getting this error when trying to use AnnotApplicationContextMock. 
Judging by the example shown in the latest javadocs: 
http://wicketbyexample.com/api/wicket-spring/latest/org/apache/wicket/spring/injection/annot/test/AnnotApplicationContextMock.html 
you should create the application context mock before initializing 
WicketTester. However then you get the error mentioned in the subject, 
ie. "no application attached to current thread main".


However if I initialize the WicketTester before the 
AnnotApplicationContextMock I get null pointer errors which are caused 
when the Panel or Page to be tested tries to access a service, which 
seems to apply that they don't get injected correctly in this case either.


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