Hi,

I believe the problem to your [Could not instantiate bean class [de.Test]:
No default constructor found;] is that your are setting up a Wicket Page
(without default constructor) as a managed bean in Spring, when what you
actually mean was to define your [UserService] as the Spring bean.

Spring doesn't to managed the Wicket pages specifically, just bind your
services and then use the @SpringBean annotation on it and you will be fine.


On Wed, Mar 30, 2011 at 12:56 PM, hrbaer [via Apache Wicket] <
ml-node+3418488-701454310-65...@n4.nabble.com> wrote:

> Just to summarize my status:
>
> I've added *addComponentInstantiationListener( new
> SpringComponentInjector(this) );* to the init method of my xxxApplication
> file, I added *<bean id="userService"
> class="de.service.UserService"></bean>* to my applicationContext and
> withing my WebPage I have this code:
>
> public class Test extends WebPage {
>
>     @SpringBean
>     private UserService userService;
>
>     public Test( PageParameters params ) {
>
>     (...)
>
> }
>
> If I add
> <bean id="test" class="de.Test">
>     <property name="userService" ref="userService"/>
> </bean>
> to the applicationContext I get the error "Could not instantiate bean class
> [de.Test]: No default constructor found;"
>
> If I don't add this line I get the error message "*WicketMessage: Can't
> instantiate page using constructor public
> de.Test(org.apache.wicket.PageParameters) and argument
> Root cause:
> java.lang.ClassNotFoundException: net.sf.cglib.proxy.Callback (...)*"
>
> At the moment I'm at a loss. Every help would be appreciated.
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://apache-wicket.1842946.n4.nabble.com/problems-with-spring-integration-tp3416484p3418488.html
>  To start a new topic under Apache Wicket, email
> ml-node+1842946-398011874-65...@n4.nabble.com
> To unsubscribe from Apache Wicket, click 
> here<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=1842946&code=amNnYXJjaWFtQGdtYWlsLmNvbXwxODQyOTQ2fDEyNTYxMzc3ODY=>.
>
>



-- 
Sincerely,
JC (http://www.linkedin.com/in/jcgarciam)
--Anyone who has never made a mistake has never tried anything new.--


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/problems-with-spring-integration-tp3416484p3418767.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

Reply via email to