Wicket spring security sample app

2012-01-14 Thread Brian Lavender
Does someone have a sample of the current spring security with Wicket 
auth-roles?
One that I can do the following.

mvn jetty:run

and see it run? 

brian
-- 
Brian Lavender
http://www.brie.com/brian/

There are two ways of constructing a software design. One way is to
make it so simple that there are obviously no deficiencies. And the other
way is to make it so complicated that there are no obvious deficiencies.

Professor C. A. R. Hoare
The 1980 Turing award lecture

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



wicket-spring version

2011-09-27 Thread boy_oh_boy
Hello,

Very new to Wicket. Trying to integrate an existing Spring application with
the latest Wicket release.

Versions:

Wicket - 1.5.0
SpringFramework - 2.5.6

I am following the annotations based approach mentioned here -
https://cwiki.apache.org/WICKET/spring.html. 

Now, which version of wicket-spring-annot do I use? In the maven repo, the
latest version is 1.3.7. So, do I need to use 1.3.7 version of
wicket-spring jar too? When I use 1.3.7 for both wicket-spring and
wicket-spring-annot, I get this error when I start up jetty server:

:2432011-09-27 11:12:58.635::WARN:  failed BCWicketFilter
java.lang.NoSuchMethodError:
org.apache.wicket.MetaDataKey.init(Ljava/lang/Class;)V
at
org.apache.wicket.spring.injection.annot.SpringComponentInjector$1.init(SpringComponentInjector.java:58)
at
org.apache.wicket.spring.injection.annot.SpringComponentInjector.clinit(SpringComponentInjector.java:55)
at
com.inceptor.bcWicket.app.BCWicketApplication.init(BCWicketApplication.java:19)
at org.apache.wicket.Application.initApplication(Application.java:805)
at 
org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:346)
at 
org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:286)
at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:99)
at 
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at
org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:570)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:139)
at
org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1191)
at
org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:481)
at 
org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:434)
at 
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at
org.mortbay.jetty.plugin.Jetty6PluginWebApplication.start(Jetty6PluginWebApplication.java:147)
at
org.mortbay.jetty.plugin.AbstractJettyRunMojo$1.changesDetected(AbstractJettyRunMojo.java:372)
at org.mortbay.jetty.plugin.util.Scanner.run(Scanner.java:159)



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

2011-09-27 Thread Pointbreak
Don't use wicket-spring-annot, just wicket-spring.

On Tuesday, September 27, 2011 3:15 AM, boy_oh_boy
muralih...@gmail.com wrote:
 Hello,
 
 Very new to Wicket. Trying to integrate an existing Spring application
 with
 the latest Wicket release.
 
 Versions:
 
 Wicket - 1.5.0
 SpringFramework - 2.5.6
 
 I am following the annotations based approach mentioned here -
 https://cwiki.apache.org/WICKET/spring.html. 
 
 Now, which version of wicket-spring-annot do I use? In the maven repo,
 the
 latest version is 1.3.7. So, do I need to use 1.3.7 version of
 wicket-spring jar too? When I use 1.3.7 for both wicket-spring and
 wicket-spring-annot, I get this error when I start up jetty server:
 
 :2432011-09-27 11:12:58.635::WARN:  failed BCWicketFilter
 java.lang.NoSuchMethodError:
 org.apache.wicket.MetaDataKey.init(Ljava/lang/Class;)V
   at
 org.apache.wicket.spring.injection.annot.SpringComponentInjector$1.init(SpringComponentInjector.java:58)
   at
 org.apache.wicket.spring.injection.annot.SpringComponentInjector.clinit(SpringComponentInjector.java:55)
   at
 com.inceptor.bcWicket.app.BCWicketApplication.init(BCWicketApplication.java:19)
   at org.apache.wicket.Application.initApplication(Application.java:805)
   at 
 org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:346)
   at 
 org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:286)
   at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:99)
   at 
 org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
   at
 org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:570)
   at org.mortbay.jetty.servlet.Context.startContext(Context.java:139)
   at
 org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1191)
   at
 org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:481)
   at 
 org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:434)
   at 
 org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
   at
 org.mortbay.jetty.plugin.Jetty6PluginWebApplication.start(Jetty6PluginWebApplication.java:147)
   at
 org.mortbay.jetty.plugin.AbstractJettyRunMojo$1.changesDetected(AbstractJettyRunMojo.java:372)
   at org.mortbay.jetty.plugin.util.Scanner.run(Scanner.java:159)
 
 
 
 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/wicket-spring-version-tp3846702p3846702.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
 
 

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



Re: wicket-spring version

2011-09-27 Thread Martin Grigorov
See wicket-examples-1.5.0.war. It comes with the full Wicket distro
and contains a demo of a Spring application.
Or you can download it from Maven too.

On Tue, Sep 27, 2011 at 12:39 PM, Pointbreak
pointbreak+wicketst...@ml1.net wrote:
 Don't use wicket-spring-annot, just wicket-spring.

 On Tuesday, September 27, 2011 3:15 AM, boy_oh_boy
 muralih...@gmail.com wrote:
 Hello,

 Very new to Wicket. Trying to integrate an existing Spring application
 with
 the latest Wicket release.

 Versions:

 Wicket - 1.5.0
 SpringFramework - 2.5.6

 I am following the annotations based approach mentioned here -
 https://cwiki.apache.org/WICKET/spring.html.

 Now, which version of wicket-spring-annot do I use? In the maven repo,
 the
 latest version is 1.3.7. So, do I need to use 1.3.7 version of
 wicket-spring jar too? When I use 1.3.7 for both wicket-spring and
 wicket-spring-annot, I get this error when I start up jetty server:

 :2432011-09-27 11:12:58.635::WARN:  failed BCWicketFilter
 java.lang.NoSuchMethodError:
 org.apache.wicket.MetaDataKey.init(Ljava/lang/Class;)V
       at
 org.apache.wicket.spring.injection.annot.SpringComponentInjector$1.init(SpringComponentInjector.java:58)
       at
 org.apache.wicket.spring.injection.annot.SpringComponentInjector.clinit(SpringComponentInjector.java:55)
       at
 com.inceptor.bcWicket.app.BCWicketApplication.init(BCWicketApplication.java:19)
       at org.apache.wicket.Application.initApplication(Application.java:805)
       at 
 org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:346)
       at 
 org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:286)
       at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:99)
       at 
 org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
       at
 org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:570)
       at org.mortbay.jetty.servlet.Context.startContext(Context.java:139)
       at
 org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1191)
       at
 org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:481)
       at 
 org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:434)
       at 
 org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
       at
 org.mortbay.jetty.plugin.Jetty6PluginWebApplication.start(Jetty6PluginWebApplication.java:147)
       at
 org.mortbay.jetty.plugin.AbstractJettyRunMojo$1.changesDetected(AbstractJettyRunMojo.java:372)
       at org.mortbay.jetty.plugin.util.Scanner.run(Scanner.java:159)



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



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





-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: wicket-spring version

2011-09-27 Thread boy_oh_boy
Thanks. That fixed it. The jetty and the application starts up. But when I
try to access the first page, it fails at:

public LoginService(){
   Injector.get().inject(this); -- failing line
}

With the following stackTrace:

Root cause:

java.lang.NoSuchMethodError:
org.springframework.beans.factory.config.BeanDefinition.isPrimary()Z
 at 
org.apache.wicket.spring.injection.annot.AnnotProxyFieldValueFactory.getBeanNameOfClass(AnnotProxyFieldValueFactory.java:232)
 at 
org.apache.wicket.spring.injection.annot.AnnotProxyFieldValueFactory.getBeanName(AnnotProxyFieldValueFactory.java:164)
 at 
org.apache.wicket.spring.injection.annot.AnnotProxyFieldValueFactory.getFieldValue(AnnotProxyFieldValueFactory.java:112)
 at org.apache.wicket.injection.Injector.inject(Injector.java:111)
 at 
org.apache.wicket.spring.injection.annot.SpringComponentInjector.inject(SpringComponentInjector.java:124)
 at test.LoginService.init(LoginService.java:22)


I have checked the mvn dependency:tree to be sure that it is not referring
to different versions of spring framework. From the dependency tree, I see
the version 2.5.6 being referred and no other versions. What could be the
problem?

Thanks.

On Tue, Sep 27, 2011 at 11:40 AM, pointbreak+wicketstuff [via Apache Wicket]
ml-node+s1842946n3846753...@n4.nabble.com wrote:

 Don't use wicket-spring-annot, just wicket-spring.

 On Tuesday, September 27, 2011 3:15 AM, boy_oh_boy
 [hidden email] http://user/SendEmail.jtp?type=nodenode=3846753i=0
 wrote:

  Hello,
 
  Very new to Wicket. Trying to integrate an existing Spring application
  with
  the latest Wicket release.
 
  Versions:
 
  Wicket - 1.5.0
  SpringFramework - 2.5.6
 
  I am following the annotations based approach mentioned here -
  https://cwiki.apache.org/WICKET/spring.html.
 
  Now, which version of wicket-spring-annot do I use? In the maven repo,
  the
  latest version is 1.3.7. So, do I need to use 1.3.7 version of
  wicket-spring jar too? When I use 1.3.7 for both wicket-spring and
  wicket-spring-annot, I get this error when I start up jetty server:
 
  :2432011-09-27 11:12:58.635::WARN:  failed BCWicketFilter
  java.lang.NoSuchMethodError:
  org.apache.wicket.MetaDataKey.init(Ljava/lang/Class;)V
  at
 
 org.apache.wicket.spring.injection.annot.SpringComponentInjector$1.init(SpringComponentInjector.java:58)

  at
 
 org.apache.wicket.spring.injection.annot.SpringComponentInjector.clinit(SpringComponentInjector.java:55)

  at
 
 com.inceptor.bcWicket.app.BCWicketApplication.init(BCWicketApplication.java:19)

  at org.apache.wicket.Application.initApplication(Application.java:805)
  at
 org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:346)
  at
 org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:286)
  at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:99)
  at
 org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
  at
 
 org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:570)

  at org.mortbay.jetty.servlet.Context.startContext(Context.java:139)
  at
 
 org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1191)

  at
  org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:481)

  at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:434)

  at
 org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
  at
 
 org.mortbay.jetty.plugin.Jetty6PluginWebApplication.start(Jetty6PluginWebApplication.java:147)

  at
 
 org.mortbay.jetty.plugin.AbstractJettyRunMojo$1.changesDetected(AbstractJettyRunMojo.java:372)

  at org.mortbay.jetty.plugin.util.Scanner.run(Scanner.java:159)
 
 
 
  --
  View this message in context:
 
 http://apache-wicket.1842946.n4.nabble.com/wicket-spring-version-tp3846702p3846702.html
  Sent from the Users forum mailing list archive at Nabble.com.
 
  -
  To unsubscribe, e-mail: [hidden 
  email]http://user/SendEmail.jtp?type=nodenode=3846753i=1
  For additional commands, e-mail: [hidden 
  email]http://user/SendEmail.jtp?type=nodenode=3846753i=2
 
 

 -
 To unsubscribe, e-mail: [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=3846753i=3
 For additional commands, e-mail: [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=3846753i=4



 --
  If you reply to this email, your message will be added to the discussion
 below:

 http://apache-wicket.1842946.n4.nabble.com/wicket-spring-version-tp3846702p3846753.html
  To unsubscribe from wicket-spring version, click 
 herehttp://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=3846702code=bXVyYWxpaGVyZUBnbWFpbC5jb218Mzg0NjcwMnwxMDcyNTUzNzAz.




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/wicket-spring-version-tp3846702p3846782

Re: wicket-spring version

2011-09-27 Thread Martin Grigorov
Wicket is built against Spring 3.0.x. Maybe this method has been added
in 3.x or its signature has changed since 2.x

On Tue, Sep 27, 2011 at 12:54 PM, boy_oh_boy muralih...@gmail.com wrote:
 Thanks. That fixed it. The jetty and the application starts up. But when I
 try to access the first page, it fails at:

 public LoginService(){
       Injector.get().inject(this); -- failing line
 }

 With the following stackTrace:

 Root cause:

 java.lang.NoSuchMethodError:
 org.springframework.beans.factory.config.BeanDefinition.isPrimary()Z
     at 
 org.apache.wicket.spring.injection.annot.AnnotProxyFieldValueFactory.getBeanNameOfClass(AnnotProxyFieldValueFactory.java:232)
     at 
 org.apache.wicket.spring.injection.annot.AnnotProxyFieldValueFactory.getBeanName(AnnotProxyFieldValueFactory.java:164)
     at 
 org.apache.wicket.spring.injection.annot.AnnotProxyFieldValueFactory.getFieldValue(AnnotProxyFieldValueFactory.java:112)
     at org.apache.wicket.injection.Injector.inject(Injector.java:111)
     at 
 org.apache.wicket.spring.injection.annot.SpringComponentInjector.inject(SpringComponentInjector.java:124)
     at test.LoginService.init(LoginService.java:22)


 I have checked the mvn dependency:tree to be sure that it is not referring
 to different versions of spring framework. From the dependency tree, I see
 the version 2.5.6 being referred and no other versions. What could be the
 problem?

 Thanks.

 On Tue, Sep 27, 2011 at 11:40 AM, pointbreak+wicketstuff [via Apache Wicket]
 ml-node+s1842946n3846753...@n4.nabble.com wrote:

 Don't use wicket-spring-annot, just wicket-spring.

 On Tuesday, September 27, 2011 3:15 AM, boy_oh_boy
 [hidden email] http://user/SendEmail.jtp?type=nodenode=3846753i=0
 wrote:

  Hello,
 
  Very new to Wicket. Trying to integrate an existing Spring application
  with
  the latest Wicket release.
 
  Versions:
 
  Wicket - 1.5.0
  SpringFramework - 2.5.6
 
  I am following the annotations based approach mentioned here -
  https://cwiki.apache.org/WICKET/spring.html.
 
  Now, which version of wicket-spring-annot do I use? In the maven repo,
  the
  latest version is 1.3.7. So, do I need to use 1.3.7 version of
  wicket-spring jar too? When I use 1.3.7 for both wicket-spring and
  wicket-spring-annot, I get this error when I start up jetty server:
 
  :2432011-09-27 11:12:58.635::WARN:  failed BCWicketFilter
  java.lang.NoSuchMethodError:
  org.apache.wicket.MetaDataKey.init(Ljava/lang/Class;)V
  at
 
 org.apache.wicket.spring.injection.annot.SpringComponentInjector$1.init(SpringComponentInjector.java:58)

  at
 
 org.apache.wicket.spring.injection.annot.SpringComponentInjector.clinit(SpringComponentInjector.java:55)

  at
 
 com.inceptor.bcWicket.app.BCWicketApplication.init(BCWicketApplication.java:19)

  at org.apache.wicket.Application.initApplication(Application.java:805)
  at
 org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:346)
  at
 org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:286)
  at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:99)
  at
 org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
  at
 
 org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:570)

  at org.mortbay.jetty.servlet.Context.startContext(Context.java:139)
  at
 
 org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1191)

  at
  org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:481)

  at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:434)

  at
 org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
  at
 
 org.mortbay.jetty.plugin.Jetty6PluginWebApplication.start(Jetty6PluginWebApplication.java:147)

  at
 
 org.mortbay.jetty.plugin.AbstractJettyRunMojo$1.changesDetected(AbstractJettyRunMojo.java:372)

  at org.mortbay.jetty.plugin.util.Scanner.run(Scanner.java:159)
 
 
 
  --
  View this message in context:
 
 http://apache-wicket.1842946.n4.nabble.com/wicket-spring-version-tp3846702p3846702.html
  Sent from the Users forum mailing list archive at Nabble.com.
 
  -
  To unsubscribe, e-mail: [hidden 
  email]http://user/SendEmail.jtp?type=nodenode=3846753i=1
  For additional commands, e-mail: [hidden 
  email]http://user/SendEmail.jtp?type=nodenode=3846753i=2
 
 

 -
 To unsubscribe, e-mail: [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=3846753i=3
 For additional commands, e-mail: [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=3846753i=4



 --
  If you reply to this email, your message will be added to the discussion
 below:

 http://apache-wicket.1842946.n4.nabble.com/wicket-spring-version-tp3846702p3846753.html
  To unsubscribe from wicket-spring version, click 
 herehttp://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro

Re: wicket-spring version

2011-09-27 Thread boy_oh_boy
Thanks. I was able to update the Spring version to 3.0+ and that has fixed
it (I also had to update the hibernate dependency to 3.2+ version).
Everything working as expected.


On Tue, Sep 27, 2011 at 11:58 AM, Martin Grigorov-4 [via Apache Wicket] 
ml-node+s1842946n3846797...@n4.nabble.com wrote:

 Wicket is built against Spring 3.0.x. Maybe this method has been added
 in 3.x or its signature has changed since 2.x

 On Tue, Sep 27, 2011 at 12:54 PM, boy_oh_boy [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=3846797i=0
 wrote:

  Thanks. That fixed it. The jetty and the application starts up. But when
 I
  try to access the first page, it fails at:
 
  public LoginService(){
Injector.get().inject(this); -- failing line
  }
 
  With the following stackTrace:
 
  Root cause:
 
  java.lang.NoSuchMethodError:
  org.springframework.beans.factory.config.BeanDefinition.isPrimary()Z
  at
 org.apache.wicket.spring.injection.annot.AnnotProxyFieldValueFactory.getBeanNameOfClass(AnnotProxyFieldValueFactory.java:232)

  at
 org.apache.wicket.spring.injection.annot.AnnotProxyFieldValueFactory.getBeanName(AnnotProxyFieldValueFactory.java:164)

  at
 org.apache.wicket.spring.injection.annot.AnnotProxyFieldValueFactory.getFieldValue(AnnotProxyFieldValueFactory.java:112)

  at org.apache.wicket.injection.Injector.inject(Injector.java:111)
  at
 org.apache.wicket.spring.injection.annot.SpringComponentInjector.inject(SpringComponentInjector.java:124)

  at test.LoginService.init(LoginService.java:22)
 
 
  I have checked the mvn dependency:tree to be sure that it is not
 referring
  to different versions of spring framework. From the dependency tree, I
 see
  the version 2.5.6 being referred and no other versions. What could be the

  problem?
 
  Thanks.
 
  On Tue, Sep 27, 2011 at 11:40 AM, pointbreak+wicketstuff [via Apache
 Wicket]
  [hidden email] http://user/SendEmail.jtp?type=nodenode=3846797i=1
 wrote:
 
  Don't use wicket-spring-annot, just wicket-spring.
 
  On Tuesday, September 27, 2011 3:15 AM, boy_oh_boy
  [hidden email] http://user/SendEmail.jtp?type=nodenode=3846753i=0

  wrote:
 
   Hello,
  
   Very new to Wicket. Trying to integrate an existing Spring application

   with
   the latest Wicket release.
  
   Versions:
  
   Wicket - 1.5.0
   SpringFramework - 2.5.6
  
   I am following the annotations based approach mentioned here -
   https://cwiki.apache.org/WICKET/spring.html.
  
   Now, which version of wicket-spring-annot do I use? In the maven repo,

   the
   latest version is 1.3.7. So, do I need to use 1.3.7 version of
   wicket-spring jar too? When I use 1.3.7 for both wicket-spring and
   wicket-spring-annot, I get this error when I start up jetty server:
  
   :2432011-09-27 11:12:58.635::WARN:  failed BCWicketFilter
   java.lang.NoSuchMethodError:
   org.apache.wicket.MetaDataKey.init(Ljava/lang/Class;)V
   at
  
 
 org.apache.wicket.spring.injection.annot.SpringComponentInjector$1.init(SpringComponentInjector.java:58)

 
   at
  
 
 org.apache.wicket.spring.injection.annot.SpringComponentInjector.clinit(SpringComponentInjector.java:55)

 
   at
  
 
 com.inceptor.bcWicket.app.BCWicketApplication.init(BCWicketApplication.java:19)

 
   at org.apache.wicket.Application.initApplication(Application.java:805)

   at
  org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:346)

   at
  org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:286)

   at
 org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:99)
   at
  org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)

   at
  
 
 org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:570)

 
   at org.mortbay.jetty.servlet.Context.startContext(Context.java:139)
   at
  
 
 org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1191)

 
   at
  
 org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:481)
 
   at
 org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:434)
 
   at
  org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)

   at
  
 
 org.mortbay.jetty.plugin.Jetty6PluginWebApplication.start(Jetty6PluginWebApplication.java:147)

 
   at
  
 
 org.mortbay.jetty.plugin.AbstractJettyRunMojo$1.changesDetected(AbstractJettyRunMojo.java:372)

 
   at org.mortbay.jetty.plugin.util.Scanner.run(Scanner.java:159)
  
  
  
   --
   View this message in context:
  
 
 http://apache-wicket.1842946.n4.nabble.com/wicket-spring-version-tp3846702p3846702.html
   Sent from the Users forum mailing list archive at Nabble.com.
  
   -
   To unsubscribe, e-mail: [hidden email]
 http://user/SendEmail.jtp?type=nodenode=3846753i=1
   For additional commands, e-mail: [hidden email]
 http://user/SendEmail.jtp?type=nodenode=3846753i=2

Re: Wicket Spring and JSR 330

2011-09-21 Thread Martin Grigorov
https://issues.apache.org/jira/browse/WICKET-4064

On Wed, Sep 21, 2011 at 4:49 AM, Fabio Cechinel Veronez
fabio.vero...@gmail.com wrote:
 Is there some issue we could follow?

 On Tue, Sep 20, 2011 at 10:00 PM, Igor Vaynberg igor.vaynb...@gmail.com 
 wrote:
 currently it is not, but we are looking into it...

 -igor

 On Tue, Sep 20, 2011 at 5:08 PM, Fabio Cechinel Veronez
 fabio.vero...@gmail.com wrote:
 Hello all,

 Up until now I have been using SpringBean annotation to inject spring
 beans at my page instance.

 By I would like to know if it possible to use JSR 330 annotations like
 Inject and Qualifier to indicate to Spring what bean should be
 injected.

 Thanks in advance.

 --
 Fabio Cechinel Veronez

 -
 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





 --
 Fabio Cechinel Veronez

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





-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Wicket Spring and JSR 330

2011-09-20 Thread Fabio Cechinel Veronez
Hello all,

Up until now I have been using SpringBean annotation to inject spring
beans at my page instance.

By I would like to know if it possible to use JSR 330 annotations like
Inject and Qualifier to indicate to Spring what bean should be
injected.

Thanks in advance.

-- 
Fabio Cechinel Veronez

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



Re: Wicket Spring and JSR 330

2011-09-20 Thread Igor Vaynberg
currently it is not, but we are looking into it...

-igor

On Tue, Sep 20, 2011 at 5:08 PM, Fabio Cechinel Veronez
fabio.vero...@gmail.com wrote:
 Hello all,

 Up until now I have been using SpringBean annotation to inject spring
 beans at my page instance.

 By I would like to know if it possible to use JSR 330 annotations like
 Inject and Qualifier to indicate to Spring what bean should be
 injected.

 Thanks in advance.

 --
 Fabio Cechinel Veronez

 -
 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



Re: Wicket Spring and JSR 330

2011-09-20 Thread Fabio Cechinel Veronez
Is there some issue we could follow?

On Tue, Sep 20, 2011 at 10:00 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote:
 currently it is not, but we are looking into it...

 -igor

 On Tue, Sep 20, 2011 at 5:08 PM, Fabio Cechinel Veronez
 fabio.vero...@gmail.com wrote:
 Hello all,

 Up until now I have been using SpringBean annotation to inject spring
 beans at my page instance.

 By I would like to know if it possible to use JSR 330 annotations like
 Inject and Qualifier to indicate to Spring what bean should be
 injected.

 Thanks in advance.

 --
 Fabio Cechinel Veronez

 -
 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





-- 
Fabio Cechinel Veronez

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



Re: How to use the LoadableDetachableModel in a Wicket, Spring, Hibernate based web application correctly?

2011-08-12 Thread jcgarciam
To avoid having detached objects in your web layer, try wrapping wicket
filter with the Spring OpenSessionInView
http://static.springsource.org/spring/docs/2.5.x/api/org/springframework/orm/hibernate3/support/OpenSessionInViewFilter.htmlfilter,
in that way transaction will be bound to the - HttpRequest - HttpResponse
cycle, or you can you use a more wicket way and override onBeginRequest /
onEndRequest to do your transaction work there.


On Fri, Aug 12, 2011 at 5:52 AM, Florian B. [via Apache Wicket] 
ml-node+3738252-887758337-65...@n4.nabble.com wrote:

 I'm developing a web application based on Hibernate, Spring and Wicket.

 Until now I implemented the business objects and the persistence layer. The
 transaction is managed by a transaction interceptor of the Spring framework
 and the HibernateTransactionManager. So each method of the DAO classes is
 encapsulated in a transaction. Implementing this together with unit test was
 straight forward.

 Now I come to the web application part where I also use Spring for
 dependency injection. Together with the @SpringBean annotations of the
 Wicket framework I inject the DAOs in the Wicket components. But as I'm
 pretty new to Wicket I'm a little bit stuck when using the right model for
 my business objects when passing them do the Wicket components. The problem
 is that I got a lot of exceptions due to detached business objects, which
 are not connected to the Hibernate session any more.

 I tried to use the LoadableDetachableModel solve the issues. I put the
 business object into a LoadableDetachableModel which I put into a
 CompoundModel which then is bound to Form. The form is on a page which
 should be used to create new business objects and also to edit exiting ones
 depending on the input parameters of the page.

 If there is a id in the parameters then the corresponding business object
 should be loaded from the database. When there are no parameters then a new
 business object should be created. The part were a object should be edited
 runs quite well but when a new object should be created, and I fill out the
 web form and press save, I get a NullPointerException. After some debugging
 I found out that LoadableDetachableModel could not return an instance of the
 business object as the overridden load() method could not load the object
 form the database as it was not saved there yet and therefore has no id.

 So now I'm wondering how to solve this problem. Is the
 LoadableDetachableModel the right choice? Is it advisable to separate the
 form into two interdependent forms and each form uses a different model. So
 only the edit page/form uses the LoadableDetachableModel?

 --
  If you reply to this email, your message will be added to the discussion
 below:

 http://apache-wicket.1842946.n4.nabble.com/How-to-use-the-LoadableDetachableModel-in-a-Wicket-Spring-Hibernate-based-web-application-correctly-tp3738252p3738252.html
  To start a new topic under Apache Wicket, email
 ml-node+1842946-398011874-65...@n4.nabble.com
 To unsubscribe from Apache Wicket, click 
 herehttp://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=1842946code=amNnYXJjaWFtQGdtYWlsLmNvbXwxODQyOTQ2fDEyNTYxMzc3ODY=.





-- 

JC


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-use-the-LoadableDetachableModel-in-a-Wicket-Spring-Hibernate-based-web-application-correctly-tp3738252p3739173.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: Wicket/Spring/Junit/Maven - Don't understand what's going on.

2011-07-05 Thread Niranjan Rao
Hi folks,

As everyone mentioned earlier this is/was not wicket problem. Problem is
still not solved, but after lot of println statements, I have concluded
that there is something wrong in my spring setup or the way
maven/surefire sets up the classpath.

The required files do exists at given location which is in classpath
properly. However spring complains that it cannot load the files with
FileNotFoundException.

I have posted the question to spring support forums. I can post
resolution - if any, if anyone is interested.

Regards,

Niranjan

On Sun, 2011-07-03 at 10:22 -0700, Igor Vaynberg wrote:
 yep. thats probably the cause. to elaborate a little more: eclipse
 does not separate between a test class path and normal class path,
 while maven does.
 
 -igor
 
 On Sun, Jul 3, 2011 at 3:01 AM, Harald Wellmann harald.wellm...@gmx.de 
 wrote:
  Without a stacktrace or more details about your setup, I can only guess...
  Most likely it's not a Wicket problem.
 
  I'd say your applicationContext.xml is in the wrong place where Maven can't
  see it, and Eclipse just happens to see it because m2eclipse cannot map
  Maven classpaths 1:1 to Eclipse.
 
  In the blog you cited, this line looks suspicious to me:
 
  @ContextConfiguration(locations =
  {classpath:WEB-INF/applicationContext.xml})
 
  If you have a default Maven project structure, then WEB-INF is under
  src/main/webapp, and this is not on the test classpath for Surefire.
 
  Regards,
 
  Harald
 
 
 
  -
  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
 



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



Re: Wicket/Spring/Junit/Maven - Don't understand what's going on.

2011-07-04 Thread Bruno Borges
I'm working on this right now and I found this problem:

java.lang.IllegalStateException: the application key does not seem to be set
properly or this method is called before WicketServlet is set, which leads
to the wrong behavior
at
org.apache.wicket.protocol.http.WebApplication.getApplicationKey(WebApplication.java:164)
at org.apache.wicket.Application.internalInit(Application.java:1045)
at
org.apache.wicket.protocol.http.WebApplication.internalInit(WebApplication.java:549)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at
org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:685)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at
org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at
org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:621)
...

I followed the same tutorial as you and I'm working with Embedded Derby
datasource. Is there any way to come around this issue or am I missing
something?


*Bruno Borges*
www.brunoborges.com.br
+55 21 76727099



On Mon, Jul 4, 2011 at 2:26 AM, Niranjan Rao nhr...@gmail.com wrote:

 Sorry for the delay in the response folks and thanks for the help.

 My gut feeling is also same - differences of classpaths. That's why I
 actually added println statements in the code to see what classpath code
 is seeing.

 I am working on isolated test case that I can send to this DL. Should be
 done by tomorrow.

 Regards,

 Niranjan

 On Sun, 2011-07-03 at 10:22 -0700, Igor Vaynberg wrote:
  yep. thats probably the cause. to elaborate a little more: eclipse
  does not separate between a test class path and normal class path,
  while maven does.
 
  -igor
 
  On Sun, Jul 3, 2011 at 3:01 AM, Harald Wellmann harald.wellm...@gmx.de
 wrote:
   Without a stacktrace or more details about your setup, I can only
 guess...
   Most likely it's not a Wicket problem.
  
   I'd say your applicationContext.xml is in the wrong place where Maven
 can't
   see it, and Eclipse just happens to see it because m2eclipse cannot map
   Maven classpaths 1:1 to Eclipse.
  
   In the blog you cited, this line looks suspicious to me:
  
   @ContextConfiguration(locations =
   {classpath:WEB-INF/applicationContext.xml})
  
   If you have a default Maven project structure, then WEB-INF is under
   src/main/webapp, and this is not on the test classpath for Surefire.
  
   Regards,
  
   Harald
  
  
  
   -
   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
 



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




Re: Wicket/Spring/Junit/Maven - Don't understand what's going on.

2011-07-04 Thread Niranjan Rao
Unfortunately, can not help you much here. I followed the exact steps in
the tutorial and never got this error.

Regards,

- Niranjan
On Mon, 2011-07-04 at 13:51 -0300, Bruno Borges wrote:
 I'm working on this right now and I found this problem:
 
 java.lang.IllegalStateException: the application key does not seem to be set
 properly or this method is called before WicketServlet is set, which leads
 to the wrong behavior
 at
 org.apache.wicket.protocol.http.WebApplication.getApplicationKey(WebApplication.java:164)
 at org.apache.wicket.Application.internalInit(Application.java:1045)
 at
 org.apache.wicket.protocol.http.WebApplication.internalInit(WebApplication.java:549)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
 at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
 at java.lang.reflect.Method.invoke(Method.java:611)
 at
 org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
 at
 org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
 at
 org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:685)
 at
 org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
 at
 org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
 at
 org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
 at
 org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:621)
 ...
 
 I followed the same tutorial as you and I'm working with Embedded Derby
 datasource. Is there any way to come around this issue or am I missing
 something?
 
 
 *Bruno Borges*
 www.brunoborges.com.br
 +55 21 76727099
 
 
 
 On Mon, Jul 4, 2011 at 2:26 AM, Niranjan Rao nhr...@gmail.com wrote:
 
  Sorry for the delay in the response folks and thanks for the help.
 
  My gut feeling is also same - differences of classpaths. That's why I
  actually added println statements in the code to see what classpath code
  is seeing.
 
  I am working on isolated test case that I can send to this DL. Should be
  done by tomorrow.
 
  Regards,
 
  Niranjan
 
  On Sun, 2011-07-03 at 10:22 -0700, Igor Vaynberg wrote:
   yep. thats probably the cause. to elaborate a little more: eclipse
   does not separate between a test class path and normal class path,
   while maven does.
  
   -igor
  
   On Sun, Jul 3, 2011 at 3:01 AM, Harald Wellmann harald.wellm...@gmx.de
  wrote:
Without a stacktrace or more details about your setup, I can only
  guess...
Most likely it's not a Wicket problem.
   
I'd say your applicationContext.xml is in the wrong place where Maven
  can't
see it, and Eclipse just happens to see it because m2eclipse cannot map
Maven classpaths 1:1 to Eclipse.
   
In the blog you cited, this line looks suspicious to me:
   
@ContextConfiguration(locations =
{classpath:WEB-INF/applicationContext.xml})
   
If you have a default Maven project structure, then WEB-INF is under
src/main/webapp, and this is not on the test classpath for Surefire.
   
Regards,
   
Harald
   
   
   
-
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
  
 
 
 
  -
  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



Re: Wicket/Spring/Junit/Maven - Don't understand what's going on.

2011-07-03 Thread Loc Nguyen
If you can attach a zip of the project someone can take a quick look. Or maybe 
provide your pom.xml and the stacktrace as a starting point?

-Loc


On Sat, Jul 2, 2011 at 10:09 PM, Niranjan Rao nhr...@gmail.com 
(mailto:nhr...@gmail.com) wrote:
  Hi,
 
  I am a new user of wicket and new member of this list.Actually this is
  my first post to this mailing list.
 
  I am trying to make Wicket/Spring/Junit/Maven combo work. To make life
  more interesting, I have multi module project and one module (WebApp)
  depends upon DAL module.
 
  I followed the tutorial at
 http://comsysto.wordpress.com/2010/06/04/test-driven-development-with-apache-wicket-and-spring-framework/
  and it works - at least in eclipse. I have imported the project in eclipse 
 using m2eclipse/import existing maven file. All the unit tests pass when 
 executed in eclipse.
 
  However when I try to test using maven command line, tests do fail. I
  have no idea why - as same tests run in eclipse. To make sure, I have
  created a new workspace, imported the projects again, and all tests
  still pass in eclipse.
 
  Failing point is clear, spring is not auto wiring the application as
  mentioned in above post. As a result wicket tester fails with null
  pointer exception.
 
  As a last resort I added printlns for classpath. In eclipse, I do see
  all the expected entries. Same test when executed in maven, just
  prints /tmp/surefirebooter8162555418175145722.jar. Not sure if
  maven/surefire is combining all jars in one jar and that's causing
  problem.
 
  Any help is greatly appreciated. I can include code also, but not sure
  what's the protocol here.
 
  Regards,
 
  - Niranjan
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org 
 (mailto:users-unsubscr...@wicket.apache.org)
  For additional commands, e-mail: users-h...@wicket.apache.org 
 (mailto:users-h...@wicket.apache.org)
 



Re: Wicket/Spring/Junit/Maven - Don't understand what's going on.

2011-07-03 Thread Harald Wellmann
Without a stacktrace or more details about your setup, I can only 
guess... Most likely it's not a Wicket problem.


I'd say your applicationContext.xml is in the wrong place where Maven 
can't see it, and Eclipse just happens to see it because m2eclipse 
cannot map Maven classpaths 1:1 to Eclipse.


In the blog you cited, this line looks suspicious to me:

@ContextConfiguration(locations = 
{classpath:WEB-INF/applicationContext.xml})


If you have a default Maven project structure, then WEB-INF is under 
src/main/webapp, and this is not on the test classpath for Surefire.


Regards,

Harald



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



Re: Wicket/Spring/Junit/Maven - Don't understand what's going on.

2011-07-03 Thread Igor Vaynberg
yep. thats probably the cause. to elaborate a little more: eclipse
does not separate between a test class path and normal class path,
while maven does.

-igor

On Sun, Jul 3, 2011 at 3:01 AM, Harald Wellmann harald.wellm...@gmx.de wrote:
 Without a stacktrace or more details about your setup, I can only guess...
 Most likely it's not a Wicket problem.

 I'd say your applicationContext.xml is in the wrong place where Maven can't
 see it, and Eclipse just happens to see it because m2eclipse cannot map
 Maven classpaths 1:1 to Eclipse.

 In the blog you cited, this line looks suspicious to me:

 @ContextConfiguration(locations =
 {classpath:WEB-INF/applicationContext.xml})

 If you have a default Maven project structure, then WEB-INF is under
 src/main/webapp, and this is not on the test classpath for Surefire.

 Regards,

 Harald



 -
 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



Re: Wicket/Spring/Junit/Maven - Don't understand what's going on.

2011-07-03 Thread Niranjan Rao
Sorry for the delay in the response folks and thanks for the help.

My gut feeling is also same - differences of classpaths. That's why I
actually added println statements in the code to see what classpath code
is seeing.

I am working on isolated test case that I can send to this DL. Should be
done by tomorrow.

Regards,

Niranjan

On Sun, 2011-07-03 at 10:22 -0700, Igor Vaynberg wrote:
 yep. thats probably the cause. to elaborate a little more: eclipse
 does not separate between a test class path and normal class path,
 while maven does.
 
 -igor
 
 On Sun, Jul 3, 2011 at 3:01 AM, Harald Wellmann harald.wellm...@gmx.de 
 wrote:
  Without a stacktrace or more details about your setup, I can only guess...
  Most likely it's not a Wicket problem.
 
  I'd say your applicationContext.xml is in the wrong place where Maven can't
  see it, and Eclipse just happens to see it because m2eclipse cannot map
  Maven classpaths 1:1 to Eclipse.
 
  In the blog you cited, this line looks suspicious to me:
 
  @ContextConfiguration(locations =
  {classpath:WEB-INF/applicationContext.xml})
 
  If you have a default Maven project structure, then WEB-INF is under
  src/main/webapp, and this is not on the test classpath for Surefire.
 
  Regards,
 
  Harald
 
 
 
  -
  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
 



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



Wicket/Spring/Junit/Maven - Don't understand what's going on.

2011-07-02 Thread Niranjan Rao
Hi,

I am a new user of wicket and new member of this list.Actually this is
my first post to this mailing list.

I am trying to make Wicket/Spring/Junit/Maven combo work. To make life
more interesting, I have multi module project and one module (WebApp)
depends upon DAL module.

I followed the tutorial at
http://comsysto.wordpress.com/2010/06/04/test-driven-development-with-apache-wicket-and-spring-framework/
 and it works - at least in eclipse. I have imported the project in eclipse 
using m2eclipse/import existing maven file. All the unit tests pass when 
executed in eclipse.

However when I try to test using maven command line, tests do fail. I
have no idea why - as same tests run in eclipse. To make sure, I have
created a new workspace, imported the projects again, and all tests
still pass in eclipse. 

Failing point is clear, spring is not auto wiring the application as
mentioned in above post. As a result wicket tester fails with null
pointer exception. 

As a last resort I added printlns for classpath. In eclipse, I do see
all the expected entries. Same test when executed in maven, just
prints /tmp/surefirebooter8162555418175145722.jar. Not sure if
maven/surefire is combining all jars in one jar and that's causing
problem. 

Any help is greatly appreciated. I can include code also, but not sure
what's the protocol here.

Regards,

- Niranjan


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



Re: Wicket-Spring Hibernate dao

2011-03-02 Thread ookpalm
Thanks everyone. I will go for using the new operator for my domain object
since there is no simple way to inject and it is not really nescessary to
inject bean to object in this case.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-Spring-Hibernate-dao-tp3320134p3332713.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: Wicket-Spring Hibernate dao

2011-03-02 Thread James Carman
I believe you want to look into using a factory to create your cats.
You can inject DAOs and whatever you want into your factory.  The
factory would be a spring-managed bean, but the entities wouldn't.

On Wed, Mar 2, 2011 at 10:36 PM, ookpalm ookp...@gmail.com wrote:
 Thanks everyone. I will go for using the new operator for my domain object
 since there is no simple way to inject and it is not really nescessary to
 inject bean to object in this case.

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Wicket-Spring-Hibernate-dao-tp3320134p3332713.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



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



Wicket-Spring Hibernate dao

2011-02-22 Thread ookpalm

Hi 

I have a question about wicket spring.

My project is setup with Wicket-Spring plus using Hibernate annotation. I
created a Dao object says CatDao and created a entity for relational
mapping with hibernate says Cat. Both are created by using Spring
applicationContext file.

On my page says AddCat I show the default values of Cat object that I
set in my applicationContext which is rendered correctly in textFields
(Wicket-spring works correctly). But when I use the command
catDao.store(cat); The following error happens:

Last cause: Unknown entity: WICKET_com.ook.Cat$$EnhancerByCGLIB$$d80b8019

I commented out the @SpringBean annotation of the varriable Cat in my AddCat
page and used the operator new directly to the Cat object like

Cat cat = new Cat();

The CatDao still remains the same
@SpringBean
CatDao catDao;

now the command catDao.store(cat); works fine. Data are written to the
Database. I have no clue how to solve this.

Please help.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-Spring-Hibernate-dao-tp3320134p3320134.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: Wicket-Spring Hibernate dao

2011-02-22 Thread Igor Vaynberg
you should be doing cat=new cat() anyways. i assume the default cat
is a singleton in your application context, in which case you do not
want it to be persisted anyways.

-igor

On Tue, Feb 22, 2011 at 1:59 PM, ookpalm ookp...@gmail.com wrote:

 Hi

 I have a question about wicket spring.

 My project is setup with Wicket-Spring plus using Hibernate annotation. I
 created a Dao object says CatDao and created a entity for relational
 mapping with hibernate says Cat. Both are created by using Spring
 applicationContext file.

 On my page says AddCat I show the default values of Cat object that I
 set in my applicationContext which is rendered correctly in textFields
 (Wicket-spring works correctly). But when I use the command
 catDao.store(cat); The following error happens:

 Last cause: Unknown entity: WICKET_com.ook.Cat$$EnhancerByCGLIB$$d80b8019

 I commented out the @SpringBean annotation of the varriable Cat in my AddCat
 page and used the operator new directly to the Cat object like

 Cat cat = new Cat();

 The CatDao still remains the same
 @SpringBean
 CatDao catDao;

 now the command catDao.store(cat); works fine. Data are written to the
 Database. I have no clue how to solve this.

 Please help.
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Wicket-Spring-Hibernate-dao-tp3320134p3320134.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



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



Re: Wicket-Spring Hibernate dao

2011-02-22 Thread Dan Griffin
I think that it happened because spring wrapped a proxy around your 
bean, and then hibernate couldn`t recognize its class and which table it 
should look for. I`m not sure if you can get around it, but I agree with 
Igor that you should  create your domain objects with new, rather than 
inject them.

you should be doing cat=new cat() anyways. i assume the default cat
is a singleton in your application context, in which case you do not
want it to be persisted anyways.

-igor

On Tue, Feb 22, 2011 at 1:59 PM, ookpalmookp...@gmail.com  wrote:
   

Hi

I have a question about wicket spring.

My project is setup with Wicket-Spring plus using Hibernate annotation. I
created a Dao object says CatDao and created a entity for relational
mapping with hibernate says Cat. Both are created by using Spring
applicationContext file.

On my page says AddCat I show the default values of Cat object that I
set in my applicationContext which is rendered correctly in textFields
(Wicket-spring works correctly). But when I use the command
catDao.store(cat); The following error happens:

Last cause: Unknown entity: WICKET_com.ook.Cat$$EnhancerByCGLIB$$d80b8019

I commented out the @SpringBean annotation of the varriable Cat in my AddCat
page and used the operator new directly to the Cat object like

Cat cat = new Cat();

The CatDao still remains the same
@SpringBean
CatDao catDao;

now the command catDao.store(cat); works fine. Data are written to the
Database. I have no clue how to solve this.

Please help.
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-Spring-Hibernate-dao-tp3320134p3320134.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


 

-
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



Re: Wicket-Spring Hibernate dao

2011-02-22 Thread Nivedan Nadaraj
Hi,

Is your DAO marked with @Repository annotation?

e.g.
*@Repository(myDao)*
public class SomeDAO extends HibernateSessionDao implements IDao {


Plus in your client you need that @SpringBean,((Spring would inject it)

In my case I use a Service to get to the DAO - May not be necessary

@SpringBean( name = serviceName)
private IService service;

The IService Impl is define like this


@Service(serviceName)

So Client calls the Service and the Service delegates to the DAO.

I think its something to do with the markup/annotation and probably missing
the configuration.

Hope this helps
niv


On Wed, Feb 23, 2011 at 6:26 AM, Dan Griffin dangri...@gmail.com wrote:

 I think that it happened because spring wrapped a proxy around your bean,
 and then hibernate couldn`t recognize its class and which table it should
 look for. I`m not sure if you can get around it, but I agree with Igor that
 you should  create your domain objects with new, rather than inject them.

  you should be doing cat=new cat() anyways. i assume the default cat
 is a singleton in your application context, in which case you do not
 want it to be persisted anyways.

 -igor

 On Tue, Feb 22, 2011 at 1:59 PM, ookpalmookp...@gmail.com  wrote:


 Hi

 I have a question about wicket spring.

 My project is setup with Wicket-Spring plus using Hibernate annotation. I
 created a Dao object says CatDao and created a entity for relational
 mapping with hibernate says Cat. Both are created by using Spring
 applicationContext file.

 On my page says AddCat I show the default values of Cat object that I
 set in my applicationContext which is rendered correctly in textFields
 (Wicket-spring works correctly). But when I use the command
 catDao.store(cat); The following error happens:

 Last cause: Unknown entity: WICKET_com.ook.Cat
 $$EnhancerByCGLIB$$d80b8019

 I commented out the @SpringBean annotation of the varriable Cat in my
 AddCat
 page and used the operator new directly to the Cat object like

 Cat cat = new Cat();

 The CatDao still remains the same
 @SpringBean
 CatDao catDao;

 now the command catDao.store(cat); works fine. Data are written to the
 Database. I have no clue how to solve this.

 Please help.
 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Wicket-Spring-Hibernate-dao-tp3320134p3320134.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




 -
 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




Re: help me please!!! Wicket/Spring/Hibernate configuration woes

2010-12-16 Thread adam.gibbons
-classorg.springframework.web.context.ContextLoaderListener/listener-class

 
  /listener
  filter
  filter-nameopensessioninview/filter-name
  
  
 
 filter-classorg.springframework.orm.hibernate3.support.OpenSessionInViewFilter/filter-class

 
  /filter
  filter
  filter-namewicket-spring-hibernate/filter-name
  
  
 filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class
 
  init-param
  param-nameapplicationFactoryClassName/param-name
  
  
 
 param-valueorg.apache.wicket.spring.SpringWebApplicationFactory/param-value

 
  /init-param
  init-param
  param-nameapplicationClassName/param-name
  
  
 
 param-valueuk.co.company.product.presentation.wicket.app.WicketApplication/param-value

 
 
  /init-param
  /filter
  filter-mapping
  filter-nameopensessioninview/filter-name
  url-pattern/*/url-pattern
  /filter-mapping
  filter-mapping
  filter-namewicket-spring-hibernate/filter-name
  url-pattern/*/url-pattern
  /filter-mapping
   /web-app
  
  
  
   applicationContext.xml:
  
   ?xml version=1.0 encoding=UTF-8?
   beans
  xmlns=http://www.springframework.org/schema/beans;
  xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  xmlns:aop=http://www.springframework.org/schema/aop;
  xmlns:tx=http://www.springframework.org/schema/tx;
  xmlns:context=http://www.springframework.org/schema/context;
  xsi:schemaLocation=
  http://www.springframework.org/schema/beans
   http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
  http://www.springframework.org/schema/aop
   http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
  http://www.springframework.org/schema/tx
   http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
  http://www.springframework.org/schema/context
   http://www.springframework.org/schema/context/spring-context-2.5.xsd
  
  default-autowire=byType
  default-lazy-init=false
   
  bean id=wicketApplication
  
 class=uk.co.company.product.presentation.wicket.app.WicketApplication
  /
  
  bean id=placeholderConfigurer
  
 
 class=org.springframework.beans.factory.config.PropertyPlaceholderConfigurer

 
 
   autowire=byName
  property name=ignoreUnresolvablePlaceholders value=false
 /
  property name=systemPropertiesModeName
   value=SYSTEM_PROPERTIES_MODE_OVERRIDE /
  property name=ignoreResourceNotFound value=false /
  property name=locationslist
  valueclasspath*:/application.properties/value
  /list/property
  /bean
  
  bean id=dataSource
   class=org.springframework.jdbc.datasource.DriverManagerDataSource
   autowire=byName
  property
   name=driverClassNamevalue${jdbc.driver}/value/property
  property name=urlvalue${jdbc.url}/value/property
  property
  name=usernamevalue${jdbc.username}/value/property
  property
  name=passwordvalue${jdbc.password}/value/property
 
  /bean
  
  tx:annotation-driven transaction-manager=txManager /
  
  bean id=txManager
   class=org.springframework.orm.hibernate3.HibernateTransactionManager

   autowire=byName
  property name=sessionFactory ref=sessionFactory /
  /bean
  
  !--bean id=interceptor
   class=com.mycompany.hibernate.HibernateInterceptor
  /bean--
  
  bean id=sessionFactory
  
 
 class=org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean

 
 
   autowire=byName
  property name=dataSource ref=dataSource /
  property name=hibernateProperties
  props
  !-- GENERAL --
  prop
 key=hibernate.dialect${hibernate.dialect}/prop
  prop key=hibernate.show_sqltrue/prop
  prop
 key=hibernate.show_sqlhibernate.format_sql/prop
 
  prop
 key=hibernate.default_schemazen_template/prop
  prop key=hibernate.max_fetch_depth2/prop
  !-- prop
   key=hibernate.default_batch_fetch_size16/prop --
  prop key=hibernate.default_entity_modepojo/prop
  prop key=hibernate.order_updatestrue/prop
  prop key=hibernate.generate_statisticstrue/prop
  prop
 key=hibernate.use_identifier_rollbacktrue/prop
  prop
   key=hibernate.current_session_context_classthread/prop
  prop key=hibernate.use_outer_jointrue/prop
  !-- JDBC --
  !-- prop key=hibernate.jdbc.batch_size20/prop
 --
  !-- prop
   key=hibernate.jdbc.batch_versioned_datatrue/prop --
  prop
   key=hibernate.jdbc.use_streams_for_binarytrue/prop
  prop
   key=hibernate.j
 
 
  --
   View message @
 
 http://apache-wicket.1842946.n4.nabble.com/help-me-please-Wicket-Spring-Hibernate-configuration-woes-tp3088768p3089324

help me please!!! Wicket/Spring/Hibernate configuration woes

2010-12-15 Thread Adam Gibbons
Hi there,

For some time now I have been trying to put together a simple project to get
me off the ground with a Wicket/Spring/Hibernate setup. I've had lots of ups
and downs, and found this guide really useful:
http://wicketinaction.com/2009/06/wicketspringhibernate-configuration/
However, I still seem to be having some problems and I've no idea where to
look now.

Here's the error I get in my log:

org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'userServiceImpl' defined in file
[C:\tomcat6\webapps\ZenTemplate-0\WEB-INF\classes\uk\co\company\product\business\spring\UserServiceImpl.class]:
Instantiation of bean failed; nested exception is
org.springframework.beans.BeanInstantiationException: Could not instantiate
bean class [uk.co.company.product.business.spring.UserServiceImpl]:
Constructor threw exception; nested exception is org.apache.wicket.Wicket
RuntimeException: There is no application attached to current thread
ContainerBackgroundProcessor[StandardEngine[Catalina]]
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:883)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:839)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
at
org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4135)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4630)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
at
org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:905)
at
org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:740)
at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:500)
at
org.apache.catalina.startup.HostConfig.check(HostConfig.java:1345)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:303)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at
org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.springframework.beans.BeanInstantiationException: Could not
instantiate bean class
[uk.co.company.product.business.spring.UserServiceImpl]: Constructor threw
exception; nested exception is org.apache.wicket.WicketRuntimeException:
There is no application attached to current thread
ContainerBackgroundProcessor[StandardEngine[Catalina]]
at
org.springframework.beans.BeanUtils.instantiateClass

Re: help me please!!! Wicket/Spring/Hibernate configuration woes

2010-12-15 Thread James Carman
@SpringBean isn't for use inside your Spring services, just Wicket
stuff.  Just use the native Spring injection mechanisms.  Try
@Autowired.

On Wed, Dec 15, 2010 at 5:43 AM, Adam Gibbons adam.s.gibb...@gmail.com wrote:
 Hi there,

 For some time now I have been trying to put together a simple project to get
 me off the ground with a Wicket/Spring/Hibernate setup. I've had lots of ups
 and downs, and found this guide really useful:
 http://wicketinaction.com/2009/06/wicketspringhibernate-configuration/
 However, I still seem to be having some problems and I've no idea where to
 look now.

 Here's the error I get in my log:

 org.springframework.beans.factory.BeanCreationException: Error creating bean
 with name 'userServiceImpl' defined in file
 [C:\tomcat6\webapps\ZenTemplate-0\WEB-INF\classes\uk\co\company\product\business\spring\UserServiceImpl.class]:
 Instantiation of bean failed; nested exception is
 org.springframework.beans.BeanInstantiationException: Could not instantiate
 bean class [uk.co.company.product.business.spring.UserServiceImpl]:
 Constructor threw exception; nested exception is org.apache.wicket.Wicket
 RuntimeException: There is no application attached to current thread
 ContainerBackgroundProcessor[StandardEngine[Catalina]]
        at
 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:883)
        at
 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:839)
        at
 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)
        at
 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
        at java.security.AccessController.doPrivileged(Native Method)
        at
 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
        at
 org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
        at
 org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
        at
 org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
        at
 org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
        at
 org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
        at
 org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
        at
 org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
        at
 org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
        at
 org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
        at
 org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
        at
 org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
        at
 org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4135)
        at
 org.apache.catalina.core.StandardContext.start(StandardContext.java:4630)
        at
 org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
        at
 org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
        at
 org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
        at
 org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:905)
        at
 org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:740)
        at
 org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:500)
        at
 org.apache.catalina.startup.HostConfig.check(HostConfig.java:1345)
        at
 org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:303)
        at
 org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
        at
 org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337)
        at
 org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)
        at
 org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
        at
 org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590)
        at java.lang.Thread.run(Thread.java:619)
 Caused by: org.springframework.beans.BeanInstantiationException: Could not
 instantiate bean class

Re: help me please!!! Wicket/Spring/Hibernate configuration woes

2010-12-15 Thread adam.gibbons

Hi James,

Thanks for the suggestion! However, even with your change, I still get the
There is no application attached to current thread
ContainerBackgroundProcessor[StandardEngine[Catalina]] error.

Regards,
Adam

On 15 December 2010 11:17, James Carman [via Apache Wicket] 
ml-node+3088802-1498820770-201...@n4.nabble.comml-node%2b3088802-1498820770-201...@n4.nabble.com
 wrote:

 @SpringBean isn't for use inside your Spring services, just Wicket
 stuff.  Just use the native Spring injection mechanisms.  Try
 @Autowired.

 On Wed, Dec 15, 2010 at 5:43 AM, Adam Gibbons [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=3088802i=0
 wrote:

  Hi there,
 
  For some time now I have been trying to put together a simple project to
 get
  me off the ground with a Wicket/Spring/Hibernate setup. I've had lots of
 ups
  and downs, and found this guide really useful:
  http://wicketinaction.com/2009/06/wicketspringhibernate-configuration/
  However, I still seem to be having some problems and I've no idea where
 to
  look now.
 
  Here's the error I get in my log:
 
  org.springframework.beans.factory.BeanCreationException: Error creating
 bean
  with name 'userServiceImpl' defined in file
 
 [C:\tomcat6\webapps\ZenTemplate-0\WEB-INF\classes\uk\co\company\product\business\spring\UserServiceImpl.class]:

  Instantiation of bean failed; nested exception is
  org.springframework.beans.BeanInstantiationException: Could not
 instantiate
  bean class [uk.co.company.product.business.spring.UserServiceImpl]:
  Constructor threw exception; nested exception is org.apache.wicket.Wicket

  RuntimeException: There is no application attached to current thread
  ContainerBackgroundProcessor[StandardEngine[Catalina]]
 at
 
 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:883)

 at
 
 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:839)

 at
 
 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)

 at
 
 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)

 at java.security.AccessController.doPrivileged(Native Method)
 at
 
 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)

 at
 
 org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)

 at
 
 org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)

 at
 
 org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)

 at
 
 org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)

 at
 
 org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)

 at
 
 org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)

 at
 
 org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)

 at
 
 org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)

 at
 
 org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)

 at
 
 org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)

 at
 
 org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)

 at
 
 org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4135)

 at
  org.apache.catalina.core.StandardContext.start(StandardContext.java:4630)

 at
 
 org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)

 at
  org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
 at
  org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
 at
  org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:905)
 at
  org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:740)
 at
  org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:500)
 at
  org.apache.catalina.startup.HostConfig.check(HostConfig.java:1345)
 at
 
 org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:303)
 at
 
 org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)

 at
 
 org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java

Re: help me please!!! Wicket/Spring/Hibernate configuration woes

2010-12-15 Thread James Carman
You need to be able to fire your spring context outside the context of
Wicket.  Can it be instantiated outside your container?  Once you get
that down, you should be good to go.

On Wed, Dec 15, 2010 at 8:50 AM, adam.gibbons adam.s.gibb...@gmail.com wrote:

 Hi James,

 Thanks for the suggestion! However, even with your change, I still get the
 There is no application attached to current thread
 ContainerBackgroundProcessor[StandardEngine[Catalina]] error.

 Regards,
 Adam

 On 15 December 2010 11:17, James Carman [via Apache Wicket] 
 ml-node+3088802-1498820770-201...@n4.nabble.comml-node%2b3088802-1498820770-201...@n4.nabble.com
 wrote:

 @SpringBean isn't for use inside your Spring services, just Wicket
 stuff.  Just use the native Spring injection mechanisms.  Try
 @Autowired.

 On Wed, Dec 15, 2010 at 5:43 AM, Adam Gibbons [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=3088802i=0
 wrote:

  Hi there,
 
  For some time now I have been trying to put together a simple project to
 get
  me off the ground with a Wicket/Spring/Hibernate setup. I've had lots of
 ups
  and downs, and found this guide really useful:
  http://wicketinaction.com/2009/06/wicketspringhibernate-configuration/
  However, I still seem to be having some problems and I've no idea where
 to
  look now.
 
  Here's the error I get in my log:
 
  org.springframework.beans.factory.BeanCreationException: Error creating
 bean
  with name 'userServiceImpl' defined in file
 
 [C:\tomcat6\webapps\ZenTemplate-0\WEB-INF\classes\uk\co\company\product\business\spring\UserServiceImpl.class]:

  Instantiation of bean failed; nested exception is
  org.springframework.beans.BeanInstantiationException: Could not
 instantiate
  bean class [uk.co.company.product.business.spring.UserServiceImpl]:
  Constructor threw exception; nested exception is org.apache.wicket.Wicket

  RuntimeException: There is no application attached to current thread
  ContainerBackgroundProcessor[StandardEngine[Catalina]]
         at
 
 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:883)

         at
 
 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:839)

         at
 
 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)

         at
 
 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)

         at java.security.AccessController.doPrivileged(Native Method)
         at
 
 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)

         at
 
 org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)

         at
 
 org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)

         at
 
 org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)

         at
 
 org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)

         at
 
 org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)

         at
 
 org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)

         at
 
 org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)

         at
 
 org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)

         at
 
 org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)

         at
 
 org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)

         at
 
 org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)

         at
 
 org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4135)

         at
  org.apache.catalina.core.StandardContext.start(StandardContext.java:4630)

         at
 
 org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)

         at
  org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
         at
  org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
         at
  org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:905)
         at
  org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:740)
         at
  org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:500)
         at
  org.apache.catalina.startup.HostConfig.check(HostConfig.java:1345

Re: help me please!!! Wicket/Spring/Hibernate configuration woes

2010-12-15 Thread adam.gibbons

I thought that was the whole point of the Wicket-Spring project... That
tutorial looked like it worked as recently as a year ago. I find it hard to
believe that it's no longer possible or harder to integrate Wicket and
Spring than it was a year ago.

On researching that error, all I find are comments about deleting the
session file from Tomcat, and turning off session persistance. I've done
both and I still get the same start up error.



On 15 December 2010 13:53, James Carman [via Apache Wicket] 
ml-node+3089041-1452804699-201...@n4.nabble.comml-node%2b3089041-1452804699-201...@n4.nabble.com
 wrote:

 You need to be able to fire your spring context outside the context of
 Wicket.  Can it be instantiated outside your container?  Once you get
 that down, you should be good to go.

 On Wed, Dec 15, 2010 at 8:50 AM, adam.gibbons [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=3089041i=0
 wrote:

 
  Hi James,
 
  Thanks for the suggestion! However, even with your change, I still get
 the
  There is no application attached to current thread
  ContainerBackgroundProcessor[StandardEngine[Catalina]] error.
 
  Regards,
  Adam
 
  On 15 December 2010 11:17, James Carman [via Apache Wicket] 
  [hidden email] 
  http://user/SendEmail.jtp?type=nodenode=3089041i=1[hidden
 email] http://user/SendEmail.jtp?type=nodenode=3089041i=2
  wrote:
 
  @SpringBean isn't for use inside your Spring services, just Wicket
  stuff.  Just use the native Spring injection mechanisms.  Try
  @Autowired.
 
  On Wed, Dec 15, 2010 at 5:43 AM, Adam Gibbons [hidden email]
 http://user/SendEmail.jtp?type=nodenode=3088802i=0
  wrote:
 
   Hi there,
  
   For some time now I have been trying to put together a simple project
 to
  get
   me off the ground with a Wicket/Spring/Hibernate setup. I've had lots
 of
  ups
   and downs, and found this guide really useful:
  
 http://wicketinaction.com/2009/06/wicketspringhibernate-configuration/
   However, I still seem to be having some problems and I've no idea
 where
  to
   look now.
  
   Here's the error I get in my log:
  
   org.springframework.beans.factory.BeanCreationException: Error
 creating
  bean
   with name 'userServiceImpl' defined in file
  
 
 [C:\tomcat6\webapps\ZenTemplate-0\WEB-INF\classes\uk\co\company\product\business\spring\UserServiceImpl.class]:

 
   Instantiation of bean failed; nested exception is
   org.springframework.beans.BeanInstantiationException: Could not
  instantiate
   bean class [uk.co.company.product.business.spring.UserServiceImpl]:
   Constructor threw exception; nested exception is
 org.apache.wicket.Wicket
 
   RuntimeException: There is no application attached to current thread
   ContainerBackgroundProcessor[StandardEngine[Catalina]]
  at
  
 
 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:883)

 
  at
  
 
 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:839)

 
  at
  
 
 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)

 
  at
  
 
 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)

 
  at java.security.AccessController.doPrivileged(Native Method)
  at
  
 
 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)

 
  at
  
 
 org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)

 
  at
  
 
 org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)

 
  at
  
 
 org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)

 
  at
  
 
 org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)

 
  at
  
 
 org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)

 
  at
  
 
 org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)

 
  at
  
 
 org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)

 
  at
  
 
 org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)

 
  at
  
 
 org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)

 
  at
  
 
 org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199

Re: help me please!!! Wicket/Spring/Hibernate configuration woes

2010-12-15 Thread Matthias Gasser
Does the spring context startup without the wicket part?

I've integrated Wicket in an existing Spring project (following the 
same guide as you did) and it worked without any (greater) problem.

cheers,
Matthias

Am 15.12.2010 um 15:06 schrieb adam.gibbons:

 
 I thought that was the whole point of the Wicket-Spring project... That
 tutorial looked like it worked as recently as a year ago. I find it hard to
 believe that it's no longer possible or harder to integrate Wicket and
 Spring than it was a year ago.
 
 On researching that error, all I find are comments about deleting the
 session file from Tomcat, and turning off session persistance. I've done
 both and I still get the same start up error.
 
 
 
 On 15 December 2010 13:53, James Carman [via Apache Wicket] 
 ml-node+3089041-1452804699-201...@n4.nabble.comml-node%2b3089041-1452804699-201...@n4.nabble.com
 wrote:
 
 You need to be able to fire your spring context outside the context of
 Wicket.  Can it be instantiated outside your container?  Once you get
 that down, you should be good to go.
 
 On Wed, Dec 15, 2010 at 8:50 AM, adam.gibbons [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=3089041i=0
 wrote:
 
 
 Hi James,
 
 Thanks for the suggestion! However, even with your change, I still get
 the
 There is no application attached to current thread
 ContainerBackgroundProcessor[StandardEngine[Catalina]] error.
 
 Regards,
 Adam
 
 On 15 December 2010 11:17, James Carman [via Apache Wicket] 
 [hidden email] 
 http://user/SendEmail.jtp?type=nodenode=3089041i=1[hidden
 email] http://user/SendEmail.jtp?type=nodenode=3089041i=2
 wrote:
 
 @SpringBean isn't for use inside your Spring services, just Wicket
 stuff.  Just use the native Spring injection mechanisms.  Try
 @Autowired.
 
 On Wed, Dec 15, 2010 at 5:43 AM, Adam Gibbons [hidden email]
 http://user/SendEmail.jtp?type=nodenode=3088802i=0
 wrote:
 
 Hi there,
 
 For some time now I have been trying to put together a simple project
 to
 get
 me off the ground with a Wicket/Spring/Hibernate setup. I've had lots
 of
 ups
 and downs, and found this guide really useful:
 
 http://wicketinaction.com/2009/06/wicketspringhibernate-configuration/
 However, I still seem to be having some problems and I've no idea
 where
 to
 look now.
 
 Here's the error I get in my log:
 
 org.springframework.beans.factory.BeanCreationException: Error
 creating
 bean
 with name 'userServiceImpl' defined in file
 
 
 [C:\tomcat6\webapps\ZenTemplate-0\WEB-INF\classes\uk\co\company\product\business\spring\UserServiceImpl.class]:
 
 
 Instantiation of bean failed; nested exception is
 org.springframework.beans.BeanInstantiationException: Could not
 instantiate
 bean class [uk.co.company.product.business.spring.UserServiceImpl]:
 Constructor threw exception; nested exception is
 org.apache.wicket.Wicket
 
 RuntimeException: There is no application attached to current thread
 ContainerBackgroundProcessor[StandardEngine[Catalina]]
   at
 
 
 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:883)
 
 
   at
 
 
 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:839)
 
 
   at
 
 
 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)
 
 
   at
 
 
 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
 
 
   at java.security.AccessController.doPrivileged(Native Method)
   at
 
 
 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
 
 
   at
 
 
 org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
 
 
   at
 
 
 org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
 
 
   at
 
 
 org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
 
 
   at
 
 
 org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
 
 
   at
 
 
 org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
 
 
   at
 
 
 org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
 
 
   at
 
 
 org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
 
 
   at
 
 
 org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
 
 
   at
 
 
 org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255

Re: help me please!!! Wicket/Spring/Hibernate configuration woes

2010-12-15 Thread James Carman
What's the code for UserServiceImpl?

On Wed, Dec 15, 2010 at 9:02 AM, adam.gibbons adam.s.gibb...@gmail.com wrote:

 New log:
 org.springframework.beans.factory.BeanCreationException: Error creating bean
 with name 'userServiceImpl' defined in file
 [C:\tomcat6\webapps\ZenTemplate-0\WEB-INF\classes\uk\co\company\product\business\spring\UserServiceImpl.class]:
 Instantiation of bean failed; nested exception is
 org.springframework.beans.BeanInstantiationException: Could not instantiate
 bean class [uk.co.company.product.business.spring.UserServiceImpl]:
 Constructor threw exception; nested exception is org.apache.wicket.Wicket
 RuntimeException: There is no application attached to current thread
 ContainerBackgroundProcessor[StandardEngine[Catalina]]

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



Re: help me please!!! Wicket/Spring/Hibernate configuration woes

2010-12-15 Thread adam.gibbons

Hi Matthias,

Sorry, I'm not sure what you mean by that? If you look at the new log I just
posted, Spring seems to be starting up fine. How could I check it without
the wicket part? What would I need to change exactly?

Thanks,
Adam

On 15 December 2010 14:15, Matthias Gasser [via Apache Wicket] 
ml-node+3089072-2099328675-201...@n4.nabble.comml-node%2b3089072-2099328675-201...@n4.nabble.com
 wrote:

 Does the spring context startup without the wicket part?

 I've integrated Wicket in an existing Spring project (following the
 same guide as you did) and it worked without any (greater) problem.

 cheers,
 Matthias

 Am 15.12.2010 um 15:06 schrieb adam.gibbons:

 
  I thought that was the whole point of the Wicket-Spring project... That
  tutorial looked like it worked as recently as a year ago. I find it hard
 to
  believe that it's no longer possible or harder to integrate Wicket and
  Spring than it was a year ago.
 
  On researching that error, all I find are comments about deleting the
  session file from Tomcat, and turning off session persistance. I've done
  both and I still get the same start up error.
 
 
 
  On 15 December 2010 13:53, James Carman [via Apache Wicket] 
  [hidden email] 
  http://user/SendEmail.jtp?type=nodenode=3089072i=0[hidden
 email] http://user/SendEmail.jtp?type=nodenode=3089072i=1
  wrote:
 
  You need to be able to fire your spring context outside the context of
  Wicket.  Can it be instantiated outside your container?  Once you get
  that down, you should be good to go.
 
  On Wed, Dec 15, 2010 at 8:50 AM, adam.gibbons [hidden email]
 http://user/SendEmail.jtp?type=nodenode=3089041i=0
  wrote:
 
 
  Hi James,
 
  Thanks for the suggestion! However, even with your change, I still get
  the
  There is no application attached to current thread
  ContainerBackgroundProcessor[StandardEngine[Catalina]] error.
 
  Regards,
  Adam
 
  On 15 December 2010 11:17, James Carman [via Apache Wicket] 
  [hidden email] 
  http://user/SendEmail.jtp?type=nodenode=3089041i=1[hidden

  email] http://user/SendEmail.jtp?type=nodenode=3089041i=2
  wrote:
 
  @SpringBean isn't for use inside your Spring services, just Wicket
  stuff.  Just use the native Spring injection mechanisms.  Try
  @Autowired.
 
  On Wed, Dec 15, 2010 at 5:43 AM, Adam Gibbons [hidden email]
  http://user/SendEmail.jtp?type=nodenode=3088802i=0
  wrote:
 
  Hi there,
 
  For some time now I have been trying to put together a simple project

  to
  get
  me off the ground with a Wicket/Spring/Hibernate setup. I've had lots

  of
  ups
  and downs, and found this guide really useful:
 
  http://wicketinaction.com/2009/06/wicketspringhibernate-configuration/
  However, I still seem to be having some problems and I've no idea
  where
  to
  look now.
 
  Here's the error I get in my log:
 
  org.springframework.beans.factory.BeanCreationException: Error
  creating
  bean
  with name 'userServiceImpl' defined in file
 
 
 
 [C:\tomcat6\webapps\ZenTemplate-0\WEB-INF\classes\uk\co\company\product\business\spring\UserServiceImpl.class]:

 
 
  Instantiation of bean failed; nested exception is
  org.springframework.beans.BeanInstantiationException: Could not
  instantiate
  bean class [uk.co.company.product.business.spring.UserServiceImpl]:
  Constructor threw exception; nested exception is
  org.apache.wicket.Wicket
 
  RuntimeException: There is no application attached to current thread
  ContainerBackgroundProcessor[StandardEngine[Catalina]]
at
 
 
 
 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:883)

 
 
at
 
 
 
 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:839)

 
 
at
 
 
 
 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)

 
 
at
 
 
 
 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)

 
 
at java.security.AccessController.doPrivileged(Native Method)
at
 
 
 
 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)

 
 
at
 
 
 
 org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)

 
 
at
 
 
 
 org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)

 
 
at
 
 
 
 org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)

 
 
at
 
 
 
 org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)

 
 
at
 
 
 
 org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164

Re: help me please!!! Wicket/Spring/Hibernate configuration woes

2010-12-15 Thread adam.gibbons

The UserServiceImpl code is in the first post.


On 15 December 2010 13:53, James Carman [via Apache Wicket] 
ml-node+3089041-1452804699-201...@n4.nabble.comml-node%2b3089041-1452804699-201...@n4.nabble.com
 wrote:

 You need to be able to fire your spring context outside the context of
 Wicket.  Can it be instantiated outside your container?  Once you get
 that down, you should be good to go.

 On Wed, Dec 15, 2010 at 8:50 AM, adam.gibbons [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=3089041i=0
 wrote:

 
  Hi James,
 
  Thanks for the suggestion! However, even with your change, I still get
 the
  There is no application attached to current thread
  ContainerBackgroundProcessor[StandardEngine[Catalina]] error.
 
  Regards,
  Adam
 
  On 15 December 2010 11:17, James Carman [via Apache Wicket] 
  [hidden email] 
  http://user/SendEmail.jtp?type=nodenode=3089041i=1[hidden
 email] http://user/SendEmail.jtp?type=nodenode=3089041i=2
  wrote:
 
  @SpringBean isn't for use inside your Spring services, just Wicket
  stuff.  Just use the native Spring injection mechanisms.  Try
  @Autowired.
 
  On Wed, Dec 15, 2010 at 5:43 AM, Adam Gibbons [hidden email]
 http://user/SendEmail.jtp?type=nodenode=3088802i=0
  wrote:
 
   Hi there,
  
   For some time now I have been trying to put together a simple project
 to
  get
   me off the ground with a Wicket/Spring/Hibernate setup. I've had lots
 of
  ups
   and downs, and found this guide really useful:
  
 http://wicketinaction.com/2009/06/wicketspringhibernate-configuration/
   However, I still seem to be having some problems and I've no idea
 where
  to
   look now.
  
   Here's the error I get in my log:
  
   org.springframework.beans.factory.BeanCreationException: Error
 creating
  bean
   with name 'userServiceImpl' defined in file
  
 
 [C:\tomcat6\webapps\ZenTemplate-0\WEB-INF\classes\uk\co\company\product\business\spring\UserServiceImpl.class]:

 
   Instantiation of bean failed; nested exception is
   org.springframework.beans.BeanInstantiationException: Could not
  instantiate
   bean class [uk.co.company.product.business.spring.UserServiceImpl]:
   Constructor threw exception; nested exception is
 org.apache.wicket.Wicket
 
   RuntimeException: There is no application attached to current thread
   ContainerBackgroundProcessor[StandardEngine[Catalina]]
  at
  
 
 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:883)

 
  at
  
 
 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:839)

 
  at
  
 
 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)

 
  at
  
 
 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)

 
  at java.security.AccessController.doPrivileged(Native Method)
  at
  
 
 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)

 
  at
  
 
 org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)

 
  at
  
 
 org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)

 
  at
  
 
 org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)

 
  at
  
 
 org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)

 
  at
  
 
 org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)

 
  at
  
 
 org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)

 
  at
  
 
 org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)

 
  at
  
 
 org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)

 
  at
  
 
 org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)

 
  at
  
 
 org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)

 
  at
  
 
 org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)

 
  at
  
 
 org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4135)

 
  at
  
 org.apache.catalina.core.StandardContext.start(StandardContext.java:4630)
 
  at
  
 
 org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791

Re: help me please!!! Wicket/Spring/Hibernate configuration woes

2010-12-15 Thread James Carman
Spring is not starting up fine.  It's unable to instantiate the
UserServiceImpl bean which is why I asked for the code for that class.

On Wed, Dec 15, 2010 at 9:19 AM, adam.gibbons adam.s.gibb...@gmail.com wrote:

 Hi Matthias,

 Sorry, I'm not sure what you mean by that? If you look at the new log I just
 posted, Spring seems to be starting up fine. How could I check it without
 the wicket part? What would I need to change exactly?

 Thanks,
 Adam

 On 15 December 2010 14:15, Matthias Gasser [via Apache Wicket] 
 ml-node+3089072-2099328675-201...@n4.nabble.comml-node%2b3089072-2099328675-201...@n4.nabble.com
 wrote:

 Does the spring context startup without the wicket part?

 I've integrated Wicket in an existing Spring project (following the
 same guide as you did) and it worked without any (greater) problem.

 cheers,
 Matthias

 Am 15.12.2010 um 15:06 schrieb adam.gibbons:

 
  I thought that was the whole point of the Wicket-Spring project... That
  tutorial looked like it worked as recently as a year ago. I find it hard
 to
  believe that it's no longer possible or harder to integrate Wicket and
  Spring than it was a year ago.
 
  On researching that error, all I find are comments about deleting the
  session file from Tomcat, and turning off session persistance. I've done
  both and I still get the same start up error.
 
 
 
  On 15 December 2010 13:53, James Carman [via Apache Wicket] 
  [hidden email] 
  http://user/SendEmail.jtp?type=nodenode=3089072i=0[hidden
 email] http://user/SendEmail.jtp?type=nodenode=3089072i=1
  wrote:
 
  You need to be able to fire your spring context outside the context of
  Wicket.  Can it be instantiated outside your container?  Once you get
  that down, you should be good to go.
 
  On Wed, Dec 15, 2010 at 8:50 AM, adam.gibbons [hidden email]
 http://user/SendEmail.jtp?type=nodenode=3089041i=0
  wrote:
 
 
  Hi James,
 
  Thanks for the suggestion! However, even with your change, I still get
  the
  There is no application attached to current thread
  ContainerBackgroundProcessor[StandardEngine[Catalina]] error.
 
  Regards,
  Adam
 
  On 15 December 2010 11:17, James Carman [via Apache Wicket] 
  [hidden email] 
  http://user/SendEmail.jtp?type=nodenode=3089041i=1[hidden

  email] http://user/SendEmail.jtp?type=nodenode=3089041i=2
  wrote:
 
  @SpringBean isn't for use inside your Spring services, just Wicket
  stuff.  Just use the native Spring injection mechanisms.  Try
  @Autowired.
 
  On Wed, Dec 15, 2010 at 5:43 AM, Adam Gibbons [hidden email]
  http://user/SendEmail.jtp?type=nodenode=3088802i=0
  wrote:
 
  Hi there,
 
  For some time now I have been trying to put together a simple project

  to
  get
  me off the ground with a Wicket/Spring/Hibernate setup. I've had lots

  of
  ups
  and downs, and found this guide really useful:
 
  http://wicketinaction.com/2009/06/wicketspringhibernate-configuration/
  However, I still seem to be having some problems and I've no idea
  where
  to
  look now.
 
  Here's the error I get in my log:
 
  org.springframework.beans.factory.BeanCreationException: Error
  creating
  bean
  with name 'userServiceImpl' defined in file
 
 
 
 [C:\tomcat6\webapps\ZenTemplate-0\WEB-INF\classes\uk\co\company\product\business\spring\UserServiceImpl.class]:

 
 
  Instantiation of bean failed; nested exception is
  org.springframework.beans.BeanInstantiationException: Could not
  instantiate
  bean class [uk.co.company.product.business.spring.UserServiceImpl]:
  Constructor threw exception; nested exception is
  org.apache.wicket.Wicket
 
  RuntimeException: There is no application attached to current thread
  ContainerBackgroundProcessor[StandardEngine[Catalina]]
        at
 
 
 
 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:883)

 
 
        at
 
 
 
 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:839)

 
 
        at
 
 
 
 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)

 
 
        at
 
 
 
 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)

 
 
        at java.security.AccessController.doPrivileged(Native Method)
        at
 
 
 
 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)

 
 
        at
 
 
 
 org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)

 
 
        at
 
 
 
 org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)

 
 
        at
 
 
 
 org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261

Re: help me please!!! Wicket/Spring/Hibernate configuration woes

2010-12-15 Thread James Carman
So, you didn't change UserServiceImpl, as I suggested?  The section
you need to change is:

@SpringBean
private Temp1DAO temp1DAO;

Change that to @Autowired instead of @SpringBean




On Wed, Dec 15, 2010 at 9:23 AM, adam.gibbons adam.s.gibb...@gmail.com wrote:

 The UserServiceImpl code is in the first post.


 On 15 December 2010 13:53, James Carman [via Apache Wicket] 
 ml-node+3089041-1452804699-201...@n4.nabble.comml-node%2b3089041-1452804699-201...@n4.nabble.com
 wrote:

 You need to be able to fire your spring context outside the context of
 Wicket.  Can it be instantiated outside your container?  Once you get
 that down, you should be good to go.

 On Wed, Dec 15, 2010 at 8:50 AM, adam.gibbons [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=3089041i=0
 wrote:

 
  Hi James,
 
  Thanks for the suggestion! However, even with your change, I still get
 the
  There is no application attached to current thread
  ContainerBackgroundProcessor[StandardEngine[Catalina]] error.
 
  Regards,
  Adam
 
  On 15 December 2010 11:17, James Carman [via Apache Wicket] 
  [hidden email] 
  http://user/SendEmail.jtp?type=nodenode=3089041i=1[hidden
 email] http://user/SendEmail.jtp?type=nodenode=3089041i=2
  wrote:
 
  @SpringBean isn't for use inside your Spring services, just Wicket
  stuff.  Just use the native Spring injection mechanisms.  Try
  @Autowired.
 
  On Wed, Dec 15, 2010 at 5:43 AM, Adam Gibbons [hidden email]
 http://user/SendEmail.jtp?type=nodenode=3088802i=0
  wrote:
 
   Hi there,
  
   For some time now I have been trying to put together a simple project
 to
  get
   me off the ground with a Wicket/Spring/Hibernate setup. I've had lots
 of
  ups
   and downs, and found this guide really useful:
  
 http://wicketinaction.com/2009/06/wicketspringhibernate-configuration/
   However, I still seem to be having some problems and I've no idea
 where
  to
   look now.
  
   Here's the error I get in my log:
  
   org.springframework.beans.factory.BeanCreationException: Error
 creating
  bean
   with name 'userServiceImpl' defined in file
  
 
 [C:\tomcat6\webapps\ZenTemplate-0\WEB-INF\classes\uk\co\company\product\business\spring\UserServiceImpl.class]:

 
   Instantiation of bean failed; nested exception is
   org.springframework.beans.BeanInstantiationException: Could not
  instantiate
   bean class [uk.co.company.product.business.spring.UserServiceImpl]:
   Constructor threw exception; nested exception is
 org.apache.wicket.Wicket
 
   RuntimeException: There is no application attached to current thread
   ContainerBackgroundProcessor[StandardEngine[Catalina]]
          at
  
 
 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:883)

 
          at
  
 
 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:839)

 
          at
  
 
 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)

 
          at
  
 
 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)

 
          at java.security.AccessController.doPrivileged(Native Method)
          at
  
 
 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)

 
          at
  
 
 org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)

 
          at
  
 
 org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)

 
          at
  
 
 org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)

 
          at
  
 
 org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)

 
          at
  
 
 org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)

 
          at
  
 
 org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)

 
          at
  
 
 org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)

 
          at
  
 
 org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)

 
          at
  
 
 org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)

 
          at
  
 
 org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)

 
          at
  
 
 org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)

 
          at
  
 
 org.apache.catalina.core.StandardContext.listenerStart

Re: help me please!!! Wicket/Spring/Hibernate configuration woes

2010-12-15 Thread adam.gibbons

Yes but directly below it states: Caused by:
org.springframework.beans.BeanInstantiationException: Could not instantiate
bean class [uk.co.company.product.business.spring.UserServiceImpl]:
Constructor threw exception; nested exception is
org.apache.wicket.WicketRuntimeException: There is no application attached
to current thread ContainerBackgroundProcessor[StandardEngine[Catalina]]

...so it's the same error.

here is the code for UserServiceImpl again:

@Service
public class UserServiceImpl extends _AbstractService implements
UserService{

final private TestUserService testUserService = new TestUserService();

@Autowired
private Temp1DAO temp1DAO;
@Override
@Required
final public void setTemp1DAO(final Temp1DAO temp1dao){
temp1DAO = temp1dao;
}

public UserServiceImpl(){
super();
InjectorHolder.getInjector().inject(this);//-- VERY IMPORTANT to
get Spring DI to work.
}

/* (non-Javadoc)
 * @see
uk.co.company.product.business.spring.UserService#authenticate(java.lang.String,
java.lang.String)
 */
@Override
@Transactional
final public boolean authenticate(final String userName, final String
password){
final Temp1 temp1 = new Temp1();
temp1.setValue(userName);
temp1DAO.save(temp1);
return testUserService.authenticate(userName, password);
}

/* (non-Javadoc)
 * @see
uk.co.company.product.business.spring.UserService#getRoles(java.lang.String,
boolean)
 */
@Override
@Transactional
final public Roles getRoles(final String userName, final boolean
signedIn){
return testUserService.getRoles(userName, signedIn);
}
}


On 15 December 2010 14:26, James Carman [via Apache Wicket] 
ml-node+3089100-955689425-201...@n4.nabble.comml-node%2b3089100-955689425-201...@n4.nabble.com
 wrote:

 Spring is not starting up fine.  It's unable to instantiate the
 UserServiceImpl bean which is why I asked for the code for that class.

 On Wed, Dec 15, 2010 at 9:19 AM, adam.gibbons [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=3089100i=0
 wrote:

 
  Hi Matthias,
 
  Sorry, I'm not sure what you mean by that? If you look at the new log I
 just
  posted, Spring seems to be starting up fine. How could I check it without

  the wicket part? What would I need to change exactly?
 
  Thanks,
  Adam
 
  On 15 December 2010 14:15, Matthias Gasser [via Apache Wicket] 
  [hidden email] 
  http://user/SendEmail.jtp?type=nodenode=3089100i=1[hidden
 email] http://user/SendEmail.jtp?type=nodenode=3089100i=2
  wrote:
 
  Does the spring context startup without the wicket part?
 
  I've integrated Wicket in an existing Spring project (following the
  same guide as you did) and it worked without any (greater) problem.
 
  cheers,
  Matthias
 
  Am 15.12.2010 um 15:06 schrieb adam.gibbons:
 
  
   I thought that was the whole point of the Wicket-Spring project...
 That
   tutorial looked like it worked as recently as a year ago. I find it
 hard
  to
   believe that it's no longer possible or harder to integrate Wicket and

   Spring than it was a year ago.
  
   On researching that error, all I find are comments about deleting the
   session file from Tomcat, and turning off session persistance. I've
 done
   both and I still get the same start up error.
  
  
  
   On 15 December 2010 13:53, James Carman [via Apache Wicket] 
   [hidden email] 
   http://user/SendEmail.jtp?type=nodenode=3089072i=0[hidden

  email] http://user/SendEmail.jtp?type=nodenode=3089072i=1
   wrote:
  
   You need to be able to fire your spring context outside the context
 of
   Wicket.  Can it be instantiated outside your container?  Once you get

   that down, you should be good to go.
  
   On Wed, Dec 15, 2010 at 8:50 AM, adam.gibbons [hidden email]
  http://user/SendEmail.jtp?type=nodenode=3089041i=0
   wrote:
  
  
   Hi James,
  
   Thanks for the suggestion! However, even with your change, I still
 get
   the
   There is no application attached to current thread
   ContainerBackgroundProcessor[StandardEngine[Catalina]] error.
  
   Regards,
   Adam
  
   On 15 December 2010 11:17, James Carman [via Apache Wicket] 
   [hidden email] 
 http://user/SendEmail.jtp?type=nodenode=3089041i=1[hidden
 
   email] http://user/SendEmail.jtp?type=nodenode=3089041i=2
   wrote:
  
   @SpringBean isn't for use inside your Spring services, just Wicket
   stuff.  Just use the native Spring injection mechanisms.  Try
   @Autowired.
  
   On Wed, Dec 15, 2010 at 5:43 AM, Adam Gibbons [hidden email]
   http://user/SendEmail.jtp?type=nodenode=3088802i=0
   wrote:
  
   Hi there,
  
   For some time now I have been trying to put together a simple
 project
 
   to
   get
   me off the ground with a Wicket/Spring/Hibernate setup. I've had
 lots
 
   of
   ups
   and downs, and found this guide really useful:
  
  
 http://wicketinaction.com/2009/06/wicketspringhibernate-configuration/
   However, I still seem to be having some

Re: help me please!!! Wicket/Spring/Hibernate configuration woes

2010-12-15 Thread adam.gibbons

Sorry perhaps I didn't make that clear before. I made that change as you
suggested and this is the result.


On 15 December 2010 14:28, James Carman [via Apache Wicket] 
ml-node+3089111-1454695690-201...@n4.nabble.comml-node%2b3089111-1454695690-201...@n4.nabble.com
 wrote:

 So, you didn't change UserServiceImpl, as I suggested?  The section
 you need to change is:

 @SpringBean
 private Temp1DAO temp1DAO;

 Change that to @Autowired instead of @SpringBean




 On Wed, Dec 15, 2010 at 9:23 AM, adam.gibbons [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=3089111i=0
 wrote:

 
  The UserServiceImpl code is in the first post.
 
 
  On 15 December 2010 13:53, James Carman [via Apache Wicket] 
  [hidden email] 
  http://user/SendEmail.jtp?type=nodenode=3089111i=1[hidden
 email] http://user/SendEmail.jtp?type=nodenode=3089111i=2
  wrote:
 
  You need to be able to fire your spring context outside the context of
  Wicket.  Can it be instantiated outside your container?  Once you get
  that down, you should be good to go.
 
  On Wed, Dec 15, 2010 at 8:50 AM, adam.gibbons [hidden email]
 http://user/SendEmail.jtp?type=nodenode=3089041i=0
  wrote:
 
  
   Hi James,
  
   Thanks for the suggestion! However, even with your change, I still get

  the
   There is no application attached to current thread
   ContainerBackgroundProcessor[StandardEngine[Catalina]] error.
  
   Regards,
   Adam
  
   On 15 December 2010 11:17, James Carman [via Apache Wicket] 
   [hidden email] 
   http://user/SendEmail.jtp?type=nodenode=3089041i=1[hidden

  email] http://user/SendEmail.jtp?type=nodenode=3089041i=2
   wrote:
  
   @SpringBean isn't for use inside your Spring services, just Wicket
   stuff.  Just use the native Spring injection mechanisms.  Try
   @Autowired.
  
   On Wed, Dec 15, 2010 at 5:43 AM, Adam Gibbons [hidden email]
  http://user/SendEmail.jtp?type=nodenode=3088802i=0
   wrote:
  
Hi there,
   
For some time now I have been trying to put together a simple
 project
  to
   get
me off the ground with a Wicket/Spring/Hibernate setup. I've had
 lots
  of
   ups
and downs, and found this guide really useful:
   
  http://wicketinaction.com/2009/06/wicketspringhibernate-configuration/
However, I still seem to be having some problems and I've no idea
  where
   to
look now.
   
Here's the error I get in my log:
   
org.springframework.beans.factory.BeanCreationException: Error
  creating
   bean
with name 'userServiceImpl' defined in file
   
  
 
 [C:\tomcat6\webapps\ZenTemplate-0\WEB-INF\classes\uk\co\company\product\business\spring\UserServiceImpl.class]:

 
  
Instantiation of bean failed; nested exception is
org.springframework.beans.BeanInstantiationException: Could not
   instantiate
bean class [uk.co.company.product.business.spring.UserServiceImpl]:

Constructor threw exception; nested exception is
  org.apache.wicket.Wicket
  
RuntimeException: There is no application attached to current
 thread
ContainerBackgroundProcessor[StandardEngine[Catalina]]
   at
   
  
 
 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:883)

 
  
   at
   
  
 
 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:839)

 
  
   at
   
  
 
 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)

 
  
   at
   
  
 
 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)

 
  
   at java.security.AccessController.doPrivileged(Native
 Method)
   at
   
  
 
 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)

 
  
   at
   
  
 
 org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)

 
  
   at
   
  
 
 org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)

 
  
   at
   
  
 
 org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)

 
  
   at
   
  
 
 org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)

 
  
   at
   
  
 
 org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)

 
  
   at
   
  
 
 org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)

 
  
   at
   
  
 
 org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728

Re: help me please!!! Wicket/Spring/Hibernate configuration woes

2010-12-15 Thread James Carman
Get rid of the InjectorHolder code in your constructor.

On Wed, Dec 15, 2010 at 9:39 AM, adam.gibbons adam.s.gibb...@gmail.com wrote:

 Yes but directly below it states: Caused by:
 org.springframework.beans.BeanInstantiationException: Could not instantiate
 bean class [uk.co.company.product.business.spring.UserServiceImpl]:
 Constructor threw exception; nested exception is
 org.apache.wicket.WicketRuntimeException: There is no application attached
 to current thread ContainerBackgroundProcessor[StandardEngine[Catalina]]

 ...so it's the same error.

 here is the code for UserServiceImpl again:

 @Service
 public class UserServiceImpl extends _AbstractService implements
 UserService{

    final private TestUserService testUserService = new TestUserService();

   �...@autowired
    private Temp1DAO temp1DAO;
   �...@override
   �...@required
    final public void setTemp1DAO(final Temp1DAO temp1dao){
        temp1DAO = temp1dao;
    }

    public UserServiceImpl(){
        super();
        InjectorHolder.getInjector().inject(this);//-- VERY IMPORTANT to
 get Spring DI to work.
    }

    /* (non-Javadoc)
     * @see
 uk.co.company.product.business.spring.UserService#authenticate(java.lang.String,
 java.lang.String)
     */
   �...@override
   �...@transactional
    final public boolean authenticate(final String userName, final String
 password){
        final Temp1 temp1 = new Temp1();
        temp1.setValue(userName);
        temp1DAO.save(temp1);
        return testUserService.authenticate(userName, password);
    }

    /* (non-Javadoc)
     * @see
 uk.co.company.product.business.spring.UserService#getRoles(java.lang.String,
 boolean)
     */
   �...@override
   �...@transactional
    final public Roles getRoles(final String userName, final boolean
 signedIn){
        return testUserService.getRoles(userName, signedIn);
    }
 }


 On 15 December 2010 14:26, James Carman [via Apache Wicket] 
 ml-node+3089100-955689425-201...@n4.nabble.comml-node%2b3089100-955689425-201...@n4.nabble.com
 wrote:

 Spring is not starting up fine.  It's unable to instantiate the
 UserServiceImpl bean which is why I asked for the code for that class.

 On Wed, Dec 15, 2010 at 9:19 AM, adam.gibbons [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=3089100i=0
 wrote:

 
  Hi Matthias,
 
  Sorry, I'm not sure what you mean by that? If you look at the new log I
 just
  posted, Spring seems to be starting up fine. How could I check it without

  the wicket part? What would I need to change exactly?
 
  Thanks,
  Adam
 
  On 15 December 2010 14:15, Matthias Gasser [via Apache Wicket] 
  [hidden email] 
  http://user/SendEmail.jtp?type=nodenode=3089100i=1[hidden
 email] http://user/SendEmail.jtp?type=nodenode=3089100i=2
  wrote:
 
  Does the spring context startup without the wicket part?
 
  I've integrated Wicket in an existing Spring project (following the
  same guide as you did) and it worked without any (greater) problem.
 
  cheers,
  Matthias
 
  Am 15.12.2010 um 15:06 schrieb adam.gibbons:
 
  
   I thought that was the whole point of the Wicket-Spring project...
 That
   tutorial looked like it worked as recently as a year ago. I find it
 hard
  to
   believe that it's no longer possible or harder to integrate Wicket and

   Spring than it was a year ago.
  
   On researching that error, all I find are comments about deleting the
   session file from Tomcat, and turning off session persistance. I've
 done
   both and I still get the same start up error.
  
  
  
   On 15 December 2010 13:53, James Carman [via Apache Wicket] 
   [hidden email] 
   http://user/SendEmail.jtp?type=nodenode=3089072i=0[hidden

  email] http://user/SendEmail.jtp?type=nodenode=3089072i=1
   wrote:
  
   You need to be able to fire your spring context outside the context
 of
   Wicket.  Can it be instantiated outside your container?  Once you get

   that down, you should be good to go.
  
   On Wed, Dec 15, 2010 at 8:50 AM, adam.gibbons [hidden email]
  http://user/SendEmail.jtp?type=nodenode=3089041i=0
   wrote:
  
  
   Hi James,
  
   Thanks for the suggestion! However, even with your change, I still
 get
   the
   There is no application attached to current thread
   ContainerBackgroundProcessor[StandardEngine[Catalina]] error.
  
   Regards,
   Adam
  
   On 15 December 2010 11:17, James Carman [via Apache Wicket] 
   [hidden email] 
 http://user/SendEmail.jtp?type=nodenode=3089041i=1[hidden
 
   email] http://user/SendEmail.jtp?type=nodenode=3089041i=2
   wrote:
  
   @SpringBean isn't for use inside your Spring services, just Wicket
   stuff.  Just use the native Spring injection mechanisms.  Try
   @Autowired.
  
   On Wed, Dec 15, 2010 at 5:43 AM, Adam Gibbons [hidden email]
   http://user/SendEmail.jtp?type=nodenode=3088802i=0
   wrote:
  
   Hi there,
  
   For some time now I have been trying to put together a simple
 project
 
   to
   get
   me off the ground with a Wicket/Spring/Hibernate setup. I've had
 lots
 
   of
   ups

Re: help me please!!! Wicket/Spring/Hibernate configuration woes

2010-12-15 Thread James Carman
Put a log statement in your DAO's constructor to see if it's getting
instantiated (it's probably not).  Then turn on component scanning as
suggested by someone else.


On Wed, Dec 15, 2010 at 10:01 AM, adam.gibbons adam.s.gibb...@gmail.com wrote:

 There is definitely only 1 implementation. I read the error as it finds 0
 implementations...

 On 15 December 2010 14:54, jcgarciam [via Apache Wicket] 
 ml-node+3089160-35062030-201...@n4.nabble.comml-node%2b3089160-35062030-201...@n4.nabble.com
 wrote:

 It seems be two Implementation in the classpath, and �...@autowired can't 
 pick
 one of them.

 On Wed, Dec 15, 2010 at 11:50 AM, James Carman [via Apache Wicket] [hidden
 email] http://user/SendEmail.jtp?type=nodenode=3089160i=0 wrote:

 Now this isn't a Wicket question.  This is a Spring question.  Wrong
 forum.

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



Re: help me please!!! Wicket/Spring/Hibernate configuration woes

2010-12-15 Thread adam.gibbons
){
currentUser = username;
return userService.authenticate(username, password);
}

@Override
public Roles getRoles(){
return userService.getRoles(currentUser, isSignedIn());
}
}


UserServiceImpl.java:

@Service
public class UserServiceImpl extends _AbstractService implements
UserService{

final private TestUserService testUserService = new TestUserService();

@Autowired
private Temp1DAO temp1DAO;
@Override
@Required
final public void setTemp1DAO(final Temp1DAO temp1dao){
temp1DAO = temp1dao;
}

public UserServiceImpl(){
super();
//InjectorHolder.getInjector().inject(this);//-- VERY IMPORTANT to
get Spring DI to work.
}

/* (non-Javadoc)
 * @see
uk.co.company.product.business.spring.UserService#authenticate(java.lang.String,
java.lang.String)
 */
@Override
@Transactional
final public boolean authenticate(final String userName, final String
password){
final Temp1 temp1 = new Temp1();
temp1.setValue(userName);
temp1DAO.save(temp1);
return testUserService.authenticate(userName, password);
}

/* (non-Javadoc)
 * @see
uk.co.company.product.business.spring.UserService#getRoles(java.lang.String,
boolean)
 */
@Override
@Transactional
final public Roles getRoles(final String userName, final boolean
signedIn){
return testUserService.getRoles(userName, signedIn);
}
}


Temp1DAOImpl.java:

@Repository
public class Temp1DAOImpl extends AbstractTemp1DAO implements Temp1DAO{
private static final Log log = LogFactory.getLog(Temp1DAOImpl.class);

public Temp1DAOImpl(){
super();
log.debug(Temp1DAO created.);
}

@Autowired
public void init(final SessionFactory factory) {
setSessionFactory(factory);
}
}

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/help-me-please-Wicket-Spring-Hibernate-configuration-woes-tp3088768p3089284.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: help me please!!! Wicket/Spring/Hibernate configuration woes

2010-12-15 Thread jcgarciam
 userService;
 public void setUserService(final UserService userService){
 this.userService = userService;
 }

 transient private String currentUser = null;

 public CustomAuthenticatedWebSession(final Request request){
 super(request);
 InjectorHolder.getInjector().inject(this);//-- VERY IMPORTANT to
 get Spring DI to work (within Wicket objects)

 }

 @Override
 public boolean authenticate(final String username, final String
 password){
 currentUser = username;
 return userService.authenticate(username, password);
 }

 @Override
 public Roles getRoles(){
 return userService.getRoles(currentUser, isSignedIn());
 }
 }


 UserServiceImpl.java:

 @Service
 public class UserServiceImpl extends _AbstractService implements
 UserService{

 final private TestUserService testUserService = new TestUserService();

 @Autowired
 private Temp1DAO temp1DAO;
 @Override
 @Required
 final public void setTemp1DAO(final Temp1DAO temp1dao){
 temp1DAO = temp1dao;
 }

 public UserServiceImpl(){
 super();
 //InjectorHolder.getInjector().inject(this);//-- VERY IMPORTANT to
 get Spring DI to work.
 }

 /* (non-Javadoc)
  * @see
 uk.co.company.product.business.spring.UserService#authenticate(java.lang.String,
 java.lang.String)
  */
 @Override
 @Transactional
 final public boolean authenticate(final String userName, final String
 password){
 final Temp1 temp1 = new Temp1();
 temp1.setValue(userName);
 temp1DAO.save(temp1);
 return testUserService.authenticate(userName, password);
 }

 /* (non-Javadoc)
  * @see
 uk.co.company.product.business.spring.UserService#getRoles(java.lang.String,
 boolean)
  */
 @Override
 @Transactional
 final public Roles getRoles(final String userName, final boolean
 signedIn){
 return testUserService.getRoles(userName, signedIn);
 }
 }


 Temp1DAOImpl.java:

 @Repository
 public class Temp1DAOImpl extends AbstractTemp1DAO implements Temp1DAO{
 private static final Log log = LogFactory.getLog(Temp1DAOImpl.class);

 public Temp1DAOImpl(){
 super();
 log.debug(Temp1DAO created.);
 }

 @Autowired
 public void init(final SessionFactory factory) {
 setSessionFactory(factory);
 }
 }




 --
  View message @
 http://apache-wicket.1842946.n4.nabble.com/help-me-please-Wicket-Spring-Hibernate-configuration-woes-tp3088768p3089284.html

 To start a new topic under Apache Wicket, email
 ml-node+1842946-398011874-65...@n4.nabble.comml-node%2b1842946-398011874-65...@n4.nabble.com
 To unsubscribe from Apache Wicket, click 
 herehttp://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=1842946code=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/help-me-please-Wicket-Spring-Hibernate-configuration-woes-tp3088768p3089321.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: help me please!!! Wicket/Spring/Hibernate configuration woes

2010-12-15 Thread Hielke Hoeve
Hey Adam,

This is still a spring error, you need a sessionfactory and
transactionfactory and link them together. The opensessioninview filter only
opens a transaction if you get this right. The spring forums are filled with
examples.

Hielke
On 15 Dec 2010 16:58, adam.gibbons adam.s.gibb...@gmail.com wrote:


 Ok, I think this is now back to a Wicket question. Start up is ok now.
 However when I try and invoke UserServiceImpl.authenticate(){
final Temp1 temp1 = new Temp1();
temp1.setValue(userName);
temp1DAO.save(temp1);
return testUserService.authenticate(userName, password);
 }

 I get the following error through the GUI:

 Method onFormSubmitted of interface
 org.apache.wicket.markup.html.form.IFormSubmitListener targeted at
component
 [MarkupContainer [Component id = signInForm]] threw an exception

 Root cause:

 org.hibernate.HibernateException: persist is not valid without active
 transaction
 at

org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:297)
 at $Proxy18.persist(Unknown Source)
 at

uk.co.company.product.persistance.hibernate.AbstractTemp1DAO.save(AbstractTemp1DAO.java:21)
 at

uk.co.company.product.persistance.hibernate.Temp1DAOImpl.save(Temp1DAOImpl.java:1)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at

org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
 at

org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
 at

org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
 at

org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
 at

org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
 at

org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
 at $Proxy9.save(Unknown Source)
 at

uk.co.company.product.business.spring.UserServiceImpl.authenticate(UserServiceImpl.java:42)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at

org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
 at

org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
 at

org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
 at

org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
 at

org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
 at

org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
 at $Proxy10.authenticate(Unknown Source)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at

org.apache.wicket.proxy.LazyInitProxyFactory$JdkHandler.invoke(LazyInitProxyFactory.java:416)
 at org.apache.wicket.proxy.$Proxy15.authenticate(Unknown Source)
 at

uk.co.company.product.presentation.wicket.app.CustomAuthenticatedWebSession.authenticate(CustomAuthenticatedWebSession.java:29)

 I was under the impression that the OpenSessionInViewFilter was supposed
to
 do this for us?


 Once again here is the source code:


 web.xml:

 ?xml version=1.0 encoding=UTF-8?
 web-app
xmlns=http://java.sun.com/xml/ns/j2ee;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=
http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd

version=2.4
 
display-nameZenTemplate/display-name
context-param
param-namecontextConfigLocation/param-name
param-valueclasspath:applicationContext.xml/param-value
/context-param
listener


listener-classorg.springframework.web.context.ContextLoaderListener/listener-class
/listener
filter
filter-nameopensessioninview/filter-name


filter-classorg.springframework.orm.hibernate3.support.OpenSessionInViewFilter/filter-class
/filter
filter
filter-namewicket-spring-hibernate/filter-name

 filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class
init-param
param-nameapplicationFactoryClassName/param-name


param-valueorg.apache.wicket.spring.SpringWebApplicationFactory/param-value
/init-param
init-param
param-nameapplicationClassName/param-name


param-valueuk.co.company.product.presentation.wicket.app.WicketApplication/param-value
/init-param
/filter
filter-mapping
filter-nameopensessioninview/filter-name
url-pattern/*/url-pattern
/filter-mapping
filter-mapping
filter-namewicket-spring-hibernate/filter-name
url-pattern/*/url-pattern
/filter-mapping
 /web-app



 applicationContext.xml:

 ?xml version=1.0 encoding=UTF-8?
 beans

Re: help me please!!! Wicket/Spring/Hibernate configuration woes

2010-12-15 Thread adam.gibbons
/prop --
 prop
 key=hibernate.jdbc.use_streams_for_binarytrue/prop
 prop
 key=hibernate.jdbc.use_get_generated_keystrue/prop
 !-- CONNECTION --
 prop key=hibernate.connection.isolation8/prop!--
 TRANSACTION_SERIALIZABLE --
 prop key=hibernate.connection.autocommitfalse/prop
 prop key=hibernate.connection.pool_size5/prop
 !-- CACHE --
 !-- prop
 key=hibernate.cache.provider_classorg.hibernate.cache.EhCacheProvider/prop
 --
 !-- prop
 key=hibernate.cache.use_minimal_putstrue/prop --
 !-- prop
 key=hibernate.cache.use_query_cachetrue/prop --
  !-- MISCELLANEOUS --
  prop
 key=hibernate.bytecode.use_reflection_optimizertrue/prop
 prop
 key=hibernate.cglib.use_reflection_optimizertrue/prop
 !-- prop key=hibernate.bytecode.providercglib/prop
 --
 !-- prop key=hibernate.query.substitutionstrue/prop
 --
 /props
 /property
 !--property name=entityInterceptor
 ref bean=interceptor /
 /property--
 property name=packagesToScanlist
 valueuk.co.company.product.persistance.hibernate/value
 /list/property
 /bean
  context:component-scan base-package=uk.co.company.product /
  context:annotation-config/
 /beans


 CustomAuthenticatedWebSession.java:


 public class CustomAuthenticatedWebSession extends
 AuthenticatedWebSession{
 private static final long serialVersionUID = 4713195500103052768L;

 @SpringBean
 private UserService userService;
 public void setUserService(final UserService userService){
 this.userService = userService;
 }

 transient private String currentUser = null;

 public CustomAuthenticatedWebSession(final Request request){
 super(request);
 InjectorHolder.getInjector().inject(this);//-- VERY IMPORTANT to
 get Spring DI to work (within Wicket objects)

 }

 @Override
 public boolean authenticate(final String username, final String
 password){
 currentUser = username;
 return userService.authenticate(username, password);
 }

 @Override
 public Roles getRoles(){
 return userService.getRoles(currentUser, isSignedIn());
 }
 }


 UserServiceImpl.java:

 @Service
 public class UserServiceImpl extends _AbstractService implements
 UserService{

 final private TestUserService testUserService = new TestUserService();

 @Autowired
 private Temp1DAO temp1DAO;
 @Override
 @Required
 final public void setTemp1DAO(final Temp1DAO temp1dao){
 temp1DAO = temp1dao;
 }

 public UserServiceImpl(){
 super();
 //InjectorHolder.getInjector().inject(this);//-- VERY IMPORTANT
 to get Spring DI to work.
 }

 /* (non-Javadoc)
  * @see
 uk.co.company.product.business.spring.UserService#authenticate(java.lang.String,
 java.lang.String)
  */
 @Override
 @Transactional
 final public boolean authenticate(final String userName, final String
 password){
 final Temp1 temp1 = new Temp1();
 temp1.setValue(userName);
 temp1DAO.save(temp1);
 return testUserService.authenticate(userName, password);
 }

 /* (non-Javadoc)
  * @see
 uk.co.company.product.business.spring.UserService#getRoles(java.lang.String,
 boolean)
  */
 @Override
 @Transactional
 final public Roles getRoles(final String userName, final boolean
 signedIn){
 return testUserService.getRoles(userName, signedIn);
 }
 }


 Temp1DAOImpl.java:

 @Repository
 public class Temp1DAOImpl extends AbstractTemp1DAO implements Temp1DAO{
 private static final Log log = LogFactory.getLog(Temp1DAOImpl.class);

 public Temp1DAOImpl(){
 super();
 log.debug(Temp1DAO created.);
 }

 @Autowired
 public void init(final SessionFactory factory) {
 setSessionFactory(factory);
 }
 }




 --
  View message @
 http://apache-wicket.1842946.n4.nabble.com/help-me-please-Wicket-Spring-Hibernate-configuration-woes-tp3088768p3089284.htmlhttp://apache-wicket.1842946.n4.nabble.com/help-me-please-Wicket-Spring-Hibernate-configuration-woes-tp3088768p3089284.html?by-user=t

 To start a new topic under Apache Wicket, email [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=3089321i=1
 To unsubscribe from Apache Wicket, click 
 herehttp://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=1842946code=amNnYXJjaWFtQGdtYWlsLmNvbXwxODQyOTQ2fDEyNTYxMzc3ODY=by-user=t.





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




 --
  View message @
 http://apache-wicket.1842946.n4.nabble.com/help-me-please-Wicket-Spring-Hibernate

Re: help me please!!! Wicket/Spring/Hibernate configuration woes

2010-12-15 Thread adam.gibbons
-mapping
 filter-mapping
 filter-namewicket-spring-hibernate/filter-name
 url-pattern/*/url-pattern
 /filter-mapping
  /web-app
 
 
 
  applicationContext.xml:
 
  ?xml version=1.0 encoding=UTF-8?
  beans
 xmlns=http://www.springframework.org/schema/beans;
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
 xmlns:aop=http://www.springframework.org/schema/aop;
 xmlns:tx=http://www.springframework.org/schema/tx;
 xmlns:context=http://www.springframework.org/schema/context;
 xsi:schemaLocation=
 http://www.springframework.org/schema/beans
  http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
 http://www.springframework.org/schema/aop
  http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
 http://www.springframework.org/schema/tx
  http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
 http://www.springframework.org/schema/context
  http://www.springframework.org/schema/context/spring-context-2.5.xsd
 
 default-autowire=byType
 default-lazy-init=false
  
 bean id=wicketApplication
  class=uk.co.company.product.presentation.wicket.app.WicketApplication
 /
 
 bean id=placeholderConfigurer
 
 class=org.springframework.beans.factory.config.PropertyPlaceholderConfigurer


  autowire=byName
 property name=ignoreUnresolvablePlaceholders value=false /
 property name=systemPropertiesModeName
  value=SYSTEM_PROPERTIES_MODE_OVERRIDE /
 property name=ignoreResourceNotFound value=false /
 property name=locationslist
 valueclasspath*:/application.properties/value
 /list/property
 /bean
 
 bean id=dataSource
  class=org.springframework.jdbc.datasource.DriverManagerDataSource
  autowire=byName
 property
  name=driverClassNamevalue${jdbc.driver}/value/property
 property name=urlvalue${jdbc.url}/value/property
 property
 name=usernamevalue${jdbc.username}/value/property
 property
 name=passwordvalue${jdbc.password}/value/property

 /bean
 
 tx:annotation-driven transaction-manager=txManager /
 
 bean id=txManager
  class=org.springframework.orm.hibernate3.HibernateTransactionManager
  autowire=byName
 property name=sessionFactory ref=sessionFactory /
 /bean
 
 !--bean id=interceptor
  class=com.mycompany.hibernate.HibernateInterceptor
 /bean--
 
 bean id=sessionFactory
 
 class=org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean


  autowire=byName
 property name=dataSource ref=dataSource /
 property name=hibernateProperties
 props
 !-- GENERAL --
 prop key=hibernate.dialect${hibernate.dialect}/prop
 prop key=hibernate.show_sqltrue/prop
 prop key=hibernate.show_sqlhibernate.format_sql/prop

 prop key=hibernate.default_schemazen_template/prop
 prop key=hibernate.max_fetch_depth2/prop
 !-- prop
  key=hibernate.default_batch_fetch_size16/prop --
 prop key=hibernate.default_entity_modepojo/prop
 prop key=hibernate.order_updatestrue/prop
 prop key=hibernate.generate_statisticstrue/prop
 prop key=hibernate.use_identifier_rollbacktrue/prop
 prop
  key=hibernate.current_session_context_classthread/prop
 prop key=hibernate.use_outer_jointrue/prop
 !-- JDBC --
 !-- prop key=hibernate.jdbc.batch_size20/prop --
 !-- prop
  key=hibernate.jdbc.batch_versioned_datatrue/prop --
 prop
  key=hibernate.jdbc.use_streams_for_binarytrue/prop
 prop
  key=hibernate.j


 --
  View message @
 http://apache-wicket.1842946.n4.nabble.com/help-me-please-Wicket-Spring-Hibernate-configuration-woes-tp3088768p3089324.html

 To start a new topic under Apache Wicket, email
 ml-node+1842946-1499480286-201...@n4.nabble.comml-node%2b1842946-1499480286-201...@n4.nabble.com
 To unsubscribe from Apache Wicket, click 
 herehttp://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=1842946code=YWRhbS5zLmdpYmJvbnNAZ21haWwuY29tfDE4NDI5NDZ8LTUzNzMyMDU4OQ==.



-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/help-me-please-Wicket-Spring-Hibernate-configuration-woes-tp3088768p3089377.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: help me please!!! Wicket/Spring/Hibernate configuration woes

2010-12-15 Thread James Carman
-valueuk.co.company.product.presentation.wicket.app.WicketApplication/param-value


         /init-param
     /filter
     filter-mapping
         filter-nameopensessioninview/filter-name
         url-pattern/*/url-pattern
     /filter-mapping
     filter-mapping
         filter-namewicket-spring-hibernate/filter-name
         url-pattern/*/url-pattern
     /filter-mapping
  /web-app
 
 
 
  applicationContext.xml:
 
  ?xml version=1.0 encoding=UTF-8?
  beans
     xmlns=http://www.springframework.org/schema/beans;
     xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
     xmlns:aop=http://www.springframework.org/schema/aop;
     xmlns:tx=http://www.springframework.org/schema/tx;
     xmlns:context=http://www.springframework.org/schema/context;
     xsi:schemaLocation=
         http://www.springframework.org/schema/beans
  http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
         http://www.springframework.org/schema/aop
  http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
         http://www.springframework.org/schema/tx
  http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
         http://www.springframework.org/schema/context
  http://www.springframework.org/schema/context/spring-context-2.5.xsd
     
     default-autowire=byType
     default-lazy-init=false
  
     bean id=wicketApplication
  class=uk.co.company.product.presentation.wicket.app.WicketApplication
 /
 
     bean id=placeholderConfigurer
 
 class=org.springframework.beans.factory.config.PropertyPlaceholderConfigurer


  autowire=byName
         property name=ignoreUnresolvablePlaceholders value=false /
         property name=systemPropertiesModeName
  value=SYSTEM_PROPERTIES_MODE_OVERRIDE /
         property name=ignoreResourceNotFound value=false /
         property name=locationslist
             valueclasspath*:/application.properties/value
         /list/property
     /bean
 
     bean id=dataSource
  class=org.springframework.jdbc.datasource.DriverManagerDataSource
  autowire=byName
         property
  name=driverClassNamevalue${jdbc.driver}/value/property
         property name=urlvalue${jdbc.url}/value/property
         property
 name=usernamevalue${jdbc.username}/value/property
         property
 name=passwordvalue${jdbc.password}/value/property

     /bean
 
     tx:annotation-driven transaction-manager=txManager /
 
     bean id=txManager
  class=org.springframework.orm.hibernate3.HibernateTransactionManager
  autowire=byName
         property name=sessionFactory ref=sessionFactory /
     /bean
 
     !--bean id=interceptor
  class=com.mycompany.hibernate.HibernateInterceptor
     /bean--
 
     bean id=sessionFactory
 
 class=org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean


  autowire=byName
         property name=dataSource ref=dataSource /
         property name=hibernateProperties
             props
                 !-- GENERAL --
                 prop key=hibernate.dialect${hibernate.dialect}/prop
                 prop key=hibernate.show_sqltrue/prop
                 prop key=hibernate.show_sqlhibernate.format_sql/prop

                 prop key=hibernate.default_schemazen_template/prop
                 prop key=hibernate.max_fetch_depth2/prop
                 !-- prop
  key=hibernate.default_batch_fetch_size16/prop --
                 prop key=hibernate.default_entity_modepojo/prop
                 prop key=hibernate.order_updatestrue/prop
                 prop key=hibernate.generate_statisticstrue/prop
                 prop key=hibernate.use_identifier_rollbacktrue/prop
                 prop
  key=hibernate.current_session_context_classthread/prop
                 prop key=hibernate.use_outer_jointrue/prop
                 !-- JDBC --
                 !-- prop key=hibernate.jdbc.batch_size20/prop --
                 !-- prop
  key=hibernate.jdbc.batch_versioned_datatrue/prop --
                 prop
  key=hibernate.jdbc.use_streams_for_binarytrue/prop
                 prop
  key=hibernate.j


 --
  View message @
 http://apache-wicket.1842946.n4.nabble.com/help-me-please-Wicket-Spring-Hibernate-configuration-woes-tp3088768p3089324.html

 To start a new topic under Apache Wicket, email
 ml-node+1842946-1499480286-201...@n4.nabble.comml-node%2b1842946-1499480286-201...@n4.nabble.com
 To unsubscribe from Apache Wicket, click 
 herehttp://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=1842946code=YWRhbS5zLmdpYmJvbnNAZ21haWwuY29tfDE4NDI5NDZ8LTUzNzMyMDU4OQ==.



 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/help-me-please-Wicket-Spring-Hibernate-configuration-woes-tp3088768p3089377.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: help me please!!! Wicket/Spring/Hibernate configuration woes

2010-12-15 Thread Michael O'Cleirigh
/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd

version=2.4
display-nameZenTemplate/display-name
context-param
param-namecontextConfigLocation/param-name
param-valueclasspath:applicationContext.xml/param-value
/context-param
listener



listener-classorg.springframework.web.context.ContextLoaderListener/listener-class


/listener
filter
filter-nameopensessioninview/filter-name



filter-classorg.springframework.orm.hibernate3.support.OpenSessionInViewFilter/filter-class


/filter
filter
filter-namewicket-spring-hibernate/filter-name

filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class
init-param
param-nameapplicationFactoryClassName/param-name



param-valueorg.apache.wicket.spring.SpringWebApplicationFactory/param-value


/init-param
init-param
param-nameapplicationClassName/param-name



param-valueuk.co.company.product.presentation.wicket.app.WicketApplication/param-value



/init-param
/filter
filter-mapping
filter-nameopensessioninview/filter-name
url-pattern/*/url-pattern
/filter-mapping
filter-mapping
filter-namewicket-spring-hibernate/filter-name
url-pattern/*/url-pattern
/filter-mapping
/web-app



applicationContext.xml:

?xml version=1.0 encoding=UTF-8?
beans
xmlns=http://www.springframework.org/schema/beans;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns:aop=http://www.springframework.org/schema/aop;
xmlns:tx=http://www.springframework.org/schema/tx;
xmlns:context=http://www.springframework.org/schema/context;
xsi:schemaLocation=
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-2.5.xsd

default-autowire=byType
default-lazy-init=false
bean id=wicketApplication
class=uk.co.company.product.presentation.wicket.app.WicketApplication

/

bean id=placeholderConfigurer


class=org.springframework.beans.factory.config.PropertyPlaceholderConfigurer



autowire=byName
property name=ignoreUnresolvablePlaceholders value=false /
property name=systemPropertiesModeName
value=SYSTEM_PROPERTIES_MODE_OVERRIDE /
property name=ignoreResourceNotFound value=false /
property name=locationslist
valueclasspath*:/application.properties/value
/list/property
/bean

bean id=dataSource
class=org.springframework.jdbc.datasource.DriverManagerDataSource
autowire=byName
property
name=driverClassNamevalue${jdbc.driver}/value/property
property name=urlvalue${jdbc.url}/value/property
property

name=usernamevalue${jdbc.username}/value/property

property

name=passwordvalue${jdbc.password}/value/property


/bean

tx:annotation-driven transaction-manager=txManager /

bean id=txManager
class=org.springframework.orm.hibernate3.HibernateTransactionManager
autowire=byName
property name=sessionFactory ref=sessionFactory /
/bean

!--bean id=interceptor
class=com.mycompany.hibernate.HibernateInterceptor
/bean--

bean id=sessionFactory


class=org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean



autowire=byName
property name=dataSource ref=dataSource /
property name=hibernateProperties
props
!-- GENERAL --
prop key=hibernate.dialect${hibernate.dialect}/prop
prop key=hibernate.show_sqltrue/prop
prop key=hibernate.show_sqlhibernate.format_sql/prop
prop key=hibernate.default_schemazen_template/prop
prop key=hibernate.max_fetch_depth2/prop
!--prop
key=hibernate.default_batch_fetch_size16/prop  --
prop key=hibernate.default_entity_modepojo/prop
prop key=hibernate.order_updatestrue/prop
prop key=hibernate.generate_statisticstrue/prop
prop key=hibernate.use_identifier_rollbacktrue/prop
prop
key=hibernate.current_session_context_classthread/prop
prop key=hibernate.use_outer_jointrue/prop
!-- JDBC --
!--prop key=hibernate.jdbc.batch_size20/prop  --
!--prop
key=hibernate.jdbc.batch_versioned_datatrue/prop  --
prop
key=hibernate.jdbc.use_streams_for_binarytrue/prop
prop
key=hibernate.j


--
  View message @
http://apache-wicket.1842946.n4.nabble.com/help-me-please-Wicket-Spring-Hibernate-configuration-woes

problem with wicket + spring + hibernate

2010-08-11 Thread Will Martinez A .

Hello,
I'm newbie with wicket,  I'm trying to set up a new project, I took some 
configuration examples from 5 days of wicket, but I don't know what happened, 
for some reason I'm not able to save my data, I'm using spring annotations, my 
application begins with a login form, after that it shows an Add Client form, 
when I hit the save button, nothing happen, not message, nothing at all.  If 
somebody can help I will apreciate it a lot. Below you can see my project's 
files:


web.xml 
?xml version=1.0 encoding=ISO-8859-1?
web-app xmlns=http://java.sun.com/xml/ns/j2ee; 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee 
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;
version=2.4
 
display-namescfsi3/display-name
filter
filter-namewicket.scfsi3/filter-name

filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class
init-param
param-nameapplicationFactoryClassName/param-name

param-valueorg.apache.wicket.spring.SpringWebApplicationFactory/param-value
/init-param
/filter
filter-mapping
filter-namewicket.scfsi3/filter-name
url-pattern/*/url-pattern
/filter-mapping
filter
   filter-nameopen.hibernate.session.in.view/filter-name

filter-classorg.springframework.orm.hibernate3.support.OpenSessionInViewFilter/filter-class
/filter

!-- Important! This filter mapping must come before Wicket's! --
filter-mapping
   filter-nameopen.hibernate.session.in.view/filter-name
   url-pattern/*/url-pattern
/filter-mapping
filter
   filter-namewicket.session/filter-name
   
filter-classorg.apache.wicket.protocol.http.servlet.WicketSessionFilter/filter-class
   init-param
   param-namefilterName/param-name
   param-valuewicket.scfsi3/param-value
   /init-param
/filter
filter-mapping
filter-namewicket.session/filter-name
url-pattern/servlet/*/url-pattern
/filter-mapping

context-param
param-namecontextConfigLocation/param-name

param-valueclasspath:com/fmorales/scfsi3/spring/applicationContext.xml/param-value
/context-param
listener

listener-classorg.springframework.web.context.ContextLoaderListener/listener-class
/listener
/web-app


my pom.xml
project xmlns=http://maven.apache.org/POM/4.0.0;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd;

modelVersion4.0.0/modelVersion
groupIdcom.fmorales/groupId
artifactIdscfsi3/artifactId
packagingwar/packaging
version1.0-SNAPSHOT/version
!-- TODO project name  --
namefmorales/name
description/description

!-- TODO
organization
namecompany name/name
urlcompany url/url
/organization
--

licenses
license
nameThe Apache Software License, Version 2.0/name
urlhttp://www.apache.org/licenses/LICENSE-2.0.txt/url
distributionrepo/distribution
/license
/licenses
   
 dependencies
!--  WICKET DEPENDENCIES --
dependency
groupIdorg.apache.wicket/groupId
artifactIdwicket/artifactId
version${wicket.version}/version
/dependency
dependency
groupIdorg.apache.wicket/groupId
artifactIdwicket-extensions/artifactId
version${wicket.version}/version
/dependency
dependency
groupIdorg.apache.wicket/groupId
artifactIdwicket-ioc/artifactId
version${wicket.version}/version
/dependency
dependency
groupIdorg.apache.wicket/groupId
artifactIdwicket-spring/artifactId
version${wicket.version}/version
/dependency
!--  HIBERNATE DEPENDNECIES --
dependency
groupIdorg.hibernate/groupId
artifactIdhibernate-annotations/artifactId
version${hibernate.version}/version
/dependency
dependency
groupIdc3p0/groupId
artifactIdc3p0/artifactId
version${c3p0.version}/version
/dependency
dependency
groupIdpostgresql/groupId
artifactIdpostgresql/artifactId
version${postgres.version}/version

SV: problem with wicket + spring + hibernate

2010-08-11 Thread Wilhelmsen Tor Iver
I noticed that you ignored the warning here:

 !-- Important! This filter mapping must come before Wicket's! --

by placing the Wicket filters first.

- Tor Iver

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



RE: SV: problem with wicket + spring + hibernate

2010-08-11 Thread Will Martinez A .

As I said before I took some configurations files from 5 days of 
wicket(mysticpaste) and for mysticpaste it works fine.

I think I found the problem for some reason without @transactional it is not 
working, in mysticpaste it works without @transactional, but in my project it 
need it, some one can tell why?

Thanks,
Will



 From: toriv...@arrive.no
 To: users@wicket.apache.org
 Date: Wed, 11 Aug 2010 08:50:01 +0200
 Subject: SV: problem with wicket + spring + hibernate
 
 I noticed that you ignored the warning here:
 
  !-- Important! This filter mapping must come before Wicket's! --
 
 by placing the Wicket filters first.
 
 - Tor Iver
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
  

Re: SV: problem with wicket + spring + hibernate

2010-08-11 Thread jcgarciam

Probably some Form validation fail (some field cannot be converted), try
overriding the OnError method in the form, report any error in the
feedbackpanel.


On Wed, Aug 11, 2010 at 4:10 AM, Will Martinez A. [via Apache Wicket] 
ml-node+2320816-430238374-65...@n4.nabble.comml-node%2b2320816-430238374-65...@n4.nabble.com
 wrote:


 As I said before I took some configurations files from 5 days of
 wicket(mysticpaste) and for mysticpaste it works fine.

 I think I found the problem for some reason without @transactional it is
 not working, in mysticpaste it works without @transactional, but in my
 project it need it, some one can tell why?

 Thanks,
 Will



  From: [hidden email]http://user/SendEmail.jtp?type=nodenode=2320816i=0
  To: [hidden email]http://user/SendEmail.jtp?type=nodenode=2320816i=1
  Date: Wed, 11 Aug 2010 08:50:01 +0200
  Subject: SV: problem with wicket + spring + hibernate
 
  I noticed that you ignored the warning here:
 
   !-- Important! This filter mapping must come before Wicket's! --
 
  by placing the Wicket filters first.
 
  - Tor Iver
 
  -
  To unsubscribe, e-mail: [hidden 
  email]http://user/SendEmail.jtp?type=nodenode=2320816i=2
  For additional commands, e-mail: [hidden 
  email]http://user/SendEmail.jtp?type=nodenode=2320816i=3
 


 --
  View message @
 http://apache-wicket.1842946.n4.nabble.com/problem-with-wicket-spring-hibernate-tp2320778p2320816.html
 To unsubscribe from Apache Wicket, click 
 herehttp://apache-wicket.1842946.n4.nabble.com/template/NodeServlet.jtp?tpl=unsubscribe_by_codenode=1842946code=amNnYXJjaWFtQGdtYWlsLmNvbXwxODQyOTQ2fDEyNTYxMzc3ODY=.





-- 
Sincerely,
JC (http://www.linkedin.com/in/jcgarciam)
Work smarter, not harder!.

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/problem-with-wicket-spring-hibernate-tp2320778p2321036.html
Sent from the Wicket - User mailing list archive at Nabble.com.


Wicket + Spring + WicketTester: org.apache.wicket.WicketRuntimeException: There is no application attached to current thread main

2010-05-10 Thread Lauwers, Kim
Hello everybody,

 

I'm having problems with testing my wicket application with WicketTester

I get this error:

org.apache.wicket.WicketRuntimeException: There is no application attached to 
current thread main

 

è See below for fulle stacktrace.

 

 

I have been looking everywhere on the net, and I can't seem to get it working L

 

I have following WEB.XML

 

[WEB.XML]

?xml version=1.0 encoding=UTF-8?

web-app version=2.5 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-app_2_5.xsd;

context-param

param-namecontextConfigLocation/param-name

param-valueclasspath:applicationContext.xml/param-value

/context-param

 

servlet

servlet-nameSLF4J helper/servlet-name

servlet-classbe.thomascook.SLF4JHelperServlet/servlet-class

load-on-startup1/load-on-startup

/servlet

 

listener


listener-classorg.springframework.web.context.ContextLoaderListener/listener-class

/listener

 

filter

filter-nameopensessioninview/filter-name


filter-classorg.springframework.orm.hibernate3.support.OpenSessionInViewFilter/filter-class

/filter

filter-mapping

filter-nameopensessioninview/filter-name

url-pattern/*/url-pattern

/filter-mapping

 

servlet

servlet-nameJersey Spring Web Application/servlet-name


servlet-classcom.sun.jersey.spi.spring.container.servlet.SpringServlet/servlet-class

init-param


param-namecom.sun.jersey.config.property.JSPTemplatesBasePath/param-name

param-value/WEB-INF/jsp/param-value

/init-param

load-on-startup2/load-on-startup

/servlet

servlet-mapping

servlet-nameJersey Spring Web Application/servlet-name

url-pattern/rest/*/url-pattern

/servlet-mapping

 

filter

filter-namewicket-spring/filter-name


filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class

init-param

param-nameapplicationFactoryClassName/param-name


param-valueorg.apache.wicket.spring.SpringWebApplicationFactory/param-value

/init-param

init-param

param-nameapplicationBean/param-name

param-valuewicketApplication/param-value

/init-param

/filter

 

filter-mapping

filter-namewicket-spring/filter-name

url-pattern/*/url-pattern

/filter-mapping

/web-app

[/WEB.XML]

 

 

My WebApplication

In the init method we weave spring to our wicket

[APP]

public class WicketFilter extends WebApplication {

/**

 * Constructor.

 */

public WicketFilter() {

 

}

 

@Override

protected void init() {

addComponentInstantiationListener(new SpringComponentInjector(this));

}

 

public Class getHomePage() {

return UserListPage.class;

}

}

[/APP]

 

My userListPage

With the @SpringBean we inject a spring bean which is defined in our 
applicationContext.

[PAGE]

public class UserListPage extends TemplatePage {

 

@SpringBean(name = userservice)

private GenericCRUDServiceUser, Long service;

 

public UserListPage() {

setPageTitle(Users List);

this.add(new CRUDPanelUser, Long(userlist, service, username, 
firstName, lastName, email, enabled) {

@Override

protected void onEdit(IModelUser rowModel) {

UserPage page = new UserPage(rowModel);

setResponsePage(page);

}

});

}

}

[/PAGE]

 

 

And finally my test which fails

[TEST]

@ContextConfiguration(locations = {

/applicationContext-dao.xml,

/applicationContext-service.xml,

/applicationContext-database.xml})

public class UserListPageTest extends AbstractTestNGSpringContextTests {

 

@Autowired

private ApplicationContext applicationContext;

@Autowired

protected WicketFilter wicketApplication;

 

@Test

public void labelContainsHelloWorld() {

 

wicketApplication.addComponentInstantiationListener(new 
SpringComponentInjector(wicketApplication, applicationContext, true));

 

WicketTester tester = new WicketTester(wicketApplication);

 

 

tester.startPage(UserListPage.class);

tester.assertNoErrorMessage();

tester.assertLabel(title, Roles List);

}

}

[/TEST]

 

 

[EXCEPTION]

org.apache.wicket.WicketRuntimeException: There is no application attached to 
current thread main

at org.apache.wicket.Application.get(Application.java:179)

at 
org.apache.wicket.injection.web.InjectorHolder.setInjector(InjectorHolder.java:88)

at 
org.apache.wicket.spring.injection.annot.SpringComponentInjector.init(SpringComponentInjector.java:104)

  

RE: Wicket + Spring + WicketTester: org.apache.wicket.WicketRuntimeException: There is no application attached to current thread main

2010-05-10 Thread Lauwers, Kim
Okay,

Got my test green :-)


Here it is:

package be.thomascook.ui.pages.admin;

import be.thomascook.wicket.component.WicketFilter;
import org.apache.wicket.spring.injection.annot.SpringComponentInjector;
import org.apache.wicket.util.tester.WicketTester;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.testng.AbstractTestNGSpringContextTests;
import 
org.springframework.test.context.testng.AbstractTransactionalTestNGSpringContextTests;
import org.springframework.transaction.annotation.Transactional;
import org.testng.annotations.Test;

/**
 * @author Compi
 * @since 10-mei-2010
 */
@ContextConfiguration(locations = {
/applicationContext-dao.xml,
/applicationContext-service.xml,
/applicationContext-database.xml})
@Transactional
public class UserListPageTest extends 
AbstractTransactionalTestNGSpringContextTests {

@Autowired
private ApplicationContext applicationContext;
@Autowired
protected WicketFilter wicketApplication;

@Test
public void labelContainsHelloWorld()   {
WicketTester tester=new WicketTester();
tester.getApplication().addComponentInstantiationListener(new 
SpringComponentInjector(tester.getApplication(), applicationContext, true ));


tester.startPage(UserListPage.class);
tester.assertNoErrorMessage();
tester.assertLabel(title, Users List);
}
}


Kind regards,
Kim

-Original Message-
From: Lauwers, Kim [mailto:kim.lauw...@thomascook.be] 
Sent: maandag 10 mei 2010 14:00
To: users@wicket.apache.org
Subject: Wicket + Spring + WicketTester: 
org.apache.wicket.WicketRuntimeException: There is no application attached to 
current thread main

Hello everybody,

 

I'm having problems with testing my wicket application with WicketTester

I get this error:

org.apache.wicket.WicketRuntimeException: There is no application attached to 
current thread main

 

è See below for fulle stacktrace.

 

 

I have been looking everywhere on the net, and I can't seem to get it working L

 

I have following WEB.XML

 

[WEB.XML]

?xml version=1.0 encoding=UTF-8?

web-app version=2.5 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-app_2_5.xsd;

context-param

param-namecontextConfigLocation/param-name

param-valueclasspath:applicationContext.xml/param-value

/context-param

 

servlet

servlet-nameSLF4J helper/servlet-name

servlet-classbe.thomascook.SLF4JHelperServlet/servlet-class

load-on-startup1/load-on-startup

/servlet

 

listener


listener-classorg.springframework.web.context.ContextLoaderListener/listener-class

/listener

 

filter

filter-nameopensessioninview/filter-name


filter-classorg.springframework.orm.hibernate3.support.OpenSessionInViewFilter/filter-class

/filter

filter-mapping

filter-nameopensessioninview/filter-name

url-pattern/*/url-pattern

/filter-mapping

 

servlet

servlet-nameJersey Spring Web Application/servlet-name


servlet-classcom.sun.jersey.spi.spring.container.servlet.SpringServlet/servlet-class

init-param


param-namecom.sun.jersey.config.property.JSPTemplatesBasePath/param-name

param-value/WEB-INF/jsp/param-value

/init-param

load-on-startup2/load-on-startup

/servlet

servlet-mapping

servlet-nameJersey Spring Web Application/servlet-name

url-pattern/rest/*/url-pattern

/servlet-mapping

 

filter

filter-namewicket-spring/filter-name


filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class

init-param

param-nameapplicationFactoryClassName/param-name


param-valueorg.apache.wicket.spring.SpringWebApplicationFactory/param-value

/init-param

init-param

param-nameapplicationBean/param-name

param-valuewicketApplication/param-value

/init-param

/filter

 

filter-mapping

filter-namewicket-spring/filter-name

url-pattern/*/url-pattern

/filter-mapping

/web-app

[/WEB.XML]

 

 

My WebApplication

In the init method we weave spring to our wicket

[APP]

public class WicketFilter extends WebApplication {

/**

 * Constructor.

 */

public WicketFilter() {

 

}

 

@Override

protected void init() {

addComponentInstantiationListener(new SpringComponentInjector(this));

}

 

public Class getHomePage() {

return UserListPage.class;

}

}

[/APP]

 

My userListPage

With the @SpringBean we inject a spring bean which is defined in our

Wicket-Spring 1.4.8 runs into exception in unit test

2010-05-04 Thread Per Newgro

Hi *,

today i updated wicket from 1.4.7 to 1.4.8. I found a hardcoded 
dependency to wicket-spring 1.4.1 in my pom.
I updated it to 1.4.8 to. Now i get in my page test the following 
exception in setup. But what does it mean? Where
can i change something to make this work. Until now i didn't found a 
starting point. Maybe someone solved this

already. - Unit test layout is related to world-known wicket-example.

org.apache.wicket.WicketRuntimeException: There is no application 
attached to current thread main

at org.apache.wicket.Application.get(Application.java:179)
at 
org.apache.wicket.injection.web.InjectorHolder.setInjector(InjectorHolder.java:88)
at 
org.apache.wicket.spring.injection.annot.test.AnnotApplicationContextMock.init(AnnotApplicationContextMock.java:61)

at my.chaman.frontend.wicket.MockContext.init(MockContext.java:11)
at 
my.chaman.frontend.wicket.ApplicationForTesting.init(ApplicationForTesting.java:11)
at 
my.chaman.frontend.wicket.pricetype.edit.pricetypetext.PriceTypeTextPageTest.setUp(PriceTypeTextPageTest.java:29)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)
at 
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at 
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)

at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at 
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
at 
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)


Cheers
Per


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



Re: Wicket-Spring 1.4.8 runs into exception in unit test

2010-05-04 Thread Jeremy Thomerson
Is your unit test setting up the application before it starts (i.e. in the
setUp method if you're using junit?).  If you can't figure it out, create a
quickstart that demonstrates it, and attach that to a JIRA.

--
Jeremy Thomerson
http://www.wickettraining.com



On Tue, May 4, 2010 at 11:42 AM, Per Newgro per.new...@gmx.ch wrote:

 Hi *,

 today i updated wicket from 1.4.7 to 1.4.8. I found a hardcoded dependency
 to wicket-spring 1.4.1 in my pom.
 I updated it to 1.4.8 to. Now i get in my page test the following exception
 in setup. But what does it mean? Where
 can i change something to make this work. Until now i didn't found a
 starting point. Maybe someone solved this
 already. - Unit test layout is related to world-known wicket-example.

 org.apache.wicket.WicketRuntimeException: There is no application attached
 to current thread main
at org.apache.wicket.Application.get(Application.java:179)
at
 org.apache.wicket.injection.web.InjectorHolder.setInjector(InjectorHolder.java:88)
at
 org.apache.wicket.spring.injection.annot.test.AnnotApplicationContextMock.init(AnnotApplicationContextMock.java:61)
at my.chaman.frontend.wicket.MockContext.init(MockContext.java:11)
at
 my.chaman.frontend.wicket.ApplicationForTesting.init(ApplicationForTesting.java:11)
at
 my.chaman.frontend.wicket.pricetype.edit.pricetypetext.PriceTypeTextPageTest.setUp(PriceTypeTextPageTest.java:29)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
 org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at
 org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at
 org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at
 org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
at
 org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
at
 org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at
 org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
at
 org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
 org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at
 org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at
 org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at
 org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

 Cheers
 Per


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




Re: Wicket-Spring 1.4.8 runs into exception in unit test

2010-05-04 Thread Ben Tilford
Did you upgrade to spring 3?

I ran into an issue with the testng spring test not creating the application
context before  wicket tester tried to use it (iirc @BeforeTest executed
before the super classes @BeforeClass)  Ended up switching anything
annotated with @BeforeTest to @BeforeMethod.

I assume junit has similar annotations.

On Tue, May 4, 2010 at 11:15 PM, Jeremy Thomerson jer...@wickettraining.com
 wrote:

 Is your unit test setting up the application before it starts (i.e. in the
 setUp method if you're using junit?).  If you can't figure it out, create a
 quickstart that demonstrates it, and attach that to a JIRA.

 --
 Jeremy Thomerson
 http://www.wickettraining.com



 On Tue, May 4, 2010 at 11:42 AM, Per Newgro per.new...@gmx.ch wrote:

  Hi *,
 
  today i updated wicket from 1.4.7 to 1.4.8. I found a hardcoded
 dependency
  to wicket-spring 1.4.1 in my pom.
  I updated it to 1.4.8 to. Now i get in my page test the following
 exception
  in setup. But what does it mean? Where
  can i change something to make this work. Until now i didn't found a
  starting point. Maybe someone solved this
  already. - Unit test layout is related to world-known wicket-example.
 
  org.apache.wicket.WicketRuntimeException: There is no application
 attached
  to current thread main
 at org.apache.wicket.Application.get(Application.java:179)
 at
 
 org.apache.wicket.injection.web.InjectorHolder.setInjector(InjectorHolder.java:88)
 at
 
 org.apache.wicket.spring.injection.annot.test.AnnotApplicationContextMock.init(AnnotApplicationContextMock.java:61)
 at my.chaman.frontend.wicket.MockContext.init(MockContext.java:11)
 at
 
 my.chaman.frontend.wicket.ApplicationForTesting.init(ApplicationForTesting.java:11)
 at
 
 my.chaman.frontend.wicket.pricetype.edit.pricetypetext.PriceTypeTextPageTest.setUp(PriceTypeTextPageTest.java:29)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at
 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at
 
 org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
 at
 
 org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
 at
 
 org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
 at
 
 org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
 at
 
 org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
 at
 
 org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
 at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
 at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
 at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
 at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
 at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
 at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
 at
 
 org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
 at
 
 org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
 at
 
 org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
 at
 
 org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
 at
 
 org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
 at
 
 org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
 
  Cheers
  Per
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 



Wicket + Spring 3 + Hibernate

2010-04-15 Thread Steven Haines
Hi,

I am at a point where I need to upgrade my application from Spring 2.5.6 to 
Spring 3.0.1.RELEASE. I have a working application and when I update Spring, I 
see the following exception on deployment:

Caused by: org.springframework.beans.factory.BeanCurrentlyInCreationException: 
Error creating bean with name 'sessionFactory': FactoryBean which is currently 
in creation returned null from getObject
at 
org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:157)
at 
org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:109)
at 
org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1387)


I've simplified my Hibernate configuration to: 

bean id=sessionFactory 
class=org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean
property name=dataSource ref=dataSource /
property name=hibernateProperties
props
prop 
key=hibernate.dialectorg.hibernate.dialect.Oracle10gDialect/prop
prop key=hibernate.hbm2ddl.autovalidate/prop
/props
/property
property name=packagesToScan
list
valuecom.mycompany.model/value
/list
/property
/bean

Finally, here is the dependency list in Maven for my Spring and Hibernate 
libraries with wicket.version=1.4.7 and spring.version=3.0.1.RELEASE:
dependency
groupIdorg.apache.wicket/groupId
artifactIdwicket-spring/artifactId
version${wicket.version}/version
/dependency
dependency
groupIdorg.springframework/groupId
artifactIdorg.springframework.context/artifactId
version${spring.version}/version
/dependency
dependency
groupIdorg.springframework/groupId
artifactIdorg.springframework.core/artifactId
version${spring.version}/version
/dependency
dependency
groupIdorg.springframework/groupId
artifactIdorg.springframework.web/artifactId
version${spring.version}/version
/dependency
dependency
groupIdorg.springframework/groupId
artifactIdorg.springframework.web.servlet/artifactId
version${spring.version}/version
/dependency
dependency
groupIdorg.springframework/groupId
artifactIdorg.springframework.beans/artifactId
version${spring.version}/version
/dependency
dependency
groupIdorg.springframework/groupId
artifactIdorg.springframework.oxm/artifactId
version${spring.version}/version
/dependency
dependency
groupIdorg.springframework/groupId
artifactIdorg.springframework.orm/artifactId
version${spring.version}/version
/dependency
dependency
groupIdjavax.servlet/groupId
artifactIdservlet-api/artifactId
version${servlet-api.version}/version
scopeprovided/scope
/dependency
dependency
groupIdorg.hibernate/groupId
artifactIdhibernate-core/artifactId
version3.3.2.GA/version
/dependency
dependency
groupIdjavax.persistence/groupId
artifactIdpersistence-api/artifactId
version1.0/version
/dependency
dependency
groupIdorg.hibernate/groupId
artifactIdhibernate-annotations/artifactId
version3.4.0.GA/version
/dependency


I have successfully integrated Spring 3 and Hibernate in a RESTful web service 
and I have successfully integrated Wicket 1.4.7 with Spring 2.5.6 and 
Hibernate, but I am seeing errors specifically with Wicket and Spring 3 with 
Hibernate. Has anyone successfully integrated the three technologies?

Any suggestions?

Thanks!
Steve

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



Re: Wicket + Spring 3 + Hibernate

2010-04-15 Thread Sigmar Muuga
What error? Next time post the stack :)

On Thu, Apr 15, 2010 at 5:47 PM, Steven Haines lyg...@yahoo.com wrote:

 Hi,

 I am at a point where I need to upgrade my application from Spring 2.5.6 to
 Spring 3.0.1.RELEASE. I have a working application and when I update Spring,
 I see the following exception on deployment:

 Caused by:
 org.springframework.beans.factory.BeanCurrentlyInCreationException: Error
 creating bean with name 'sessionFactory': FactoryBean which is currently in
 creation returned null from getObject
at
 org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:157)
at
 org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:109)
at
 org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1387)


 I've simplified my Hibernate configuration to:

bean id=sessionFactory
 class=org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean
property name=dataSource ref=dataSource /
property name=hibernateProperties
props
prop
 key=hibernate.dialectorg.hibernate.dialect.Oracle10gDialect/prop
prop key=hibernate.hbm2ddl.autovalidate/prop
/props
/property
property name=packagesToScan
list
valuecom.mycompany.model/value
/list
/property
/bean

 Finally, here is the dependency list in Maven for my Spring and Hibernate
 libraries with wicket.version=1.4.7 and spring.version=3.0.1.RELEASE:
dependency
groupIdorg.apache.wicket/groupId
artifactIdwicket-spring/artifactId
version${wicket.version}/version
/dependency
dependency
groupIdorg.springframework/groupId
artifactIdorg.springframework.context/artifactId
version${spring.version}/version
/dependency
dependency
groupIdorg.springframework/groupId
artifactIdorg.springframework.core/artifactId
version${spring.version}/version
/dependency
dependency
groupIdorg.springframework/groupId
artifactIdorg.springframework.web/artifactId
version${spring.version}/version
/dependency
dependency
groupIdorg.springframework/groupId
artifactIdorg.springframework.web.servlet/artifactId
version${spring.version}/version
/dependency
dependency
groupIdorg.springframework/groupId
artifactIdorg.springframework.beans/artifactId
version${spring.version}/version
/dependency
dependency
groupIdorg.springframework/groupId
artifactIdorg.springframework.oxm/artifactId
version${spring.version}/version
/dependency
dependency
groupIdorg.springframework/groupId
artifactIdorg.springframework.orm/artifactId
version${spring.version}/version
/dependency
dependency
groupIdjavax.servlet/groupId
artifactIdservlet-api/artifactId
version${servlet-api.version}/version
scopeprovided/scope
/dependency
dependency
groupIdorg.hibernate/groupId
artifactIdhibernate-core/artifactId
version3.3.2.GA/version
/dependency
dependency
groupIdjavax.persistence/groupId
artifactIdpersistence-api/artifactId
version1.0/version
/dependency
dependency
groupIdorg.hibernate/groupId
artifactIdhibernate-annotations/artifactId
version3.4.0.GA/version
/dependency


 I have successfully integrated Spring 3 and Hibernate in a RESTful web
 service and I have successfully integrated Wicket 1.4.7 with Spring 2.5.6
 and Hibernate, but I am seeing errors specifically with Wicket and Spring 3
 with Hibernate. Has anyone successfully integrated the three technologies?

 Any suggestions?

 Thanks!
 Steve

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




Re: Wicket + Spring 3 + Hibernate

2010-04-15 Thread Steven Haines
)
at 
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)
at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1308)
at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1067)
at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:511)
at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:450)
at 
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:290)
at 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:287)
at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:189)
at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:825)
at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:754)
at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:685)
at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByType(AbstractAutowireCapableBeanFactory.java:1134)
... 40 more
Caused by: org.springframework.beans.factory.BeanCurrentlyInCreationException: 
Error creating bean with name 'sessionFactory': FactoryBean which is currently 
in creation returned null from getObject
at 
org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:157)
at 
org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:109)
at 
org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1387)
at 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:244)
at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:189)
at 
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322)
... 53 more
Apr 15, 2010 11:05:11 AM org.apache.catalina.core.ApplicationContext log
INFO: Closing Spring root WebApplicationContext






- Original Message 
From: Sigmar Muuga meedi...@gmail.com
To: users@wicket.apache.org; Steven Haines lyg...@yahoo.com
Sent: Thu, April 15, 2010 11:09:50 AM
Subject: Re: Wicket + Spring 3 + Hibernate

What error? Next time post the stack :)

On Thu, Apr 15, 2010 at 5:47 PM, Steven Haines lyg...@yahoo.com wrote:

 Hi,

 I am at a point where I need to upgrade my application from Spring 2.5.6 to
 Spring 3.0.1.RELEASE. I have a working application and when I update Spring,
 I see the following exception on deployment:

 Caused by:
 org.springframework.beans.factory.BeanCurrentlyInCreationException: Error
 creating bean with name 'sessionFactory': FactoryBean which is currently in
 creation returned null from getObject
at
 org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:157)
at
 org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:109)
at
 org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1387)


 I've simplified my Hibernate configuration to:

bean id=sessionFactory
 class=org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean
property name=dataSource ref=dataSource /
property name=hibernateProperties
props
prop
 key=hibernate.dialectorg.hibernate.dialect.Oracle10gDialect/prop
prop key=hibernate.hbm2ddl.autovalidate/prop
/props
/property
property name=packagesToScan
list
valuecom.mycompany.model/value
/list
/property
/bean

 Finally, here is the dependency list in Maven for my Spring and Hibernate
 libraries with wicket.version=1.4.7 and spring.version=3.0.1.RELEASE:
dependency
groupIdorg.apache.wicket/groupId
artifactIdwicket-spring/artifactId
version${wicket.version}/version
/dependency
dependency
groupIdorg.springframework/groupId

Re: Wicket + Spring 3 + Hibernate

2010-04-15 Thread Steven Haines
Sorry for the spam, I found the root cause of the problem - I guess there is 
some kind of circular dependency in Spring/Hibernate that appeared when I 
integrated the app with Wicket... I dont full understand, but I changed 
application context XML file to wire by name instead of type and the problem 
went away:

beans default-autowire=byName
   xmlns=http://www.springframework.org/schema/beans;
   xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
   xmlns:context=http://www.springframework.org/schema/context;
   xmlns:util=http://www.springframework.org/schema/util;
   xsi:schemaLocation=http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/util 
http://www.springframework.org/schema/util/spring-util-3.0.xsd;

I appreciate your responses and I hope that someone can find my couple days of 
troubleshooting helpful :)

Thanks
Steve




- Original Message 
From: Steven Haines lyg...@yahoo.com
To: users@wicket.apache.org
Sent: Thu, April 15, 2010 11:14:49 AM
Subject: Re: Wicket + Spring 3 + Hibernate

I posted a few lines from the error, but here is the complete stack trace. My 
initial searches on this pointed to a circular dependency caused by autowiring, 
which may or may not be the case - when I removed the default-autowire 
parameter from my beans node then the error changed to state that the bean 
needs a sessionFactory (because I removed it.) So note sure if I took a step 
forward or back.

If you are interested I created a sample project that produces the error, I can 
zip it up and mail it to you (but dont want to spam the whole list with an 
attachment...

Thanks
Steve

Stack Trace:

Apr 15, 2010 11:05:11 AM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of 
class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.UnsatisfiedDependencyException: Error 
creating bean with name 'messageDao' defined in file 
[/Users/scadmin/Downloads/apache-tomcat-6.0.20/webapps/wicketspringhibernateexample/WEB-INF/classes/com/informit/dao/HibernateMessageDaoImpl.class]:
 Unsatisfied dependency expressed through bean property 'sessionFactory': : 
Error creating bean with name 'sessionFactory' defined in class path resource 
[applicationContext.xml]: Unsatisfied dependency expressed through bean 
property 'eventListeners': : Error creating bean with name 'transactionManager' 
defined in class path resource [applicationContext.xml]: Cannot resolve 
reference to bean 'sessionFactory' while setting bean property 
'sessionFactory'; nested exception is 
org.springframework.beans.factory.BeanCurrentlyInCreationException: Error 
creating bean with name 'sessionFactory': FactoryBean which is currently in 
creation returned null from getObject; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'transactionManager' defined in class path resource 
[applicationContext.xml]: Cannot resolve reference to bean 'sessionFactory' 
while setting bean property 'sessionFactory'; nested exception is 
org.springframework.beans.factory.BeanCurrentlyInCreationException: Error 
creating bean with name 'sessionFactory': FactoryBean which is currently in 
creation returned null from getObject; nested exception is 
org.springframework.beans.factory.UnsatisfiedDependencyException: Error 
creating bean with name 'sessionFactory' defined in class path resource 
[applicationContext.xml]: Unsatisfied dependency expressed through bean 
property 'eventListeners': : Error creating bean with name 'transactionManager' 
defined in class path resource [applicationContext.xml]: Cannot resolve 
reference to bean 'sessionFactory' while setting bean property 
'sessionFactory'; nested exception is
org.springframework.beans.factory.BeanCurrentlyInCreationException: Error 
creating bean with name 'sessionFactory': FactoryBean which is currently in 
creation returned null from getObject; nested exception is 
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'transactionManager' defined in class path resource 
[applicationContext.xml]: Cannot resolve reference to bean 'sessionFactory' 
while setting bean property 'sessionFactory'; nested exception is 
org.springframework.beans.factory.BeanCurrentlyInCreationException: Error 
creating bean with name 'sessionFactory': FactoryBean which is currently in 
creation returned null from getObject
at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByType(AbstractAutowireCapableBeanFactory.java:1150)
at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean

Re: Wicket + Spring 3 + Hibernate

2010-04-15 Thread Mauro Ciancio
Take out the 'default-autowire=byName' from your beans.xml
and it will work.

Cheers!

On Thu, Apr 15, 2010 at 12:21 PM, Steven Haines lyg...@yahoo.com wrote:
 Sorry for the spam, I found the root cause of the problem - I guess there is 
 some kind of circular dependency in Spring/Hibernate that appeared when I 
 integrated the app with Wicket... I dont full understand, but I changed 
 application context XML file to wire by name instead of type and the problem 
 went away:

 beans default-autowire=byName
       xmlns=http://www.springframework.org/schema/beans;
       xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
       xmlns:context=http://www.springframework.org/schema/context;
       xmlns:util=http://www.springframework.org/schema/util;
       xsi:schemaLocation=http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
        http://www.springframework.org/schema/context
        http://www.springframework.org/schema/context/spring-context-3.0.xsd
        http://www.springframework.org/schema/util 
 http://www.springframework.org/schema/util/spring-util-3.0.xsd;

 I appreciate your responses and I hope that someone can find my couple days 
 of troubleshooting helpful :)

 Thanks
 Steve




 - Original Message 
 From: Steven Haines lyg...@yahoo.com
 To: users@wicket.apache.org
 Sent: Thu, April 15, 2010 11:14:49 AM
 Subject: Re: Wicket + Spring 3 + Hibernate

 I posted a few lines from the error, but here is the complete stack trace. My 
 initial searches on this pointed to a circular dependency caused by 
 autowiring, which may or may not be the case - when I removed the 
 default-autowire parameter from my beans node then the error changed to state 
 that the bean needs a sessionFactory (because I removed it.) So note sure if 
 I took a step forward or back.

 If you are interested I created a sample project that produces the error, I 
 can zip it up and mail it to you (but dont want to spam the whole list with 
 an attachment...

 Thanks
 Steve

 Stack Trace:

 Apr 15, 2010 11:05:11 AM org.apache.catalina.core.StandardContext 
 listenerStart
 SEVERE: Exception sending context initialized event to listener instance of 
 class org.springframework.web.context.ContextLoaderListener
 org.springframework.beans.factory.UnsatisfiedDependencyException: Error 
 creating bean with name 'messageDao' defined in file 
 [/Users/scadmin/Downloads/apache-tomcat-6.0.20/webapps/wicketspringhibernateexample/WEB-INF/classes/com/informit/dao/HibernateMessageDaoImpl.class]:
  Unsatisfied dependency expressed through bean property 'sessionFactory': : 
 Error creating bean with name 'sessionFactory' defined in class path resource 
 [applicationContext.xml]: Unsatisfied dependency expressed through bean 
 property 'eventListeners': : Error creating bean with name 
 'transactionManager' defined in class path resource [applicationContext.xml]: 
 Cannot resolve reference to bean 'sessionFactory' while setting bean property 
 'sessionFactory'; nested exception is 
 org.springframework.beans.factory.BeanCurrentlyInCreationException: Error 
 creating bean with name 'sessionFactory': FactoryBean which is currently in 
 creation returned null from getObject; nested exception is
 org.springframework.beans.factory.BeanCreationException: Error creating bean 
 with name 'transactionManager' defined in class path resource 
 [applicationContext.xml]: Cannot resolve reference to bean 'sessionFactory' 
 while setting bean property 'sessionFactory'; nested exception is 
 org.springframework.beans.factory.BeanCurrentlyInCreationException: Error 
 creating bean with name 'sessionFactory': FactoryBean which is currently in 
 creation returned null from getObject; nested exception is 
 org.springframework.beans.factory.UnsatisfiedDependencyException: Error 
 creating bean with name 'sessionFactory' defined in class path resource 
 [applicationContext.xml]: Unsatisfied dependency expressed through bean 
 property 'eventListeners': : Error creating bean with name 
 'transactionManager' defined in class path resource [applicationContext.xml]: 
 Cannot resolve reference to bean 'sessionFactory' while setting bean property 
 'sessionFactory'; nested exception is
 org.springframework.beans.factory.BeanCurrentlyInCreationException: Error 
 creating bean with name 'sessionFactory': FactoryBean which is currently in 
 creation returned null from getObject; nested exception is 
 org.springframework.beans.factory.BeanCreationException: Error creating bean 
 with name 'transactionManager' defined in class path resource 
 [applicationContext.xml]: Cannot resolve reference to bean 'sessionFactory' 
 while setting bean property 'sessionFactory'; nested exception is 
 org.springframework.beans.factory.BeanCurrentlyInCreationException: Error 
 creating bean with name 'sessionFactory': FactoryBean which is currently in 
 creation returned null from getObject

Re: Recommend two good complete clean Wicket+Spring+Hibernate apps?

2010-03-16 Thread Cemal Bayramoglu
David,

You may find LegUp [1] useful.
Also see the wiki, [2], the Wicket in Action site [3]  and book [4]
for useful information, and  the PhoneBook sample [5].

Regards - Cemal
jWeekend
OO  Java Technologies, Wicket
Consulting, Development, Training
http://jWeekend.com

[1] http://jweekend.com/dev/LegUp
[2] http://cwiki.apache.org/WICKET/spring.html
[3] http://wicketinaction.com/2009/06/wicketspringhibernate-configuration/
[4] http://www.manning.com/dashorst/
[5] http://wicketstuff.org/confluence/display/STUFFWIKI/wicket-phonebook


On 16 March 2010 02:05, David Chang david_q_zh...@yahoo.com wrote:

 Can anybody recommend to me two good complete clean sample or open source 
 Wicket + Spring + Hibernate applications?

 One of the effective ways I learn is by learning from good examples.

 I would be very much grateful for any info. Hopefully, the sample or open 
 source applications are not too big, but still show many points.

 Thanks a lot!




 -
 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



Re: Recommend two good complete clean Wicket+Spring+Hibernate apps?

2010-03-16 Thread David Chang
James, thanks so much for the information. I cannot say enough thank-you for 
your help.

All the best,
David

--- On Tue, 3/16/10, Cemal Bayramoglu jweekend_for...@cabouge.com wrote:

 From: Cemal Bayramoglu jweekend_for...@cabouge.com
 Subject: Re: Recommend two good complete clean Wicket+Spring+Hibernate apps?
 To: users users@wicket.apache.org
 Date: Tuesday, March 16, 2010, 9:01 AM
 David,
 
 You may find LegUp [1] useful.
 Also see the wiki, [2], the Wicket in Action site [3] 
 and book [4]
 for useful information, and  the PhoneBook sample
 [5].
 
 Regards - Cemal
 jWeekend
 OO  Java Technologies, Wicket
 Consulting, Development, Training
 http://jWeekend.com
 
 [1] http://jweekend.com/dev/LegUp
 [2] http://cwiki.apache.org/WICKET/spring.html
 [3] http://wicketinaction.com/2009/06/wicketspringhibernate-configuration/
 [4] http://www.manning.com/dashorst/
 [5] http://wicketstuff.org/confluence/display/STUFFWIKI/wicket-phonebook
 
 
 On 16 March 2010 02:05, David Chang david_q_zh...@yahoo.com
 wrote:
 
  Can anybody recommend to me two good complete clean
 sample or open source Wicket + Spring + Hibernate
 applications?
 
  One of the effective ways I learn is by learning from
 good examples.
 
  I would be very much grateful for any info. Hopefully,
 the sample or open source applications are not too big, but
 still show many points.
 
  Thanks a lot!
 
 
 
 
 
 -
  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
 
 




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



Re: Recommend two good complete clean Wicket+Spring+Hibernate apps?

2010-03-16 Thread David Chang
Cemal, 

Thanks so much for the information. I am really grateful, indeed.
Putting Wicket aside, you guys are awesome.

Best, 
David

--- On Tue, 3/16/10, Cemal Bayramoglu jweekend_for...@cabouge.com wrote:

 From: Cemal Bayramoglu jweekend_for...@cabouge.com
 Subject: Re: Recommend two good complete clean Wicket+Spring+Hibernate apps?
 To: users users@wicket.apache.org
 Date: Tuesday, March 16, 2010, 9:01 AM
 David,
 
 You may find LegUp [1] useful.
 Also see the wiki, [2], the Wicket in Action site [3] 
 and book [4]
 for useful information, and  the PhoneBook sample
 [5].
 
 Regards - Cemal
 jWeekend
 OO  Java Technologies, Wicket
 Consulting, Development, Training
 http://jWeekend.com
 
 [1] http://jweekend.com/dev/LegUp
 [2] http://cwiki.apache.org/WICKET/spring.html
 [3] http://wicketinaction.com/2009/06/wicketspringhibernate-configuration/
 [4] http://www.manning.com/dashorst/
 [5] http://wicketstuff.org/confluence/display/STUFFWIKI/wicket-phonebook
 
 
 On 16 March 2010 02:05, David Chang david_q_zh...@yahoo.com
 wrote:
 
  Can anybody recommend to me two good complete clean
 sample or open source Wicket + Spring + Hibernate
 applications?
 
  One of the effective ways I learn is by learning from
 good examples.
 
  I would be very much grateful for any info. Hopefully,
 the sample or open source applications are not too big, but
 still show many points.
 
  Thanks a lot!
 
 
 
 
 
 -
  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
 
 




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



Recommend two good complete clean Wicket+Spring+Hibernate apps?

2010-03-15 Thread David Chang

Can anybody recommend to me two good complete clean sample or open source 
Wicket + Spring + Hibernate applications?

One of the effective ways I learn is by learning from good examples.

I would be very much grateful for any info. Hopefully, the sample or open 
source applications are not too big, but still show many points.

Thanks a lot!


  

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



Re: Recommend two good complete clean Wicket+Spring+Hibernate apps?

2010-03-15 Thread James Carman
You can try my demo application I used for my Advanced Wicket presentation:

http://svn.carmanconsulting.com/public/wicket-advanced/trunk



On Mon, Mar 15, 2010 at 10:05 PM, David Chang david_q_zh...@yahoo.com wrote:

 Can anybody recommend to me two good complete clean sample or open source 
 Wicket + Spring + Hibernate applications?

 One of the effective ways I learn is by learning from good examples.

 I would be very much grateful for any info. Hopefully, the sample or open 
 source applications are not too big, but still show many points.

 Thanks a lot!




 -
 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



Re: Recommend two good complete clean Wicket+Spring+Hibernate apps?

2010-03-15 Thread David Chang

Hello James,

Thank you!

Best,
-David

--- On Mon, 3/15/10, James Carman jcar...@carmanconsulting.com wrote:

 From: James Carman jcar...@carmanconsulting.com
 Subject: Re: Recommend two good complete clean Wicket+Spring+Hibernate apps?
 To: users@wicket.apache.org
 Date: Monday, March 15, 2010, 10:09 PM
 You can try my demo application I
 used for my Advanced Wicket presentation:
 
 http://svn.carmanconsulting.com/public/wicket-advanced/trunk
 
 
 
 On Mon, Mar 15, 2010 at 10:05 PM, David Chang david_q_zh...@yahoo.com
 wrote:
 
  Can anybody recommend to me two good complete clean
 sample or open source Wicket + Spring + Hibernate
 applications?
 
  One of the effective ways I learn is by learning from
 good examples.
 
  I would be very much grateful for any info. Hopefully,
 the sample or open source applications are not too big, but
 still show many points.
 
  Thanks a lot!
 
 
 
 
 
 -
  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
 
 


  

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



Re: Recommend two good complete clean Wicket+Spring+Hibernate apps?

2010-03-15 Thread David Chang
James, 

I just downloaded your application. Do you have any documentation/presentation 
about this application? 

Do you happen to have knowledge of another good sample/demo app?

Thanks, 
David

--- On Mon, 3/15/10, James Carman jcar...@carmanconsulting.com wrote:

 From: James Carman jcar...@carmanconsulting.com
 Subject: Re: Recommend two good complete clean Wicket+Spring+Hibernate apps?
 To: users@wicket.apache.org
 Date: Monday, March 15, 2010, 10:09 PM
 You can try my demo application I
 used for my Advanced Wicket presentation:
 
 http://svn.carmanconsulting.com/public/wicket-advanced/trunk
 
 
 
 On Mon, Mar 15, 2010 at 10:05 PM, David Chang david_q_zh...@yahoo.com
 wrote:
 
  Can anybody recommend to me two good complete clean
 sample or open source Wicket + Spring + Hibernate
 applications?
 
  One of the effective ways I learn is by learning from
 good examples.
 
  I would be very much grateful for any info. Hopefully,
 the sample or open source applications are not too big, but
 still show many points.
 
  Thanks a lot!
 
 
 
 
 
 -
  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
 
 


  

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



Re: Recommend two good complete clean Wicket+Spring+Hibernate apps?

2010-03-15 Thread James Carman
On Mon, Mar 15, 2010 at 10:57 PM, David Chang david_q_zh...@yahoo.com wrote:
 James,

 I just downloaded your application. Do you have any 
 documentation/presentation about this application?

I didn't really have a slide presentation for this talk.  I basically
just walked through code.  I did it as a day in the life of a Wicket
programmer where I implemented some user stories on-the-fly.


 Do you happen to have knowledge of another good sample/demo app?

Wicket Iolite 
(http://wicketstuff.org/confluence/display/STUFFWIKI/Wicket-Iolite)
is another good example, or the example that comes with Wicketopia
(work in progress).

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



Re: Recommend two good complete clean Wicket+Spring+Hibernate apps?

2010-03-15 Thread David Chang

James, the info is fantastic! 

Many thanks!!! 
-David


--- On Mon, 3/15/10, James Carman jcar...@carmanconsulting.com wrote:

 From: James Carman jcar...@carmanconsulting.com
 Subject: Re: Recommend two good complete clean Wicket+Spring+Hibernate apps?
 To: users@wicket.apache.org
 Date: Monday, March 15, 2010, 11:02 PM
 On Mon, Mar 15, 2010 at 10:57 PM,
 David Chang david_q_zh...@yahoo.com
 wrote:
  James,
 
  I just downloaded your application. Do you have any
 documentation/presentation about this application?
 
 I didn't really have a slide presentation for this
 talk.  I basically
 just walked through code.  I did it as a day in the
 life of a Wicket
 programmer where I implemented some user stories
 on-the-fly.
 
 
  Do you happen to have knowledge of another good
 sample/demo app?
 
 Wicket Iolite 
 (http://wicketstuff.org/confluence/display/STUFFWIKI/Wicket-Iolite)
 is another good example, or the example that comes with
 Wicketopia
 (work in progress).
 
 -
 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



RE: [newbie] Wicket, Spring, Hibernate and transactions in views.

2010-03-03 Thread Colin Rogers
James,

Thank you very much for that - a working example is exactly what I need! :)

Cheers,
Col.

-Original Message-
From: James Carman [mailto:jcar...@carmanconsulting.com] 
Sent: 02 March 2010 17:59
To: users@wicket.apache.org
Subject: Re: [newbie] Wicket, Spring, Hibernate and transactions in views.

Introduce AspectJ and spring-aspects into your build.  You can see an
example of it in my wicket-advanced sample project:

http://svn.carmanconsulting.com/public/wicket-advanced/trunk/

Then, AspectJ will weave the transaction support into your
Page/Component classes like you want.  There are limits on what type
of methods can be transactional, though.  I would also recommend the
OpenSessionInView filter (which my example project also uses).

On Tue, Mar 2, 2010 at 11:25 AM, Colin Rogers coli...@groundsure.com wrote:
 All,



 I've got a bit of a newbie Wicket question involving Spring, Hibernate
 and transactions.



 The question that I can't seem to find an answer to;



 Can a view be a created/injected/aop'd like a spring bean so that it
 honours @Transactional methods for hibernate?



 An example;



 public class HomePage extends WebPage {



 @SpringBean // this is working fine

 private SessionFactory sessionFactory;



 public HomePage(final PageParameters parameters) {



 this.init();

      }



     �...@transactional // this is not working

      public void init() {



            Criteria criteria =
 sessionFactory.getCurrentSession().createCriteria(MyEntity.class);

            ListMyEntity myEntities = criteria.list();

            for( MyEntity myEntity : myEntities ) {



                  // where subEntities is a lazy collection

                  for( SubEntity subEntity : myEntity.getSubEntities() )
 {



                        // ...

                  }

            }

 }

 }



 I've been reading Wicket In Action book, various places on the net and
 of course, emails on the subject on this list and this particular
 tutorial;



 http://wicketinaction.com/2009/06/wicketspringhibernate-configuration/



 And I'm still wondering, is this something that is actually possible? I
 could full understand that it wouldn't be - i.e. that the injector only
 works for Spring injection dependency and not AOP or anything else. So
 you inject your dependencies - and they have transaction support etc.
 But that means I'll be having to force fetching of lazily fetched
 children from outside the views themselves, which is obviously very
 painful. It would be so much easier to have transaction support in the
 view itself and not have to delegate.



 Any help would be greatly appreciated.



 The error message I'm receiving is;



 Caused by: org.hibernate.HibernateException: createCriteria is not valid
 without active transaction

      at
 org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWra
 pper.invoke(ThreadLocalSessionContext.java:338)

      at $Proxy15.createCriteria(Unknown Source)

      at com.tenthart.tacs.testpres.HomePage.init(HomePage.java:39)

      at com.tenthart.tacs.testpres.HomePage.init(HomePage.java:28)

      ... 34 more



 Cheers,

 Col









 Emap delivers intelligence, inspiration and access through publications, 
 events and data businesses in retail, media, the public sector and the built 
 environment. www.emap.com.

 The information in or attached to this email is confidential and may be 
 legally privileged. If you are not the intended recipient of this message any 
 use, disclosure, copying, distribution or any action taken in reliance on it 
 is prohibited and may be unlawful. If you have received this message in 
 error, please notify the sender immediately by return email or by telephone 
 on +44(0)207 728 5000 and delete this message and any copies from your 
 computer and network. The Emap group does not warrant that this email and any 
 attachments are free from viruses and accepts no liability for any loss 
 resulting from infected email transmissions.

 The Emap group reserves the right to monitor all e-mail communications 
 through its networks. Please note that any views expressed in this email may 
 be those of the originator and do not necessarily reflect those of the Emap 
 group.

 GroundSure Ltd. Company number 03421028 (England and Wales)
 Emap Limited. Company number: 0537204 (England and Wales).
 Registered Office: Greater London House, Hampstead Road, London NW1 7EJ, 
 United Kingdom.
 Details of the operating companies forming part of the Emap group can be 
 found at www.emap.com

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



Emap delivers intelligence, inspiration and access through publications, events 
and data businesses in retail, media, the public sector and the built 
environment. www.emap.com.

The information in or attached to this email is confidential

[newbie] Wicket, Spring, Hibernate and transactions in views.

2010-03-02 Thread Colin Rogers
All,

 

I've got a bit of a newbie Wicket question involving Spring, Hibernate
and transactions.

 

The question that I can't seem to find an answer to;

 

Can a view be a created/injected/aop'd like a spring bean so that it
honours @Transactional methods for hibernate?

 

An example;

 

public class HomePage extends WebPage {

 

@SpringBean // this is working fine

private SessionFactory sessionFactory;

  

public HomePage(final PageParameters parameters) {

 

this.init();

  }

  

  @Transactional // this is not working

  public void init() {



Criteria criteria =
sessionFactory.getCurrentSession().createCriteria(MyEntity.class);

ListMyEntity myEntities = criteria.list();

for( MyEntity myEntity : myEntities ) {

  

  // where subEntities is a lazy collection

  for( SubEntity subEntity : myEntity.getSubEntities() )
{



// ...

  }

} 

}

}

 

I've been reading Wicket In Action book, various places on the net and
of course, emails on the subject on this list and this particular
tutorial;

 

http://wicketinaction.com/2009/06/wicketspringhibernate-configuration/

 

And I'm still wondering, is this something that is actually possible? I
could full understand that it wouldn't be - i.e. that the injector only
works for Spring injection dependency and not AOP or anything else. So
you inject your dependencies - and they have transaction support etc.
But that means I'll be having to force fetching of lazily fetched
children from outside the views themselves, which is obviously very
painful. It would be so much easier to have transaction support in the
view itself and not have to delegate.

 

Any help would be greatly appreciated.

 

The error message I'm receiving is;

 

Caused by: org.hibernate.HibernateException: createCriteria is not valid
without active transaction

  at
org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWra
pper.invoke(ThreadLocalSessionContext.java:338)

  at $Proxy15.createCriteria(Unknown Source)

  at com.tenthart.tacs.testpres.HomePage.init(HomePage.java:39)

  at com.tenthart.tacs.testpres.HomePage.init(HomePage.java:28)

  ... 34 more

 

Cheers,

Col

 

 

 

 

Emap delivers intelligence, inspiration and access through publications, events 
and data businesses in retail, media, the public sector and the built 
environment. www.emap.com.

The information in or attached to this email is confidential and may be legally 
privileged. If you are not the intended recipient of this message any use, 
disclosure, copying, distribution or any action taken in reliance on it is 
prohibited and may be unlawful. If you have received this message in error, 
please notify the sender immediately by return email or by telephone on 
+44(0)207 728 5000 and delete this message and any copies from your computer 
and network. The Emap group does not warrant that this email and any 
attachments are free from viruses and accepts no liability for any loss 
resulting from infected email transmissions.

The Emap group reserves the right to monitor all e-mail communications through 
its networks. Please note that any views expressed in this email may be those 
of the originator and do not necessarily reflect those of the Emap group.

GroundSure Ltd. Company number 03421028 (England and Wales)
Emap Limited. Company number: 0537204 (England and Wales).
Registered Office: Greater London House, Hampstead Road, London NW1 7EJ, United 
Kingdom.
Details of the operating companies forming part of the Emap group can be found 
at www.emap.com

Re: [newbie] Wicket, Spring, Hibernate and transactions in views.

2010-03-02 Thread Pedro Sena
I don't think so.

I'd recommend you to make your transactional control in your services and
call them from your pages instead of trying to control it in your view.

Best Regards,

On Tue, Mar 2, 2010 at 1:25 PM, Colin Rogers coli...@groundsure.com wrote:

 All,



 I've got a bit of a newbie Wicket question involving Spring, Hibernate
 and transactions.



 The question that I can't seem to find an answer to;



 Can a view be a created/injected/aop'd like a spring bean so that it
 honours @Transactional methods for hibernate?



 An example;



 public class HomePage extends WebPage {



 @SpringBean // this is working fine

 private SessionFactory sessionFactory;



 public HomePage(final PageParameters parameters) {



 this.init();

  }



  @Transactional // this is not working

  public void init() {



Criteria criteria =
 sessionFactory.getCurrentSession().createCriteria(MyEntity.class);

ListMyEntity myEntities = criteria.list();

for( MyEntity myEntity : myEntities ) {



  // where subEntities is a lazy collection

  for( SubEntity subEntity : myEntity.getSubEntities() )
 {



// ...

  }

}

 }

 }



 I've been reading Wicket In Action book, various places on the net and
 of course, emails on the subject on this list and this particular
 tutorial;



 http://wicketinaction.com/2009/06/wicketspringhibernate-configuration/



 And I'm still wondering, is this something that is actually possible? I
 could full understand that it wouldn't be - i.e. that the injector only
 works for Spring injection dependency and not AOP or anything else. So
 you inject your dependencies - and they have transaction support etc.
 But that means I'll be having to force fetching of lazily fetched
 children from outside the views themselves, which is obviously very
 painful. It would be so much easier to have transaction support in the
 view itself and not have to delegate.



 Any help would be greatly appreciated.



 The error message I'm receiving is;



 Caused by: org.hibernate.HibernateException: createCriteria is not valid
 without active transaction

  at
 org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWra
 pper.invoke(ThreadLocalSessionContext.java:338)

  at $Proxy15.createCriteria(Unknown Source)

  at com.tenthart.tacs.testpres.HomePage.init(HomePage.java:39)

  at com.tenthart.tacs.testpres.HomePage.init(HomePage.java:28)

  ... 34 more



 Cheers,

 Col









 Emap delivers intelligence, inspiration and access through publications,
 events and data businesses in retail, media, the public sector and the built
 environment. www.emap.com.

 The information in or attached to this email is confidential and may be
 legally privileged. If you are not the intended recipient of this message
 any use, disclosure, copying, distribution or any action taken in reliance
 on it is prohibited and may be unlawful. If you have received this message
 in error, please notify the sender immediately by return email or by
 telephone on +44(0)207 728 5000 and delete this message and any copies from
 your computer and network. The Emap group does not warrant that this email
 and any attachments are free from viruses and accepts no liability for any
 loss resulting from infected email transmissions.

 The Emap group reserves the right to monitor all e-mail communications
 through its networks. Please note that any views expressed in this email may
 be those of the originator and do not necessarily reflect those of the Emap
 group.

 GroundSure Ltd. Company number 03421028 (England and Wales)
 Emap Limited. Company number: 0537204 (England and Wales).
 Registered Office: Greater London House, Hampstead Road, London NW1 7EJ,
 United Kingdom.
 Details of the operating companies forming part of the Emap group can be
 found at www.emap.com




-- 
/**
* Pedro Sena
* Systems Architect
* Sun Certified Java Programmer
* Sun Certified Web Component Developer
*/


RE: [newbie] Wicket, Spring, Hibernate and transactions in views.

2010-03-02 Thread Colin Rogers
I'd recommend you to make your transactional control in your services
and call them from your pages instead of trying to control it in your
view.

I'd agree in terms of good design, but I'm coding something for myself
- and I'm trying to make it easy and as little time consuming as
possible. So, yes, transactions in the presentation layer is bad - but
it's only read-only transactions, so I'm letting myself off! ;)

Having the transactionally controlled service methods, individually
instantiate all child entities by hand is also time consuming and would
potentially harm performance (if the view didn't need the children, for
example).

-Original Message-
From: Pedro Sena [mailto:sena.pe...@gmail.com] 
Sent: 02 March 2010 16:39
To: users@wicket.apache.org
Subject: Re: [newbie] Wicket, Spring, Hibernate and transactions in
views.

I don't think so.

I'd recommend you to make your transactional control in your services
and
call them from your pages instead of trying to control it in your view.

Best Regards,

On Tue, Mar 2, 2010 at 1:25 PM, Colin Rogers coli...@groundsure.com
wrote:

 All,



 I've got a bit of a newbie Wicket question involving Spring, Hibernate
 and transactions.



 The question that I can't seem to find an answer to;



 Can a view be a created/injected/aop'd like a spring bean so that it
 honours @Transactional methods for hibernate?



 An example;



 public class HomePage extends WebPage {



 @SpringBean // this is working fine

 private SessionFactory sessionFactory;



 public HomePage(final PageParameters parameters) {



 this.init();

  }



  @Transactional // this is not working

  public void init() {



Criteria criteria =
 sessionFactory.getCurrentSession().createCriteria(MyEntity.class);

ListMyEntity myEntities = criteria.list();

for( MyEntity myEntity : myEntities ) {



  // where subEntities is a lazy collection

  for( SubEntity subEntity : myEntity.getSubEntities()
)
 {



// ...

  }

}

 }

 }



 I've been reading Wicket In Action book, various places on the net and
 of course, emails on the subject on this list and this particular
 tutorial;



 http://wicketinaction.com/2009/06/wicketspringhibernate-configuration/



 And I'm still wondering, is this something that is actually possible?
I
 could full understand that it wouldn't be - i.e. that the injector
only
 works for Spring injection dependency and not AOP or anything else. So
 you inject your dependencies - and they have transaction support etc.
 But that means I'll be having to force fetching of lazily fetched
 children from outside the views themselves, which is obviously very
 painful. It would be so much easier to have transaction support in the
 view itself and not have to delegate.



 Any help would be greatly appreciated.



 The error message I'm receiving is;



 Caused by: org.hibernate.HibernateException: createCriteria is not
valid
 without active transaction

  at

org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWra
 pper.invoke(ThreadLocalSessionContext.java:338)

  at $Proxy15.createCriteria(Unknown Source)

  at com.tenthart.tacs.testpres.HomePage.init(HomePage.java:39)

  at com.tenthart.tacs.testpres.HomePage.init(HomePage.java:28)

  ... 34 more



 Cheers,

 Col









 Emap delivers intelligence, inspiration and access through
publications,
 events and data businesses in retail, media, the public sector and the
built
 environment. www.emap.com.

 The information in or attached to this email is confidential and may
be
 legally privileged. If you are not the intended recipient of this
message
 any use, disclosure, copying, distribution or any action taken in
reliance
 on it is prohibited and may be unlawful. If you have received this
message
 in error, please notify the sender immediately by return email or by
 telephone on +44(0)207 728 5000 and delete this message and any copies
from
 your computer and network. The Emap group does not warrant that this
email
 and any attachments are free from viruses and accepts no liability for
any
 loss resulting from infected email transmissions.

 The Emap group reserves the right to monitor all e-mail communications
 through its networks. Please note that any views expressed in this
email may
 be those of the originator and do not necessarily reflect those of the
Emap
 group.

 GroundSure Ltd. Company number 03421028 (England and Wales)
 Emap Limited. Company number: 0537204 (England and Wales).
 Registered Office: Greater London House, Hampstead Road, London NW1
7EJ,
 United Kingdom.
 Details of the operating companies forming part of the Emap group can
be
 found at www.emap.com




-- 
/**
* Pedro Sena
* Systems Architect
* Sun Certified Java Programmer
* Sun Certified Web Component Developer
*/


Emap delivers intelligence, inspiration and access through

RE: [newbie] Wicket, Spring, Hibernate and transactions in views.

2010-03-02 Thread Josh Chappelle
If you aren't concerned with good design then I wouldn't worry about
transactions at all. Especially if you are doing read only data retrieval. 

Once you get the code working the way you want you can always add
transactions later and refactor the code into your service methods. That's
the agile method anyway. :-)

Josh

-Original Message-
From: Colin Rogers [mailto:coli...@groundsure.com] 
Sent: Tuesday, March 02, 2010 10:46 AM
To: users@wicket.apache.org
Subject: RE: [newbie] Wicket, Spring, Hibernate and transactions in views.

I'd recommend you to make your transactional control in your services
and call them from your pages instead of trying to control it in your
view.

I'd agree in terms of good design, but I'm coding something for myself
- and I'm trying to make it easy and as little time consuming as
possible. So, yes, transactions in the presentation layer is bad - but
it's only read-only transactions, so I'm letting myself off! ;)

Having the transactionally controlled service methods, individually
instantiate all child entities by hand is also time consuming and would
potentially harm performance (if the view didn't need the children, for
example).

-Original Message-
From: Pedro Sena [mailto:sena.pe...@gmail.com] 
Sent: 02 March 2010 16:39
To: users@wicket.apache.org
Subject: Re: [newbie] Wicket, Spring, Hibernate and transactions in
views.

I don't think so.

I'd recommend you to make your transactional control in your services
and
call them from your pages instead of trying to control it in your view.

Best Regards,

On Tue, Mar 2, 2010 at 1:25 PM, Colin Rogers coli...@groundsure.com
wrote:

 All,



 I've got a bit of a newbie Wicket question involving Spring, Hibernate
 and transactions.



 The question that I can't seem to find an answer to;



 Can a view be a created/injected/aop'd like a spring bean so that it
 honours @Transactional methods for hibernate?



 An example;



 public class HomePage extends WebPage {



 @SpringBean // this is working fine

 private SessionFactory sessionFactory;



 public HomePage(final PageParameters parameters) {



 this.init();

  }



  @Transactional // this is not working

  public void init() {



Criteria criteria =
 sessionFactory.getCurrentSession().createCriteria(MyEntity.class);

ListMyEntity myEntities = criteria.list();

for( MyEntity myEntity : myEntities ) {



  // where subEntities is a lazy collection

  for( SubEntity subEntity : myEntity.getSubEntities()
)
 {



// ...

  }

}

 }

 }



 I've been reading Wicket In Action book, various places on the net and
 of course, emails on the subject on this list and this particular
 tutorial;



 http://wicketinaction.com/2009/06/wicketspringhibernate-configuration/



 And I'm still wondering, is this something that is actually possible?
I
 could full understand that it wouldn't be - i.e. that the injector
only
 works for Spring injection dependency and not AOP or anything else. So
 you inject your dependencies - and they have transaction support etc.
 But that means I'll be having to force fetching of lazily fetched
 children from outside the views themselves, which is obviously very
 painful. It would be so much easier to have transaction support in the
 view itself and not have to delegate.



 Any help would be greatly appreciated.



 The error message I'm receiving is;



 Caused by: org.hibernate.HibernateException: createCriteria is not
valid
 without active transaction

  at

org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWra
 pper.invoke(ThreadLocalSessionContext.java:338)

  at $Proxy15.createCriteria(Unknown Source)

  at com.tenthart.tacs.testpres.HomePage.init(HomePage.java:39)

  at com.tenthart.tacs.testpres.HomePage.init(HomePage.java:28)

  ... 34 more



 Cheers,

 Col









 Emap delivers intelligence, inspiration and access through
publications,
 events and data businesses in retail, media, the public sector and the
built
 environment. www.emap.com.

 The information in or attached to this email is confidential and may
be
 legally privileged. If you are not the intended recipient of this
message
 any use, disclosure, copying, distribution or any action taken in
reliance
 on it is prohibited and may be unlawful. If you have received this
message
 in error, please notify the sender immediately by return email or by
 telephone on +44(0)207 728 5000 and delete this message and any copies
from
 your computer and network. The Emap group does not warrant that this
email
 and any attachments are free from viruses and accepts no liability for
any
 loss resulting from infected email transmissions.

 The Emap group reserves the right to monitor all e-mail communications
 through its networks. Please note that any views expressed in this
email may
 be those of the originator and do

Re: [newbie] Wicket, Spring, Hibernate and transactions in views.

2010-03-02 Thread Riyad Kalla
I'm not DB expert, but why are you using transactions for read only
(SELECTs) queries? I've only ever seen transactions used to wrap
INSERT/UPDATE/DELETE statements (writes)

-R

On Tue, Mar 2, 2010 at 9:46 AM, Colin Rogers coli...@groundsure.com wrote:

 I'd recommend you to make your transactional control in your services
 and call them from your pages instead of trying to control it in your
 view.

 I'd agree in terms of good design, but I'm coding something for myself
 - and I'm trying to make it easy and as little time consuming as
 possible. So, yes, transactions in the presentation layer is bad - but
 it's only read-only transactions, so I'm letting myself off! ;)

 Having the transactionally controlled service methods, individually
 instantiate all child entities by hand is also time consuming and would
 potentially harm performance (if the view didn't need the children, for
 example).

 -Original Message-
 From: Pedro Sena [mailto:sena.pe...@gmail.com]
 Sent: 02 March 2010 16:39
 To: users@wicket.apache.org
 Subject: Re: [newbie] Wicket, Spring, Hibernate and transactions in
 views.

 I don't think so.

 I'd recommend you to make your transactional control in your services
 and
 call them from your pages instead of trying to control it in your view.

 Best Regards,

 On Tue, Mar 2, 2010 at 1:25 PM, Colin Rogers coli...@groundsure.com
 wrote:

  All,
 
 
 
  I've got a bit of a newbie Wicket question involving Spring, Hibernate
  and transactions.
 
 
 
  The question that I can't seem to find an answer to;
 
 
 
  Can a view be a created/injected/aop'd like a spring bean so that it
  honours @Transactional methods for hibernate?
 
 
 
  An example;
 
 
 
  public class HomePage extends WebPage {
 
 
 
  @SpringBean // this is working fine
 
  private SessionFactory sessionFactory;
 
 
 
  public HomePage(final PageParameters parameters) {
 
 
 
  this.init();
 
   }
 
 
 
   @Transactional // this is not working
 
   public void init() {
 
 
 
 Criteria criteria =
  sessionFactory.getCurrentSession().createCriteria(MyEntity.class);
 
 ListMyEntity myEntities = criteria.list();
 
 for( MyEntity myEntity : myEntities ) {
 
 
 
   // where subEntities is a lazy collection
 
   for( SubEntity subEntity : myEntity.getSubEntities()
 )
  {
 
 
 
 // ...
 
   }
 
 }
 
  }
 
  }
 
 
 
  I've been reading Wicket In Action book, various places on the net and
  of course, emails on the subject on this list and this particular
  tutorial;
 
 
 
  http://wicketinaction.com/2009/06/wicketspringhibernate-configuration/
 
 
 
  And I'm still wondering, is this something that is actually possible?
 I
  could full understand that it wouldn't be - i.e. that the injector
 only
  works for Spring injection dependency and not AOP or anything else. So
  you inject your dependencies - and they have transaction support etc.
  But that means I'll be having to force fetching of lazily fetched
  children from outside the views themselves, which is obviously very
  painful. It would be so much easier to have transaction support in the
  view itself and not have to delegate.
 
 
 
  Any help would be greatly appreciated.
 
 
 
  The error message I'm receiving is;
 
 
 
  Caused by: org.hibernate.HibernateException: createCriteria is not
 valid
  without active transaction
 
   at
 
 org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWra
  pper.invoke(ThreadLocalSessionContext.java:338)
 
   at $Proxy15.createCriteria(Unknown Source)
 
   at com.tenthart.tacs.testpres.HomePage.init(HomePage.java:39)
 
   at com.tenthart.tacs.testpres.HomePage.init(HomePage.java:28)
 
   ... 34 more
 
 
 
  Cheers,
 
  Col
 
 
 
 
 
 
 
 
 
  Emap delivers intelligence, inspiration and access through
 publications,
  events and data businesses in retail, media, the public sector and the
 built
  environment. www.emap.com.
 
  The information in or attached to this email is confidential and may
 be
  legally privileged. If you are not the intended recipient of this
 message
  any use, disclosure, copying, distribution or any action taken in
 reliance
  on it is prohibited and may be unlawful. If you have received this
 message
  in error, please notify the sender immediately by return email or by
  telephone on +44(0)207 728 5000 and delete this message and any copies
 from
  your computer and network. The Emap group does not warrant that this
 email
  and any attachments are free from viruses and accepts no liability for
 any
  loss resulting from infected email transmissions.
 
  The Emap group reserves the right to monitor all e-mail communications
  through its networks. Please note that any views expressed in this
 email may
  be those of the originator and do not necessarily reflect those of the
 Emap
  group.
 
  GroundSure Ltd. Company number 03421028 (England

RE: [newbie] Wicket, Spring, Hibernate and transactions in views.

2010-03-02 Thread Colin Rogers
 I'm not DB expert, but why are you using transactions for read only
(SELECTs) queries?

If you aren't concerned with good design then I wouldn't worry about
transactions at all

Because you need the transactions for lazy fetching of child elements in
hibernate.

-Original Message-
From: Riyad Kalla [mailto:rka...@gmail.com] 
Sent: 02 March 2010 16:53
To: users@wicket.apache.org
Subject: Re: [newbie] Wicket, Spring, Hibernate and transactions in
views.

I'm not DB expert, but why are you using transactions for read only
(SELECTs) queries? I've only ever seen transactions used to wrap
INSERT/UPDATE/DELETE statements (writes)

-R

On Tue, Mar 2, 2010 at 9:46 AM, Colin Rogers coli...@groundsure.com
wrote:

 I'd recommend you to make your transactional control in your services
 and call them from your pages instead of trying to control it in your
 view.

 I'd agree in terms of good design, but I'm coding something for
myself
 - and I'm trying to make it easy and as little time consuming as
 possible. So, yes, transactions in the presentation layer is bad -
but
 it's only read-only transactions, so I'm letting myself off! ;)

 Having the transactionally controlled service methods, individually
 instantiate all child entities by hand is also time consuming and
would
 potentially harm performance (if the view didn't need the children,
for
 example).

 -Original Message-
 From: Pedro Sena [mailto:sena.pe...@gmail.com]
 Sent: 02 March 2010 16:39
 To: users@wicket.apache.org
 Subject: Re: [newbie] Wicket, Spring, Hibernate and transactions in
 views.

 I don't think so.

 I'd recommend you to make your transactional control in your services
 and
 call them from your pages instead of trying to control it in your
view.

 Best Regards,

 On Tue, Mar 2, 2010 at 1:25 PM, Colin Rogers coli...@groundsure.com
 wrote:

  All,
 
 
 
  I've got a bit of a newbie Wicket question involving Spring,
Hibernate
  and transactions.
 
 
 
  The question that I can't seem to find an answer to;
 
 
 
  Can a view be a created/injected/aop'd like a spring bean so that it
  honours @Transactional methods for hibernate?
 
 
 
  An example;
 
 
 
  public class HomePage extends WebPage {
 
 
 
  @SpringBean // this is working fine
 
  private SessionFactory sessionFactory;
 
 
 
  public HomePage(final PageParameters parameters) {
 
 
 
  this.init();
 
   }
 
 
 
   @Transactional // this is not working
 
   public void init() {
 
 
 
 Criteria criteria =
  sessionFactory.getCurrentSession().createCriteria(MyEntity.class);
 
 ListMyEntity myEntities = criteria.list();
 
 for( MyEntity myEntity : myEntities ) {
 
 
 
   // where subEntities is a lazy collection
 
   for( SubEntity subEntity :
myEntity.getSubEntities()
 )
  {
 
 
 
 // ...
 
   }
 
 }
 
  }
 
  }
 
 
 
  I've been reading Wicket In Action book, various places on the net
and
  of course, emails on the subject on this list and this particular
  tutorial;
 
 
 
 
http://wicketinaction.com/2009/06/wicketspringhibernate-configuration/
 
 
 
  And I'm still wondering, is this something that is actually
possible?
 I
  could full understand that it wouldn't be - i.e. that the injector
 only
  works for Spring injection dependency and not AOP or anything else.
So
  you inject your dependencies - and they have transaction support
etc.
  But that means I'll be having to force fetching of lazily fetched
  children from outside the views themselves, which is obviously very
  painful. It would be so much easier to have transaction support in
the
  view itself and not have to delegate.
 
 
 
  Any help would be greatly appreciated.
 
 
 
  The error message I'm receiving is;
 
 
 
  Caused by: org.hibernate.HibernateException: createCriteria is not
 valid
  without active transaction
 
   at
 

org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWra
  pper.invoke(ThreadLocalSessionContext.java:338)
 
   at $Proxy15.createCriteria(Unknown Source)
 
   at com.tenthart.tacs.testpres.HomePage.init(HomePage.java:39)
 
   at com.tenthart.tacs.testpres.HomePage.init(HomePage.java:28)
 
   ... 34 more
 
 
 
  Cheers,
 
  Col
 
 
 
 
 
 
 
 
 
  Emap delivers intelligence, inspiration and access through
 publications,
  events and data businesses in retail, media, the public sector and
the
 built
  environment. www.emap.com.
 
  The information in or attached to this email is confidential and may
 be
  legally privileged. If you are not the intended recipient of this
 message
  any use, disclosure, copying, distribution or any action taken in
 reliance
  on it is prohibited and may be unlawful. If you have received this
 message
  in error, please notify the sender immediately by return email or by
  telephone on +44(0)207 728 5000 and delete this message and any
copies
 from
  your computer and network. The Emap

Re: [newbie] Wicket, Spring, Hibernate and transactions in views.

2010-03-02 Thread Pedro Santos
Consider to use OpenSessionInViewFilter

http://static.springsource.org/spring/docs/1.2.9/api/org/springframework/orm/hibernate3/support/OpenSessionInViewFilter.html

The doc: Intended for the Open Session in View pattern, i.e. to allow for
lazy loading in web views despite the original transactions already being
completed.

On Tue, Mar 2, 2010 at 2:05 PM, Colin Rogers coli...@groundsure.com wrote:

  I'm not DB expert, but why are you using transactions for read only
 (SELECTs) queries?

 If you aren't concerned with good design then I wouldn't worry about
 transactions at all

 Because you need the transactions for lazy fetching of child elements in
 hibernate.

 -Original Message-
 From: Riyad Kalla [mailto:rka...@gmail.com]
 Sent: 02 March 2010 16:53
 To: users@wicket.apache.org
 Subject: Re: [newbie] Wicket, Spring, Hibernate and transactions in
 views.

 I'm not DB expert, but why are you using transactions for read only
 (SELECTs) queries? I've only ever seen transactions used to wrap
 INSERT/UPDATE/DELETE statements (writes)

 -R

 On Tue, Mar 2, 2010 at 9:46 AM, Colin Rogers coli...@groundsure.com
 wrote:

  I'd recommend you to make your transactional control in your services
  and call them from your pages instead of trying to control it in your
  view.
 
  I'd agree in terms of good design, but I'm coding something for
 myself
  - and I'm trying to make it easy and as little time consuming as
  possible. So, yes, transactions in the presentation layer is bad -
 but
  it's only read-only transactions, so I'm letting myself off! ;)
 
  Having the transactionally controlled service methods, individually
  instantiate all child entities by hand is also time consuming and
 would
  potentially harm performance (if the view didn't need the children,
 for
  example).
 
  -Original Message-
  From: Pedro Sena [mailto:sena.pe...@gmail.com]
  Sent: 02 March 2010 16:39
  To: users@wicket.apache.org
  Subject: Re: [newbie] Wicket, Spring, Hibernate and transactions in
  views.
 
  I don't think so.
 
  I'd recommend you to make your transactional control in your services
  and
  call them from your pages instead of trying to control it in your
 view.
 
  Best Regards,
 
  On Tue, Mar 2, 2010 at 1:25 PM, Colin Rogers coli...@groundsure.com
  wrote:
 
   All,
  
  
  
   I've got a bit of a newbie Wicket question involving Spring,
 Hibernate
   and transactions.
  
  
  
   The question that I can't seem to find an answer to;
  
  
  
   Can a view be a created/injected/aop'd like a spring bean so that it
   honours @Transactional methods for hibernate?
  
  
  
   An example;
  
  
  
   public class HomePage extends WebPage {
  
  
  
   @SpringBean // this is working fine
  
   private SessionFactory sessionFactory;
  
  
  
   public HomePage(final PageParameters parameters) {
  
  
  
   this.init();
  
}
  
  
  
@Transactional // this is not working
  
public void init() {
  
  
  
  Criteria criteria =
   sessionFactory.getCurrentSession().createCriteria(MyEntity.class);
  
  ListMyEntity myEntities = criteria.list();
  
  for( MyEntity myEntity : myEntities ) {
  
  
  
// where subEntities is a lazy collection
  
for( SubEntity subEntity :
 myEntity.getSubEntities()
  )
   {
  
  
  
  // ...
  
}
  
  }
  
   }
  
   }
  
  
  
   I've been reading Wicket In Action book, various places on the net
 and
   of course, emails on the subject on this list and this particular
   tutorial;
  
  
  
  
 http://wicketinaction.com/2009/06/wicketspringhibernate-configuration/
  
  
  
   And I'm still wondering, is this something that is actually
 possible?
  I
   could full understand that it wouldn't be - i.e. that the injector
  only
   works for Spring injection dependency and not AOP or anything else.
 So
   you inject your dependencies - and they have transaction support
 etc.
   But that means I'll be having to force fetching of lazily fetched
   children from outside the views themselves, which is obviously very
   painful. It would be so much easier to have transaction support in
 the
   view itself and not have to delegate.
  
  
  
   Any help would be greatly appreciated.
  
  
  
   The error message I'm receiving is;
  
  
  
   Caused by: org.hibernate.HibernateException: createCriteria is not
  valid
   without active transaction
  
at
  
 
 org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWra
   pper.invoke(ThreadLocalSessionContext.java:338)
  
at $Proxy15.createCriteria(Unknown Source)
  
at com.tenthart.tacs.testpres.HomePage.init(HomePage.java:39)
  
at com.tenthart.tacs.testpres.HomePage.init(HomePage.java:28)
  
... 34 more
  
  
  
   Cheers,
  
   Col
  
  
  
  
  
  
  
  
  
   Emap delivers intelligence, inspiration and access through
  publications

RE: [newbie] Wicket, Spring, Hibernate and transactions in views.

2010-03-02 Thread Colin Rogers
 DEBUG  207:OpenSessionInViewFilter - Closing
single Hibernate Session in OpenSessionInViewFilter
2010-03-02 17:19:12,751 DEBUG  207:OpenSessionInViewFilter - Closing
single Hibernate Session in OpenSessionInViewFilter
2010-03-02 17:19:12,798 DEBUG  239:OpenSessionInViewFilter - Using
SessionFactory 'sessionFactory' for OpenSessionInViewFilter
2010-03-02 17:19:12,798 DEBUG  239:OpenSessionInViewFilter - Using
SessionFactory 'sessionFactory' for OpenSessionInViewFilter
2010-03-02 17:19:12,798 DEBUG  181:OpenSessionInViewFilter - Opening
single Hibernate Session in OpenSessionInViewFilter
2010-03-02 17:19:12,798 DEBUG  181:OpenSessionInViewFilter - Opening
single Hibernate Session in OpenSessionInViewFilter
2010-03-02 17:19:12,798 DEBUG  207:OpenSessionInViewFilter - Closing
single Hibernate Session in OpenSessionInViewFilter
2010-03-02 17:19:12,798 DEBUG  207:OpenSessionInViewFilter - Closing
single Hibernate Session in OpenSessionInViewFilter

-Original Message-
From: Pedro Santos [mailto:pedros...@gmail.com] 
Sent: 02 March 2010 17:11
To: users@wicket.apache.org
Subject: Re: [newbie] Wicket, Spring, Hibernate and transactions in
views.

Consider to use OpenSessionInViewFilter

http://static.springsource.org/spring/docs/1.2.9/api/org/springframework
/orm/hibernate3/support/OpenSessionInViewFilter.html

The doc: Intended for the Open Session in View pattern, i.e. to allow
for
lazy loading in web views despite the original transactions already
being
completed.

On Tue, Mar 2, 2010 at 2:05 PM, Colin Rogers coli...@groundsure.com
wrote:

  I'm not DB expert, but why are you using transactions for read
only
 (SELECTs) queries?

 If you aren't concerned with good design then I wouldn't worry
about
 transactions at all

 Because you need the transactions for lazy fetching of child elements
in
 hibernate.

 -Original Message-
 From: Riyad Kalla [mailto:rka...@gmail.com]
 Sent: 02 March 2010 16:53
 To: users@wicket.apache.org
 Subject: Re: [newbie] Wicket, Spring, Hibernate and transactions in
 views.

 I'm not DB expert, but why are you using transactions for read only
 (SELECTs) queries? I've only ever seen transactions used to wrap
 INSERT/UPDATE/DELETE statements (writes)

 -R

 On Tue, Mar 2, 2010 at 9:46 AM, Colin Rogers coli...@groundsure.com
 wrote:

  I'd recommend you to make your transactional control in your
services
  and call them from your pages instead of trying to control it in
your
  view.
 
  I'd agree in terms of good design, but I'm coding something for
 myself
  - and I'm trying to make it easy and as little time consuming as
  possible. So, yes, transactions in the presentation layer is bad -
 but
  it's only read-only transactions, so I'm letting myself off! ;)
 
  Having the transactionally controlled service methods, individually
  instantiate all child entities by hand is also time consuming and
 would
  potentially harm performance (if the view didn't need the children,
 for
  example).
 
  -Original Message-
  From: Pedro Sena [mailto:sena.pe...@gmail.com]
  Sent: 02 March 2010 16:39
  To: users@wicket.apache.org
  Subject: Re: [newbie] Wicket, Spring, Hibernate and transactions in
  views.
 
  I don't think so.
 
  I'd recommend you to make your transactional control in your
services
  and
  call them from your pages instead of trying to control it in your
 view.
 
  Best Regards,
 
  On Tue, Mar 2, 2010 at 1:25 PM, Colin Rogers
coli...@groundsure.com
  wrote:
 
   All,
  
  
  
   I've got a bit of a newbie Wicket question involving Spring,
 Hibernate
   and transactions.
  
  
  
   The question that I can't seem to find an answer to;
  
  
  
   Can a view be a created/injected/aop'd like a spring bean so that
it
   honours @Transactional methods for hibernate?
  
  
  
   An example;
  
  
  
   public class HomePage extends WebPage {
  
  
  
   @SpringBean // this is working fine
  
   private SessionFactory sessionFactory;
  
  
  
   public HomePage(final PageParameters parameters) {
  
  
  
   this.init();
  
}
  
  
  
@Transactional // this is not working
  
public void init() {
  
  
  
  Criteria criteria =
   sessionFactory.getCurrentSession().createCriteria(MyEntity.class);
  
  ListMyEntity myEntities = criteria.list();
  
  for( MyEntity myEntity : myEntities ) {
  
  
  
// where subEntities is a lazy collection
  
for( SubEntity subEntity :
 myEntity.getSubEntities()
  )
   {
  
  
  
  // ...
  
}
  
  }
  
   }
  
   }
  
  
  
   I've been reading Wicket In Action book, various places on the net
 and
   of course, emails on the subject on this list and this particular
   tutorial;
  
  
  
  
 http://wicketinaction.com/2009/06/wicketspringhibernate-configuration/
  
  
  
   And I'm still wondering, is this something that is actually
 possible?
  I
   could full understand that it wouldn't

Re: [newbie] Wicket, Spring, Hibernate and transactions in views.

2010-03-02 Thread James Carman
Introduce AspectJ and spring-aspects into your build.  You can see an
example of it in my wicket-advanced sample project:

http://svn.carmanconsulting.com/public/wicket-advanced/trunk/

Then, AspectJ will weave the transaction support into your
Page/Component classes like you want.  There are limits on what type
of methods can be transactional, though.  I would also recommend the
OpenSessionInView filter (which my example project also uses).

On Tue, Mar 2, 2010 at 11:25 AM, Colin Rogers coli...@groundsure.com wrote:
 All,



 I've got a bit of a newbie Wicket question involving Spring, Hibernate
 and transactions.



 The question that I can't seem to find an answer to;



 Can a view be a created/injected/aop'd like a spring bean so that it
 honours @Transactional methods for hibernate?



 An example;



 public class HomePage extends WebPage {



 @SpringBean // this is working fine

 private SessionFactory sessionFactory;



 public HomePage(final PageParameters parameters) {



 this.init();

      }



     �...@transactional // this is not working

      public void init() {



            Criteria criteria =
 sessionFactory.getCurrentSession().createCriteria(MyEntity.class);

            ListMyEntity myEntities = criteria.list();

            for( MyEntity myEntity : myEntities ) {



                  // where subEntities is a lazy collection

                  for( SubEntity subEntity : myEntity.getSubEntities() )
 {



                        // ...

                  }

            }

 }

 }



 I've been reading Wicket In Action book, various places on the net and
 of course, emails on the subject on this list and this particular
 tutorial;



 http://wicketinaction.com/2009/06/wicketspringhibernate-configuration/



 And I'm still wondering, is this something that is actually possible? I
 could full understand that it wouldn't be - i.e. that the injector only
 works for Spring injection dependency and not AOP or anything else. So
 you inject your dependencies - and they have transaction support etc.
 But that means I'll be having to force fetching of lazily fetched
 children from outside the views themselves, which is obviously very
 painful. It would be so much easier to have transaction support in the
 view itself and not have to delegate.



 Any help would be greatly appreciated.



 The error message I'm receiving is;



 Caused by: org.hibernate.HibernateException: createCriteria is not valid
 without active transaction

      at
 org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWra
 pper.invoke(ThreadLocalSessionContext.java:338)

      at $Proxy15.createCriteria(Unknown Source)

      at com.tenthart.tacs.testpres.HomePage.init(HomePage.java:39)

      at com.tenthart.tacs.testpres.HomePage.init(HomePage.java:28)

      ... 34 more



 Cheers,

 Col









 Emap delivers intelligence, inspiration and access through publications, 
 events and data businesses in retail, media, the public sector and the built 
 environment. www.emap.com.

 The information in or attached to this email is confidential and may be 
 legally privileged. If you are not the intended recipient of this message any 
 use, disclosure, copying, distribution or any action taken in reliance on it 
 is prohibited and may be unlawful. If you have received this message in 
 error, please notify the sender immediately by return email or by telephone 
 on +44(0)207 728 5000 and delete this message and any copies from your 
 computer and network. The Emap group does not warrant that this email and any 
 attachments are free from viruses and accepts no liability for any loss 
 resulting from infected email transmissions.

 The Emap group reserves the right to monitor all e-mail communications 
 through its networks. Please note that any views expressed in this email may 
 be those of the originator and do not necessarily reflect those of the Emap 
 group.

 GroundSure Ltd. Company number 03421028 (England and Wales)
 Emap Limited. Company number: 0537204 (England and Wales).
 Registered Office: Greater London House, Hampstead Road, London NW1 7EJ, 
 United Kingdom.
 Details of the operating companies forming part of the Emap group can be 
 found at www.emap.com

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



Re: Wicket, Spring 3 and UnitTesting

2010-01-29 Thread Kent Tong


Jochen Mader-2 wrote:
 
 Just figured out how to do UnitTesting with Spring 3 and Wicket.
 

An alternative is to use http://wicketpagetest.sourceforge.net. It works
fine with Spring 3.0 without changing any of your code.

-
--
Kent Tong
Better way to unit test Wicket pages (http://wicketpagetest.sourceforge.net)
Books on CXF, Axis2, Wicket, JSF (http://agileskills2.org)
-- 
View this message in context: 
http://old.nabble.com/Wicket%2C-Spring-3-and-UnitTesting-tp27320784p27380973.html
Sent from the Wicket - User 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: Wicket, Spring 3 and UnitTesting

2010-01-28 Thread Jochen Mader
Sorry for my late answer.
StaticWebApplicationContext doesn't cut it for  me.
Your example contains a small mistake:
Inserting the mock-object won't work as registerSingleton expects to get a
Class.
As I want to create mock objects with EasyMock there are two approaches (as
far as I know).
The one I have shown before, involving the creation of the custom
ApplicationContextMock or using easy mock inside a testing-spring.xml.

CU

Jochen


Re: Wicket, Spring 3 and UnitTesting

2010-01-28 Thread mbrictson

The API is bit confusing: registerSingleton() on StaticWebApplicationContext
takes a class, but registerSingleton() on ConfigurableListableBeanFactory
takes a bean. That is why I first call getBeanFactory() in my example.

ctx.getBeanFactory().registerSingleton(...)

I use StaticWebApplicationContext for my unit testing, so I am pretty sure
it works. :)

Here is the registerSingleton signature:

http://static.springsource.org/spring/docs/3.0.x/api/org/springframework/beans/factory/config/SingletonBeanRegistry.html#registerSingleton%28java.lang.String,%20java.lang.Object%29




Jochen Mader-2 wrote:
 
 Sorry for my late answer.
 StaticWebApplicationContext doesn't cut it for  me.
 Your example contains a small mistake:
 Inserting the mock-object won't work as registerSingleton expects to get a
 Class.
 As I want to create mock objects with EasyMock there are two approaches
 (as
 far as I know).
 The one I have shown before, involving the creation of the custom
 ApplicationContextMock or using easy mock inside a testing-spring.xml.
 
 CU
 
 Jochen
 
 

-- 
View this message in context: 
http://old.nabble.com/Wicket%2C-Spring-3-and-UnitTesting-tp27320784p27358526.html
Sent from the Wicket - User 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: Wicket, Spring 3 and UnitTesting

2010-01-28 Thread Jochen Mader
Oh man, you are right.
My eyes got a little selective on that line :)


Wicket, Spring 3 and UnitTesting

2010-01-26 Thread Jochen Mader
Just figured out how to do UnitTesting with Spring 3 and Wicket.
Spring 3 introduced a check to see if a given context was a
WebApplicationContext. That means ApplicationContextMock is not suitable for
testing (giving the infamous  No WebApplicationContext found: no
ContextLoaderListener registered? message).
I simply extended the class and added WebApplicationContext interface.

The following example shows how to get it going (I hope the code doesn't get
messed up):


public class TestHomePage extends TestCase {

private WicketTester tester;


 @Override

public void setUp() {

final WebApplicationContextMock appctx = new WebApplicationContextMock();


 final ServiceOfDoom mock = createMock(ServiceOfDoom.class);

expect(mock.getIt()).andReturn(whups).anyTimes();

replay(mock);

 tester = new WicketTester(new WicketApplication()) {

@Override

public ServletContext newServletContext(String path) {

MockServletContext servletContext = (MockServletContext) super

.newServletContext(path);

appctx.setServletContext(servletContext);

appctx.putBean(scratchy, mock);

servletContext

.setAttribute(

WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE,

appctx);

return servletContext;

}

};

tester.getApplication().addComponentInstantiationListener(

new SpringComponentInjector(tester.getApplication(), appctx,

false));

}


 public void testRenderMyPage() {

// start and render the test page

tester.startPage(HomePage.class);


 // assert rendered page class

tester.assertRenderedPage(HomePage.class);


 // assert rendered label component

tester

.assertLabel(message,

whups);

}


 private class WebApplicationContextMock extends ApplicationContextMock

implements WebApplicationContext {

private ServletContext servletContext;


 public T T getBean(ClassT requiredType) throws BeansException {

// TODO Auto-generated method stub

return null;

}


 public A extends Annotation A findAnnotationOnBean(String beanName,

ClassA annotationType) {

// TODO Auto-generated method stub

return null;

}


 public MapString, Object getBeansWithAnnotation(

Class? extends Annotation annotationType)

throws BeansException {

// TODO Auto-generated method stub

return null;

}


 public void setServletContext(ServletContext servletContext) {

this.servletContext = servletContext;

}


 public ServletContext getServletContext() {

return null;

}


 }

}


Re: Wicket, Spring 3 and UnitTesting

2010-01-26 Thread Martin Grigorov
Please add this to http://cwiki.apache.org/WICKET/spring.html

On Tue, 2010-01-26 at 11:48 +0100, Jochen Mader wrote:
 Just figured out how to do UnitTesting with Spring 3 and Wicket.
 Spring 3 introduced a check to see if a given context was a
 WebApplicationContext. That means ApplicationContextMock is not suitable for
 testing (giving the infamous  No WebApplicationContext found: no
 ContextLoaderListener registered? message).
 I simply extended the class and added WebApplicationContext interface.
 
 The following example shows how to get it going (I hope the code doesn't get
 messed up):
 
 
 public class TestHomePage extends TestCase {
 
 private WicketTester tester;
 
 
  @Override
 
 public void setUp() {
 
 final WebApplicationContextMock appctx = new WebApplicationContextMock();
 
 
  final ServiceOfDoom mock = createMock(ServiceOfDoom.class);
 
 expect(mock.getIt()).andReturn(whups).anyTimes();
 
 replay(mock);
 
  tester = new WicketTester(new WicketApplication()) {
 
 @Override
 
 public ServletContext newServletContext(String path) {
 
 MockServletContext servletContext = (MockServletContext) super
 
 .newServletContext(path);
 
 appctx.setServletContext(servletContext);
 
 appctx.putBean(scratchy, mock);
 
 servletContext
 
 .setAttribute(
 
 WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE,
 
 appctx);
 
 return servletContext;
 
 }
 
 };
 
 tester.getApplication().addComponentInstantiationListener(
 
 new SpringComponentInjector(tester.getApplication(), appctx,
 
 false));
 
 }
 
 
  public void testRenderMyPage() {
 
 // start and render the test page
 
 tester.startPage(HomePage.class);
 
 
  // assert rendered page class
 
 tester.assertRenderedPage(HomePage.class);
 
 
  // assert rendered label component
 
 tester
 
 .assertLabel(message,
 
 whups);
 
 }
 
 
  private class WebApplicationContextMock extends ApplicationContextMock
 
 implements WebApplicationContext {
 
 private ServletContext servletContext;
 
 
  public T T getBean(ClassT requiredType) throws BeansException {
 
 // TODO Auto-generated method stub
 
 return null;
 
 }
 
 
  public A extends Annotation A findAnnotationOnBean(String beanName,
 
 ClassA annotationType) {
 
 // TODO Auto-generated method stub
 
 return null;
 
 }
 
 
  public MapString, Object getBeansWithAnnotation(
 
 Class? extends Annotation annotationType)
 
 throws BeansException {
 
 // TODO Auto-generated method stub
 
 return null;
 
 }
 
 
  public void setServletContext(ServletContext servletContext) {
 
 this.servletContext = servletContext;
 
 }
 
 
  public ServletContext getServletContext() {
 
 return null;
 
 }
 
 
  }
 
 }



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



Re: Wicket, Spring 3 and UnitTesting

2010-01-26 Thread mbrictson

Why not use Spring's StaticWebApplicationContext?

StaticWebApplicationContext ctx = new StaticWebApplicationContext();
ctx.getBeanFactory().registerSingleton(serviceOfDoom, mock);

http://static.springsource.org/spring/docs/3.0.x/api/org/springframework/web/context/support/StaticWebApplicationContext.html


Jochen Mader-2 wrote:
 
 Just figured out how to do UnitTesting with Spring 3 and Wicket.
 Spring 3 introduced a check to see if a given context was a
 WebApplicationContext. That means ApplicationContextMock is not suitable
 for
 testing (giving the infamous  No WebApplicationContext found: no
 ContextLoaderListener registered? message).
 I simply extended the class and added WebApplicationContext interface.
 
 The following example shows how to get it going (I hope the code doesn't
 get
 messed up):
 
 
 public class TestHomePage extends TestCase {
 
 private WicketTester tester;
 
 
  @Override
 
 public void setUp() {
 
 final WebApplicationContextMock appctx = new WebApplicationContextMock();
 
 
  final ServiceOfDoom mock = createMock(ServiceOfDoom.class);
 
 expect(mock.getIt()).andReturn(whups).anyTimes();
 
 replay(mock);
 
  tester = new WicketTester(new WicketApplication()) {
 
 @Override
 
 public ServletContext newServletContext(String path) {
 
 MockServletContext servletContext = (MockServletContext) super
 
 .newServletContext(path);
 
 appctx.setServletContext(servletContext);
 
 appctx.putBean(scratchy, mock);
 
 servletContext
 
 .setAttribute(
 
 WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE,
 
 appctx);
 
 return servletContext;
 
 }
 
 };
 
 tester.getApplication().addComponentInstantiationListener(
 
 new SpringComponentInjector(tester.getApplication(), appctx,
 
 false));
 
 }
 
 
  public void testRenderMyPage() {
 
 // start and render the test page
 
 tester.startPage(HomePage.class);
 
 
  // assert rendered page class
 
 tester.assertRenderedPage(HomePage.class);
 
 
  // assert rendered label component
 
 tester
 
 .assertLabel(message,
 
 whups);
 
 }
 
 
  private class WebApplicationContextMock extends ApplicationContextMock
 
 implements WebApplicationContext {
 
 private ServletContext servletContext;
 
 
  public T T getBean(ClassT requiredType) throws BeansException {
 
 // TODO Auto-generated method stub
 
 return null;
 
 }
 
 
  public   A findAnnotationOnBean(String beanName,
 
 Class  annotationType) {
 
 // TODO Auto-generated method stub
 
 return null;
 
 }
 
 
  public MapString, Object getBeansWithAnnotation(
 
 Class? extends Annotation annotationType)
 
 throws BeansException {
 
 // TODO Auto-generated method stub
 
 return null;
 
 }
 
 
  public void setServletContext(ServletContext servletContext) {
 
 this.servletContext = servletContext;
 
 }
 
 
  public ServletContext getServletContext() {
 
 return null;
 
 }
 
 
  }
 
 }
 
 

-- 
View this message in context: 
http://old.nabble.com/Wicket%2C-Spring-3-and-UnitTesting-tp27320784p27332886.html
Sent from the Wicket - User 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: Wicket + Spring + Hibernate - Wicket-In-Action

2009-11-18 Thread Martijn Dashorst
The interceptor can be safely removed. It was necessary for the
project I was working on, but you probably don't need it.

JDBC connection settings are best done through a DataSource and
specified at the container level instead of programmatically.

Martijn

On Mon, Nov 16, 2009 at 6:38 PM, Jeffrey Schneller
jeffrey.schnel...@envisa.com wrote:
 At the link[1] it describes how to configure wicket to use Spring and
 Hibernate.  In the applicationContext.xml file there is reference to a n
 interceptor bean.  What is this interceptor bean?  What is the
 definition of this bean?  Everything else seems to make sense.



 Also how would one move the configuration of the jdbc connection to
 code?  It is desirable to db connection information reside at the server
 level so when deploying code from dev to stage to production, you do not
 need change or replace a file.  The configuration is at the server level
 [in the server context] and it is pulled from there.



 Thanks.







 [1]
 http://wicketinaction.com/2009/06/wicketspringhibernate-configuration/







-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.4 increases type safety for web applications
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.0

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



Re: Wicket + Spring + Hibernate - Wicket-In-Action

2009-11-18 Thread Martijn Dashorst
The interceptor can be safely removed. It was necessary for the
project I was working on, but you probably don't need it.

JDBC connection settings are best done through a DataSource and
specified at the container level instead of programmatically.

Martijn

On Mon, Nov 16, 2009 at 6:38 PM, Jeffrey Schneller
jeffrey.schnel...@envisa.com wrote:
 At the link[1] it describes how to configure wicket to use Spring and
 Hibernate.  In the applicationContext.xml file there is reference to a n
 interceptor bean.  What is this interceptor bean?  What is the
 definition of this bean?  Everything else seems to make sense.



 Also how would one move the configuration of the jdbc connection to
 code?  It is desirable to db connection information reside at the server
 level so when deploying code from dev to stage to production, you do not
 need change or replace a file.  The configuration is at the server level
 [in the server context] and it is pulled from there.



 Thanks.







 [1]
 http://wicketinaction.com/2009/06/wicketspringhibernate-configuration/







-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.4 increases type safety for web applications
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.0

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



Re: Wicket + Spring + Hibernate - Wicket-In-Action

2009-11-17 Thread James Carman
On Mon, Nov 16, 2009 at 12:38 PM, Jeffrey Schneller
jeffrey.schnel...@envisa.com wrote:
 Also how would one move the configuration of the jdbc connection to
 code?  It is desirable to db connection information reside at the server
 level so when deploying code from dev to stage to production, you do not
 need change or replace a file.  The configuration is at the server level
 [in the server context] and it is pulled from there.

Isn't this a Spring question?  The Wicket/Spring integration basically
lets you talk to your Spring beans (by using @SpringBean annotation
to inject them).  It doesn't do anything fancy with Spring itself.
You don't even use a Wicket way to bootstrap the context (you use
Spring's context listener for that).  How you configure your Spring
beans is up to you.  I'd recommend either picking up Spring in Action
or just read the online documentation (it's pretty good).

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



RE: Wicket + Spring + Hibernate - Wicket-In-Action

2009-11-17 Thread Loritsch, Berin C.
I'm not sure the purpose of the interceptor, but until you have a need
to extend and use it, you can use the org.hibernate.EmptyInterceptor
class instead of creating your own.  I have had no problems with using
that class.

-Original Message-
From: Jeffrey Schneller [mailto:jeffrey.schnel...@envisa.com] 
Sent: Monday, November 16, 2009 12:38 PM
To: users@wicket.apache.org
Subject: Wicket + Spring + Hibernate - Wicket-In-Action

At the link[1] it describes how to configure wicket to use Spring and
Hibernate.  In the applicationContext.xml file there is reference to a n
interceptor bean.  What is this interceptor bean?  What is the
definition of this bean?  Everything else seems to make sense.

 

Also how would one move the configuration of the jdbc connection to
code?  It is desirable to db connection information reside at the server
level so when deploying code from dev to stage to production, you do not
need change or replace a file.  The configuration is at the server level
[in the server context] and it is pulled from there.

 

Thanks.

 

 

 

[1]
http://wicketinaction.com/2009/06/wicketspringhibernate-configuration/

 


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



Wicket + Spring + Hibernate - Wicket-In-Action

2009-11-16 Thread Jeffrey Schneller
At the link[1] it describes how to configure wicket to use Spring and
Hibernate.  In the applicationContext.xml file there is reference to a n
interceptor bean.  What is this interceptor bean?  What is the
definition of this bean?  Everything else seems to make sense.

 

Also how would one move the configuration of the jdbc connection to
code?  It is desirable to db connection information reside at the server
level so when deploying code from dev to stage to production, you do not
need change or replace a file.  The configuration is at the server level
[in the server context] and it is pulled from there.

 

Thanks.

 

 

 

[1]
http://wicketinaction.com/2009/06/wicketspringhibernate-configuration/

 



Wicket Spring API docs?

2009-11-12 Thread Loritsch, Berin C.
Where can I find the wicket-spring module API docs?  It's not clear to
me from the website.


Re: Wicket Spring API docs?

2009-11-12 Thread Igor Vaynberg
dont you use attach sources in your IDE?

-igor

On Thu, Nov 12, 2009 at 12:09 PM, Loritsch, Berin C.
berin.lorit...@gd-ais.com wrote:
 Where can I find the wicket-spring module API docs?  It's not clear to
 me from the website.


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



Re: Wicket Spring API docs?

2009-11-12 Thread James Carman
Not everyone wants to use the source code all the time to figure out
what's going on.  Sometimes it's just nicer to just look at the
javadocs online.  They used to all be merged together.  Is that not
going to happen anymore?

On Thu, Nov 12, 2009 at 3:16 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote:
 dont you use attach sources in your IDE?

 -igor

 On Thu, Nov 12, 2009 at 12:09 PM, Loritsch, Berin C.
 berin.lorit...@gd-ais.com wrote:
 Where can I find the wicket-spring module API docs?  It's not clear to
 me from the website.


 -
 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



Re: Wicket Spring API docs?

2009-11-12 Thread James Carman
I really like the hierarchy view.  When you want to know what
classes are out there that implement a certain interface and how they
relate to one another, that comes in very handy.

On Thu, Nov 12, 2009 at 3:42 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote:
 your IDE is much better at browsing and searching for classes then a
 javadoc online :)

 -igor

 On Thu, Nov 12, 2009 at 12:38 PM, Loritsch, Berin C.
 berin.lorit...@gd-ais.com wrote:
 I did, but that doesn't help me with knowing what classes are available.

 For example, I had issues with using the WicketTester to test my 
 Wicket/Spring based app.  I finally was able to create my own 
 SpringWicketTester class that would load up the SpringWebApplicationContext 
 that is needed for my app to run.  However, I had no way of telling if that 
 was duplicate work.

 If anyone is interested, I can donate the SpringWicketTester class.  It 
 should belong to the wicket-spring subproject.

 -Original Message-
 From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com]
 Sent: Thursday, November 12, 2009 3:16 PM
 To: users@wicket.apache.org
 Subject: Re: Wicket Spring API docs?

 dont you use attach sources in your IDE?

 -igor

 On Thu, Nov 12, 2009 at 12:09 PM, Loritsch, Berin C.
 berin.lorit...@gd-ais.com wrote:
 Where can I find the wicket-spring module API docs?  It's not clear to
 me from the website.


 -
 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



 -
 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



RE: Wicket Spring API docs?

2009-11-12 Thread Loritsch, Berin C.
I did, but that doesn't help me with knowing what classes are available.

For example, I had issues with using the WicketTester to test my Wicket/Spring 
based app.  I finally was able to create my own SpringWicketTester class that 
would load up the SpringWebApplicationContext that is needed for my app to run. 
 However, I had no way of telling if that was duplicate work.

If anyone is interested, I can donate the SpringWicketTester class.  It should 
belong to the wicket-spring subproject.

-Original Message-
From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] 
Sent: Thursday, November 12, 2009 3:16 PM
To: users@wicket.apache.org
Subject: Re: Wicket Spring API docs?

dont you use attach sources in your IDE?

-igor

On Thu, Nov 12, 2009 at 12:09 PM, Loritsch, Berin C.
berin.lorit...@gd-ais.com wrote:
 Where can I find the wicket-spring module API docs?  It's not clear to
 me from the website.


-
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



Re: Wicket Spring API docs?

2009-11-12 Thread Igor Vaynberg
your IDE is much better at browsing and searching for classes then a
javadoc online :)

-igor

On Thu, Nov 12, 2009 at 12:38 PM, Loritsch, Berin C.
berin.lorit...@gd-ais.com wrote:
 I did, but that doesn't help me with knowing what classes are available.

 For example, I had issues with using the WicketTester to test my 
 Wicket/Spring based app.  I finally was able to create my own 
 SpringWicketTester class that would load up the SpringWebApplicationContext 
 that is needed for my app to run.  However, I had no way of telling if that 
 was duplicate work.

 If anyone is interested, I can donate the SpringWicketTester class.  It 
 should belong to the wicket-spring subproject.

 -Original Message-
 From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com]
 Sent: Thursday, November 12, 2009 3:16 PM
 To: users@wicket.apache.org
 Subject: Re: Wicket Spring API docs?

 dont you use attach sources in your IDE?

 -igor

 On Thu, Nov 12, 2009 at 12:09 PM, Loritsch, Berin C.
 berin.lorit...@gd-ais.com wrote:
 Where can I find the wicket-spring module API docs?  It's not clear to
 me from the website.


 -
 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



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



<    1   2   3   4   >