Hello,

I use click (2.3.0) and spring (3.2.4)

When I try to run my app, I get during start:

(...)
Caused by: org.springframework.beans.BeanInstantiationException: Could not
instantiate bean class [com.mytest.page.HomePage]: Constructor threw
exception; nested exception is java.lang.RuntimeException: No Context
available on ThreadLocal Context Stack
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:163)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy
.instantiate(SimpleInstantiationStrategy.java:87)
at org.springframework.beans.factory.support.
AbstractAutowireCapableBeanFactory.instantiateBean(
AbstractAutowireCapableBeanFactory.java:1000)
... 21 more

java.lang.RuntimeException: No Context available on ThreadLocal Context
Stack
at org.apache.click.Context$ContextStack.peek(Context.java:966)
at org.apache.click.Context$ContextStack.access$000(Context.java:917)
at org.apache.click.Context.getThreadLocalContext(Context.java:165)
at org.apache.click.extras.control.MenuFactory.loadFromMenuXml(MenuFactory
.java:499)
at org.apache.click.extras.control.MenuFactory.getRootMenu(MenuFactory
.java:302)
at org.apache.click.extras.control.MenuFactory.getRootMenu(MenuFactory
.java:255)
at org.apache.click.extras.control.MenuFactory.getRootMenu(MenuFactory
.java:197)
at com.mytest.page.BaseTemplate.<init>(BaseTemplate.java:19)

where BaseTemplate.java:19

        rootMenu = menuFactory.getRootMenu();



Without menu it runs correctly ( I did spring configuration according to
documentation<http://click.apache.org/docs/extras-api/org/apache/click/extras/spring/package-summary.html>)


How to solve it?


Tomasz

Reply via email to