Re: Wicket Spring API docs?

2009-11-12 Thread Igor Vaynberg
not sure, you will have to ask martijn. i think there was a problem
with the size?

until then there are sites like these:

http://grepcode.com/snapshot/repo1.maven.org$mav...@org.apache.wicket$wicket@1.4.1

if you want the latest its easy to checkout the source and run mvn
javadoc:javadoc.

-igor

On Thu, Nov 12, 2009 at 12:26 PM, James Carman
jcar...@carmanconsulting.com wrote:
 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



-
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 hate to be a smart-butt, but if I'm not familiar with how things are named 
yet search is not very helpful.  Javadocs have their place, and are most useful 
when you are familiarizing yourself with an unfamiliar API.  I've now run the 
mvn target to get the javadocs, which is helpful.

Is there any interest in the SpringWicketTester class I put together?  I'm sure 
there is more than one person who has hit this problem, and all the online 
instructions I've found are for Wicket 1.3 or 1.2.

-Original Message-
From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] 
Sent: Thursday, November 12, 2009 3:42 PM
To: users@wicket.apache.org
Subject: Re: Wicket Spring API docs?

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 Pierre Goupil
Hello,

I'd be glad to see it. Is there any place where it would fit? Maybe on the
Wicket wiki?

Regards,

Pierre



On Thu, Nov 12, 2009 at 9:56 PM, Loritsch, Berin C. 
berin.lorit...@gd-ais.com wrote:

 I hate to be a smart-butt, but if I'm not familiar with how things are
 named yet search is not very helpful.  Javadocs have their place, and are
 most useful when you are familiarizing yourself with an unfamiliar API.
  I've now run the mvn target to get the javadocs, which is helpful.

 Is there any interest in the SpringWicketTester class I put together?  I'm
 sure there is more than one person who has hit this problem, and all the
 online instructions I've found are for Wicket 1.3 or 1.2.

 -Original Message-
 From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com]
 Sent: Thursday, November 12, 2009 3:42 PM
 To: users@wicket.apache.org
 Subject: Re: Wicket Spring API docs?

 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




-- 
Rien de grand ne s'est accompli dans le monde sans passion.

(G.W.F. Hegel, philosophe allemand)


RE: Wicket Spring API docs?

2009-11-12 Thread Loritsch, Berin C.
It's fairly small.  I can include it in an email.  If I throw it on the wiki 
where would be the best place?

-Original Message-
From: Pierre Goupil [mailto:goupilpie...@gmail.com] 
Sent: Thursday, November 12, 2009 4:02 PM
To: users@wicket.apache.org
Subject: Re: Wicket Spring API docs?

Hello,

I'd be glad to see it. Is there any place where it would fit? Maybe on the
Wicket wiki?

Regards,

Pierre


Wicket + Spring + Hibernate event in ISTANBUL (Turkey)

2009-10-15 Thread Altuğ B . Altıntaş
Hi all;
Today we will organize a medium size event. In that event,  we will present
hands on session about Wicket + Spring + Hibernate.

This event will be in Istanbul,  Besiktasi Bahcesehir University at 19.00
(local time)

http.//www.java.org.tr

Feel free to attend this event.

Regards.

-- 
Altuğ.


Re: Leg Up for Wicket, Spring, Guice, JPA, Warp, EclipseLink, Hibernate ... projects

2009-10-11 Thread richardwilko

Hi,

What version of maven are you using (you can find you with mvn -version)

Can you try changing this bit of the command line:
-DarchetypeCatalog=http://legup.googlecode.com/svn/repo/archetype-catalog.xml

to this:
-DarchetypeCatalog=http://legup.googlecode.com/svn/repo

and see if that works.

(btw are you the same guy who left the comment on my blog?)

Regards - Richard Wilkinson
Developer,
jWeekend: OO  Java Technologies - Development and Training
http://jWeekend.com




danisevsky danisevsky wrote:
 
 Hello, I was trying it on Linux with no proxy and I got the same error. In
 text editor is see, that there is no line breaks. I do not know where is
 problem.
 
 2009/10/9 Bert taser...@gmail.com
 
 Perhaps he is using a maven proxy repository and the archetype
 repository is not added to it?

 On Thu, Oct 8, 2009 at 21:49, jWeekend jweekend_for...@cabouge.com
 wrote:
 
  Danisevsky,
 
  This has been used by loads of people and on all sorts of OSs and
 versions.
  I also just successfully tried it on XP, Vista  Ubuntu in case you had
 come
  across something that has been missed.
 
  Paste what you copy from Leg Up into a text editor to see what's
 causing
  that exception on your box and let us know what you find to help others
 that
  may hit a similar issue with copy 'n' paste or whatever else it turns
 out
 to
  be specific to your environment (possibly a proxy issue - ie you
 haven't
  told Maven about your proxy, but your browser is set up properly to use
 it).
 
  Regards - Cemal
  jWeekend
  OO  Java Technologies, Wicket Training and Development
  http://jWeekend.com
 
 
 
 
  danisevsky danisevsky wrote:
 
  I can access this file in web browser and it seems that there is no
 break
  line. I will try it later in linux.
 
  thank you
 
 
  2009/10/8 richardwilko richardjohnwilkin...@gmail.com
 
 
  hi,
 
  The error is saying that maven cannot find the archetype catalog
 file,
  please make sure you can access this file in a web browser [1], and
  ensure
  that you do not have any line breaks in your maven command (not sure
 if
  it
  is just how the command appears on nabble but it looks like there is
 a
  line
  break in the middle of the url)
 
 
  [1] - http://legup.googlecode.com/svn/repo/archetype-catalog.xml
 
 
  Hope this helps
 
  Regards - Richard Wilkinson
  Developer,
  jWeekend: OO  Java Technologies - Development and Training
  http://jWeekend.com
 
 
 
  danisevsky danisevsky wrote:
  
   Hello, I was trying generate Wicket - Spring - JPA project and I
 get
   following error:
  
   C:\projects\testmvn archetype:generate -B -DarchetypeCatalog=
   http://legup.googl
  
 
 ecode.com/svn/repo/archetype-catalog.xml-DarchetypeArtifactId=wicket-spring-jpa
   -archetype -DarchetypeGroupId=com.jweekend -DarchetypeVersion=0.8.0
   -DgroupId=co
   m.mycompany -DartifactId=mycompany -Dversion=1.0-SNAPSHOT
   -Dpackage=com.mycompan
   y
   [INFO] Scanning for projects...
   [INFO] Searching repository for plugin with prefix: 'archetype'.
   [INFO]
  
 
 
   [INFO] Building Maven Default Project
   [INFO]task-segment: [archetype:generate] (aggregator-style)
   [INFO]
  
 
 
   [INFO] Preparing archetype:generate
   [INFO] No goals needed for project - skipping
   [INFO] Setting property: classpath.resource.loader.class =
   'org.codehaus.plexus
   .velocity.ContextClassLoaderResourceLoader'.
   [INFO] Setting property: velocimacro.messages.on = 'false'.
   [INFO] Setting property: resource.loader = 'classpath'.
   [INFO] Setting property: resource.manager.logwhenfound = 'false'.
   [INFO] [archetype:generate]
   [INFO] Generating project in Batch mode
   [WARNING] Error reading archetype catalog
   http://legup.googlecode.com/svn/repo/a
   rchetype-catalog.xml
   org.apache.maven.wagon.ResourceDoesNotExistException: Unable to
 locate
   resource
   in repository
   at
  
 org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputD
   ata(LightweightHttpWagon.java:100)
   at
 org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:68)
   at
  
 org.apache.maven.archetype.source.RemoteCatalogArchetypeDataSource.ge
   tArchetypeCatalog(RemoteCatalogArchetypeDataSource.java:74)
   at
  
 org.apache.maven.archetype.DefaultArchetype.getRemoteCatalog(DefaultA
   rchetype.java:203)
   at
  
 org.apache.maven.archetype.ui.DefaultArchetypeSelector.getArchetypesB
   yCatalog(DefaultArchetypeSelector.java:249)
   at
  
 org.apache.maven.archetype.ui.DefaultArchetypeSelector.selectArchetyp
   e(DefaultArchetypeSelector.java:74)
   at
  
 org.apache.maven.archetype.mojos.CreateProjectFromArchetypeMojo.execu
   te(CreateProjectFromArchetypeMojo.java:180)
   at
  
 org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
   nManager.java:453

Re: Leg Up for Wicket, Spring, Guice, JPA, Warp, EclipseLink, Hibernate ... projects

2009-10-11 Thread danisevsky
Hi,

I am using 2.2.1. I tried it again (without the command change) and now it
works. If I remember well, only change what I done was clear .m2 directory.
I am not the same guy who left the comment on your blog.

Thank you very much.


2009/10/11 richardwilko richardjohnwilkin...@gmail.com


 Hi,

 What version of maven are you using (you can find you with mvn -version)

 Can you try changing this bit of the command line:
 -DarchetypeCatalog=
 http://legup.googlecode.com/svn/repo/archetype-catalog.xml

 to this:
 -DarchetypeCatalog=http://legup.googlecode.com/svn/repo

 and see if that works.

 (btw are you the same guy who left the comment on my blog?)

 Regards - Richard Wilkinson
 Developer,
 jWeekend: OO  Java Technologies - Development and Training
 http://jWeekend.com




 danisevsky danisevsky wrote:
 
  Hello, I was trying it on Linux with no proxy and I got the same error.
 In
  text editor is see, that there is no line breaks. I do not know where is
  problem.
 
  2009/10/9 Bert taser...@gmail.com
 
  Perhaps he is using a maven proxy repository and the archetype
  repository is not added to it?
 
  On Thu, Oct 8, 2009 at 21:49, jWeekend jweekend_for...@cabouge.com
  wrote:
  
   Danisevsky,
  
   This has been used by loads of people and on all sorts of OSs and
  versions.
   I also just successfully tried it on XP, Vista  Ubuntu in case you
 had
  come
   across something that has been missed.
  
   Paste what you copy from Leg Up into a text editor to see what's
  causing
   that exception on your box and let us know what you find to help
 others
  that
   may hit a similar issue with copy 'n' paste or whatever else it turns
  out
  to
   be specific to your environment (possibly a proxy issue - ie you
  haven't
   told Maven about your proxy, but your browser is set up properly to
 use
  it).
  
   Regards - Cemal
   jWeekend
   OO  Java Technologies, Wicket Training and Development
   http://jWeekend.com
  
  
  
  
   danisevsky danisevsky wrote:
  
   I can access this file in web browser and it seems that there is no
  break
   line. I will try it later in linux.
  
   thank you
  
  
   2009/10/8 richardwilko richardjohnwilkin...@gmail.com
  
  
   hi,
  
   The error is saying that maven cannot find the archetype catalog
  file,
   please make sure you can access this file in a web browser [1], and
   ensure
   that you do not have any line breaks in your maven command (not sure
  if
   it
   is just how the command appears on nabble but it looks like there is
  a
   line
   break in the middle of the url)
  
  
   [1] - http://legup.googlecode.com/svn/repo/archetype-catalog.xml
  
  
   Hope this helps
  
   Regards - Richard Wilkinson
   Developer,
   jWeekend: OO  Java Technologies - Development and Training
   http://jWeekend.com
  
  
  
   danisevsky danisevsky wrote:
   
Hello, I was trying generate Wicket - Spring - JPA project and I
  get
following error:
   
C:\projects\testmvn archetype:generate -B -DarchetypeCatalog=
http://legup.googl
   
  
 
 ecode.com/svn/repo/archetype-catalog.xml-DarchetypeArtifactId=wicket-spring-jpa
-archetype -DarchetypeGroupId=com.jweekend
 -DarchetypeVersion=0.8.0
-DgroupId=co
m.mycompany -DartifactId=mycompany -Dversion=1.0-SNAPSHOT
-Dpackage=com.mycompan
y
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO]
   
  
  
[INFO] Building Maven Default Project
[INFO]task-segment: [archetype:generate] (aggregator-style)
[INFO]
   
  
  
[INFO] Preparing archetype:generate
[INFO] No goals needed for project - skipping
[INFO] Setting property: classpath.resource.loader.class =
'org.codehaus.plexus
.velocity.ContextClassLoaderResourceLoader'.
[INFO] Setting property: velocimacro.messages.on = 'false'.
[INFO] Setting property: resource.loader = 'classpath'.
[INFO] Setting property: resource.manager.logwhenfound = 'false'.
[INFO] [archetype:generate]
[INFO] Generating project in Batch mode
[WARNING] Error reading archetype catalog
http://legup.googlecode.com/svn/repo/a
rchetype-catalog.xml
org.apache.maven.wagon.ResourceDoesNotExistException: Unable to
  locate
resource
in repository
at
   
  org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputD
ata(LightweightHttpWagon.java:100)
at
  org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:68)
at
   
  org.apache.maven.archetype.source.RemoteCatalogArchetypeDataSource.ge
tArchetypeCatalog(RemoteCatalogArchetypeDataSource.java:74)
at
   
  org.apache.maven.archetype.DefaultArchetype.getRemoteCatalog(DefaultA
rchetype.java:203

Re: Leg Up for Wicket, Spring, Guice, JPA, Warp, EclipseLink, Hibernate ... projects

2009-10-11 Thread jWeekend

Thanks for the update, that's useful.  
I expect you had an old settings.xml in there or that there was something
else broken deeper in your repo. 

Also bear in mind that unless you've configured Maven on Linux and Windows
on the same machine to use the same repo, you'll have 2 repos, under your
respective home folders (eg /home/danievsky/.m2 and c:\User\danievsky\.m2
etc); in Linux, I use a symbolic link that points to my Windows Maven repo
to avoid this duplication.

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

danisevsky danisevsky wrote:
 
 Hi,
 
 I am using 2.2.1. I tried it again (without the command change) and now it
 works. If I remember well, only change what I done was clear .m2
 directory.
 I am not the same guy who left the comment on your blog.
 
 Thank you very much.
 
 
 2009/10/11 richardwilko richardjohnwilkin...@gmail.com
 

 Hi,

 What version of maven are you using (you can find you with mvn -version)

 Can you try changing this bit of the command line:
 -DarchetypeCatalog=
 http://legup.googlecode.com/svn/repo/archetype-catalog.xml

 to this:
 -DarchetypeCatalog=http://legup.googlecode.com/svn/repo

 and see if that works.

 (btw are you the same guy who left the comment on my blog?)

 Regards - Richard Wilkinson
 Developer,
 jWeekend: OO  Java Technologies - Development and Training
 http://jWeekend.com




 danisevsky danisevsky wrote:
 
  Hello, I was trying it on Linux with no proxy and I got the same error.
 In
  text editor is see, that there is no line breaks. I do not know where
 is
  problem.
 
  2009/10/9 Bert taser...@gmail.com
 
  Perhaps he is using a maven proxy repository and the archetype
  repository is not added to it?
 
  On Thu, Oct 8, 2009 at 21:49, jWeekend jweekend_for...@cabouge.com
  wrote:
  
   Danisevsky,
  
   This has been used by loads of people and on all sorts of OSs and
  versions.
   I also just successfully tried it on XP, Vista  Ubuntu in case you
 had
  come
   across something that has been missed.
  
   Paste what you copy from Leg Up into a text editor to see what's
  causing
   that exception on your box and let us know what you find to help
 others
  that
   may hit a similar issue with copy 'n' paste or whatever else it
 turns
  out
  to
   be specific to your environment (possibly a proxy issue - ie you
  haven't
   told Maven about your proxy, but your browser is set up properly to
 use
  it).
  
   Regards - Cemal
   jWeekend
   OO  Java Technologies, Wicket Training and Development
   http://jWeekend.com
  
  
  
  
   danisevsky danisevsky wrote:
  
   I can access this file in web browser and it seems that there is no
  break
   line. I will try it later in linux.
  
   thank you
  
  
   2009/10/8 richardwilko richardjohnwilkin...@gmail.com
  
  
   hi,
  
   The error is saying that maven cannot find the archetype catalog
  file,
   please make sure you can access this file in a web browser [1],
 and
   ensure
   that you do not have any line breaks in your maven command (not
 sure
  if
   it
   is just how the command appears on nabble but it looks like there
 is
  a
   line
   break in the middle of the url)
  
  
   [1] - http://legup.googlecode.com/svn/repo/archetype-catalog.xml
  
  
   Hope this helps
  
   Regards - Richard Wilkinson
   Developer,
   jWeekend: OO  Java Technologies - Development and Training
   http://jWeekend.com
  
  
  
   danisevsky danisevsky wrote:
   
Hello, I was trying generate Wicket - Spring - JPA project and I
  get
following error:
   
C:\projects\testmvn archetype:generate -B -DarchetypeCatalog=
http://legup.googl
   
  
 
 ecode.com/svn/repo/archetype-catalog.xml-DarchetypeArtifactId=wicket-spring-jpa
-archetype -DarchetypeGroupId=com.jweekend
 -DarchetypeVersion=0.8.0
-DgroupId=co
m.mycompany -DartifactId=mycompany -Dversion=1.0-SNAPSHOT
-Dpackage=com.mycompan
y
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO]
   
  
 
 
[INFO] Building Maven Default Project
[INFO]task-segment: [archetype:generate] (aggregator-style)
[INFO]
   
  
 
 
[INFO] Preparing archetype:generate
[INFO] No goals needed for project - skipping
[INFO] Setting property: classpath.resource.loader.class =
'org.codehaus.plexus
.velocity.ContextClassLoaderResourceLoader'.
[INFO] Setting property: velocimacro.messages.on = 'false'.
[INFO] Setting property: resource.loader = 'classpath'.
[INFO] Setting property: resource.manager.logwhenfound =
 'false'.
[INFO] [archetype:generate]
[INFO] Generating project in Batch mode
[WARNING] Error reading archetype catalog
http://legup.googlecode.com/svn/repo/a
rchetype-catalog.xml

Re: Leg Up for Wicket, Spring, Guice, JPA, Warp, EclipseLink, Hibernate ... projects

2009-10-09 Thread Bert
Perhaps he is using a maven proxy repository and the archetype
repository is not added to it?

On Thu, Oct 8, 2009 at 21:49, jWeekend jweekend_for...@cabouge.com wrote:

 Danisevsky,

 This has been used by loads of people and on all sorts of OSs and versions.
 I also just successfully tried it on XP, Vista  Ubuntu in case you had come
 across something that has been missed.

 Paste what you copy from Leg Up into a text editor to see what's causing
 that exception on your box and let us know what you find to help others that
 may hit a similar issue with copy 'n' paste or whatever else it turns out to
 be specific to your environment (possibly a proxy issue - ie you haven't
 told Maven about your proxy, but your browser is set up properly to use it).

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




 danisevsky danisevsky wrote:

 I can access this file in web browser and it seems that there is no break
 line. I will try it later in linux.

 thank you


 2009/10/8 richardwilko richardjohnwilkin...@gmail.com


 hi,

 The error is saying that maven cannot find the archetype catalog file,
 please make sure you can access this file in a web browser [1], and
 ensure
 that you do not have any line breaks in your maven command (not sure if
 it
 is just how the command appears on nabble but it looks like there is a
 line
 break in the middle of the url)


 [1] - http://legup.googlecode.com/svn/repo/archetype-catalog.xml


 Hope this helps

 Regards - Richard Wilkinson
 Developer,
 jWeekend: OO  Java Technologies - Development and Training
 http://jWeekend.com



 danisevsky danisevsky wrote:
 
  Hello, I was trying generate Wicket - Spring - JPA project and I get
  following error:
 
  C:\projects\testmvn archetype:generate -B -DarchetypeCatalog=
  http://legup.googl
 
 ecode.com/svn/repo/archetype-catalog.xml-DarchetypeArtifactId=wicket-spring-jpa
  -archetype -DarchetypeGroupId=com.jweekend -DarchetypeVersion=0.8.0
  -DgroupId=co
  m.mycompany -DartifactId=mycompany -Dversion=1.0-SNAPSHOT
  -Dpackage=com.mycompan
  y
  [INFO] Scanning for projects...
  [INFO] Searching repository for plugin with prefix: 'archetype'.
  [INFO]
 
 
  [INFO] Building Maven Default Project
  [INFO]    task-segment: [archetype:generate] (aggregator-style)
  [INFO]
 
 
  [INFO] Preparing archetype:generate
  [INFO] No goals needed for project - skipping
  [INFO] Setting property: classpath.resource.loader.class =
  'org.codehaus.plexus
  .velocity.ContextClassLoaderResourceLoader'.
  [INFO] Setting property: velocimacro.messages.on = 'false'.
  [INFO] Setting property: resource.loader = 'classpath'.
  [INFO] Setting property: resource.manager.logwhenfound = 'false'.
  [INFO] [archetype:generate]
  [INFO] Generating project in Batch mode
  [WARNING] Error reading archetype catalog
  http://legup.googlecode.com/svn/repo/a
  rchetype-catalog.xml
  org.apache.maven.wagon.ResourceDoesNotExistException: Unable to locate
  resource
  in repository
          at
  org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputD
  ata(LightweightHttpWagon.java:100)
          at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:68)
          at
  org.apache.maven.archetype.source.RemoteCatalogArchetypeDataSource.ge
  tArchetypeCatalog(RemoteCatalogArchetypeDataSource.java:74)
          at
  org.apache.maven.archetype.DefaultArchetype.getRemoteCatalog(DefaultA
  rchetype.java:203)
          at
  org.apache.maven.archetype.ui.DefaultArchetypeSelector.getArchetypesB
  yCatalog(DefaultArchetypeSelector.java:249)
          at
  org.apache.maven.archetype.ui.DefaultArchetypeSelector.selectArchetyp
  e(DefaultArchetypeSelector.java:74)
          at
  org.apache.maven.archetype.mojos.CreateProjectFromArchetypeMojo.execu
  te(CreateProjectFromArchetypeMojo.java:180)
          at
  org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
  nManager.java:453)
          at
  org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
  ultLifecycleExecutor.java:559)
          at
  org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone
  Goal(DefaultLifecycleExecutor.java:513)
          at
  org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
  ltLifecycleExecutor.java:483)
          at
  org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
  dleFailures(DefaultLifecycleExecutor.java:331)
          at
  org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
  ts(DefaultLifecycleExecutor.java:228)
          at
  org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
  fecycleExecutor.java:142)
          at
 org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
          at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129

Re: Leg Up for Wicket, Spring, Guice, JPA, Warp, EclipseLink, Hibernate ... projects

2009-10-09 Thread danisevsky
Hello, I was trying it on Linux with no proxy and I got the same error. In
text editor is see, that there is no line breaks. I do not know where is
problem.

2009/10/9 Bert taser...@gmail.com

 Perhaps he is using a maven proxy repository and the archetype
 repository is not added to it?

 On Thu, Oct 8, 2009 at 21:49, jWeekend jweekend_for...@cabouge.com
 wrote:
 
  Danisevsky,
 
  This has been used by loads of people and on all sorts of OSs and
 versions.
  I also just successfully tried it on XP, Vista  Ubuntu in case you had
 come
  across something that has been missed.
 
  Paste what you copy from Leg Up into a text editor to see what's
 causing
  that exception on your box and let us know what you find to help others
 that
  may hit a similar issue with copy 'n' paste or whatever else it turns out
 to
  be specific to your environment (possibly a proxy issue - ie you haven't
  told Maven about your proxy, but your browser is set up properly to use
 it).
 
  Regards - Cemal
  jWeekend
  OO  Java Technologies, Wicket Training and Development
  http://jWeekend.com
 
 
 
 
  danisevsky danisevsky wrote:
 
  I can access this file in web browser and it seems that there is no
 break
  line. I will try it later in linux.
 
  thank you
 
 
  2009/10/8 richardwilko richardjohnwilkin...@gmail.com
 
 
  hi,
 
  The error is saying that maven cannot find the archetype catalog file,
  please make sure you can access this file in a web browser [1], and
  ensure
  that you do not have any line breaks in your maven command (not sure if
  it
  is just how the command appears on nabble but it looks like there is a
  line
  break in the middle of the url)
 
 
  [1] - http://legup.googlecode.com/svn/repo/archetype-catalog.xml
 
 
  Hope this helps
 
  Regards - Richard Wilkinson
  Developer,
  jWeekend: OO  Java Technologies - Development and Training
  http://jWeekend.com
 
 
 
  danisevsky danisevsky wrote:
  
   Hello, I was trying generate Wicket - Spring - JPA project and I get
   following error:
  
   C:\projects\testmvn archetype:generate -B -DarchetypeCatalog=
   http://legup.googl
  
 
 ecode.com/svn/repo/archetype-catalog.xml-DarchetypeArtifactId=wicket-spring-jpa
   -archetype -DarchetypeGroupId=com.jweekend -DarchetypeVersion=0.8.0
   -DgroupId=co
   m.mycompany -DartifactId=mycompany -Dversion=1.0-SNAPSHOT
   -Dpackage=com.mycompan
   y
   [INFO] Scanning for projects...
   [INFO] Searching repository for plugin with prefix: 'archetype'.
   [INFO]
  
 
 
   [INFO] Building Maven Default Project
   [INFO]task-segment: [archetype:generate] (aggregator-style)
   [INFO]
  
 
 
   [INFO] Preparing archetype:generate
   [INFO] No goals needed for project - skipping
   [INFO] Setting property: classpath.resource.loader.class =
   'org.codehaus.plexus
   .velocity.ContextClassLoaderResourceLoader'.
   [INFO] Setting property: velocimacro.messages.on = 'false'.
   [INFO] Setting property: resource.loader = 'classpath'.
   [INFO] Setting property: resource.manager.logwhenfound = 'false'.
   [INFO] [archetype:generate]
   [INFO] Generating project in Batch mode
   [WARNING] Error reading archetype catalog
   http://legup.googlecode.com/svn/repo/a
   rchetype-catalog.xml
   org.apache.maven.wagon.ResourceDoesNotExistException: Unable to
 locate
   resource
   in repository
   at
   org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputD
   ata(LightweightHttpWagon.java:100)
   at
 org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:68)
   at
  
 org.apache.maven.archetype.source.RemoteCatalogArchetypeDataSource.ge
   tArchetypeCatalog(RemoteCatalogArchetypeDataSource.java:74)
   at
   org.apache.maven.archetype.DefaultArchetype.getRemoteCatalog(DefaultA
   rchetype.java:203)
   at
   org.apache.maven.archetype.ui.DefaultArchetypeSelector.getArchetypesB
   yCatalog(DefaultArchetypeSelector.java:249)
   at
   org.apache.maven.archetype.ui.DefaultArchetypeSelector.selectArchetyp
   e(DefaultArchetypeSelector.java:74)
   at
   org.apache.maven.archetype.mojos.CreateProjectFromArchetypeMojo.execu
   te(CreateProjectFromArchetypeMojo.java:180)
   at
   org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
   nManager.java:453)
   at
   org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
   ultLifecycleExecutor.java:559)
   at
   org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone
   Goal(DefaultLifecycleExecutor.java:513)
   at
   org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
   ltLifecycleExecutor.java:483)
   at
   org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
   dleFailures(DefaultLifecycleExecutor.java:331

Re: Leg Up for Wicket, Spring, Guice, JPA, Warp, EclipseLink, Hibernate ... projects

2009-10-08 Thread danisevsky
Hello, I was trying generate Wicket - Spring - JPA project and I get
following error:

C:\projects\testmvn archetype:generate -B -DarchetypeCatalog=
http://legup.googl
ecode.com/svn/repo/archetype-catalog.xml-DarchetypeArtifactId=wicket-spring-jpa
-archetype -DarchetypeGroupId=com.jweekend -DarchetypeVersion=0.8.0
-DgroupId=co
m.mycompany -DartifactId=mycompany -Dversion=1.0-SNAPSHOT
-Dpackage=com.mycompan
y
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO]

[INFO] Building Maven Default Project
[INFO]task-segment: [archetype:generate] (aggregator-style)
[INFO]

[INFO] Preparing archetype:generate
[INFO] No goals needed for project - skipping
[INFO] Setting property: classpath.resource.loader.class =
'org.codehaus.plexus
.velocity.ContextClassLoaderResourceLoader'.
[INFO] Setting property: velocimacro.messages.on = 'false'.
[INFO] Setting property: resource.loader = 'classpath'.
[INFO] Setting property: resource.manager.logwhenfound = 'false'.
[INFO] [archetype:generate]
[INFO] Generating project in Batch mode
[WARNING] Error reading archetype catalog
http://legup.googlecode.com/svn/repo/a
rchetype-catalog.xml
org.apache.maven.wagon.ResourceDoesNotExistException: Unable to locate
resource
in repository
at
org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputD
ata(LightweightHttpWagon.java:100)
at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:68)
at
org.apache.maven.archetype.source.RemoteCatalogArchetypeDataSource.ge
tArchetypeCatalog(RemoteCatalogArchetypeDataSource.java:74)
at
org.apache.maven.archetype.DefaultArchetype.getRemoteCatalog(DefaultA
rchetype.java:203)
at
org.apache.maven.archetype.ui.DefaultArchetypeSelector.getArchetypesB
yCatalog(DefaultArchetypeSelector.java:249)
at
org.apache.maven.archetype.ui.DefaultArchetypeSelector.selectArchetyp
e(DefaultArchetypeSelector.java:74)
at
org.apache.maven.archetype.mojos.CreateProjectFromArchetypeMojo.execu
te(CreateProjectFromArchetypeMojo.java:180)
at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
nManager.java:453)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:559)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone
Goal(DefaultLifecycleExecutor.java:513)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
ltLifecycleExecutor.java:483)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
dleFailures(DefaultLifecycleExecutor.java:331)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
ts(DefaultLifecycleExecutor.java:228)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
fecycleExecutor.java:142)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:301)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)

at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: java.io.FileNotFoundException:
http://legup.googlecode.com/svn/repo/a
rchetype-catalog.xml/archetype-catalog.xml
at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon
nection.java:1288)
at
org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputD
ata(LightweightHttpWagon.java:83)
... 24 more
[INFO]

[ERROR] BUILD FAILURE
[INFO]

[INFO] : java.lang.NullPointerException
null
[INFO]

[INFO] For more information, run Maven with the -e switch
[INFO]

[INFO] Total time: 2 seconds
[INFO] Finished at: Thu Oct 08 13:30:48 CEST 2009
[INFO] Final Memory: 8M/14M
[INFO]

C:\projects\test

2009/10/6 richardwilko richardjohnwilkin...@gmail.com


 Hi,

 Yes, you will need to bind every dao (and eveything you want to inject

Re: Leg Up for Wicket, Spring, Guice, JPA, Warp, EclipseLink, Hibernate ... projects

2009-10-08 Thread richardwilko

hi,

The error is saying that maven cannot find the archetype catalog file,
please make sure you can access this file in a web browser [1], and ensure
that you do not have any line breaks in your maven command (not sure if it
is just how the command appears on nabble but it looks like there is a line
break in the middle of the url)


[1] - http://legup.googlecode.com/svn/repo/archetype-catalog.xml


Hope this helps

Regards - Richard Wilkinson
Developer,
jWeekend: OO  Java Technologies - Development and Training
http://jWeekend.com



danisevsky danisevsky wrote:
 
 Hello, I was trying generate Wicket - Spring - JPA project and I get
 following error:
 
 C:\projects\testmvn archetype:generate -B -DarchetypeCatalog=
 http://legup.googl
 ecode.com/svn/repo/archetype-catalog.xml-DarchetypeArtifactId=wicket-spring-jpa
 -archetype -DarchetypeGroupId=com.jweekend -DarchetypeVersion=0.8.0
 -DgroupId=co
 m.mycompany -DartifactId=mycompany -Dversion=1.0-SNAPSHOT
 -Dpackage=com.mycompan
 y
 [INFO] Scanning for projects...
 [INFO] Searching repository for plugin with prefix: 'archetype'.
 [INFO]
 
 [INFO] Building Maven Default Project
 [INFO]task-segment: [archetype:generate] (aggregator-style)
 [INFO]
 
 [INFO] Preparing archetype:generate
 [INFO] No goals needed for project - skipping
 [INFO] Setting property: classpath.resource.loader.class =
 'org.codehaus.plexus
 .velocity.ContextClassLoaderResourceLoader'.
 [INFO] Setting property: velocimacro.messages.on = 'false'.
 [INFO] Setting property: resource.loader = 'classpath'.
 [INFO] Setting property: resource.manager.logwhenfound = 'false'.
 [INFO] [archetype:generate]
 [INFO] Generating project in Batch mode
 [WARNING] Error reading archetype catalog
 http://legup.googlecode.com/svn/repo/a
 rchetype-catalog.xml
 org.apache.maven.wagon.ResourceDoesNotExistException: Unable to locate
 resource
 in repository
 at
 org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputD
 ata(LightweightHttpWagon.java:100)
 at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:68)
 at
 org.apache.maven.archetype.source.RemoteCatalogArchetypeDataSource.ge
 tArchetypeCatalog(RemoteCatalogArchetypeDataSource.java:74)
 at
 org.apache.maven.archetype.DefaultArchetype.getRemoteCatalog(DefaultA
 rchetype.java:203)
 at
 org.apache.maven.archetype.ui.DefaultArchetypeSelector.getArchetypesB
 yCatalog(DefaultArchetypeSelector.java:249)
 at
 org.apache.maven.archetype.ui.DefaultArchetypeSelector.selectArchetyp
 e(DefaultArchetypeSelector.java:74)
 at
 org.apache.maven.archetype.mojos.CreateProjectFromArchetypeMojo.execu
 te(CreateProjectFromArchetypeMojo.java:180)
 at
 org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
 nManager.java:453)
 at
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
 ultLifecycleExecutor.java:559)
 at
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone
 Goal(DefaultLifecycleExecutor.java:513)
 at
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
 ltLifecycleExecutor.java:483)
 at
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
 dleFailures(DefaultLifecycleExecutor.java:331)
 at
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
 ts(DefaultLifecycleExecutor.java:228)
 at
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
 fecycleExecutor.java:142)
 at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
 at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
 at org.apache.maven.cli.MavenCli.main(MavenCli.java:301)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
 java:39)
 at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
 sorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at
 org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
 at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
 at
 org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
 
 at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
 Caused by: java.io.FileNotFoundException:
 http://legup.googlecode.com/svn/repo/a
 rchetype-catalog.xml/archetype-catalog.xml
 at
 sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon
 nection.java:1288)
 at
 org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputD
 ata(LightweightHttpWagon.java:83)
 ... 24 more
 [INFO]
 
 [ERROR] BUILD FAILURE
 [INFO

Re: Leg Up for Wicket, Spring, Guice, JPA, Warp, EclipseLink, Hibernate ... projects

2009-10-08 Thread danisevsky
I can access this file in web browser and it seems that there is no break
line. I will try it later in linux.

thank you


2009/10/8 richardwilko richardjohnwilkin...@gmail.com


 hi,

 The error is saying that maven cannot find the archetype catalog file,
 please make sure you can access this file in a web browser [1], and ensure
 that you do not have any line breaks in your maven command (not sure if it
 is just how the command appears on nabble but it looks like there is a line
 break in the middle of the url)


 [1] - http://legup.googlecode.com/svn/repo/archetype-catalog.xml


 Hope this helps

 Regards - Richard Wilkinson
 Developer,
 jWeekend: OO  Java Technologies - Development and Training
 http://jWeekend.com



 danisevsky danisevsky wrote:
 
  Hello, I was trying generate Wicket - Spring - JPA project and I get
  following error:
 
  C:\projects\testmvn archetype:generate -B -DarchetypeCatalog=
  http://legup.googl
 
 ecode.com/svn/repo/archetype-catalog.xml-DarchetypeArtifactId=wicket-spring-jpa
  -archetype -DarchetypeGroupId=com.jweekend -DarchetypeVersion=0.8.0
  -DgroupId=co
  m.mycompany -DartifactId=mycompany -Dversion=1.0-SNAPSHOT
  -Dpackage=com.mycompan
  y
  [INFO] Scanning for projects...
  [INFO] Searching repository for plugin with prefix: 'archetype'.
  [INFO]
  
  [INFO] Building Maven Default Project
  [INFO]task-segment: [archetype:generate] (aggregator-style)
  [INFO]
  
  [INFO] Preparing archetype:generate
  [INFO] No goals needed for project - skipping
  [INFO] Setting property: classpath.resource.loader.class =
  'org.codehaus.plexus
  .velocity.ContextClassLoaderResourceLoader'.
  [INFO] Setting property: velocimacro.messages.on = 'false'.
  [INFO] Setting property: resource.loader = 'classpath'.
  [INFO] Setting property: resource.manager.logwhenfound = 'false'.
  [INFO] [archetype:generate]
  [INFO] Generating project in Batch mode
  [WARNING] Error reading archetype catalog
  http://legup.googlecode.com/svn/repo/a
  rchetype-catalog.xml
  org.apache.maven.wagon.ResourceDoesNotExistException: Unable to locate
  resource
  in repository
  at
  org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputD
  ata(LightweightHttpWagon.java:100)
  at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:68)
  at
  org.apache.maven.archetype.source.RemoteCatalogArchetypeDataSource.ge
  tArchetypeCatalog(RemoteCatalogArchetypeDataSource.java:74)
  at
  org.apache.maven.archetype.DefaultArchetype.getRemoteCatalog(DefaultA
  rchetype.java:203)
  at
  org.apache.maven.archetype.ui.DefaultArchetypeSelector.getArchetypesB
  yCatalog(DefaultArchetypeSelector.java:249)
  at
  org.apache.maven.archetype.ui.DefaultArchetypeSelector.selectArchetyp
  e(DefaultArchetypeSelector.java:74)
  at
  org.apache.maven.archetype.mojos.CreateProjectFromArchetypeMojo.execu
  te(CreateProjectFromArchetypeMojo.java:180)
  at
  org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
  nManager.java:453)
  at
  org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
  ultLifecycleExecutor.java:559)
  at
  org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone
  Goal(DefaultLifecycleExecutor.java:513)
  at
  org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
  ltLifecycleExecutor.java:483)
  at
  org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
  dleFailures(DefaultLifecycleExecutor.java:331)
  at
  org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
  ts(DefaultLifecycleExecutor.java:228)
  at
  org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
  fecycleExecutor.java:142)
  at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
  at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
  at org.apache.maven.cli.MavenCli.main(MavenCli.java:301)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at
  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
  java:39)
  at
  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
  sorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:597)
  at
  org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
  at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
  at
  org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
 
  at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
  Caused by: java.io.FileNotFoundException:
  http://legup.googlecode.com/svn/repo/a
  rchetype-catalog.xml/archetype-catalog.xml

Re: Leg Up for Wicket, Spring, Guice, JPA, Warp, EclipseLink, Hibernate ... projects

2009-10-08 Thread jWeekend

Danisevsky,

This has been used by loads of people and on all sorts of OSs and versions.
I also just successfully tried it on XP, Vista  Ubuntu in case you had come
across something that has been missed. 

Paste what you copy from Leg Up into a text editor to see what's causing
that exception on your box and let us know what you find to help others that
may hit a similar issue with copy 'n' paste or whatever else it turns out to
be specific to your environment (possibly a proxy issue - ie you haven't
told Maven about your proxy, but your browser is set up properly to use it).

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




danisevsky danisevsky wrote:
 
 I can access this file in web browser and it seems that there is no break
 line. I will try it later in linux.
 
 thank you
 
 
 2009/10/8 richardwilko richardjohnwilkin...@gmail.com
 

 hi,

 The error is saying that maven cannot find the archetype catalog file,
 please make sure you can access this file in a web browser [1], and
 ensure
 that you do not have any line breaks in your maven command (not sure if
 it
 is just how the command appears on nabble but it looks like there is a
 line
 break in the middle of the url)


 [1] - http://legup.googlecode.com/svn/repo/archetype-catalog.xml


 Hope this helps

 Regards - Richard Wilkinson
 Developer,
 jWeekend: OO  Java Technologies - Development and Training
 http://jWeekend.com



 danisevsky danisevsky wrote:
 
  Hello, I was trying generate Wicket - Spring - JPA project and I get
  following error:
 
  C:\projects\testmvn archetype:generate -B -DarchetypeCatalog=
  http://legup.googl
 
 ecode.com/svn/repo/archetype-catalog.xml-DarchetypeArtifactId=wicket-spring-jpa
  -archetype -DarchetypeGroupId=com.jweekend -DarchetypeVersion=0.8.0
  -DgroupId=co
  m.mycompany -DartifactId=mycompany -Dversion=1.0-SNAPSHOT
  -Dpackage=com.mycompan
  y
  [INFO] Scanning for projects...
  [INFO] Searching repository for plugin with prefix: 'archetype'.
  [INFO]
 
 
  [INFO] Building Maven Default Project
  [INFO]task-segment: [archetype:generate] (aggregator-style)
  [INFO]
 
 
  [INFO] Preparing archetype:generate
  [INFO] No goals needed for project - skipping
  [INFO] Setting property: classpath.resource.loader.class =
  'org.codehaus.plexus
  .velocity.ContextClassLoaderResourceLoader'.
  [INFO] Setting property: velocimacro.messages.on = 'false'.
  [INFO] Setting property: resource.loader = 'classpath'.
  [INFO] Setting property: resource.manager.logwhenfound = 'false'.
  [INFO] [archetype:generate]
  [INFO] Generating project in Batch mode
  [WARNING] Error reading archetype catalog
  http://legup.googlecode.com/svn/repo/a
  rchetype-catalog.xml
  org.apache.maven.wagon.ResourceDoesNotExistException: Unable to locate
  resource
  in repository
  at
  org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputD
  ata(LightweightHttpWagon.java:100)
  at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:68)
  at
  org.apache.maven.archetype.source.RemoteCatalogArchetypeDataSource.ge
  tArchetypeCatalog(RemoteCatalogArchetypeDataSource.java:74)
  at
  org.apache.maven.archetype.DefaultArchetype.getRemoteCatalog(DefaultA
  rchetype.java:203)
  at
  org.apache.maven.archetype.ui.DefaultArchetypeSelector.getArchetypesB
  yCatalog(DefaultArchetypeSelector.java:249)
  at
  org.apache.maven.archetype.ui.DefaultArchetypeSelector.selectArchetyp
  e(DefaultArchetypeSelector.java:74)
  at
  org.apache.maven.archetype.mojos.CreateProjectFromArchetypeMojo.execu
  te(CreateProjectFromArchetypeMojo.java:180)
  at
  org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
  nManager.java:453)
  at
  org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
  ultLifecycleExecutor.java:559)
  at
  org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone
  Goal(DefaultLifecycleExecutor.java:513)
  at
  org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
  ltLifecycleExecutor.java:483)
  at
  org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
  dleFailures(DefaultLifecycleExecutor.java:331)
  at
  org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
  ts(DefaultLifecycleExecutor.java:228)
  at
  org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
  fecycleExecutor.java:142)
  at
 org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
  at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
  at org.apache.maven.cli.MavenCli.main(MavenCli.java:301)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method

Leg Up for Wicket, Spring, Guice, JPA, Warp, EclipseLink, Hibernate ... projects

2009-10-06 Thread jWeekend

We have launched jWeekend's Leg Up page [1].

You can generate a command and run it at your console to create a simple 
project using one of our archetypes. The projects you will generate will 
include enough configuration, code and/or some tests to get you started, 
quickly. Our archetypes currently support various combinations of Spring, 
Guice, WarpPersist, JPA (with one or more implementation from EclipseLink, 
Hibernate, OpenJPA) and Wicket.

Let us know if this is useful and if you'd like to see more combinations. Also 
feel free to raise any issues [2].

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


[1] http://jweekend.com/dev/LegUp
[2] http://code.google.com/p/legup/issues/list


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



Re: Leg Up for Wicket, Spring, Guice, JPA, Warp, EclipseLink, Hibernate ... projects

2009-10-06 Thread Md. Jahid Shohel
On Tue, 2009-10-06 at 14:47 +0100, jWeekend wrote:
 http://jweekend.com/dev/LegUp

is that really working? coz , when i clicked on Generate Maven Command
button, it took me to http://jweekend.com/dev/HomePageBody


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



Re: Leg Up for Wicket, Spring, Guice, JPA, Warp, EclipseLink, Hibernate ... projects

2009-10-06 Thread nino martinez wael
Looks cool :)

2009/10/6 jWeekend jweekend_for...@cabouge.com

 We have launched jWeekend's Leg Up page [1].

 You can generate a command and run it at your console to create a simple
 project using one of our archetypes. The projects you will generate will
 include enough configuration, code and/or some tests to get you started,
 quickly. Our archetypes currently support various combinations of Spring,
 Guice, WarpPersist, JPA (with one or more implementation from EclipseLink,
 Hibernate, OpenJPA) and Wicket.

 Let us know if this is useful and if you'd like to see more combinations.
 Also feel free to raise any issues [2].

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

 [1] http://jweekend.com/dev/LegUp
 [2] http://code.google.com/p/legup/issues/list


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




Re: Leg Up for Wicket, Spring, Guice, JPA, Warp, EclipseLink, Hibernate ... projects

2009-10-06 Thread nino martinez wael
Why dont you have a Guice 2.0 archetype? We could probably bump the warp
persist guys to work on their 2.0 imp.. If thats whats stopping you?

2009/10/6 nino martinez wael nino.martinez.w...@gmail.com

 Looks cool :)

 2009/10/6 jWeekend jweekend_for...@cabouge.com

 We have launched jWeekend's Leg Up page [1].

 You can generate a command and run it at your console to create a simple
 project using one of our archetypes. The projects you will generate will
 include enough configuration, code and/or some tests to get you started,
 quickly. Our archetypes currently support various combinations of Spring,
 Guice, WarpPersist, JPA (with one or more implementation from EclipseLink,
 Hibernate, OpenJPA) and Wicket.

 Let us know if this is useful and if you'd like to see more combinations.
 Also feel free to raise any issues [2].

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

 [1] http://jweekend.com/dev/LegUp
 [2] http://code.google.com/p/legup/issues/list


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





Re: Leg Up for Wicket, Spring, Guice, JPA, Warp, EclipseLink, Hibernate ... projects

2009-10-06 Thread nino martinez wael
Works for me.. I took the guice warp persist + etc archetype..

2009/10/6 Md. Jahid Shohel ja...@outscore.se

 On Tue, 2009-10-06 at 14:47 +0100, jWeekend wrote:
  http://jweekend.com/dev/LegUp

 is that really working? coz , when i clicked on Generate Maven Command
 button, it took me to http://jweekend.com/dev/HomePageBody


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




Re: Leg Up for Wicket, Spring, Guice, JPA, Warp, EclipseLink, Hibernate ... projects

2009-10-06 Thread James Perry
Nice one Cemal!
I will have to use leg up to get a leg over setting up Wicket projects ;-)

Best,
James.

On Tue, Oct 6, 2009 at 2:47 PM, jWeekend jweekend_for...@cabouge.comwrote:

 We have launched jWeekend's Leg Up page [1].

 You can generate a command and run it at your console to create a simple
 project using one of our archetypes. The projects you will generate will
 include enough configuration, code and/or some tests to get you started,
 quickly. Our archetypes currently support various combinations of Spring,
 Guice, WarpPersist, JPA (with one or more implementation from EclipseLink,
 Hibernate, OpenJPA) and Wicket.

 Let us know if this is useful and if you'd like to see more combinations.
 Also feel free to raise any issues [2].

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

 [1] http://jweekend.com/dev/LegUp
 [2] http://code.google.com/p/legup/issues/list


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




Re: Leg Up for Wicket, Spring, Guice, JPA, Warp, EclipseLink, Hibernate ... projects

2009-10-06 Thread richardwilko

Nino,

We don't have a Guice 2.0 for that very reason; the warp persist guys don't
have a final 2.0 release yet.

Regards - Richard Wilkinson
Developer, 
jWeekend: OO  Java Technologies - Development and Training
http://jWeekend.com


nino martinez wael wrote:
 
 Why dont you have a Guice 2.0 archetype? We could probably bump the warp
 persist guys to work on their 2.0 imp.. If thats whats stopping you?
 
 2009/10/6 nino martinez wael nino.martinez.w...@gmail.com
 
 Looks cool :)

 2009/10/6 jWeekend jweekend_for...@cabouge.com

 We have launched jWeekend's Leg Up page [1].

 You can generate a command and run it at your console to create a simple
 project using one of our archetypes. The projects you will generate will
 include enough configuration, code and/or some tests to get you started,
 quickly. Our archetypes currently support various combinations of
 Spring,
 Guice, WarpPersist, JPA (with one or more implementation from
 EclipseLink,
 Hibernate, OpenJPA) and Wicket.

 Let us know if this is useful and if you'd like to see more
 combinations.
 Also feel free to raise any issues [2].

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

 [1] http://jweekend.com/dev/LegUp
 [2] http://code.google.com/p/legup/issues/list


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



 
 


-
http://richard-wilkinson.co.uk My blog: http://richard-wilkinson.co.uk 
-- 
View this message in context: 
http://www.nabble.com/Leg-Up-for-Wicket%2C-Spring%2C-Guice%2C-JPA%2C-Warp%2C-EclipseLink%2C-Hibernate-...-projects-tp25769134p25769655.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: Leg Up for Wicket, Spring, Guice, JPA, Warp, EclipseLink, Hibernate ... projects

2009-10-06 Thread jWeekend

Jahid,

Thanks - a little Tomcat PERM_GEN issue. 
Should be OK now, but at the next scheduled restart we'll bump it up a bit.

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

 

Jahid wrote:
 
 On Tue, 2009-10-06 at 14:47 +0100, jWeekend wrote:
 http://jweekend.com/dev/LegUp
 
 is that really working? coz , when i clicked on Generate Maven Command
 button, it took me to http://jweekend.com/dev/HomePageBody
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Leg-Up-for-Wicket%2C-Spring%2C-Guice%2C-JPA%2C-Warp%2C-EclipseLink%2C-Hibernate-...-projects-tp25769134p25769670.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: Leg Up for Wicket, Spring, Guice, JPA, Warp, EclipseLink, Hibernate ... projects

2009-10-06 Thread Md. Jahid Shohel
seems like its working now. really cool!


On Tue, 2009-10-06 at 16:01 +0200, Md. Jahid Shohel wrote:
 On Tue, 2009-10-06 at 14:47 +0100, jWeekend wrote:
  http://jweekend.com/dev/LegUp
 
 is that really working? coz , when i clicked on Generate Maven Command
 button, it took me to http://jweekend.com/dev/HomePageBody
 
 
 -
 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: Leg Up for Wicket, Spring, Guice, JPA, Warp, EclipseLink, Hibernate ... projects

2009-10-06 Thread Erik Post
Hey, that's great! Is there any way to contribute to this?

Thumbs up,
Erik

 2009/10/6 jWeekend jweekend_for...@cabouge.com

 We have launched jWeekend's Leg Up page [1].

 You can generate a command and run it at your console to create a simple
 project using one of our archetypes. The projects you will generate will
 include enough configuration, code and/or some tests to get you started,
 quickly. Our archetypes currently support various combinations of Spring,
 Guice, WarpPersist, JPA (with one or more implementation from EclipseLink,
 Hibernate, OpenJPA) and Wicket.

 Let us know if this is useful and if you'd like to see more combinations.
 Also feel free to raise any issues [2].

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

 [1] http://jweekend.com/dev/LegUp
 [2] http://code.google.com/p/legup/issues/list

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



Re: Leg Up for Wicket, Spring, Guice, JPA, Warp, EclipseLink, Hibernate ... projects

2009-10-06 Thread nino martinez wael
You could always contribute to Wicket Iolite :) Which essentially are the
same, or Wicketopia

http://wicketopia.sourceforge.net/
http://wicketstuff.org/confluence/display/STUFFWIKI/Wicket-Iolite

2009/10/6 Erik Post eriksen...@gmail.com

 Hey, that's great! Is there any way to contribute to this?

 Thumbs up,
 Erik

  2009/10/6 jWeekend jweekend_for...@cabouge.com
 
  We have launched jWeekend's Leg Up page [1].
 
  You can generate a command and run it at your console to create a simple
  project using one of our archetypes. The projects you will generate will
  include enough configuration, code and/or some tests to get you started,
  quickly. Our archetypes currently support various combinations of Spring,
  Guice, WarpPersist, JPA (with one or more implementation from
 EclipseLink,
  Hibernate, OpenJPA) and Wicket.
 
  Let us know if this is useful and if you'd like to see more combinations.
  Also feel free to raise any issues [2].

  Regards - Cemal
  jWeekend
  OO  Java Technologies, Wicket Training and Development
  http://jWeekend.com
 
  [1] http://jweekend.com/dev/LegUp
  [2] http://code.google.com/p/legup/issues/list

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




Re: Leg Up for Wicket, Spring, Guice, JPA, Warp, EclipseLink, Hibernate ... projects

2009-10-06 Thread Gw
Hi,

I'm a newbie in Wicket.
I use Databinder toolkit (wicket+hibernate) to help me develop DB
application rapidly.
With the built-in Jetty, the development is quite smooth, however, when
trying to run my app on Tomcat 5.5 (Java 5), I faced the following error. I
wonder if wicket is really compatible with Tomcat, since there's no problem
when run it from eclipse (Jetty).


TD BGCOLOR=white CLASS=NavBarCell2FONT SIZE=-2
nbsp;A
HREF=../../../../../../org/apache/wicket/markup/html/pages/BrowserInfoPage.html
title=class in org.apache.wicket.markup.html.pagesBPREV
CLASS/B/Anbsp;
nbsp;A
HREF=../../../../../../org/apache/wicket/markup/html/pages/InternalErrorPage.html
title=class in org.apache.wicket.markup.html.pagesBNEXT
CLASS/B/A/FONT/TD
TD BGCOLOR=white CLASS=NavBarCell2FONT SIZE=-2
  A
HREF=../../../../../../index.html?org/apache/wicket/markup/html/pages/ExceptionErrorPage.html
target=_topBFRAMES/B/A  nbsp;
nbsp;A HREF=ExceptionErrorPage.html target=_topBNO FRAMES/B/A
nbsp;
nbsp;SCRIPT type=text/javascript
  !--
  if(window==top) {
document.writeln('A
HREF=../../../../../../allclasses-noframe.htmlBAll Classes/B/A');
  }
  //--
/SCRIPT
NOSCRIPT
  A HREF=../../../../../../allclasses-noframe.htmlBAll Classes/B/A
/NOSCRIPT


/FONT/TD
/TR
TR
TD VALIGN=top CLASS=NavBarCell3FONT SIZE=-2
  SUMMARY:nbsp;A
HREF=#nested_classes_inherited_from_class_org.apache.wicket.PageNESTED/Anbsp;|nbsp;A
HREF=#fields_inherited_from_class_org.apache.wicket.PageFIELD/Anbsp;|nbsp;A
HREF=#constructor_summaryCONSTR/Anbsp;|nbsp;A
HREF=#method_summaryMETHOD/A/FONT/TD
TD VALIGN=top CLASS=NavBarCell3FONT SIZE=-2
DETAIL:nbsp;FIELDnbsp;|nbsp;A
HREF=#constructor_detailCONSTR/Anbsp;|nbsp;A
HREF=#method_detailMETHOD/A/FONT/TD
/TR
/TABLE
A NAME=skip-navbar_bottom/A
!--  END OF BOTTOM NAVBAR === --

HR
Copyright #169; 2004-2008 a href=http://apache.org;Apache Software
Foundation/a. All Rights Reserved.
/BODY
/HTML
, index = 4, current = [Raw markup]]
at
org.apache.wicket.markup.MarkupParser.parseMarkup(MarkupParser.java:393)
at org.apache.wicket.markup.MarkupParser.parse(MarkupParser.java:270)
at
org.apache.wicket.markup.loader.SimpleMarkupLoader.loadMarkup(SimpleMarkupLoader.java:52)
at
org.apache.wicket.markup.loader.InheritedMarkupMarkupLoader.loadMarkup(InheritedMarkupMarkupLoader.java:62)
at
org.apache.wicket.markup.loader.DefaultMarkupLoader.loadMarkup(DefaultMarkupLoader.java:55)
at org.apache.wicket.markup.MarkupCache.loadMarkup(MarkupCache.java:458)
at
org.apache.wicket.markup.MarkupCache.loadMarkupAndWatchForChanges(MarkupCache.java:553)
at org.apache.wicket.markup.MarkupCache.getMarkup(MarkupCache.java:319)
at
org.apache.wicket.markup.MarkupCache.getMarkupStream(MarkupCache.java:215)
at
org.apache.wicket.MarkupContainer.getAssociatedMarkupStream(MarkupContainer.java:343)
at org.apache.wicket.Page.onRender(Page.java:1463)
at org.apache.wicket.Component.render(Component.java:2317)
at org.apache.wicket.Page.renderPage(Page.java:904)
at
org.apache.wicket.request.target.component.PageRequestTarget.respond(PageRequestTarget.java:63)
at
org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:104)
at org.apache.wicket.RequestCycle.respond(RequestCycle.java:1190)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1257)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1353)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
at
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:355)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:200)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.text.ParseException: Tag 'DT' (line 101, column 

Re: Leg Up for Wicket, Spring, Guice, JPA, Warp, EclipseLink, Hibernate ... projects

2009-10-06 Thread nino martinez wael
Caused by: java.text.ParseException: Tag 'DT' (line 101, column 1) has a
mismatched close tag at '/DL' (line 102, column 1) is the issue, your html
are broken..

Regarding tomcat compability, I've deployed over dozens of apps the last 4-5
years or so on Tomcat 5.5 ..

2009/10/6 Gw not4spamm...@gmail.com

 Hi,

 I'm a newbie in Wicket.
 I use Databinder toolkit (wicket+hibernate) to help me develop DB
 application rapidly.
 With the built-in Jetty, the development is quite smooth, however, when
 trying to run my app on Tomcat 5.5 (Java 5), I faced the following error. I
 wonder if wicket is really compatible with Tomcat, since there's no problem
 when run it from eclipse (Jetty).

 
 TD BGCOLOR=white CLASS=NavBarCell2FONT SIZE=-2
 nbsp;A
 HREF=../../../../../../org/apache/wicket/markup/html/pages/BrowserInfoPage.html
 title=class in org.apache.wicket.markup.html.pagesBPREV
 CLASS/B/Anbsp;
 nbsp;A
 HREF=../../../../../../org/apache/wicket/markup/html/pages/InternalErrorPage.html
 title=class in org.apache.wicket.markup.html.pagesBNEXT
 CLASS/B/A/FONT/TD
 TD BGCOLOR=white CLASS=NavBarCell2FONT SIZE=-2
   A
 HREF=../../../../../../index.html?org/apache/wicket/markup/html/pages/ExceptionErrorPage.html
 target=_topBFRAMES/B/A  nbsp;
 nbsp;A HREF=ExceptionErrorPage.html target=_topBNO FRAMES/B/A
 nbsp;
 nbsp;SCRIPT type=text/javascript
   !--
   if(window==top) {
 document.writeln('A
 HREF=../../../../../../allclasses-noframe.htmlBAll Classes/B/A');
   }
   //--
 /SCRIPT
 NOSCRIPT
   A HREF=../../../../../../allclasses-noframe.htmlBAll
 Classes/B/A
 /NOSCRIPT


 /FONT/TD
 /TR
 TR
 TD VALIGN=top CLASS=NavBarCell3FONT SIZE=-2
   SUMMARY:nbsp;A
 HREF=#nested_classes_inherited_from_class_org.apache.wicket.PageNESTED/Anbsp;|nbsp;A
 HREF=#fields_inherited_from_class_org.apache.wicket.PageFIELD/Anbsp;|nbsp;A
 HREF=#constructor_summaryCONSTR/Anbsp;|nbsp;A
 HREF=#method_summaryMETHOD/A/FONT/TD
 TD VALIGN=top CLASS=NavBarCell3FONT SIZE=-2
 DETAIL:nbsp;FIELDnbsp;|nbsp;A
 HREF=#constructor_detailCONSTR/Anbsp;|nbsp;A
 HREF=#method_detailMETHOD/A/FONT/TD
 /TR
 /TABLE
 A NAME=skip-navbar_bottom/A
 !--  END OF BOTTOM NAVBAR === --

 HR
 Copyright #169; 2004-2008 a href=http://apache.org;Apache Software
 Foundation/a. All Rights Reserved.
 /BODY
 /HTML
 , index = 4, current = [Raw markup]]
 at
 org.apache.wicket.markup.MarkupParser.parseMarkup(MarkupParser.java:393)
 at org.apache.wicket.markup.MarkupParser.parse(MarkupParser.java:270)
 at
 org.apache.wicket.markup.loader.SimpleMarkupLoader.loadMarkup(SimpleMarkupLoader.java:52)
 at
 org.apache.wicket.markup.loader.InheritedMarkupMarkupLoader.loadMarkup(InheritedMarkupMarkupLoader.java:62)
 at
 org.apache.wicket.markup.loader.DefaultMarkupLoader.loadMarkup(DefaultMarkupLoader.java:55)
 at
 org.apache.wicket.markup.MarkupCache.loadMarkup(MarkupCache.java:458)
 at
 org.apache.wicket.markup.MarkupCache.loadMarkupAndWatchForChanges(MarkupCache.java:553)
 at org.apache.wicket.markup.MarkupCache.getMarkup(MarkupCache.java:319)
 at
 org.apache.wicket.markup.MarkupCache.getMarkupStream(MarkupCache.java:215)
 at
 org.apache.wicket.MarkupContainer.getAssociatedMarkupStream(MarkupContainer.java:343)
 at org.apache.wicket.Page.onRender(Page.java:1463)
 at org.apache.wicket.Component.render(Component.java:2317)
 at org.apache.wicket.Page.renderPage(Page.java:904)
 at
 org.apache.wicket.request.target.component.PageRequestTarget.respond(PageRequestTarget.java:63)
 at
 org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:104)
 at org.apache.wicket.RequestCycle.respond(RequestCycle.java:1190)
 at org.apache.wicket.RequestCycle.step(RequestCycle.java:1257)
 at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1353)
 at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
 at
 org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:355)
 at
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:200)
 at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
 at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
 at
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
 at
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
 at
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
 at
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
 at
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
 at
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
 at
 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)
 at
 

Re: Leg Up for Wicket, Spring, Guice, JPA, Warp, EclipseLink, Hibernate ... projects

2009-10-06 Thread jWeekend

Erik,

Thanks. We'll review that soon - it  is our intention but we need to be
ready to take care of the project. Just for the moment, we'll take on ideas
for new archetypes, and feel free to contact me via our site if you have
some particular ideas and need stuff included quickly. 
Ideas for further project templates include Scala and Java and maybe WiQuery
and possibly Lucene...

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




Erik Post-5 wrote:
 
 Hey, that's great! Is there any way to contribute to this?
 
 Thumbs up,
 Erik
 
 2009/10/6 jWeekend jweekend_for...@cabouge.com

 We have launched jWeekend's Leg Up page [1].

 You can generate a command and run it at your console to create a simple
 project using one of our archetypes. The projects you will generate will
 include enough configuration, code and/or some tests to get you started,
 quickly. Our archetypes currently support various combinations of Spring,
 Guice, WarpPersist, JPA (with one or more implementation from
 EclipseLink,
 Hibernate, OpenJPA) and Wicket.

 Let us know if this is useful and if you'd like to see more combinations.
 Also feel free to raise any issues [2].
 
 Regards - Cemal
 jWeekend
 OO  Java Technologies, Wicket Training and Development
 http://jWeekend.com

 [1] http://jweekend.com/dev/LegUp
 [2] http://code.google.com/p/legup/issues/list
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Leg-Up-for-Wicket%2C-Spring%2C-Guice%2C-JPA%2C-Warp%2C-EclipseLink%2C-Hibernate-...-projects-tp25769134p25770548.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: Leg Up for Wicket, Spring, Guice, JPA, Warp, EclipseLink, Hibernate ... projects

2009-10-06 Thread Erik Post
Hi Cemal,

On Tue, Oct 6, 2009 at 5:05 PM, jWeekend jweekend_for...@cabouge.com wrote:

 Thanks. We'll review that soon - it  is our intention but we need to be
 ready to take care of the project. Just for the moment, we'll take on ideas
 for new archetypes, and feel free to contact me via our site if you have
 some particular ideas and need stuff included quickly.

Great! I would like to suggest an EJB archetype. EJB seems to be
fairly impopular amongst Wicket people, but what with the upcoming
changes  to EJB (version 3.1, no XML, a Lite' web profile) and Spring
(3.0, proprietaryish goings-on) I think EJB's are looking
comparatively sweet.

By the way, it would be pretty cool to reference your page from the
Wicket quickstart page, wouldn't it? Things are pretty scattered atm
and I think this makes Wicket needlessly hard to get into.

 Ideas for further project templates include Scala and Java

I'm experimenting with this atm from an adapted version of Wicketopia,
and yeah, it would have been great to have had an archetype for this
;)

Cheers,
Erik

 Erik Post-5 wrote:

 Hey, that's great! Is there any way to contribute to this?

 Thumbs up,
 Erik

 2009/10/6 jWeekend jweekend_for...@cabouge.com

 We have launched jWeekend's Leg Up page [1].

 You can generate a command and run it at your console to create a simple
 project using one of our archetypes. The projects you will generate will
 include enough configuration, code and/or some tests to get you started,
 quickly. Our archetypes currently support various combinations of Spring,
 Guice, WarpPersist, JPA (with one or more implementation from
 EclipseLink,
 Hibernate, OpenJPA) and Wicket.

 Let us know if this is useful and if you'd like to see more combinations.
 Also feel free to raise any issues [2].

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

 [1] http://jweekend.com/dev/LegUp
 [2] http://code.google.com/p/legup/issues/list

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




 --
 View this message in context: 
 http://www.nabble.com/Leg-Up-for-Wicket%2C-Spring%2C-Guice%2C-JPA%2C-Warp%2C-EclipseLink%2C-Hibernate-...-projects-tp25769134p25770548.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



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



Re: Leg Up for Wicket, Spring, Guice, JPA, Warp, EclipseLink, Hibernate ... projects

2009-10-06 Thread jWeekend

Erik,

No such prejudice here: a Wicket with EJB 3+ archetype is a very good idea
and I was already planning on us setting up an archetype for JBoss and
wicket-javaee [1] (that contrib library just works by the way - we've used
it with no problems so far on a couple of projects, one with JBoss - and
IIRC RedHat finally did publish a decent Maven2 repo).

I have nothing against a link from the Wicket QuickStart page either, but we
are not necessarily promising instantaneous support for users of these
archetypes - the idea is just to provide a well-proven starting point for
people wanting to skip the sometimes huge (and often off-putting) effort to
work out how all these frameworks/libraries and the multitude of version
play nicely together (not to mention figuring out all the transitive
dependencies and how to best write tests and other, boiler-plate
bootstraping code). 

By the way, we use these archetypes ourselves too, and they do save us
plenty of time - it's one less  (often non-trivial)  thing to worry about
when you start your project or just want to experiment with/learn how to use
one of these frameworks/libraries. 

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

[1]
http://wicketstuff.org/confluence/display/STUFFWIKI/wicket-contrib-javaee






Erik Post-5 wrote:
 
 Hi Cemal,
 
 On Tue, Oct 6, 2009 at 5:05 PM, jWeekend jweekend_for...@cabouge.com
 wrote:
 
 Thanks. We'll review that soon - it  is our intention but we need to be
 ready to take care of the project. Just for the moment, we'll take on
 ideas
 for new archetypes, and feel free to contact me via our site if you have
 some particular ideas and need stuff included quickly.
 
 Great! I would like to suggest an EJB archetype. EJB seems to be
 fairly impopular amongst Wicket people, but what with the upcoming
 changes  to EJB (version 3.1, no XML, a Lite' web profile) and Spring
 (3.0, proprietaryish goings-on) I think EJB's are looking
 comparatively sweet.
 
 By the way, it would be pretty cool to reference your page from the
 Wicket quickstart page, wouldn't it? Things are pretty scattered atm
 and I think this makes Wicket needlessly hard to get into.
 
 Ideas for further project templates include Scala and Java
 
 I'm experimenting with this atm from an adapted version of Wicketopia,
 and yeah, it would have been great to have had an archetype for this
 ;)
 
 Cheers,
 Erik
 
 Erik Post-5 wrote:

 Hey, that's great! Is there any way to contribute to this?

 Thumbs up,
 Erik

 2009/10/6 jWeekend jweekend_for...@cabouge.com

 We have launched jWeekend's Leg Up page [1].

 You can generate a command and run it at your console to create a
 simple
 project using one of our archetypes. The projects you will generate
 will
 include enough configuration, code and/or some tests to get you
 started,
 quickly. Our archetypes currently support various combinations of
 Spring,
 Guice, WarpPersist, JPA (with one or more implementation from
 EclipseLink,
 Hibernate, OpenJPA) and Wicket.

 Let us know if this is useful and if you'd like to see more
 combinations.
 Also feel free to raise any issues [2].

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

 [1] http://jweekend.com/dev/LegUp
 [2] http://code.google.com/p/legup/issues/list

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




 --
 View this message in context:
 http://www.nabble.com/Leg-Up-for-Wicket%2C-Spring%2C-Guice%2C-JPA%2C-Warp%2C-EclipseLink%2C-Hibernate-...-projects-tp25769134p25770548.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


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

-- 
View this message in context: 
http://www.nabble.com/Leg-Up-for-Wicket%2C-Spring%2C-Guice%2C-JPA%2C-Warp%2C-EclipseLink%2C-Hibernate-...-projects-tp25769134p25773473.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: Leg Up for Wicket, Spring, Guice, JPA, Warp, EclipseLink, Hibernate ... projects

2009-10-06 Thread Jeffrey Schneller
I took the archetype for Guice, Warp, Hibernate and modified for my
application.  All my code looks similar to the code from the archetype.
The only difference is I am not using the AnnotatinConfiguration but
just the plain Configuration.  I am also using c3po connection pooling
with Oracle.   

However, I am still not able to inject the Hibernate Session into my DAO
objects.  Any ideas?  I don't see any exceptions being thrown.

@Inject
ProviderSession session;

@Transactional(type=TransactionType.READ_ONLY)
public ListT findAll() {
Criteria criteria =
session.get().createCriteria(persistentClass);
return criteria.list();
}


The session in the findAll method is always coming back as null.

What am I doing wrong?  It doesn't seem to be that difficult to
implement.


Thanks.



-Original Message-
From: jWeekend [mailto:jweekend_for...@cabouge.com] 
Sent: Tuesday, October 06, 2009 9:48 AM
To: users@wicket.apache.org
Subject: Leg Up for Wicket, Spring, Guice, JPA, Warp, EclipseLink,
Hibernate ... projects

We have launched jWeekend's Leg Up page [1].

You can generate a command and run it at your console to create a simple
project using one of our archetypes. The projects you will generate will
include enough configuration, code and/or some tests to get you started,
quickly. Our archetypes currently support various combinations of
Spring, Guice, WarpPersist, JPA (with one or more implementation from
EclipseLink, Hibernate, OpenJPA) and Wicket.

Let us know if this is useful and if you'd like to see more
combinations. Also feel free to raise any issues [2].

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

[1] http://jweekend.com/dev/LegUp
[2] http://code.google.com/p/legup/issues/list


-
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: Leg Up for Wicket, Spring, Guice, JPA, Warp, EclipseLink, Hibernate ... projects

2009-10-06 Thread Erik Post
Hi Jeffrey,

I have *absolutely* no idea if this will help you, but I had the same
with Spring. It started working when i put the injection annotation on
the method instead of on the variable.

Good luck,
Erik

On Tue, Oct 6, 2009 at 7:59 PM, Jeffrey Schneller
jeffrey.schnel...@envisa.com wrote:
 I took the archetype for Guice, Warp, Hibernate and modified for my
 application.  All my code looks similar to the code from the archetype.
 The only difference is I am not using the AnnotatinConfiguration but
 just the plain Configuration.  I am also using c3po connection pooling
 with Oracle.

 However, I am still not able to inject the Hibernate Session into my DAO
 objects.  Any ideas?  I don't see any exceptions being thrown.

       �...@inject
        ProviderSession session;

       �...@transactional(type=TransactionType.READ_ONLY)
        public ListT findAll() {
                Criteria criteria =
 session.get().createCriteria(persistentClass);
                return criteria.list();
        }


 The session in the findAll method is always coming back as null.

 What am I doing wrong?  It doesn't seem to be that difficult to
 implement.


 Thanks.



 -Original Message-
 From: jWeekend [mailto:jweekend_for...@cabouge.com]
 Sent: Tuesday, October 06, 2009 9:48 AM
 To: users@wicket.apache.org
 Subject: Leg Up for Wicket, Spring, Guice, JPA, Warp, EclipseLink,
 Hibernate ... projects

 We have launched jWeekend's Leg Up page [1].

 You can generate a command and run it at your console to create a simple
 project using one of our archetypes. The projects you will generate will
 include enough configuration, code and/or some tests to get you started,
 quickly. Our archetypes currently support various combinations of
 Spring, Guice, WarpPersist, JPA (with one or more implementation from
 EclipseLink, Hibernate, OpenJPA) and Wicket.

 Let us know if this is useful and if you'd like to see more
 combinations. Also feel free to raise any issues [2].

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

 [1] http://jweekend.com/dev/LegUp
 [2] http://code.google.com/p/legup/issues/list


 -
 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: Leg Up for Wicket, Spring, Guice, JPA, Warp, EclipseLink, Hibernate ... projects

2009-10-06 Thread Jeffrey Schneller
Thanks for the idea but this didn't work either.  Any other ideas?  I would 
expect the archetype to work correctly.



-Original Message-
From: Erik Post [mailto:eriksen...@gmail.com] 
Sent: Tuesday, October 06, 2009 2:09 PM
To: users@wicket.apache.org
Subject: Re: Leg Up for Wicket, Spring, Guice, JPA, Warp, EclipseLink, 
Hibernate ... projects

Hi Jeffrey,

I have *absolutely* no idea if this will help you, but I had the same
with Spring. It started working when i put the injection annotation on
the method instead of on the variable.

Good luck,
Erik

On Tue, Oct 6, 2009 at 7:59 PM, Jeffrey Schneller
jeffrey.schnel...@envisa.com wrote:
 I took the archetype for Guice, Warp, Hibernate and modified for my
 application.  All my code looks similar to the code from the archetype.
 The only difference is I am not using the AnnotatinConfiguration but
 just the plain Configuration.  I am also using c3po connection pooling
 with Oracle.

 However, I am still not able to inject the Hibernate Session into my DAO
 objects.  Any ideas?  I don't see any exceptions being thrown.

       �...@inject
        ProviderSession session;

       �...@transactional(type=TransactionType.READ_ONLY)
        public ListT findAll() {
                Criteria criteria =
 session.get().createCriteria(persistentClass);
                return criteria.list();
        }


 The session in the findAll method is always coming back as null.

 What am I doing wrong?  It doesn't seem to be that difficult to
 implement.


 Thanks.



 -Original Message-
 From: jWeekend [mailto:jweekend_for...@cabouge.com]
 Sent: Tuesday, October 06, 2009 9:48 AM
 To: users@wicket.apache.org
 Subject: Leg Up for Wicket, Spring, Guice, JPA, Warp, EclipseLink,
 Hibernate ... projects

 We have launched jWeekend's Leg Up page [1].

 You can generate a command and run it at your console to create a simple
 project using one of our archetypes. The projects you will generate will
 include enough configuration, code and/or some tests to get you started,
 quickly. Our archetypes currently support various combinations of
 Spring, Guice, WarpPersist, JPA (with one or more implementation from
 EclipseLink, Hibernate, OpenJPA) and Wicket.

 Let us know if this is useful and if you'd like to see more
 combinations. Also feel free to raise any issues [2].

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

 [1] http://jweekend.com/dev/LegUp
 [2] http://code.google.com/p/legup/issues/list


 -
 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: Leg Up for Wicket, Spring, Guice, JPA, Warp, EclipseLink, Hibernate ... projects

2009-10-06 Thread Jeffrey Schneller
Thanks for the help.  I finally figured it out.  I didn't realize that I needed 
to inject the DAO into each page that was going to need it.  Or at least that 
is how I solved my problem.  If I inject the DAO into every page then it seems 
to work ok.  I guess I will see what happens if I have a business layer and the 
DAO is used in that layer.  But at least I can query the db again.



-Original Message-
From: Jeffrey Schneller [mailto:jeffrey.schnel...@envisa.com] 
Sent: Tuesday, October 06, 2009 2:21 PM
To: users@wicket.apache.org; e...@shinsetsu.nl
Subject: RE: Leg Up for Wicket, Spring, Guice, JPA, Warp, EclipseLink, 
Hibernate ... projects

Thanks for the idea but this didn't work either.  Any other ideas?  I would 
expect the archetype to work correctly.



-Original Message-
From: Erik Post [mailto:eriksen...@gmail.com] 
Sent: Tuesday, October 06, 2009 2:09 PM
To: users@wicket.apache.org
Subject: Re: Leg Up for Wicket, Spring, Guice, JPA, Warp, EclipseLink, 
Hibernate ... projects

Hi Jeffrey,

I have *absolutely* no idea if this will help you, but I had the same
with Spring. It started working when i put the injection annotation on
the method instead of on the variable.

Good luck,
Erik

On Tue, Oct 6, 2009 at 7:59 PM, Jeffrey Schneller
jeffrey.schnel...@envisa.com wrote:
 I took the archetype for Guice, Warp, Hibernate and modified for my
 application.  All my code looks similar to the code from the archetype.
 The only difference is I am not using the AnnotatinConfiguration but
 just the plain Configuration.  I am also using c3po connection pooling
 with Oracle.

 However, I am still not able to inject the Hibernate Session into my DAO
 objects.  Any ideas?  I don't see any exceptions being thrown.

       �...@inject
        ProviderSession session;

       �...@transactional(type=TransactionType.READ_ONLY)
        public ListT findAll() {
                Criteria criteria =
 session.get().createCriteria(persistentClass);
                return criteria.list();
        }


 The session in the findAll method is always coming back as null.

 What am I doing wrong?  It doesn't seem to be that difficult to
 implement.


 Thanks.



 -Original Message-
 From: jWeekend [mailto:jweekend_for...@cabouge.com]
 Sent: Tuesday, October 06, 2009 9:48 AM
 To: users@wicket.apache.org
 Subject: Leg Up for Wicket, Spring, Guice, JPA, Warp, EclipseLink,
 Hibernate ... projects

 We have launched jWeekend's Leg Up page [1].

 You can generate a command and run it at your console to create a simple
 project using one of our archetypes. The projects you will generate will
 include enough configuration, code and/or some tests to get you started,
 quickly. Our archetypes currently support various combinations of
 Spring, Guice, WarpPersist, JPA (with one or more implementation from
 EclipseLink, Hibernate, OpenJPA) and Wicket.

 Let us know if this is useful and if you'd like to see more
 combinations. Also feel free to raise any issues [2].

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

 [1] http://jweekend.com/dev/LegUp
 [2] http://code.google.com/p/legup/issues/list


 -
 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


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



RE: Leg Up for Wicket, Spring, Guice, JPA, Warp, EclipseLink, Hibernate ... projects

2009-10-06 Thread richardwilko

Jeffrey,

I expect the changes you made to the Guice Module are the reason why the
session is null, could you paste in the contents of it.


Regards - Richard Wilkinson
Developer,
jWeekend: OO  Java Technologies - Development and Training
http://jWeekend.com



Jeffrey Schneller wrote:
 
 Thanks for the idea but this didn't work either.  Any other ideas?  I
 would expect the archetype to work correctly.
 
 
 
 -Original Message-
 From: Erik Post [mailto:eriksen...@gmail.com] 
 Sent: Tuesday, October 06, 2009 2:09 PM
 To: users@wicket.apache.org
 Subject: Re: Leg Up for Wicket, Spring, Guice, JPA, Warp, EclipseLink,
 Hibernate ... projects
 
 Hi Jeffrey,
 
 I have *absolutely* no idea if this will help you, but I had the same
 with Spring. It started working when i put the injection annotation on
 the method instead of on the variable.
 
 Good luck,
 Erik
 
 On Tue, Oct 6, 2009 at 7:59 PM, Jeffrey Schneller
 jeffrey.schnel...@envisa.com wrote:
 I took the archetype for Guice, Warp, Hibernate and modified for my
 application.  All my code looks similar to the code from the archetype.
 The only difference is I am not using the AnnotatinConfiguration but
 just the plain Configuration.  I am also using c3po connection pooling
 with Oracle.

 However, I am still not able to inject the Hibernate Session into my DAO
 objects.  Any ideas?  I don't see any exceptions being thrown.

       �...@inject
        ProviderSession session;

       �...@transactional(type=TransactionType.READ_ONLY)
        public ListT findAll() {
                Criteria criteria =
 session.get().createCriteria(persistentClass);
                return criteria.list();
        }


 The session in the findAll method is always coming back as null.

 What am I doing wrong?  It doesn't seem to be that difficult to
 implement.


 Thanks.



 -Original Message-
 From: jWeekend [mailto:jweekend_for...@cabouge.com]
 Sent: Tuesday, October 06, 2009 9:48 AM
 To: users@wicket.apache.org
 Subject: Leg Up for Wicket, Spring, Guice, JPA, Warp, EclipseLink,
 Hibernate ... projects

 We have launched jWeekend's Leg Up page [1].

 You can generate a command and run it at your console to create a simple
 project using one of our archetypes. The projects you will generate will
 include enough configuration, code and/or some tests to get you started,
 quickly. Our archetypes currently support various combinations of
 Spring, Guice, WarpPersist, JPA (with one or more implementation from
 EclipseLink, Hibernate, OpenJPA) and Wicket.

 Let us know if this is useful and if you'd like to see more
 combinations. Also feel free to raise any issues [2].

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

 [1] http://jweekend.com/dev/LegUp
 [2] http://code.google.com/p/legup/issues/list


 -
 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
 
 
 


-
http://richard-wilkinson.co.uk My blog: http://richard-wilkinson.co.uk 
-- 
View this message in context: 
http://www.nabble.com/Leg-Up-for-Wicket%2C-Spring%2C-Guice%2C-JPA%2C-Warp%2C-EclipseLink%2C-Hibernate-...-projects-tp25769134p25774618.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: Leg Up for Wicket, Spring, Guice, JPA, Warp, EclipseLink, Hibernate ... projects

2009-10-06 Thread Jeffrey Schneller
Here is the My Guice Module that I created.  It looks like the one in the 
archetype.  Do I need to bind every DAO?  So that then I need to inject the DAO 
when it is needed?



public class AppModule extends AbstractModule {
/* (non-Javadoc)
 * @see com.google.inject.AbstractModule#configure()
 */
@Override
protected void configure() {
bind(Initializer.class).asEagerSingleton();

//warp persist stuff
install(PersistenceService.usingHibernate()
.across(UnitOfWork.REQUEST)
.transactedWith(TransactionStrategy.LOCAL)
.buildModule());

// hibernate stuff
// default values from development
String connectionUrl = the url;
String username = the username;
String password = the password;

try {
InitialContext context = new InitialContext();
connectionUrl = (String) 
context.lookup(java:comp/env/hibernate.connection.url);
username = (String) 
context.lookup(java:comp/env/hibernate.connection.username);
password = (String) 
context.lookup(java:comp/env/hibernate.connection.password);
} catch (NamingException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}

// annotation and xml
final Configuration config = new Configuration().configure();
config.setProperty(hibernate.connection.url, connectionUrl);
config.setProperty(hibernate.connection.username, username);
config.setProperty(hibernate.connection.password, password);
config.setProperty(hibernate.current_session_context_class, 
managed);

bind(Configuration.class).toInstance(config);

//dao stuff
// DO I NEED TO DO THIS FOR EVERY DAO OBJECT?
bind(AccountDao.class).to(HibernateAccountDao.class);
bind(CountryDao.class).to(HibernateCountryDao.class);
bind(LanguageDao.class).to(HibernateLanguageDao.class);

bind(TerritorySalesCodesDao.class).to(HibernateTerritorySalesCodesDao.class);

bind(RegionSalesCodesDao.class).to(HibernateRegionSalesCodesDao.class);

bind(CountrySalesCodesDao.class).to(HibernateCountrySalesCodesDao.class);
bind(AccountTypeDao.class).to(HibernateAccountTypeDao.class);
bind(AccountAuditDao.class).to(HibernateAccountAuditDao.class);
}

@Singleton
public static class Initializer {
@Inject
Initializer(com.wideplay.warp.persist.PersistenceService 
service) {
service.start();
}
}
}

-Original Message-
From: richardwilko [mailto:richardjohnwilkin...@gmail.com] 
Sent: Tuesday, October 06, 2009 2:56 PM
To: users@wicket.apache.org
Subject: RE: Leg Up for Wicket, Spring, Guice, JPA, Warp, EclipseLink, 
Hibernate ... projects


Jeffrey,

I expect the changes you made to the Guice Module are the reason why the
session is null, could you paste in the contents of it.


Regards - Richard Wilkinson
Developer,
jWeekend: OO  Java Technologies - Development and Training
http://jWeekend.com



Jeffrey Schneller wrote:
 
 Thanks for the idea but this didn't work either.  Any other ideas?  I
 would expect the archetype to work correctly.
 
 
 
 -Original Message-
 From: Erik Post [mailto:eriksen...@gmail.com] 
 Sent: Tuesday, October 06, 2009 2:09 PM
 To: users@wicket.apache.org
 Subject: Re: Leg Up for Wicket, Spring, Guice, JPA, Warp, EclipseLink,
 Hibernate ... projects
 
 Hi Jeffrey,
 
 I have *absolutely* no idea if this will help you, but I had the same
 with Spring. It started working when i put the injection annotation on
 the method instead of on the variable.
 
 Good luck,
 Erik
 
 On Tue, Oct 6, 2009 at 7:59 PM, Jeffrey Schneller
 jeffrey.schnel...@envisa.com wrote:
 I took the archetype for Guice, Warp, Hibernate and modified for my
 application.  All my code looks similar to the code from the archetype.
 The only difference is I am not using the AnnotatinConfiguration but
 just the plain Configuration.  I am also using c3po connection pooling
 with Oracle.

 However, I am still not able to inject the Hibernate Session into my DAO
 objects.  Any ideas?  I don't see any exceptions being thrown.

       �...@inject
        ProviderSession session;

       �...@transactional(type=TransactionType.READ_ONLY)
        public ListT findAll() {
                Criteria criteria =
 session.get().createCriteria(persistentClass);
                return criteria.list

RE: Leg Up for Wicket, Spring, Guice, JPA, Warp, EclipseLink, Hibernate ... projects

2009-10-06 Thread richardwilko

Hi, 

Yes, you will need to bind every dao (and eveything you want to inject).

However there are other ways to do it with guice, like the @ImplementedBy
annotation (think its called that, check with the guice docs, sending this
from my phone so can't check atm). Afaik you would need to make spring beans
for every dao if using spring, so its not that bad.

Glad you have it working now,

Richard


Jeffrey Schneller wrote:
 
 Here is the My Guice Module that I created.  It looks like the one in the
 archetype.  Do I need to bind every DAO?  So that then I need to inject
 the DAO when it is needed?
 
 
 
 public class AppModule extends AbstractModule {
   /* (non-Javadoc)
* @see com.google.inject.AbstractModule#configure()
*/
   @Override
   protected void configure() {
   bind(Initializer.class).asEagerSingleton();
   
   //warp persist stuff
   install(PersistenceService.usingHibernate()
   .across(UnitOfWork.REQUEST)
   .transactedWith(TransactionStrategy.LOCAL)
   .buildModule());
 
   // hibernate stuff
   // default values from development
   String connectionUrl = the url;
   String username = the username;
   String password = the password;
   
   try {
   InitialContext context = new InitialContext();
   connectionUrl = (String)
 context.lookup(java:comp/env/hibernate.connection.url);
   username = (String)
 context.lookup(java:comp/env/hibernate.connection.username);
   password = (String)
 context.lookup(java:comp/env/hibernate.connection.password);
   } catch (NamingException e1) {
   // TODO Auto-generated catch block
   e1.printStackTrace();
   }
 
   // annotation and xml
   final Configuration config = new Configuration().configure();
   config.setProperty(hibernate.connection.url, connectionUrl);
   config.setProperty(hibernate.connection.username, username);
   config.setProperty(hibernate.connection.password, password);
   config.setProperty(hibernate.current_session_context_class,
 managed);
 
   bind(Configuration.class).toInstance(config);
 
   //dao stuff
   // DO I NEED TO DO THIS FOR EVERY DAO OBJECT?
   bind(AccountDao.class).to(HibernateAccountDao.class);
   bind(CountryDao.class).to(HibernateCountryDao.class);
   bind(LanguageDao.class).to(HibernateLanguageDao.class);
   
 bind(TerritorySalesCodesDao.class).to(HibernateTerritorySalesCodesDao.class);
   
 bind(RegionSalesCodesDao.class).to(HibernateRegionSalesCodesDao.class);
   
 bind(CountrySalesCodesDao.class).to(HibernateCountrySalesCodesDao.class);
   bind(AccountTypeDao.class).to(HibernateAccountTypeDao.class);
   bind(AccountAuditDao.class).to(HibernateAccountAuditDao.class);
   }
 
   @Singleton
   public static class Initializer {
   @Inject
   Initializer(com.wideplay.warp.persist.PersistenceService 
 service) {
   service.start();
   }
   }
 }
 
 -Original Message-
 From: richardwilko [mailto:richardjohnwilkin...@gmail.com] 
 Sent: Tuesday, October 06, 2009 2:56 PM
 To: users@wicket.apache.org
 Subject: RE: Leg Up for Wicket, Spring, Guice, JPA, Warp, EclipseLink,
 Hibernate ... projects
 
 
 Jeffrey,
 
 I expect the changes you made to the Guice Module are the reason why the
 session is null, could you paste in the contents of it.
 
 
 Regards - Richard Wilkinson
 Developer,
 jWeekend: OO  Java Technologies - Development and Training
 http://jWeekend.com
 
 
 
 Jeffrey Schneller wrote:
 
 Thanks for the idea but this didn't work either.  Any other ideas?  I
 would expect the archetype to work correctly.
 
 
 
 -Original Message-
 From: Erik Post [mailto:eriksen...@gmail.com] 
 Sent: Tuesday, October 06, 2009 2:09 PM
 To: users@wicket.apache.org
 Subject: Re: Leg Up for Wicket, Spring, Guice, JPA, Warp, EclipseLink,
 Hibernate ... projects
 
 Hi Jeffrey,
 
 I have *absolutely* no idea if this will help you, but I had the same
 with Spring. It started working when i put the injection annotation on
 the method instead of on the variable.
 
 Good luck,
 Erik
 
 On Tue, Oct 6, 2009 at 7:59 PM, Jeffrey Schneller
 jeffrey.schnel...@envisa.com wrote:
 I took the archetype for Guice, Warp, Hibernate and modified for my
 application.  All my code looks similar to the code from the archetype.
 The only difference is I am not using the AnnotatinConfiguration but
 just the plain Configuration.  I am also using c3po connection pooling
 with Oracle.

 However, I am still

Re: Starting with Wicket, Spring, Maven and JDBC

2009-09-24 Thread Pedro Sena
I'll check them

Thanks Eric,

On Wed, Sep 23, 2009 at 8:08 PM, Erik Post eriksen...@gmail.com wrote:

 Well, besides iolite, you could take a look at wicket-phonebook and
 wicketopia. They're not JDBC but they both come with Spring
 preconfigured. The phonebook has a couple of example DAO's and iBatis
 (among others) set up. You could take those as a starting point and
 'add' JDBC.

 Cheers,
 Erik


 On Wed, Sep 23, 2009 at 11:33 PM, Pedro Sena sena.pe...@gmail.com wrote:
  Hi Guys,
 
  I'm new to Wicket with Spring(I never used Spring before, just Seam). I'm
  using lolite but it comes with JPA instead of JDBC.
 
  I would like to know if there is some archetype for the setup that I
  described in the title. I already checked wicket stuff if no luck.
 
  Thanks in advance,
  --
  /**
  * Pedro Sena
  * Systems Architect
  * Sun Certified Java Programmer
  * Sun Certified Web Component Developer
  */
 

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




-- 
/**
* Pedro Sena
* Systems Architect
* Sun Certified Java Programmer
* Sun Certified Web Component Developer
*/


Re: Starting with Wicket, Spring, Maven and JDBC

2009-09-24 Thread Muro Copenhagen
Hi Pedro

Try Appfuse-light with the desired combination:
https://appfuse-light.dev.java.net/servlets/ProjectDocumentList?folderID=8006expandFolder=8006folderID=0

It should be at the bottom.

Best Regards
Muro

On Thu, Sep 24, 2009 at 12:04 PM, Pedro Sena sena.pe...@gmail.com wrote:

 I'll check them

 Thanks Eric,

 On Wed, Sep 23, 2009 at 8:08 PM, Erik Post eriksen...@gmail.com wrote:

  Well, besides iolite, you could take a look at wicket-phonebook and
  wicketopia. They're not JDBC but they both come with Spring
  preconfigured. The phonebook has a couple of example DAO's and iBatis
  (among others) set up. You could take those as a starting point and
  'add' JDBC.
 
  Cheers,
  Erik
 
 
  On Wed, Sep 23, 2009 at 11:33 PM, Pedro Sena sena.pe...@gmail.com
 wrote:
   Hi Guys,
  
   I'm new to Wicket with Spring(I never used Spring before, just Seam).
 I'm
   using lolite but it comes with JPA instead of JDBC.
  
   I would like to know if there is some archetype for the setup that I
   described in the title. I already checked wicket stuff if no luck.
  
   Thanks in advance,
   --
   /**
   * Pedro Sena
   * Systems Architect
   * Sun Certified Java Programmer
   * Sun Certified Web Component Developer
   */
  
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 


 --
 /**
 * Pedro Sena
 * Systems Architect
 * Sun Certified Java Programmer
 * Sun Certified Web Component Developer
 */



Re: Starting with Wicket, Spring, Maven and JDBC

2009-09-24 Thread Pedro Sena
Wow,

Exactly what I was looking for!!!

Thanks a lot !!

On Thu, Sep 24, 2009 at 7:10 AM, Muro Copenhagen copenha...@gmail.comwrote:

 Hi Pedro

 Try Appfuse-light with the desired combination:

 https://appfuse-light.dev.java.net/servlets/ProjectDocumentList?folderID=8006expandFolder=8006folderID=0

 It should be at the bottom.

 Best Regards
 Muro

 On Thu, Sep 24, 2009 at 12:04 PM, Pedro Sena sena.pe...@gmail.com wrote:

  I'll check them
 
  Thanks Eric,
 
  On Wed, Sep 23, 2009 at 8:08 PM, Erik Post eriksen...@gmail.com wrote:
 
   Well, besides iolite, you could take a look at wicket-phonebook and
   wicketopia. They're not JDBC but they both come with Spring
   preconfigured. The phonebook has a couple of example DAO's and iBatis
   (among others) set up. You could take those as a starting point and
   'add' JDBC.
  
   Cheers,
   Erik
  
  
   On Wed, Sep 23, 2009 at 11:33 PM, Pedro Sena sena.pe...@gmail.com
  wrote:
Hi Guys,
   
I'm new to Wicket with Spring(I never used Spring before, just Seam).
  I'm
using lolite but it comes with JPA instead of JDBC.
   
I would like to know if there is some archetype for the setup that I
described in the title. I already checked wicket stuff if no luck.
   
Thanks in advance,
--
/**
* Pedro Sena
* Systems Architect
* Sun Certified Java Programmer
* Sun Certified Web Component Developer
*/
   
  
   -
   To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
   For additional commands, e-mail: users-h...@wicket.apache.org
  
  
 
 
  --
  /**
  * Pedro Sena
  * Systems Architect
  * Sun Certified Java Programmer
  * Sun Certified Web Component Developer
  */
 




-- 
/**
* Pedro Sena
* Systems Architect
* Sun Certified Java Programmer
* Sun Certified Web Component Developer
*/


Starting with Wicket, Spring, Maven and JDBC

2009-09-23 Thread Pedro Sena
Hi Guys,

I'm new to Wicket with Spring(I never used Spring before, just Seam). I'm
using lolite but it comes with JPA instead of JDBC.

I would like to know if there is some archetype for the setup that I
described in the title. I already checked wicket stuff if no luck.

Thanks in advance,
-- 
/**
* Pedro Sena
* Systems Architect
* Sun Certified Java Programmer
* Sun Certified Web Component Developer
*/


Re: Starting with Wicket, Spring, Maven and JDBC

2009-09-23 Thread Erik Post
Well, besides iolite, you could take a look at wicket-phonebook and
wicketopia. They're not JDBC but they both come with Spring
preconfigured. The phonebook has a couple of example DAO's and iBatis
(among others) set up. You could take those as a starting point and
'add' JDBC.

Cheers,
Erik


On Wed, Sep 23, 2009 at 11:33 PM, Pedro Sena sena.pe...@gmail.com wrote:
 Hi Guys,

 I'm new to Wicket with Spring(I never used Spring before, just Seam). I'm
 using lolite but it comes with JPA instead of JDBC.

 I would like to know if there is some archetype for the setup that I
 described in the title. I already checked wicket stuff if no luck.

 Thanks in advance,
 --
 /**
 * Pedro Sena
 * Systems Architect
 * Sun Certified Java Programmer
 * Sun Certified Web Component Developer
 */


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



Re: Wicket + Spring Security (PreAuthentication)

2009-08-31 Thread Olivier Bourgeois
Looks like more of a spring-security question that a Wicket one : try
the spring-security forums. I suggest you have a look at this :

http://forum.springsource.org/showthread.php?t=52377

And this nice example up to date (but it's for wicket-swarn) :

http://out-println.blogspot.com/2009/02/wicket-swarm-spring-security-how-to.html

For your spring configuration, I think you will have to write a custom
AuthenticationProvider that handles you SSO cookie and checks the
token validity.


2009/8/28 Anders innocentl...@gmail.com:
 Hi,

 I refered to
 http://cwiki.apache.org/WICKET/spring-security-and-wicket-auth-roles.htmland
 wicket-spring example web application and it works.
 Now my company has a single-sign on web page already, like
 https:///login.cgi.
 This SSO web page will set cookies and return a token after login.
 I'd like to know how to use PreAuthentication of spring-security with my
 company's SSO web page?


 --
 --
 ~Mia は 最高!~
 --


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



Wicket + Spring Security (PreAuthentication)

2009-08-28 Thread Anders
Hi,

I refered to
http://cwiki.apache.org/WICKET/spring-security-and-wicket-auth-roles.htmland
wicket-spring example web application and it works.
Now my company has a single-sign on web page already, like
https:///login.cgi.
This SSO web page will set cookies and return a token after login.
I'd like to know how to use PreAuthentication of spring-security with my
company's SSO web page?


-- 
--
~Mia は 最高!~
--


Wicket, Spring, JDO on Google App Engine - Sample Application

2009-07-13 Thread Nick Wiedenbrück
I've written a Wicket, Spring, JDO sample application that runs on the
Google App Engine. An introduction ist available as a blog post at
http://stronglytypedblog.blogspot.com/2009/07/wicket-spring-jdo-on-google-app-engine.html.
The source code is available at http://kenai.com/projects/wicketgae.

- cretzel


Re: Wicket + Spring DM + Hibernate

2009-06-23 Thread Daniel Dominik Holúbek
Okay, but I still don't understand the reason of doing this stuff :)I've
already created the Application bean, and implemented
ApplicationContextAware.
Then the setApplicationContext method gets called, so I created
ApplictionContext variable in that class and set it it that method.
But if I try to access it in another bundle via Application.get(), it is
still null.
But even if it wasn't, I think that the DAO bean, declared in other bundle
(database-bundle) would not be there.

Just to make it clear - we've got three bundles. The database bundle has
everything needed to operate with DB. It creates DAO beans and makes OSGi
sevices from them. Then, there is an Application bundle. And the last bundle
is Panel bundle, which is loaded into the App bundle via an extension point.
I need to access the DAO in the Panel bundle, and there comes the problem
mentioned above.

That's why I do not understand why should I change the Application bundle
(except the Panel complaining about Application not being in Spring Extender
thread).

Thanks for your help :)

On Mon, Jun 22, 2009 at 11:38 PM, James Carman jcar...@carmanconsulting.com
 wrote:

 Sorry, that's IWebApplicationFactory, not IWicketApplicationFactory.
 Long day.

 On Mon, Jun 22, 2009 at 5:05 PM, James
 Carmanjcar...@carmanconsulting.com wrote:
  You will probably need to make your application class a singleton
  (with a getInstance() method and stuff) and specify that in the spring
  configuration:
 
  bean id=wicketApplication
  class=com.myco.myapp.MyWicketApplication
  factory-method=getInstance /
 
  Also, you will probably need to implement your own
  IWicketApplicationFactory to return the singleton instance since you
  won't have access to the Spring ApplicationContext to lookup your
  application object.
 
  On Mon, Jun 22, 2009 at 3:57 PM, Igor Vaynbergigor.vaynb...@gmail.com
 wrote:
  you have to create wicketapplication instance as a spring bean in
  order for setapplicationcontext to be called.
 
  -igor
 
  On Mon, Jun 22, 2009 at 12:47 PM, Daniel Dominik
  Holúbekdankodo...@gmail.com wrote:
  I tried implementing the ApplicationContextAware interface, it looked
 like a
  good idea, but the setApplicationContext method is never called.
 
  On Mon, Jun 22, 2009 at 8:25 PM, Daniel Dominik Holúbek 
  dankodo...@gmail.com wrote:
 
  For now, only in eclipse. But when it goes to production (or further
  testing) it will run in equinox bridge.
 
 
  On Mon, Jun 22, 2009 at 5:14 PM, James Carman 
  jcar...@carmanconsulting.com wrote:
 
  That's what I'd try, perhaps.  How are you starting this application?
  Only in eclipse?
 
  On Mon, Jun 22, 2009 at 11:09 AM, Daniel Dominik
  Holúbekdankodo...@gmail.com wrote:
   Well, I don't know :)I
  
   On Mon, Jun 22, 2009 at 12:32 PM, James Carman 
  jcar...@carmanconsulting.com
   wrote:
  
   Can you have your Application object created as a Spring bean and
 make
   it context aware and let the container inject the context into
 it?
  
   On Mon, Jun 22, 2009 at 2:02 AM, Daniel Dominik
   Holúbekdankodo...@gmail.com wrote:
But as far as I understand this, Spring DM is built upon the
 idea
  that I
can't build ApplicationContext, as it is built by Spring DM
 Extender.
  Am
   I
right?
   
On Mon, Jun 22, 2009 at 12:37 AM, James Carman 
   jcar...@carmanconsulting.com
wrote:
   
Try using the other SpringComponentInjector constructor (the
 one
  that
takes an ApplicationContext object).  Construct your
ApplicationContext however you want.
   
On Sun, Jun 21, 2009 at 2:09 PM, Daniel Dominik Holúbek
dankodo...@gmail.com wrote:

 Well, no.I'll explain:
 It's an OSGi app running in equinox-bridge. In my bundles
 there is
  no
 web.xml, and that's why I can't configure
 ContextLoaderListener.
 And because of this, when i add @SpringBean into my code,
 then add
 addComponentInstantiationListener(new
  SpringComponentInjector(this))
into
 WebApplication's init method and then run the application,
 the
  only
   thing
I
 get is this exception:  java.lang.IllegalStateException: No
 WebApplicationContext found: no ContextLoaderListener
 registered?

 But if there is a way how to set up that listener, I would be
  happy :)


 On Sun, Jun 21, 2009 at 7:28 PM, James Carman
 jcar...@carmanconsulting.comwrote:

  You can't use @SpringBean?
 
  On Sun, Jun 21, 2009 at 11:03 AM, Daniel Dominik
  Holúbekdankodo...@gmail.com wrote:
   Hello everyone :)So, I solved the Spring DM problems
   successfully...
but
   there is still one problem left, and this time I am
 absolutely
   sure
that
   it's a Wicket related problem :)
  
   I want to inject my userDao bean into Panel class. To
 do
  that, I
nead
  to
   create a bean from that Panel class - like this:
  
  
   bean name=consumer
class=sk.ziwhat.megaweb.loginpanels.prvy.lPanel
   

Re: Wicket + Spring DM + Hibernate

2009-06-23 Thread Daniel Dominik Holúbek
I appreciate your help, of course :)You know, I'm trying to create a web app
consisting of independent modules. Then if I change something in one module,
I don't have to redeploy whole application.
This can be achieved of course, the only problem is this thing we are
currently speaking of. :)

But if there is no way to do it, I think that putting the whole database
stuff into application bundle and then treating it normally would be okay,
even if I will have to redeploy the application bundle if I change something
in database.

Thanks! :)

On Tue, Jun 23, 2009 at 12:41 PM, James Carman jcar...@carmanconsulting.com
 wrote:

 On Tue, Jun 23, 2009 at 4:05 AM, Daniel Dominik Holúbek
 dankodo...@gmail.com wrote:
 
  Okay, but I still don't understand the reason of doing this stuff :)I've
  already created the Application bean, and implemented
  ApplicationContextAware.
  Then the setApplicationContext method gets called, so I created
  ApplictionContext variable in that class and set it it that method.
  But if I try to access it in another bundle via Application.get(), it is
  still null.
  But even if it wasn't, I think that the DAO bean, declared in other
 bundle
  (database-bundle) would not be there.
 

 None of us have experience with this environment, so we're trying to
 help as best we can.  This stuff wasn't designed for this environment.
  Why, exactly, do you feel it's necessary to architect your
 application this way, if you don't mind me asking?

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




-- 
-danoh-


Re: Wicket + Spring DM + Hibernate

2009-06-23 Thread Daniel Stoch
Hi,

I think your problem is that in Wicket the whole Spring injection
mechanism is prepared for applications where there is only one
ApplicationContext (AC). This AC is hold in the Wicket application
instance. So when you are trying to use @SpringBean annotation Wicket
tries to inject a bean from this AC.
Inside OSGi there are many AC (each bundle has its own AC), so the
base Wicket injection mechanism does not work here for all ACs, only
for one which you are save in Wicket application instance. The best
solution here is to make adaptation of Wicket injection mechanism to
OSGi environment (as we did in our application platform). It is not so
easy, but it can be done :).

It can work as follows (short draft):
When you are using @SpringBean to inject bean inside a class PanelA
then injection mechanism should injects a bean from ApplicationContext
of bundle where class PanelA is defined. So you must store somewhere
information about ApplicationContext in context of bundle class
loader. Then when you injecting a bean to PanelA: get a class PanelA
classloader find a proper AC for it and then inject a bean from this
AC.

--
Daniel

On Tue, Jun 23, 2009 at 10:05 AM, Daniel Dominik
Holúbekdankodo...@gmail.com wrote:
 Okay, but I still don't understand the reason of doing this stuff :)I've
 already created the Application bean, and implemented
 ApplicationContextAware.
 Then the setApplicationContext method gets called, so I created
 ApplictionContext variable in that class and set it it that method.
 But if I try to access it in another bundle via Application.get(), it is
 still null.
 But even if it wasn't, I think that the DAO bean, declared in other bundle
 (database-bundle) would not be there.

 Just to make it clear - we've got three bundles. The database bundle has
 everything needed to operate with DB. It creates DAO beans and makes OSGi
 sevices from them. Then, there is an Application bundle. And the last bundle
 is Panel bundle, which is loaded into the App bundle via an extension point.
 I need to access the DAO in the Panel bundle, and there comes the problem
 mentioned above.

 That's why I do not understand why should I change the Application bundle
 (except the Panel complaining about Application not being in Spring Extender
 thread).

 Thanks for your help :)


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



Re: Wicket + Spring DM + Hibernate

2009-06-23 Thread Daniel Dominik Holúbek
Yes, that's the way it's meant to work :)

On Tue, Jun 23, 2009 at 3:25 PM, James Carman
jcar...@carmanconsulting.comwrote:

 On Tue, Jun 23, 2009 at 8:26 AM, Daniel Dominik Holúbek
 dankodo...@gmail.com wrote:
 
  I appreciate your help, of course :)You know, I'm trying to create a web
 app
  consisting of independent modules. Then if I change something in one
 module,
  I don't have to redeploy whole application.
  This can be achieved of course, the only problem is this thing we are
  currently speaking of. :)

 So, you are going to redeploy the individual modules live, while the
 application is running, in production?

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




-- 
-danoh-


Re: Wicket + Spring DM + Hibernate

2009-06-23 Thread James Carman
How many modules do you have?  Do you really need to be able to do this with
your live production server?  I'm just trying to get an idea behind the
decision behind going with this sort of an architecture.  Perhaps we can
offer up an alternative that would work with the existing Wicket stuff so
that we can avoid some headaches for you. :)

On Tue, Jun 23, 2009 at 11:21 AM, Daniel Dominik Holúbek 
dankodo...@gmail.com wrote:

 Yes, that's the way it's meant to work :)

 On Tue, Jun 23, 2009 at 3:25 PM, James Carman
 jcar...@carmanconsulting.comwrote:

  On Tue, Jun 23, 2009 at 8:26 AM, Daniel Dominik Holúbek
  dankodo...@gmail.com wrote:
  
   I appreciate your help, of course :)You know, I'm trying to create a
 web
  app
   consisting of independent modules. Then if I change something in one
  module,
   I don't have to redeploy whole application.
   This can be achieved of course, the only problem is this thing we are
   currently speaking of. :)
 
  So, you are going to redeploy the individual modules live, while the
  application is running, in production?
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 


 --
 -danoh-



Re: Wicket + Spring DM + Hibernate

2009-06-23 Thread Igor Vaynberg
isnt a big point of osgi to manage cross-bundle-dependencies?

so if you inject panel A using panel A's context how does panel A ever
see beans that are defined in module B?

eg if panel A needs a sessionfactory which is defined in module B?

-igor

On Tue, Jun 23, 2009 at 5:36 AM, Daniel Stochdaniel.st...@gmail.com wrote:
 Hi,

 I think your problem is that in Wicket the whole Spring injection
 mechanism is prepared for applications where there is only one
 ApplicationContext (AC). This AC is hold in the Wicket application
 instance. So when you are trying to use @SpringBean annotation Wicket
 tries to inject a bean from this AC.
 Inside OSGi there are many AC (each bundle has its own AC), so the
 base Wicket injection mechanism does not work here for all ACs, only
 for one which you are save in Wicket application instance. The best
 solution here is to make adaptation of Wicket injection mechanism to
 OSGi environment (as we did in our application platform). It is not so
 easy, but it can be done :).

 It can work as follows (short draft):
 When you are using @SpringBean to inject bean inside a class PanelA
 then injection mechanism should injects a bean from ApplicationContext
 of bundle where class PanelA is defined. So you must store somewhere
 information about ApplicationContext in context of bundle class
 loader. Then when you injecting a bean to PanelA: get a class PanelA
 classloader find a proper AC for it and then inject a bean from this
 AC.

 --
 Daniel

 On Tue, Jun 23, 2009 at 10:05 AM, Daniel Dominik
 Holúbekdankodo...@gmail.com wrote:
 Okay, but I still don't understand the reason of doing this stuff :)I've
 already created the Application bean, and implemented
 ApplicationContextAware.
 Then the setApplicationContext method gets called, so I created
 ApplictionContext variable in that class and set it it that method.
 But if I try to access it in another bundle via Application.get(), it is
 still null.
 But even if it wasn't, I think that the DAO bean, declared in other bundle
 (database-bundle) would not be there.

 Just to make it clear - we've got three bundles. The database bundle has
 everything needed to operate with DB. It creates DAO beans and makes OSGi
 sevices from them. Then, there is an Application bundle. And the last bundle
 is Panel bundle, which is loaded into the App bundle via an extension point.
 I need to access the DAO in the Panel bundle, and there comes the problem
 mentioned above.

 That's why I do not understand why should I change the Application bundle
 (except the Panel complaining about Application not being in Spring Extender
 thread).

 Thanks for your help :)


 -
 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 DM + Hibernate

2009-06-23 Thread Daniel Stoch
Ok, at least two scenarios are possible:
1. You have a module A with PanelA and you want to inject someDAO bean,
which is defined inside module A (in the same module where class PanelA is
defined). Then you can use classic @SpringBean annotation, as I wrote in my
previous post.
2. You want to use PanelA class in another bundle B and injects someDAO2
bean which is defined inside module B. In such situation we are using a
diffrent annotation (similar to @SpringBean) which injects bean from current
bundle (bundle where class which uses PanelA is declared - in this example:
bundle B).

Of course a default behavior of @SpringBean annotation is up to your
implementation, it was only an example (in my previous post).
So you should decide if you want to inject a bean from AC where class is
defined or from AC where this class instance is used. Probably when you are
creating a reusable components (panels) then the second situation is more
often.

--
Daniel

On Tue, Jun 23, 2009 at 5:38 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 isnt a big point of osgi to manage cross-bundle-dependencies?

 so if you inject panel A using panel A's context how does panel A ever
 see beans that are defined in module B?

 eg if panel A needs a sessionfactory which is defined in module B?

 -igor

 On Tue, Jun 23, 2009 at 5:36 AM, Daniel Stochdaniel.st...@gmail.com
 wrote:
  Hi,
 
  I think your problem is that in Wicket the whole Spring injection
  mechanism is prepared for applications where there is only one
  ApplicationContext (AC). This AC is hold in the Wicket application
  instance. So when you are trying to use @SpringBean annotation Wicket
  tries to inject a bean from this AC.
  Inside OSGi there are many AC (each bundle has its own AC), so the
  base Wicket injection mechanism does not work here for all ACs, only
  for one which you are save in Wicket application instance. The best
  solution here is to make adaptation of Wicket injection mechanism to
  OSGi environment (as we did in our application platform). It is not so
  easy, but it can be done :).
 
  It can work as follows (short draft):
  When you are using @SpringBean to inject bean inside a class PanelA
  then injection mechanism should injects a bean from ApplicationContext
  of bundle where class PanelA is defined. So you must store somewhere
  information about ApplicationContext in context of bundle class
  loader. Then when you injecting a bean to PanelA: get a class PanelA
  classloader find a proper AC for it and then inject a bean from this
  AC.
 
  --
  Daniel



Re: Wicket + Spring DM + Hibernate

2009-06-22 Thread Daniel Dominik Holúbek
But as far as I understand this, Spring DM is built upon the idea that I
can't build ApplicationContext, as it is built by Spring DM Extender. Am I
right?

On Mon, Jun 22, 2009 at 12:37 AM, James Carman jcar...@carmanconsulting.com
 wrote:

 Try using the other SpringComponentInjector constructor (the one that
 takes an ApplicationContext object).  Construct your
 ApplicationContext however you want.

 On Sun, Jun 21, 2009 at 2:09 PM, Daniel Dominik Holúbek
 dankodo...@gmail.com wrote:
 
  Well, no.I'll explain:
  It's an OSGi app running in equinox-bridge. In my bundles there is no
  web.xml, and that's why I can't configure ContextLoaderListener.
  And because of this, when i add @SpringBean into my code, then add
  addComponentInstantiationListener(new SpringComponentInjector(this))
 into
  WebApplication's init method and then run the application, the only thing
 I
  get is this exception:  java.lang.IllegalStateException: No
  WebApplicationContext found: no ContextLoaderListener registered?
 
  But if there is a way how to set up that listener, I would be happy :)
 
 
  On Sun, Jun 21, 2009 at 7:28 PM, James Carman
  jcar...@carmanconsulting.comwrote:
 
   You can't use @SpringBean?
  
   On Sun, Jun 21, 2009 at 11:03 AM, Daniel Dominik
   Holúbekdankodo...@gmail.com wrote:
Hello everyone :)So, I solved the Spring DM problems successfully...
 but
there is still one problem left, and this time I am absolutely sure
 that
it's a Wicket related problem :)
   
I want to inject my userDao bean into Panel class. To do that, I
 nead
   to
create a bean from that Panel class - like this:
   
   
bean name=consumer
 class=sk.ziwhat.megaweb.loginpanels.prvy.lPanel
init-method=init
   
property name=userDao ref=userDao /
   
/bean
But when I try this, I get an exception:
   
Caused by: org.apache.wicket.WicketRuntimeException: There is no
   application
attached to current thread SpringOsgiExtenderThread-4
This happens when Spring is trying to instantiate the Panel class.
   
I tried this with ordinary class and everything worked fine. The idea
 was
that I will instantiate a normal class, and then I will access it
 from
   the
Panel class, but when I do:
   
ServiceConsumer sc = new ServiceConsumer();
   
and then access userDao, I'll get a NullPointerException of course.
   
So has anybody done this before? I think I need your help :)
   
Thanks a lot!
   
On Tue, Jun 16, 2009 at 2:01 AM, djo mos djo.mli...@gmail.com
 wrote:
   
Hi,
   
On Mon, Jun 15, 2009 at 9:28 PM, Daniel Dominik Holúbek 
dankodo...@gmail.com wrote:
   
 Well, may be, but won't they send me back to this mailinglist?
 :)To be
 honest, I have only a little problem with Spring DM itself (there
 are
 couple
 of tutorials out there), I was only curious about whether somebody
 has
 successfully tried this.
 For example, now it seems that the dependency is not being
 injected in
   my
 code. And I can't do that via @SpringBean, because that needs to
 be
   set
in
 web.xml, and I have no web.xml in my OSGi bundle.
   
   
Actually with Spring DM you do have web.xml in web bundles, as
 described
   in
their reference documentation.
I'v been able to use Wicket with Spring DM without problems. No
   Hibernate
though : it really wasn't designed for a strictly controlled
 environment
such as OSGi.
   
So, I guess that your problem (not getting IoC to work) is not
 Wicket
related but Spring DM related.
   
Cheers
   


 But yes, there is a chance that the problem has nothing to do with
   Wicket
 itself.

 On Mon, Jun 15, 2009 at 4:38 PM, Igor Vaynberg 
   igor.vaynb...@gmail.com
 wrote:

  isnt this a question for the spring dmserver forum?
 
  -igor
 
  On Mon, Jun 15, 2009 at 3:49 AM, Daniel Dominik
  Holúbekdankodo...@gmail.com wrote:
   Hello,has anybody here successfully used Spring DM with
 Hibernate
(the
  OSGi
   way) in Wicket?
   I am totally hopeless about this...
  
   The goal is to create modular app with this features:
   - every module (bundle) has its own applicationContext and DAO
classes.
   - i.e. if I have a module which loads blogs, I want to include
 the
Blog
   entity with corresponding DAO in the bundle and nowhere else.
  
   Thanks in advance.
  
   --
   -danoh-
  
 
 
   -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 


 --
 -danoh-

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

Re: Wicket + Spring DM + Hibernate

2009-06-22 Thread James Carman
Can you have your Application object created as a Spring bean and make
it context aware and let the container inject the context into it?

On Mon, Jun 22, 2009 at 2:02 AM, Daniel Dominik
Holúbekdankodo...@gmail.com wrote:
 But as far as I understand this, Spring DM is built upon the idea that I
 can't build ApplicationContext, as it is built by Spring DM Extender. Am I
 right?

 On Mon, Jun 22, 2009 at 12:37 AM, James Carman jcar...@carmanconsulting.com
 wrote:

 Try using the other SpringComponentInjector constructor (the one that
 takes an ApplicationContext object).  Construct your
 ApplicationContext however you want.

 On Sun, Jun 21, 2009 at 2:09 PM, Daniel Dominik Holúbek
 dankodo...@gmail.com wrote:
 
  Well, no.I'll explain:
  It's an OSGi app running in equinox-bridge. In my bundles there is no
  web.xml, and that's why I can't configure ContextLoaderListener.
  And because of this, when i add @SpringBean into my code, then add
  addComponentInstantiationListener(new SpringComponentInjector(this))
 into
  WebApplication's init method and then run the application, the only thing
 I
  get is this exception:  java.lang.IllegalStateException: No
  WebApplicationContext found: no ContextLoaderListener registered?
 
  But if there is a way how to set up that listener, I would be happy :)
 
 
  On Sun, Jun 21, 2009 at 7:28 PM, James Carman
  jcar...@carmanconsulting.comwrote:
 
   You can't use @SpringBean?
  
   On Sun, Jun 21, 2009 at 11:03 AM, Daniel Dominik
   Holúbekdankodo...@gmail.com wrote:
Hello everyone :)So, I solved the Spring DM problems successfully...
 but
there is still one problem left, and this time I am absolutely sure
 that
it's a Wicket related problem :)
   
I want to inject my userDao bean into Panel class. To do that, I
 nead
   to
create a bean from that Panel class - like this:
   
   
bean name=consumer
 class=sk.ziwhat.megaweb.loginpanels.prvy.lPanel
init-method=init
   
property name=userDao ref=userDao /
   
/bean
But when I try this, I get an exception:
   
Caused by: org.apache.wicket.WicketRuntimeException: There is no
   application
attached to current thread SpringOsgiExtenderThread-4
This happens when Spring is trying to instantiate the Panel class.
   
I tried this with ordinary class and everything worked fine. The idea
 was
that I will instantiate a normal class, and then I will access it
 from
   the
Panel class, but when I do:
   
ServiceConsumer sc = new ServiceConsumer();
   
and then access userDao, I'll get a NullPointerException of course.
   
So has anybody done this before? I think I need your help :)
   
Thanks a lot!
   
On Tue, Jun 16, 2009 at 2:01 AM, djo mos djo.mli...@gmail.com
 wrote:
   
Hi,
   
On Mon, Jun 15, 2009 at 9:28 PM, Daniel Dominik Holúbek 
dankodo...@gmail.com wrote:
   
 Well, may be, but won't they send me back to this mailinglist?
 :)To be
 honest, I have only a little problem with Spring DM itself (there
 are
 couple
 of tutorials out there), I was only curious about whether somebody
 has
 successfully tried this.
 For example, now it seems that the dependency is not being
 injected in
   my
 code. And I can't do that via @SpringBean, because that needs to
 be
   set
in
 web.xml, and I have no web.xml in my OSGi bundle.
   
   
Actually with Spring DM you do have web.xml in web bundles, as
 described
   in
their reference documentation.
I'v been able to use Wicket with Spring DM without problems. No
   Hibernate
though : it really wasn't designed for a strictly controlled
 environment
such as OSGi.
   
So, I guess that your problem (not getting IoC to work) is not
 Wicket
related but Spring DM related.
   
Cheers
   


 But yes, there is a chance that the problem has nothing to do with
   Wicket
 itself.

 On Mon, Jun 15, 2009 at 4:38 PM, Igor Vaynberg 
   igor.vaynb...@gmail.com
 wrote:

  isnt this a question for the spring dmserver forum?
 
  -igor
 
  On Mon, Jun 15, 2009 at 3:49 AM, Daniel Dominik
  Holúbekdankodo...@gmail.com wrote:
   Hello,has anybody here successfully used Spring DM with
 Hibernate
(the
  OSGi
   way) in Wicket?
   I am totally hopeless about this...
  
   The goal is to create modular app with this features:
   - every module (bundle) has its own applicationContext and DAO
classes.
   - i.e. if I have a module which loads blogs, I want to include
 the
Blog
   entity with corresponding DAO in the bundle and nowhere else.
  
   Thanks in advance.
  
   --
   -danoh-
  
 
 
   -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 


 --
 

Re: Wicket + Spring DM + Hibernate

2009-06-22 Thread Daniel Dominik Holúbek
Well, I don't know :)I

On Mon, Jun 22, 2009 at 12:32 PM, James Carman jcar...@carmanconsulting.com
 wrote:

 Can you have your Application object created as a Spring bean and make
 it context aware and let the container inject the context into it?

 On Mon, Jun 22, 2009 at 2:02 AM, Daniel Dominik
 Holúbekdankodo...@gmail.com wrote:
  But as far as I understand this, Spring DM is built upon the idea that I
  can't build ApplicationContext, as it is built by Spring DM Extender. Am
 I
  right?
 
  On Mon, Jun 22, 2009 at 12:37 AM, James Carman 
 jcar...@carmanconsulting.com
  wrote:
 
  Try using the other SpringComponentInjector constructor (the one that
  takes an ApplicationContext object).  Construct your
  ApplicationContext however you want.
 
  On Sun, Jun 21, 2009 at 2:09 PM, Daniel Dominik Holúbek
  dankodo...@gmail.com wrote:
  
   Well, no.I'll explain:
   It's an OSGi app running in equinox-bridge. In my bundles there is no
   web.xml, and that's why I can't configure ContextLoaderListener.
   And because of this, when i add @SpringBean into my code, then add
   addComponentInstantiationListener(new SpringComponentInjector(this))
  into
   WebApplication's init method and then run the application, the only
 thing
  I
   get is this exception:  java.lang.IllegalStateException: No
   WebApplicationContext found: no ContextLoaderListener registered?
  
   But if there is a way how to set up that listener, I would be happy :)
  
  
   On Sun, Jun 21, 2009 at 7:28 PM, James Carman
   jcar...@carmanconsulting.comwrote:
  
You can't use @SpringBean?
   
On Sun, Jun 21, 2009 at 11:03 AM, Daniel Dominik
Holúbekdankodo...@gmail.com wrote:
 Hello everyone :)So, I solved the Spring DM problems
 successfully...
  but
 there is still one problem left, and this time I am absolutely
 sure
  that
 it's a Wicket related problem :)

 I want to inject my userDao bean into Panel class. To do that, I
  nead
to
 create a bean from that Panel class - like this:


 bean name=consumer
  class=sk.ziwhat.megaweb.loginpanels.prvy.lPanel
 init-method=init

 property name=userDao ref=userDao /

 /bean
 But when I try this, I get an exception:

 Caused by: org.apache.wicket.WicketRuntimeException: There is no
application
 attached to current thread SpringOsgiExtenderThread-4
 This happens when Spring is trying to instantiate the Panel class.

 I tried this with ordinary class and everything worked fine. The
 idea
  was
 that I will instantiate a normal class, and then I will access it
  from
the
 Panel class, but when I do:

 ServiceConsumer sc = new ServiceConsumer();

 and then access userDao, I'll get a NullPointerException of
 course.

 So has anybody done this before? I think I need your help :)

 Thanks a lot!

 On Tue, Jun 16, 2009 at 2:01 AM, djo mos djo.mli...@gmail.com
  wrote:

 Hi,

 On Mon, Jun 15, 2009 at 9:28 PM, Daniel Dominik Holúbek 
 dankodo...@gmail.com wrote:

  Well, may be, but won't they send me back to this mailinglist?
  :)To be
  honest, I have only a little problem with Spring DM itself
 (there
  are
  couple
  of tutorials out there), I was only curious about whether
 somebody
  has
  successfully tried this.
  For example, now it seems that the dependency is not being
  injected in
my
  code. And I can't do that via @SpringBean, because that needs
 to
  be
set
 in
  web.xml, and I have no web.xml in my OSGi bundle.


 Actually with Spring DM you do have web.xml in web bundles, as
  described
in
 their reference documentation.
 I'v been able to use Wicket with Spring DM without problems. No
Hibernate
 though : it really wasn't designed for a strictly controlled
  environment
 such as OSGi.

 So, I guess that your problem (not getting IoC to work) is not
  Wicket
 related but Spring DM related.

 Cheers

 
 
  But yes, there is a chance that the problem has nothing to do
 with
Wicket
  itself.
 
  On Mon, Jun 15, 2009 at 4:38 PM, Igor Vaynberg 
igor.vaynb...@gmail.com
  wrote:
 
   isnt this a question for the spring dmserver forum?
  
   -igor
  
   On Mon, Jun 15, 2009 at 3:49 AM, Daniel Dominik
   Holúbekdankodo...@gmail.com wrote:
Hello,has anybody here successfully used Spring DM with
  Hibernate
 (the
   OSGi
way) in Wicket?
I am totally hopeless about this...
   
The goal is to create modular app with this features:
- every module (bundle) has its own applicationContext and
 DAO
 classes.
- i.e. if I have a module which loads blogs, I want to
 include
  the
 Blog
entity with corresponding DAO in the bundle and nowhere
 else.
   
Thanks in advance.
   

Re: Wicket + Spring DM + Hibernate

2009-06-22 Thread Daniel Dominik Holúbek
I don't know :)I can create a Spring bean from Application object, but I
don't know what does it mean - make it context aware.
That's why I am asking whether somebody has already tried this...

On Mon, Jun 22, 2009 at 5:09 PM, Daniel Dominik Holúbek 
dankodo...@gmail.com wrote:

 Well, I don't know :)I


 On Mon, Jun 22, 2009 at 12:32 PM, James Carman 
 jcar...@carmanconsulting.com wrote:

 Can you have your Application object created as a Spring bean and make
 it context aware and let the container inject the context into it?

 On Mon, Jun 22, 2009 at 2:02 AM, Daniel Dominik
 Holúbekdankodo...@gmail.com wrote:
  But as far as I understand this, Spring DM is built upon the idea that I
  can't build ApplicationContext, as it is built by Spring DM Extender. Am
 I
  right?
 
  On Mon, Jun 22, 2009 at 12:37 AM, James Carman 
 jcar...@carmanconsulting.com
  wrote:
 
  Try using the other SpringComponentInjector constructor (the one that
  takes an ApplicationContext object).  Construct your
  ApplicationContext however you want.
 
  On Sun, Jun 21, 2009 at 2:09 PM, Daniel Dominik Holúbek
  dankodo...@gmail.com wrote:
  
   Well, no.I'll explain:
   It's an OSGi app running in equinox-bridge. In my bundles there is no
   web.xml, and that's why I can't configure ContextLoaderListener.
   And because of this, when i add @SpringBean into my code, then add
   addComponentInstantiationListener(new
 SpringComponentInjector(this))
  into
   WebApplication's init method and then run the application, the only
 thing
  I
   get is this exception:  java.lang.IllegalStateException: No
   WebApplicationContext found: no ContextLoaderListener registered?
  
   But if there is a way how to set up that listener, I would be happy
 :)
  
  
   On Sun, Jun 21, 2009 at 7:28 PM, James Carman
   jcar...@carmanconsulting.comwrote:
  
You can't use @SpringBean?
   
On Sun, Jun 21, 2009 at 11:03 AM, Daniel Dominik
Holúbekdankodo...@gmail.com wrote:
 Hello everyone :)So, I solved the Spring DM problems
 successfully...
  but
 there is still one problem left, and this time I am absolutely
 sure
  that
 it's a Wicket related problem :)

 I want to inject my userDao bean into Panel class. To do that,
 I
  nead
to
 create a bean from that Panel class - like this:


 bean name=consumer
  class=sk.ziwhat.megaweb.loginpanels.prvy.lPanel
 init-method=init

 property name=userDao ref=userDao /

 /bean
 But when I try this, I get an exception:

 Caused by: org.apache.wicket.WicketRuntimeException: There is no
application
 attached to current thread SpringOsgiExtenderThread-4
 This happens when Spring is trying to instantiate the Panel
 class.

 I tried this with ordinary class and everything worked fine. The
 idea
  was
 that I will instantiate a normal class, and then I will access it
  from
the
 Panel class, but when I do:

 ServiceConsumer sc = new ServiceConsumer();

 and then access userDao, I'll get a NullPointerException of
 course.

 So has anybody done this before? I think I need your help :)

 Thanks a lot!

 On Tue, Jun 16, 2009 at 2:01 AM, djo mos djo.mli...@gmail.com
  wrote:

 Hi,

 On Mon, Jun 15, 2009 at 9:28 PM, Daniel Dominik Holúbek 
 dankodo...@gmail.com wrote:

  Well, may be, but won't they send me back to this mailinglist?
  :)To be
  honest, I have only a little problem with Spring DM itself
 (there
  are
  couple
  of tutorials out there), I was only curious about whether
 somebody
  has
  successfully tried this.
  For example, now it seems that the dependency is not being
  injected in
my
  code. And I can't do that via @SpringBean, because that needs
 to
  be
set
 in
  web.xml, and I have no web.xml in my OSGi bundle.


 Actually with Spring DM you do have web.xml in web bundles, as
  described
in
 their reference documentation.
 I'v been able to use Wicket with Spring DM without problems. No
Hibernate
 though : it really wasn't designed for a strictly controlled
  environment
 such as OSGi.

 So, I guess that your problem (not getting IoC to work) is not
  Wicket
 related but Spring DM related.

 Cheers

 
 
  But yes, there is a chance that the problem has nothing to do
 with
Wicket
  itself.
 
  On Mon, Jun 15, 2009 at 4:38 PM, Igor Vaynberg 
igor.vaynb...@gmail.com
  wrote:
 
   isnt this a question for the spring dmserver forum?
  
   -igor
  
   On Mon, Jun 15, 2009 at 3:49 AM, Daniel Dominik
   Holúbekdankodo...@gmail.com wrote:
Hello,has anybody here successfully used Spring DM with
  Hibernate
 (the
   OSGi
way) in Wicket?
I am totally hopeless about this...
   
The goal is to create modular app with this features:
- 

Re: Wicket + Spring DM + Hibernate

2009-06-22 Thread James Carman
On Mon, Jun 22, 2009 at 11:11 AM, Daniel Dominik
Holúbekdankodo...@gmail.com wrote:
 I don't know :)I can create a Spring bean from Application object, but I
 don't know what does it mean - make it context aware.
 That's why I am asking whether somebody has already tried this...

Have your application class implement the ApplicationContextAware interface:

http://static.springframework.org/spring/docs/2.5.x/api/org/springframework/context/ApplicationContextAware.html

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



Re: Wicket + Spring DM + Hibernate

2009-06-22 Thread James Carman
That's what I'd try, perhaps.  How are you starting this application?
Only in eclipse?

On Mon, Jun 22, 2009 at 11:09 AM, Daniel Dominik
Holúbekdankodo...@gmail.com wrote:
 Well, I don't know :)I

 On Mon, Jun 22, 2009 at 12:32 PM, James Carman jcar...@carmanconsulting.com
 wrote:

 Can you have your Application object created as a Spring bean and make
 it context aware and let the container inject the context into it?

 On Mon, Jun 22, 2009 at 2:02 AM, Daniel Dominik
 Holúbekdankodo...@gmail.com wrote:
  But as far as I understand this, Spring DM is built upon the idea that I
  can't build ApplicationContext, as it is built by Spring DM Extender. Am
 I
  right?
 
  On Mon, Jun 22, 2009 at 12:37 AM, James Carman 
 jcar...@carmanconsulting.com
  wrote:
 
  Try using the other SpringComponentInjector constructor (the one that
  takes an ApplicationContext object).  Construct your
  ApplicationContext however you want.
 
  On Sun, Jun 21, 2009 at 2:09 PM, Daniel Dominik Holúbek
  dankodo...@gmail.com wrote:
  
   Well, no.I'll explain:
   It's an OSGi app running in equinox-bridge. In my bundles there is no
   web.xml, and that's why I can't configure ContextLoaderListener.
   And because of this, when i add @SpringBean into my code, then add
   addComponentInstantiationListener(new SpringComponentInjector(this))
  into
   WebApplication's init method and then run the application, the only
 thing
  I
   get is this exception:  java.lang.IllegalStateException: No
   WebApplicationContext found: no ContextLoaderListener registered?
  
   But if there is a way how to set up that listener, I would be happy :)
  
  
   On Sun, Jun 21, 2009 at 7:28 PM, James Carman
   jcar...@carmanconsulting.comwrote:
  
You can't use @SpringBean?
   
On Sun, Jun 21, 2009 at 11:03 AM, Daniel Dominik
Holúbekdankodo...@gmail.com wrote:
 Hello everyone :)So, I solved the Spring DM problems
 successfully...
  but
 there is still one problem left, and this time I am absolutely
 sure
  that
 it's a Wicket related problem :)

 I want to inject my userDao bean into Panel class. To do that, I
  nead
to
 create a bean from that Panel class - like this:


 bean name=consumer
  class=sk.ziwhat.megaweb.loginpanels.prvy.lPanel
 init-method=init

 property name=userDao ref=userDao /

 /bean
 But when I try this, I get an exception:

 Caused by: org.apache.wicket.WicketRuntimeException: There is no
application
 attached to current thread SpringOsgiExtenderThread-4
 This happens when Spring is trying to instantiate the Panel class.

 I tried this with ordinary class and everything worked fine. The
 idea
  was
 that I will instantiate a normal class, and then I will access it
  from
the
 Panel class, but when I do:

 ServiceConsumer sc = new ServiceConsumer();

 and then access userDao, I'll get a NullPointerException of
 course.

 So has anybody done this before? I think I need your help :)

 Thanks a lot!

 On Tue, Jun 16, 2009 at 2:01 AM, djo mos djo.mli...@gmail.com
  wrote:

 Hi,

 On Mon, Jun 15, 2009 at 9:28 PM, Daniel Dominik Holúbek 
 dankodo...@gmail.com wrote:

  Well, may be, but won't they send me back to this mailinglist?
  :)To be
  honest, I have only a little problem with Spring DM itself
 (there
  are
  couple
  of tutorials out there), I was only curious about whether
 somebody
  has
  successfully tried this.
  For example, now it seems that the dependency is not being
  injected in
my
  code. And I can't do that via @SpringBean, because that needs
 to
  be
set
 in
  web.xml, and I have no web.xml in my OSGi bundle.


 Actually with Spring DM you do have web.xml in web bundles, as
  described
in
 their reference documentation.
 I'v been able to use Wicket with Spring DM without problems. No
Hibernate
 though : it really wasn't designed for a strictly controlled
  environment
 such as OSGi.

 So, I guess that your problem (not getting IoC to work) is not
  Wicket
 related but Spring DM related.

 Cheers

 
 
  But yes, there is a chance that the problem has nothing to do
 with
Wicket
  itself.
 
  On Mon, Jun 15, 2009 at 4:38 PM, Igor Vaynberg 
igor.vaynb...@gmail.com
  wrote:
 
   isnt this a question for the spring dmserver forum?
  
   -igor
  
   On Mon, Jun 15, 2009 at 3:49 AM, Daniel Dominik
   Holúbekdankodo...@gmail.com wrote:
Hello,has anybody here successfully used Spring DM with
  Hibernate
 (the
   OSGi
way) in Wicket?
I am totally hopeless about this...
   
The goal is to create modular app with this features:
- every module (bundle) has its own applicationContext and
 DAO
 classes.
- i.e. if I have a module 

Re: Wicket + Spring DM + Hibernate

2009-06-22 Thread Daniel Dominik Holúbek
For now, only in eclipse. But when it goes to production (or further
testing) it will run in equinox bridge.

On Mon, Jun 22, 2009 at 5:14 PM, James Carman
jcar...@carmanconsulting.comwrote:

 That's what I'd try, perhaps.  How are you starting this application?
 Only in eclipse?

 On Mon, Jun 22, 2009 at 11:09 AM, Daniel Dominik
 Holúbekdankodo...@gmail.com wrote:
  Well, I don't know :)I
 
  On Mon, Jun 22, 2009 at 12:32 PM, James Carman 
 jcar...@carmanconsulting.com
  wrote:
 
  Can you have your Application object created as a Spring bean and make
  it context aware and let the container inject the context into it?
 
  On Mon, Jun 22, 2009 at 2:02 AM, Daniel Dominik
  Holúbekdankodo...@gmail.com wrote:
   But as far as I understand this, Spring DM is built upon the idea that
 I
   can't build ApplicationContext, as it is built by Spring DM Extender.
 Am
  I
   right?
  
   On Mon, Jun 22, 2009 at 12:37 AM, James Carman 
  jcar...@carmanconsulting.com
   wrote:
  
   Try using the other SpringComponentInjector constructor (the one that
   takes an ApplicationContext object).  Construct your
   ApplicationContext however you want.
  
   On Sun, Jun 21, 2009 at 2:09 PM, Daniel Dominik Holúbek
   dankodo...@gmail.com wrote:
   
Well, no.I'll explain:
It's an OSGi app running in equinox-bridge. In my bundles there is
 no
web.xml, and that's why I can't configure ContextLoaderListener.
And because of this, when i add @SpringBean into my code, then add
addComponentInstantiationListener(new
 SpringComponentInjector(this))
   into
WebApplication's init method and then run the application, the only
  thing
   I
get is this exception:  java.lang.IllegalStateException: No
WebApplicationContext found: no ContextLoaderListener registered?
   
But if there is a way how to set up that listener, I would be happy
 :)
   
   
On Sun, Jun 21, 2009 at 7:28 PM, James Carman
jcar...@carmanconsulting.comwrote:
   
 You can't use @SpringBean?

 On Sun, Jun 21, 2009 at 11:03 AM, Daniel Dominik
 Holúbekdankodo...@gmail.com wrote:
  Hello everyone :)So, I solved the Spring DM problems
  successfully...
   but
  there is still one problem left, and this time I am absolutely
  sure
   that
  it's a Wicket related problem :)
 
  I want to inject my userDao bean into Panel class. To do
 that, I
   nead
 to
  create a bean from that Panel class - like this:
 
 
  bean name=consumer
   class=sk.ziwhat.megaweb.loginpanels.prvy.lPanel
  init-method=init
 
  property name=userDao ref=userDao /
 
  /bean
  But when I try this, I get an exception:
 
  Caused by: org.apache.wicket.WicketRuntimeException: There is
 no
 application
  attached to current thread SpringOsgiExtenderThread-4
  This happens when Spring is trying to instantiate the Panel
 class.
 
  I tried this with ordinary class and everything worked fine.
 The
  idea
   was
  that I will instantiate a normal class, and then I will access
 it
   from
 the
  Panel class, but when I do:
 
  ServiceConsumer sc = new ServiceConsumer();
 
  and then access userDao, I'll get a NullPointerException of
  course.
 
  So has anybody done this before? I think I need your help :)
 
  Thanks a lot!
 
  On Tue, Jun 16, 2009 at 2:01 AM, djo mos djo.mli...@gmail.com
 
   wrote:
 
  Hi,
 
  On Mon, Jun 15, 2009 at 9:28 PM, Daniel Dominik Holúbek 
  dankodo...@gmail.com wrote:
 
   Well, may be, but won't they send me back to this
 mailinglist?
   :)To be
   honest, I have only a little problem with Spring DM itself
  (there
   are
   couple
   of tutorials out there), I was only curious about whether
  somebody
   has
   successfully tried this.
   For example, now it seems that the dependency is not being
   injected in
 my
   code. And I can't do that via @SpringBean, because that
 needs
  to
   be
 set
  in
   web.xml, and I have no web.xml in my OSGi bundle.
 
 
  Actually with Spring DM you do have web.xml in web bundles, as
   described
 in
  their reference documentation.
  I'v been able to use Wicket with Spring DM without problems.
 No
 Hibernate
  though : it really wasn't designed for a strictly controlled
   environment
  such as OSGi.
 
  So, I guess that your problem (not getting IoC to work) is not
   Wicket
  related but Spring DM related.
 
  Cheers
 
  
  
   But yes, there is a chance that the problem has nothing to
 do
  with
 Wicket
   itself.
  
   On Mon, Jun 15, 2009 at 4:38 PM, Igor Vaynberg 
 igor.vaynb...@gmail.com
   wrote:
  
isnt this a question for the spring dmserver forum?
   
-igor
   
On Mon, Jun 15, 2009 at 3:49 AM, Daniel Dominik

Re: Wicket + Spring DM + Hibernate

2009-06-22 Thread Daniel Dominik Holúbek
I tried implementing the ApplicationContextAware interface, it looked like a
good idea, but the setApplicationContext method is never called.

On Mon, Jun 22, 2009 at 8:25 PM, Daniel Dominik Holúbek 
dankodo...@gmail.com wrote:

 For now, only in eclipse. But when it goes to production (or further
 testing) it will run in equinox bridge.


 On Mon, Jun 22, 2009 at 5:14 PM, James Carman 
 jcar...@carmanconsulting.com wrote:

 That's what I'd try, perhaps.  How are you starting this application?
 Only in eclipse?

 On Mon, Jun 22, 2009 at 11:09 AM, Daniel Dominik
 Holúbekdankodo...@gmail.com wrote:
  Well, I don't know :)I
 
  On Mon, Jun 22, 2009 at 12:32 PM, James Carman 
 jcar...@carmanconsulting.com
  wrote:
 
  Can you have your Application object created as a Spring bean and make
  it context aware and let the container inject the context into it?
 
  On Mon, Jun 22, 2009 at 2:02 AM, Daniel Dominik
  Holúbekdankodo...@gmail.com wrote:
   But as far as I understand this, Spring DM is built upon the idea
 that I
   can't build ApplicationContext, as it is built by Spring DM Extender.
 Am
  I
   right?
  
   On Mon, Jun 22, 2009 at 12:37 AM, James Carman 
  jcar...@carmanconsulting.com
   wrote:
  
   Try using the other SpringComponentInjector constructor (the one
 that
   takes an ApplicationContext object).  Construct your
   ApplicationContext however you want.
  
   On Sun, Jun 21, 2009 at 2:09 PM, Daniel Dominik Holúbek
   dankodo...@gmail.com wrote:
   
Well, no.I'll explain:
It's an OSGi app running in equinox-bridge. In my bundles there is
 no
web.xml, and that's why I can't configure ContextLoaderListener.
And because of this, when i add @SpringBean into my code, then add
addComponentInstantiationListener(new
 SpringComponentInjector(this))
   into
WebApplication's init method and then run the application, the
 only
  thing
   I
get is this exception:  java.lang.IllegalStateException: No
WebApplicationContext found: no ContextLoaderListener registered?
   
But if there is a way how to set up that listener, I would be
 happy :)
   
   
On Sun, Jun 21, 2009 at 7:28 PM, James Carman
jcar...@carmanconsulting.comwrote:
   
 You can't use @SpringBean?

 On Sun, Jun 21, 2009 at 11:03 AM, Daniel Dominik
 Holúbekdankodo...@gmail.com wrote:
  Hello everyone :)So, I solved the Spring DM problems
  successfully...
   but
  there is still one problem left, and this time I am absolutely
  sure
   that
  it's a Wicket related problem :)
 
  I want to inject my userDao bean into Panel class. To do
 that, I
   nead
 to
  create a bean from that Panel class - like this:
 
 
  bean name=consumer
   class=sk.ziwhat.megaweb.loginpanels.prvy.lPanel
  init-method=init
 
  property name=userDao ref=userDao /
 
  /bean
  But when I try this, I get an exception:
 
  Caused by: org.apache.wicket.WicketRuntimeException: There is
 no
 application
  attached to current thread SpringOsgiExtenderThread-4
  This happens when Spring is trying to instantiate the Panel
 class.
 
  I tried this with ordinary class and everything worked fine.
 The
  idea
   was
  that I will instantiate a normal class, and then I will access
 it
   from
 the
  Panel class, but when I do:
 
  ServiceConsumer sc = new ServiceConsumer();
 
  and then access userDao, I'll get a NullPointerException of
  course.
 
  So has anybody done this before? I think I need your help :)
 
  Thanks a lot!
 
  On Tue, Jun 16, 2009 at 2:01 AM, djo mos 
 djo.mli...@gmail.com
   wrote:
 
  Hi,
 
  On Mon, Jun 15, 2009 at 9:28 PM, Daniel Dominik Holúbek 
  dankodo...@gmail.com wrote:
 
   Well, may be, but won't they send me back to this
 mailinglist?
   :)To be
   honest, I have only a little problem with Spring DM itself
  (there
   are
   couple
   of tutorials out there), I was only curious about whether
  somebody
   has
   successfully tried this.
   For example, now it seems that the dependency is not being
   injected in
 my
   code. And I can't do that via @SpringBean, because that
 needs
  to
   be
 set
  in
   web.xml, and I have no web.xml in my OSGi bundle.
 
 
  Actually with Spring DM you do have web.xml in web bundles,
 as
   described
 in
  their reference documentation.
  I'v been able to use Wicket with Spring DM without problems.
 No
 Hibernate
  though : it really wasn't designed for a strictly controlled
   environment
  such as OSGi.
 
  So, I guess that your problem (not getting IoC to work) is
 not
   Wicket
  related but Spring DM related.
 
  Cheers
 
  
  
   But yes, there is a chance that the problem has nothing to
 do
  with
 Wicket
   itself.
  
   On Mon, Jun 15, 2009 at 4:38 PM, Igor 

Re: Wicket + Spring DM + Hibernate

2009-06-22 Thread Igor Vaynberg
you have to create wicketapplication instance as a spring bean in
order for setapplicationcontext to be called.

-igor

On Mon, Jun 22, 2009 at 12:47 PM, Daniel Dominik
Holúbekdankodo...@gmail.com wrote:
 I tried implementing the ApplicationContextAware interface, it looked like a
 good idea, but the setApplicationContext method is never called.

 On Mon, Jun 22, 2009 at 8:25 PM, Daniel Dominik Holúbek 
 dankodo...@gmail.com wrote:

 For now, only in eclipse. But when it goes to production (or further
 testing) it will run in equinox bridge.


 On Mon, Jun 22, 2009 at 5:14 PM, James Carman 
 jcar...@carmanconsulting.com wrote:

 That's what I'd try, perhaps.  How are you starting this application?
 Only in eclipse?

 On Mon, Jun 22, 2009 at 11:09 AM, Daniel Dominik
 Holúbekdankodo...@gmail.com wrote:
  Well, I don't know :)I
 
  On Mon, Jun 22, 2009 at 12:32 PM, James Carman 
 jcar...@carmanconsulting.com
  wrote:
 
  Can you have your Application object created as a Spring bean and make
  it context aware and let the container inject the context into it?
 
  On Mon, Jun 22, 2009 at 2:02 AM, Daniel Dominik
  Holúbekdankodo...@gmail.com wrote:
   But as far as I understand this, Spring DM is built upon the idea
 that I
   can't build ApplicationContext, as it is built by Spring DM Extender.
 Am
  I
   right?
  
   On Mon, Jun 22, 2009 at 12:37 AM, James Carman 
  jcar...@carmanconsulting.com
   wrote:
  
   Try using the other SpringComponentInjector constructor (the one
 that
   takes an ApplicationContext object).  Construct your
   ApplicationContext however you want.
  
   On Sun, Jun 21, 2009 at 2:09 PM, Daniel Dominik Holúbek
   dankodo...@gmail.com wrote:
   
Well, no.I'll explain:
It's an OSGi app running in equinox-bridge. In my bundles there is
 no
web.xml, and that's why I can't configure ContextLoaderListener.
And because of this, when i add @SpringBean into my code, then add
addComponentInstantiationListener(new
 SpringComponentInjector(this))
   into
WebApplication's init method and then run the application, the
 only
  thing
   I
get is this exception:  java.lang.IllegalStateException: No
WebApplicationContext found: no ContextLoaderListener registered?
   
But if there is a way how to set up that listener, I would be
 happy :)
   
   
On Sun, Jun 21, 2009 at 7:28 PM, James Carman
jcar...@carmanconsulting.comwrote:
   
 You can't use @SpringBean?

 On Sun, Jun 21, 2009 at 11:03 AM, Daniel Dominik
 Holúbekdankodo...@gmail.com wrote:
  Hello everyone :)So, I solved the Spring DM problems
  successfully...
   but
  there is still one problem left, and this time I am absolutely
  sure
   that
  it's a Wicket related problem :)
 
  I want to inject my userDao bean into Panel class. To do
 that, I
   nead
 to
  create a bean from that Panel class - like this:
 
 
  bean name=consumer
   class=sk.ziwhat.megaweb.loginpanels.prvy.lPanel
  init-method=init
 
  property name=userDao ref=userDao /
 
  /bean
  But when I try this, I get an exception:
 
  Caused by: org.apache.wicket.WicketRuntimeException: There is
 no
 application
  attached to current thread SpringOsgiExtenderThread-4
  This happens when Spring is trying to instantiate the Panel
 class.
 
  I tried this with ordinary class and everything worked fine.
 The
  idea
   was
  that I will instantiate a normal class, and then I will access
 it
   from
 the
  Panel class, but when I do:
 
  ServiceConsumer sc = new ServiceConsumer();
 
  and then access userDao, I'll get a NullPointerException of
  course.
 
  So has anybody done this before? I think I need your help :)
 
  Thanks a lot!
 
  On Tue, Jun 16, 2009 at 2:01 AM, djo mos 
 djo.mli...@gmail.com
   wrote:
 
  Hi,
 
  On Mon, Jun 15, 2009 at 9:28 PM, Daniel Dominik Holúbek 
  dankodo...@gmail.com wrote:
 
   Well, may be, but won't they send me back to this
 mailinglist?
   :)To be
   honest, I have only a little problem with Spring DM itself
  (there
   are
   couple
   of tutorials out there), I was only curious about whether
  somebody
   has
   successfully tried this.
   For example, now it seems that the dependency is not being
   injected in
 my
   code. And I can't do that via @SpringBean, because that
 needs
  to
   be
 set
  in
   web.xml, and I have no web.xml in my OSGi bundle.
 
 
  Actually with Spring DM you do have web.xml in web bundles,
 as
   described
 in
  their reference documentation.
  I'v been able to use Wicket with Spring DM without problems.
 No
 Hibernate
  though : it really wasn't designed for a strictly controlled
   environment
  such as OSGi.
 
  So, I guess that your problem (not getting IoC to work) is
 not
   Wicket
  related but 

Re: Wicket + Spring DM + Hibernate

2009-06-22 Thread James Carman
Sorry, that's IWebApplicationFactory, not IWicketApplicationFactory.
Long day.

On Mon, Jun 22, 2009 at 5:05 PM, James
Carmanjcar...@carmanconsulting.com wrote:
 You will probably need to make your application class a singleton
 (with a getInstance() method and stuff) and specify that in the spring
 configuration:

 bean id=wicketApplication
 class=com.myco.myapp.MyWicketApplication
 factory-method=getInstance /

 Also, you will probably need to implement your own
 IWicketApplicationFactory to return the singleton instance since you
 won't have access to the Spring ApplicationContext to lookup your
 application object.

 On Mon, Jun 22, 2009 at 3:57 PM, Igor Vaynbergigor.vaynb...@gmail.com wrote:
 you have to create wicketapplication instance as a spring bean in
 order for setapplicationcontext to be called.

 -igor

 On Mon, Jun 22, 2009 at 12:47 PM, Daniel Dominik
 Holúbekdankodo...@gmail.com wrote:
 I tried implementing the ApplicationContextAware interface, it looked like a
 good idea, but the setApplicationContext method is never called.

 On Mon, Jun 22, 2009 at 8:25 PM, Daniel Dominik Holúbek 
 dankodo...@gmail.com wrote:

 For now, only in eclipse. But when it goes to production (or further
 testing) it will run in equinox bridge.


 On Mon, Jun 22, 2009 at 5:14 PM, James Carman 
 jcar...@carmanconsulting.com wrote:

 That's what I'd try, perhaps.  How are you starting this application?
 Only in eclipse?

 On Mon, Jun 22, 2009 at 11:09 AM, Daniel Dominik
 Holúbekdankodo...@gmail.com wrote:
  Well, I don't know :)I
 
  On Mon, Jun 22, 2009 at 12:32 PM, James Carman 
 jcar...@carmanconsulting.com
  wrote:
 
  Can you have your Application object created as a Spring bean and make
  it context aware and let the container inject the context into it?
 
  On Mon, Jun 22, 2009 at 2:02 AM, Daniel Dominik
  Holúbekdankodo...@gmail.com wrote:
   But as far as I understand this, Spring DM is built upon the idea
 that I
   can't build ApplicationContext, as it is built by Spring DM Extender.
 Am
  I
   right?
  
   On Mon, Jun 22, 2009 at 12:37 AM, James Carman 
  jcar...@carmanconsulting.com
   wrote:
  
   Try using the other SpringComponentInjector constructor (the one
 that
   takes an ApplicationContext object).  Construct your
   ApplicationContext however you want.
  
   On Sun, Jun 21, 2009 at 2:09 PM, Daniel Dominik Holúbek
   dankodo...@gmail.com wrote:
   
Well, no.I'll explain:
It's an OSGi app running in equinox-bridge. In my bundles there is
 no
web.xml, and that's why I can't configure ContextLoaderListener.
And because of this, when i add @SpringBean into my code, then add
addComponentInstantiationListener(new
 SpringComponentInjector(this))
   into
WebApplication's init method and then run the application, the
 only
  thing
   I
get is this exception:  java.lang.IllegalStateException: No
WebApplicationContext found: no ContextLoaderListener registered?
   
But if there is a way how to set up that listener, I would be
 happy :)
   
   
On Sun, Jun 21, 2009 at 7:28 PM, James Carman
jcar...@carmanconsulting.comwrote:
   
 You can't use @SpringBean?

 On Sun, Jun 21, 2009 at 11:03 AM, Daniel Dominik
 Holúbekdankodo...@gmail.com wrote:
  Hello everyone :)So, I solved the Spring DM problems
  successfully...
   but
  there is still one problem left, and this time I am absolutely
  sure
   that
  it's a Wicket related problem :)
 
  I want to inject my userDao bean into Panel class. To do
 that, I
   nead
 to
  create a bean from that Panel class - like this:
 
 
  bean name=consumer
   class=sk.ziwhat.megaweb.loginpanels.prvy.lPanel
  init-method=init
 
  property name=userDao ref=userDao /
 
  /bean
  But when I try this, I get an exception:
 
  Caused by: org.apache.wicket.WicketRuntimeException: There is
 no
 application
  attached to current thread SpringOsgiExtenderThread-4
  This happens when Spring is trying to instantiate the Panel
 class.
 
  I tried this with ordinary class and everything worked fine.
 The
  idea
   was
  that I will instantiate a normal class, and then I will access
 it
   from
 the
  Panel class, but when I do:
 
  ServiceConsumer sc = new ServiceConsumer();
 
  and then access userDao, I'll get a NullPointerException of
  course.
 
  So has anybody done this before? I think I need your help :)
 
  Thanks a lot!
 
  On Tue, Jun 16, 2009 at 2:01 AM, djo mos 
 djo.mli...@gmail.com
   wrote:
 
  Hi,
 
  On Mon, Jun 15, 2009 at 9:28 PM, Daniel Dominik Holúbek 
  dankodo...@gmail.com wrote:
 
   Well, may be, but won't they send me back to this
 mailinglist?
   :)To be
   honest, I have only a little problem with Spring DM itself
  (there
   are
   couple
   of tutorials out there), I was only curious about whether
  somebody
   has

Re: Wicket + Spring DM + Hibernate

2009-06-21 Thread Daniel Dominik Holúbek
Hello everyone :)So, I solved the Spring DM problems successfully... but
there is still one problem left, and this time I am absolutely sure that
it's a Wicket related problem :)

I want to inject my userDao bean into Panel class. To do that, I nead to
create a bean from that Panel class - like this:


bean name=consumer class=sk.ziwhat.megaweb.loginpanels.prvy.lPanel
init-method=init

property name=userDao ref=userDao /

/bean
But when I try this, I get an exception:

Caused by: org.apache.wicket.WicketRuntimeException: There is no application
attached to current thread SpringOsgiExtenderThread-4
This happens when Spring is trying to instantiate the Panel class.

I tried this with ordinary class and everything worked fine. The idea was
that I will instantiate a normal class, and then I will access it from the
Panel class, but when I do:

ServiceConsumer sc = new ServiceConsumer();

and then access userDao, I'll get a NullPointerException of course.

So has anybody done this before? I think I need your help :)

Thanks a lot!

On Tue, Jun 16, 2009 at 2:01 AM, djo mos djo.mli...@gmail.com wrote:

 Hi,

 On Mon, Jun 15, 2009 at 9:28 PM, Daniel Dominik Holúbek 
 dankodo...@gmail.com wrote:

  Well, may be, but won't they send me back to this mailinglist? :)To be
  honest, I have only a little problem with Spring DM itself (there are
  couple
  of tutorials out there), I was only curious about whether somebody has
  successfully tried this.
  For example, now it seems that the dependency is not being injected in my
  code. And I can't do that via @SpringBean, because that needs to be set
 in
  web.xml, and I have no web.xml in my OSGi bundle.


 Actually with Spring DM you do have web.xml in web bundles, as described in
 their reference documentation.
 I'v been able to use Wicket with Spring DM without problems. No Hibernate
 though : it really wasn't designed for a strictly controlled environment
 such as OSGi.

 So, I guess that your problem (not getting IoC to work) is not Wicket
 related but Spring DM related.

 Cheers

 
 
  But yes, there is a chance that the problem has nothing to do with Wicket
  itself.
 
  On Mon, Jun 15, 2009 at 4:38 PM, Igor Vaynberg igor.vaynb...@gmail.com
  wrote:
 
   isnt this a question for the spring dmserver forum?
  
   -igor
  
   On Mon, Jun 15, 2009 at 3:49 AM, Daniel Dominik
   Holúbekdankodo...@gmail.com wrote:
Hello,has anybody here successfully used Spring DM with Hibernate
 (the
   OSGi
way) in Wicket?
I am totally hopeless about this...
   
The goal is to create modular app with this features:
- every module (bundle) has its own applicationContext and DAO
 classes.
- i.e. if I have a module which loads blogs, I want to include the
 Blog
entity with corresponding DAO in the bundle and nowhere else.
   
Thanks in advance.
   
--
-danoh-
   
  
   -
   To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
   For additional commands, e-mail: users-h...@wicket.apache.org
  
  
 
 
  --
  -danoh-
 




-- 
-danoh-


Re: Wicket + Spring DM + Hibernate

2009-06-21 Thread James Carman
You can't use @SpringBean?

On Sun, Jun 21, 2009 at 11:03 AM, Daniel Dominik
Holúbekdankodo...@gmail.com wrote:
 Hello everyone :)So, I solved the Spring DM problems successfully... but
 there is still one problem left, and this time I am absolutely sure that
 it's a Wicket related problem :)

 I want to inject my userDao bean into Panel class. To do that, I nead to
 create a bean from that Panel class - like this:


 bean name=consumer class=sk.ziwhat.megaweb.loginpanels.prvy.lPanel
 init-method=init

 property name=userDao ref=userDao /

 /bean
 But when I try this, I get an exception:

 Caused by: org.apache.wicket.WicketRuntimeException: There is no application
 attached to current thread SpringOsgiExtenderThread-4
 This happens when Spring is trying to instantiate the Panel class.

 I tried this with ordinary class and everything worked fine. The idea was
 that I will instantiate a normal class, and then I will access it from the
 Panel class, but when I do:

 ServiceConsumer sc = new ServiceConsumer();

 and then access userDao, I'll get a NullPointerException of course.

 So has anybody done this before? I think I need your help :)

 Thanks a lot!

 On Tue, Jun 16, 2009 at 2:01 AM, djo mos djo.mli...@gmail.com wrote:

 Hi,

 On Mon, Jun 15, 2009 at 9:28 PM, Daniel Dominik Holúbek 
 dankodo...@gmail.com wrote:

  Well, may be, but won't they send me back to this mailinglist? :)To be
  honest, I have only a little problem with Spring DM itself (there are
  couple
  of tutorials out there), I was only curious about whether somebody has
  successfully tried this.
  For example, now it seems that the dependency is not being injected in my
  code. And I can't do that via @SpringBean, because that needs to be set
 in
  web.xml, and I have no web.xml in my OSGi bundle.


 Actually with Spring DM you do have web.xml in web bundles, as described in
 their reference documentation.
 I'v been able to use Wicket with Spring DM without problems. No Hibernate
 though : it really wasn't designed for a strictly controlled environment
 such as OSGi.

 So, I guess that your problem (not getting IoC to work) is not Wicket
 related but Spring DM related.

 Cheers

 
 
  But yes, there is a chance that the problem has nothing to do with Wicket
  itself.
 
  On Mon, Jun 15, 2009 at 4:38 PM, Igor Vaynberg igor.vaynb...@gmail.com
  wrote:
 
   isnt this a question for the spring dmserver forum?
  
   -igor
  
   On Mon, Jun 15, 2009 at 3:49 AM, Daniel Dominik
   Holúbekdankodo...@gmail.com wrote:
Hello,has anybody here successfully used Spring DM with Hibernate
 (the
   OSGi
way) in Wicket?
I am totally hopeless about this...
   
The goal is to create modular app with this features:
- every module (bundle) has its own applicationContext and DAO
 classes.
- i.e. if I have a module which loads blogs, I want to include the
 Blog
entity with corresponding DAO in the bundle and nowhere else.
   
Thanks in advance.
   
--
-danoh-
   
  
   -
   To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
   For additional commands, e-mail: users-h...@wicket.apache.org
  
  
 
 
  --
  -danoh-
 




 --
 -danoh-


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



Re: Wicket + Spring DM + Hibernate

2009-06-21 Thread James Carman
Try using the other SpringComponentInjector constructor (the one that
takes an ApplicationContext object).  Construct your
ApplicationContext however you want.

On Sun, Jun 21, 2009 at 2:09 PM, Daniel Dominik Holúbek
dankodo...@gmail.com wrote:

 Well, no.I'll explain:
 It's an OSGi app running in equinox-bridge. In my bundles there is no
 web.xml, and that's why I can't configure ContextLoaderListener.
 And because of this, when i add @SpringBean into my code, then add
 addComponentInstantiationListener(new SpringComponentInjector(this)) into
 WebApplication's init method and then run the application, the only thing I
 get is this exception:  java.lang.IllegalStateException: No
 WebApplicationContext found: no ContextLoaderListener registered?

 But if there is a way how to set up that listener, I would be happy :)


 On Sun, Jun 21, 2009 at 7:28 PM, James Carman
 jcar...@carmanconsulting.comwrote:

  You can't use @SpringBean?
 
  On Sun, Jun 21, 2009 at 11:03 AM, Daniel Dominik
  Holúbekdankodo...@gmail.com wrote:
   Hello everyone :)So, I solved the Spring DM problems successfully... but
   there is still one problem left, and this time I am absolutely sure that
   it's a Wicket related problem :)
  
   I want to inject my userDao bean into Panel class. To do that, I nead
  to
   create a bean from that Panel class - like this:
  
  
   bean name=consumer class=sk.ziwhat.megaweb.loginpanels.prvy.lPanel
   init-method=init
  
   property name=userDao ref=userDao /
  
   /bean
   But when I try this, I get an exception:
  
   Caused by: org.apache.wicket.WicketRuntimeException: There is no
  application
   attached to current thread SpringOsgiExtenderThread-4
   This happens when Spring is trying to instantiate the Panel class.
  
   I tried this with ordinary class and everything worked fine. The idea was
   that I will instantiate a normal class, and then I will access it from
  the
   Panel class, but when I do:
  
   ServiceConsumer sc = new ServiceConsumer();
  
   and then access userDao, I'll get a NullPointerException of course.
  
   So has anybody done this before? I think I need your help :)
  
   Thanks a lot!
  
   On Tue, Jun 16, 2009 at 2:01 AM, djo mos djo.mli...@gmail.com wrote:
  
   Hi,
  
   On Mon, Jun 15, 2009 at 9:28 PM, Daniel Dominik Holúbek 
   dankodo...@gmail.com wrote:
  
Well, may be, but won't they send me back to this mailinglist? :)To be
honest, I have only a little problem with Spring DM itself (there are
couple
of tutorials out there), I was only curious about whether somebody has
successfully tried this.
For example, now it seems that the dependency is not being injected in
  my
code. And I can't do that via @SpringBean, because that needs to be
  set
   in
web.xml, and I have no web.xml in my OSGi bundle.
  
  
   Actually with Spring DM you do have web.xml in web bundles, as described
  in
   their reference documentation.
   I'v been able to use Wicket with Spring DM without problems. No
  Hibernate
   though : it really wasn't designed for a strictly controlled environment
   such as OSGi.
  
   So, I guess that your problem (not getting IoC to work) is not Wicket
   related but Spring DM related.
  
   Cheers
  
   
   
But yes, there is a chance that the problem has nothing to do with
  Wicket
itself.
   
On Mon, Jun 15, 2009 at 4:38 PM, Igor Vaynberg 
  igor.vaynb...@gmail.com
wrote:
   
 isnt this a question for the spring dmserver forum?

 -igor

 On Mon, Jun 15, 2009 at 3:49 AM, Daniel Dominik
 Holúbekdankodo...@gmail.com wrote:
  Hello,has anybody here successfully used Spring DM with Hibernate
   (the
 OSGi
  way) in Wicket?
  I am totally hopeless about this...
 
  The goal is to create modular app with this features:
  - every module (bundle) has its own applicationContext and DAO
   classes.
  - i.e. if I have a module which loads blogs, I want to include the
   Blog
  entity with corresponding DAO in the bundle and nowhere else.
 
  Thanks in advance.
 
  --
  -danoh-
 


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


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


 --
 -danoh-

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



Wicket + Spring DM + Hibernate

2009-06-15 Thread Daniel Dominik Holúbek
Hello,has anybody here successfully used Spring DM with Hibernate (the OSGi
way) in Wicket?
I am totally hopeless about this...

The goal is to create modular app with this features:
- every module (bundle) has its own applicationContext and DAO classes.
- i.e. if I have a module which loads blogs, I want to include the Blog
entity with corresponding DAO in the bundle and nowhere else.

Thanks in advance.

-- 
-danoh-


Re: Wicket + Spring DM + Hibernate

2009-06-15 Thread Igor Vaynberg
isnt this a question for the spring dmserver forum?

-igor

On Mon, Jun 15, 2009 at 3:49 AM, Daniel Dominik
Holúbekdankodo...@gmail.com wrote:
 Hello,has anybody here successfully used Spring DM with Hibernate (the OSGi
 way) in Wicket?
 I am totally hopeless about this...

 The goal is to create modular app with this features:
 - every module (bundle) has its own applicationContext and DAO classes.
 - i.e. if I have a module which loads blogs, I want to include the Blog
 entity with corresponding DAO in the bundle and nowhere else.

 Thanks in advance.

 --
 -danoh-


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



Re: Wicket + Spring DM + Hibernate

2009-06-15 Thread Daniel Dominik Holúbek
Well, may be, but won't they send me back to this mailinglist? :)To be
honest, I have only a little problem with Spring DM itself (there are couple
of tutorials out there), I was only curious about whether somebody has
successfully tried this.
For example, now it seems that the dependency is not being injected in my
code. And I can't do that via @SpringBean, because that needs to be set in
web.xml, and I have no web.xml in my OSGi bundle.

But yes, there is a chance that the problem has nothing to do with Wicket
itself.

On Mon, Jun 15, 2009 at 4:38 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 isnt this a question for the spring dmserver forum?

 -igor

 On Mon, Jun 15, 2009 at 3:49 AM, Daniel Dominik
 Holúbekdankodo...@gmail.com wrote:
  Hello,has anybody here successfully used Spring DM with Hibernate (the
 OSGi
  way) in Wicket?
  I am totally hopeless about this...
 
  The goal is to create modular app with this features:
  - every module (bundle) has its own applicationContext and DAO classes.
  - i.e. if I have a module which loads blogs, I want to include the Blog
  entity with corresponding DAO in the bundle and nowhere else.
 
  Thanks in advance.
 
  --
  -danoh-
 

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




-- 
-danoh-


Re: Wicket + Spring DM + Hibernate

2009-06-15 Thread Igor Vaynberg
your original message did not specify what problems you were having.

further, springbean does not require anything in web.xml, it simply
needs the applicationcontext reference, and if you dont give it one it
will look it up using spring's utils so everything should work.

-igor

On Mon, Jun 15, 2009 at 1:28 PM, Daniel Dominik
Holúbekdankodo...@gmail.com wrote:
 Well, may be, but won't they send me back to this mailinglist? :)To be
 honest, I have only a little problem with Spring DM itself (there are couple
 of tutorials out there), I was only curious about whether somebody has
 successfully tried this.
 For example, now it seems that the dependency is not being injected in my
 code. And I can't do that via @SpringBean, because that needs to be set in
 web.xml, and I have no web.xml in my OSGi bundle.

 But yes, there is a chance that the problem has nothing to do with Wicket
 itself.

 On Mon, Jun 15, 2009 at 4:38 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 isnt this a question for the spring dmserver forum?

 -igor

 On Mon, Jun 15, 2009 at 3:49 AM, Daniel Dominik
 Holúbekdankodo...@gmail.com wrote:
  Hello,has anybody here successfully used Spring DM with Hibernate (the
 OSGi
  way) in Wicket?
  I am totally hopeless about this...
 
  The goal is to create modular app with this features:
  - every module (bundle) has its own applicationContext and DAO classes.
  - i.e. if I have a module which loads blogs, I want to include the Blog
  entity with corresponding DAO in the bundle and nowhere else.
 
  Thanks in advance.
 
  --
  -danoh-
 

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




 --
 -danoh-


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



Re: wicket-spring classpath issue

2009-02-25 Thread Alex Parvulescu
Hello,

Your point is interesting , but I really think theres more to this than
simple convenience.

I am really interested in this because I think its a bug.

Its you choice if you want to have a big fat war (~5MB) and deploy that over
scp - i guess the fast deploy cycles go out the window,
or try to keep things small and easy , go with a common lib folder for all
the apps on the server and have ~300KB wars.

In the end I think that should be the developer's decision, and not be
constrained by an eventual bug in the framework. Apparently, the spring
beans get somehow shared by apps that have nothing in common, and thats not
good.

Thanks,
Alex

On Tue, Feb 24, 2009 at 6:32 PM, John Krasnay j...@krasnay.ca wrote:

 IMHO sharing JARs across J2EE apps is not worth the trouble.

 - it messes up some JARs (commons-logging is a classic example)

 - it forces you to keep your dependent JAR versions in sync across
  applications. This is particularly important in an enterprise
  environment where changing a dependent JAR version may force an
  additional QA cycle.

 - it complicates deployment, since you have to remember to put any new
  dependent JARs in the app-server's lib directory instead of just
  dropping the WAR in place.

 If you're like me, the memory allocated to the JVM is in the hundreds of
 megs, so an additional few megs in the WARs is simply not worth the
 effort.

 jk

 On Tue, Feb 24, 2009 at 04:00:58PM +0200, Alex Parvulescu wrote:
  Hello,
 
  I have a problem with the wicket - spring integration in wicket 1.4 rc2 ,
 i
  think its similar to https://issues.apache.org/jira/browse/WICKET-1848
 
  The use case is like this :
 
  I have 2 simple applications running in a jetty server.
 
  To keep things simple , i added the spring and wicket libs to the common
  classpath (so the following libs: cglib-nodep-2.1_3.jar,
  commons-logging-1.1.jar , log4j-1.2.13.jar , slf4j-api-1.5.0.jar ,
  slf4j-log4j12-1.5.0.jar , spring-2.5.6.jar , wicket-1.4-rc2.jar ,
  wicket-ioc-1.4-rc2.jar , wicket-spring-1.4-rc2.jar  go into
  $JETTY_HOME/lib/ext/extra-libs )
  That helps me keep the size of the wars lower.
 
  I think the problem is that by using this common classpath , the wicket
  applications share -some- context.More to the point , I don't think that
  LazyInitProxyFactory is thread safe , or maybe application safe. It
 appears
  that bean ids from one application are visible in another application
 thats
  deployed on the same server.
 

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




wicket-spring classpath issue

2009-02-24 Thread Alex Parvulescu
Hello,

I have a problem with the wicket - spring integration in wicket 1.4 rc2 , i
think its similar to https://issues.apache.org/jira/browse/WICKET-1848

The use case is like this :

I have 2 simple applications running in a jetty server.

To keep things simple , i added the spring and wicket libs to the common
classpath (so the following libs: cglib-nodep-2.1_3.jar,
commons-logging-1.1.jar , log4j-1.2.13.jar , slf4j-api-1.5.0.jar ,
slf4j-log4j12-1.5.0.jar , spring-2.5.6.jar , wicket-1.4-rc2.jar ,
wicket-ioc-1.4-rc2.jar , wicket-spring-1.4-rc2.jar  go into
$JETTY_HOME/lib/ext/extra-libs )
That helps me keep the size of the wars lower.

I think the problem is that by using this common classpath , the wicket
applications share -some- context.More to the point , I don't think that
LazyInitProxyFactory is thread safe , or maybe application safe. It appears
that bean ids from one application are visible in another application thats
deployed on the same server.

As an example : I can define a bean with the id 'simpleService' in the first
application. But when I try to define another bean in the second application
with the same id - still 'simpleService' but a different interface- I get
the following error:

GET, protocol = HTTP/1.1, requestURL = http://localhost:8080/, contentType =
null, contentLength = -1, contextPath = , pathInfo = null, requestURI = /,
servletPath = /, pathTranslated = null]
2009-02-24 15:08:04,803 ERROR org.apache.wicket.RequestCycle - Can't
instantiate page using constructor public com.asf.test2.web.Index()
org.apache.wicket.WicketRuntimeException: Can't instantiate page using
constructor public com.asf.test2.web.Index()
at
org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:172)
at
org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:58)
at
org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.newPage(BookmarkablePageRequestTarget.java:299)
at
org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.getPage(BookmarkablePageRequestTarget.java:321)
at
org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.processEvents(BookmarkablePageRequestTarget.java:234)
at
org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92)
at
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1192)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1271)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1370)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:501)
at
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:455)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:288)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1115)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:361)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:417)
at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:199)
at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:535)
at
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:865)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:538)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
at
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:522)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at
org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:153)
... 28 more
Caused by: java.lang.RuntimeException: error while injecting object [[Page
class = com.asf.test2.web.Index, id = 0, version = 0]] of type
[com.asf.test2.web.Index]
at org.apache.wicket.injection.Injector.inject(Injector.java:118)
at
org.apache.wicket.injection.ConfigurableInjector.inject

Re: wicket-spring classpath issue

2009-02-24 Thread John Krasnay
IMHO sharing JARs across J2EE apps is not worth the trouble.

- it messes up some JARs (commons-logging is a classic example)

- it forces you to keep your dependent JAR versions in sync across
  applications. This is particularly important in an enterprise
  environment where changing a dependent JAR version may force an
  additional QA cycle.

- it complicates deployment, since you have to remember to put any new
  dependent JARs in the app-server's lib directory instead of just
  dropping the WAR in place.

If you're like me, the memory allocated to the JVM is in the hundreds of
megs, so an additional few megs in the WARs is simply not worth the
effort.

jk

On Tue, Feb 24, 2009 at 04:00:58PM +0200, Alex Parvulescu wrote:
 Hello,
 
 I have a problem with the wicket - spring integration in wicket 1.4 rc2 , i
 think its similar to https://issues.apache.org/jira/browse/WICKET-1848
 
 The use case is like this :
 
 I have 2 simple applications running in a jetty server.
 
 To keep things simple , i added the spring and wicket libs to the common
 classpath (so the following libs: cglib-nodep-2.1_3.jar,
 commons-logging-1.1.jar , log4j-1.2.13.jar , slf4j-api-1.5.0.jar ,
 slf4j-log4j12-1.5.0.jar , spring-2.5.6.jar , wicket-1.4-rc2.jar ,
 wicket-ioc-1.4-rc2.jar , wicket-spring-1.4-rc2.jar  go into
 $JETTY_HOME/lib/ext/extra-libs )
 That helps me keep the size of the wars lower.
 
 I think the problem is that by using this common classpath , the wicket
 applications share -some- context.More to the point , I don't think that
 LazyInitProxyFactory is thread safe , or maybe application safe. It appears
 that bean ids from one application are visible in another application thats
 deployed on the same server.
 

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



Three tier layered application using Wicket + Spring + Hibernate. How would you handle transactions?

2009-02-10 Thread Kent Larsson
Hi,

I'm thinking about using the **Open Session In View (OSIV)** filter or
interceptor that comes with Spring, as it seems like a convenient way
for me as a developer. If that's what you recommend, do you recommend
using a filter or an interceptor and why?

I'm also wondering how it will mix with **HibernateTemplate** and if I
will loose the ability to mark methods as *...@transactional(readOnly =
true)** etc and thus loose the ability to get some more fine grained
transaction control?

Is there some kind of best practice for how to integrate this kind of
solution with a three tier architecture using Hibernate, Spring and
Wicket?

If I use OSIV I will at least never run into lazy loading exceptions,
on the other hand my transaction will live longer before being able to
commit by being uncommitted in the view as well.

Best regards, Kent

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



Re: Three tier layered application using Wicket + Spring + Hibernate. How would you handle transactions?

2009-02-10 Thread James Carman
Here's the demo code I used for a talk on wicket a while back.  It
includes OSIV and has an example of doing a repository (think DAO)

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


On Tue, Feb 10, 2009 at 3:15 AM, Kent Larsson kent.lars...@gmail.com wrote:
 Hi,

 I'm thinking about using the **Open Session In View (OSIV)** filter or
 interceptor that comes with Spring, as it seems like a convenient way
 for me as a developer. If that's what you recommend, do you recommend
 using a filter or an interceptor and why?

 I'm also wondering how it will mix with **HibernateTemplate** and if I
 will loose the ability to mark methods as *...@transactional(readOnly =
 true)** etc and thus loose the ability to get some more fine grained
 transaction control?

 Is there some kind of best practice for how to integrate this kind of
 solution with a three tier architecture using Hibernate, Spring and
 Wicket?

 If I use OSIV I will at least never run into lazy loading exceptions,
 on the other hand my transaction will live longer before being able to
 commit by being uncommitted in the view as well.

 Best regards, Kent

 -
 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: Three tier layered application using Wicket + Spring + Hibernate. How would you handle transactions?

2009-02-10 Thread Timo Rantalaiho
On Tue, 10 Feb 2009, Kent Larsson wrote:
 I'm thinking about using the **Open Session In View (OSIV)** filter or
 interceptor that comes with Spring, as it seems like a convenient way
 for me as a developer. If that's what you recommend, do you recommend
 using a filter or an interceptor and why?

What do you mean with an interceptor? If it's Spring-MVC 
specific, it cannot be used with Wicket. A Wicket equivalent 
would be a custom request cycle I suppose.

OSIV servlet filter should work OK.

 I'm also wondering how it will mix with **HibernateTemplate** and if I
 will loose the ability to mark methods as *...@transactional(readOnly =
 true)** etc and thus loose the ability to get some more fine grained
 transaction control?

It depends on what exactly you have the filter do. If you
have the Hibernate transaction manager of Spring, all Spring
*Templates should play nicely with that. Often the filter is
only made to defer closing a session until the end of the
request and transactions must still be started explicitly.
Check out what the filter code does (and how it can be
configured).

 Is there some kind of best practice for how to integrate this kind of
 solution with a three tier architecture using Hibernate, Spring and
 Wicket?

No :)

  http://www.satisfice.com/blog/archives/27

There are a lot of good examples though, the one James
posted is probably good and you should be able to find more
by searching the Wiki and this list in Nabble.

 If I use OSIV I will at least never run into lazy loading exceptions,

Not exactly. You can easily run into lazy loading exceptions
if you store your lazy-loaded objects for more than one
request and then try to access their lazy properties during
and different session than the original one.

 on the other hand my transaction will live longer before being able to
 commit by being uncommitted in the view as well.

What do you mean with this exactly?

Best wishes,
Timo

-- 
Timo Rantalaiho   
Reaktor Innovations OyURL: http://www.ri.fi/ 

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



Wicket / Spring bean annotations

2009-01-20 Thread Andrew Humphries (MEL)
Hi - 
 
Probably a simple question : We are using Spring with Wicket in our
project.  I have opted for the use of the Spring bean annotations as
described in 'Wicket in Action'.  In the chapter on integrating the two
technologies the book explains that you should use proxies instead of
direct references to Spring beans in your components, so that you don't
end up serializing your whole application context.  It then goes on to
explain the technique of annotating Spring bean references in your
components - which I gather is safe in this regard (else why would it be
recommended).  Is it also safe to pass references to the Spring beans
initialized in one component via an annotation to other components and
set them as members on those other components ?  Or will this risk app
context serialization ?
 
Thanks 
 
Andrew Humphies
Analyst/Programmer
 

This e-mail, and any attachment, is confidential. If you are not the intended 
recipient, please delete it from your system, do not use or disclose the 
information in any way, and notify the sender immediately.
Any views expressed in this message are those of the individual sender and may 
not be the views of FOXTEL, unless specifically stated. No warranty is made 
that the e-mail or attachment (s) are free from computer viruses or other 
defects.



Re: Wicket / Spring bean annotations

2009-01-20 Thread Jeremy Thomerson
Although I do not know for sure, I would think not, because my understanding
is that a proxy is created that is safe to be serialized.

However, I would ask *why* do this?  If you're passing it to another
component, why not just have that component also use an annotation?  I
wouldn't think that passing services around is typically a great use-case.

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

On Tue, Jan 20, 2009 at 6:00 PM, Andrew Humphries (MEL) 
andrew.humphr...@foxtel.com.au wrote:

 Hi -

 Probably a simple question : We are using Spring with Wicket in our
 project.  I have opted for the use of the Spring bean annotations as
 described in 'Wicket in Action'.  In the chapter on integrating the two
 technologies the book explains that you should use proxies instead of
 direct references to Spring beans in your components, so that you don't
 end up serializing your whole application context.  It then goes on to
 explain the technique of annotating Spring bean references in your
 components - which I gather is safe in this regard (else why would it be
 recommended).  Is it also safe to pass references to the Spring beans
 initialized in one component via an annotation to other components and
 set them as members on those other components ?  Or will this risk app
 context serialization ?

 Thanks

 Andrew Humphies
 Analyst/Programmer


 This e-mail, and any attachment, is confidential. If you are not the
 intended recipient, please delete it from your system, do not use or
 disclose the information in any way, and notify the sender immediately.
 Any views expressed in this message are those of the individual sender and
 may not be the views of FOXTEL, unless specifically stated. No warranty is
 made that the e-mail or attachment (s) are free from computer viruses or
 other defects.




RE: Wicket / Spring bean annotations

2009-01-20 Thread Andrew Humphries (MEL)
Thanks for your quick answer Jeremy.

 However, I would ask *why* do this?  If you're passing it to another
component, why not just have that component also use an annotation?  I
wouldn't 
 think that passing services around is typically a great use-case.

Yes, you're right, theres no point in annotating some components and not
others, and then passing around the reference.  I'll stick to doing
that, but I was also intersted out of curiosity.

Andrew

-Original Message-
From: Jeremy Thomerson [mailto:jer...@wickettraining.com] 
Sent: Wednesday, 21 January 2009 11:03 AM
To: users@wicket.apache.org
Subject: Re: Wicket / Spring bean annotations

Although I do not know for sure, I would think not, because my
understanding is that a proxy is created that is safe to be serialized.

However, I would ask *why* do this?  If you're passing it to another
component, why not just have that component also use an annotation?  I
wouldn't think that passing services around is typically a great
use-case.

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

On Tue, Jan 20, 2009 at 6:00 PM, Andrew Humphries (MEL) 
andrew.humphr...@foxtel.com.au wrote:

 Hi -

 Probably a simple question : We are using Spring with Wicket in our 
 project.  I have opted for the use of the Spring bean annotations as 
 described in 'Wicket in Action'.  In the chapter on integrating the 
 two technologies the book explains that you should use proxies instead

 of direct references to Spring beans in your components, so that you 
 don't end up serializing your whole application context.  It then goes

 on to explain the technique of annotating Spring bean references in 
 your components - which I gather is safe in this regard (else why 
 would it be recommended).  Is it also safe to pass references to the 
 Spring beans initialized in one component via an annotation to other 
 components and set them as members on those other components ?  Or 
 will this risk app context serialization ?

 Thanks

 Andrew Humphies
 Analyst/Programmer


 This e-mail, and any attachment, is confidential. If you are not the 
 intended recipient, please delete it from your system, do not use or 
 disclose the information in any way, and notify the sender
immediately.
 Any views expressed in this message are those of the individual sender

 and may not be the views of FOXTEL, unless specifically stated. No 
 warranty is made that the e-mail or attachment (s) are free from 
 computer viruses or other defects.



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



Re: Wicket / Spring bean annotations

2009-01-20 Thread James Carman
However, if you're not writing those other components, you have no
choice.  So, this case does show up.

On Tue, Jan 20, 2009 at 7:15 PM, Andrew Humphries (MEL)
andrew.humphr...@foxtel.com.au wrote:
 Thanks for your quick answer Jeremy.

 However, I would ask *why* do this?  If you're passing it to another
 component, why not just have that component also use an annotation?  I
 wouldn't
 think that passing services around is typically a great use-case.

 Yes, you're right, theres no point in annotating some components and not
 others, and then passing around the reference.  I'll stick to doing
 that, but I was also intersted out of curiosity.

 Andrew

 -Original Message-
 From: Jeremy Thomerson [mailto:jer...@wickettraining.com]
 Sent: Wednesday, 21 January 2009 11:03 AM
 To: users@wicket.apache.org
 Subject: Re: Wicket / Spring bean annotations

 Although I do not know for sure, I would think not, because my
 understanding is that a proxy is created that is safe to be serialized.

 However, I would ask *why* do this?  If you're passing it to another
 component, why not just have that component also use an annotation?  I
 wouldn't think that passing services around is typically a great
 use-case.

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

 On Tue, Jan 20, 2009 at 6:00 PM, Andrew Humphries (MEL) 
 andrew.humphr...@foxtel.com.au wrote:

 Hi -

 Probably a simple question : We are using Spring with Wicket in our
 project.  I have opted for the use of the Spring bean annotations as
 described in 'Wicket in Action'.  In the chapter on integrating the
 two technologies the book explains that you should use proxies instead

 of direct references to Spring beans in your components, so that you
 don't end up serializing your whole application context.  It then goes

 on to explain the technique of annotating Spring bean references in
 your components - which I gather is safe in this regard (else why
 would it be recommended).  Is it also safe to pass references to the
 Spring beans initialized in one component via an annotation to other
 components and set them as members on those other components ?  Or
 will this risk app context serialization ?

 Thanks

 Andrew Humphies
 Analyst/Programmer


 This e-mail, and any attachment, is confidential. If you are not the
 intended recipient, please delete it from your system, do not use or
 disclose the information in any way, and notify the sender
 immediately.
 Any views expressed in this message are those of the individual sender

 and may not be the views of FOXTEL, unless specifically stated. No
 warranty is made that the e-mail or attachment (s) are free from
 computer viruses or other defects.



 -
 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 bean annotations

2009-01-20 Thread Igor Vaynberg
there is a point, however, to passing references to injected
dependencies into models and dataproviders - something you cannot do
with wicket's proxy.

-igor

On Tue, Jan 20, 2009 at 4:15 PM, Andrew Humphries (MEL)
andrew.humphr...@foxtel.com.au wrote:
 Thanks for your quick answer Jeremy.

 However, I would ask *why* do this?  If you're passing it to another
 component, why not just have that component also use an annotation?  I
 wouldn't
 think that passing services around is typically a great use-case.

 Yes, you're right, theres no point in annotating some components and not
 others, and then passing around the reference.  I'll stick to doing
 that, but I was also intersted out of curiosity.

 Andrew

 -Original Message-
 From: Jeremy Thomerson [mailto:jer...@wickettraining.com]
 Sent: Wednesday, 21 January 2009 11:03 AM
 To: users@wicket.apache.org
 Subject: Re: Wicket / Spring bean annotations

 Although I do not know for sure, I would think not, because my
 understanding is that a proxy is created that is safe to be serialized.

 However, I would ask *why* do this?  If you're passing it to another
 component, why not just have that component also use an annotation?  I
 wouldn't think that passing services around is typically a great
 use-case.

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

 On Tue, Jan 20, 2009 at 6:00 PM, Andrew Humphries (MEL) 
 andrew.humphr...@foxtel.com.au wrote:

 Hi -

 Probably a simple question : We are using Spring with Wicket in our
 project.  I have opted for the use of the Spring bean annotations as
 described in 'Wicket in Action'.  In the chapter on integrating the
 two technologies the book explains that you should use proxies instead

 of direct references to Spring beans in your components, so that you
 don't end up serializing your whole application context.  It then goes

 on to explain the technique of annotating Spring bean references in
 your components - which I gather is safe in this regard (else why
 would it be recommended).  Is it also safe to pass references to the
 Spring beans initialized in one component via an annotation to other
 components and set them as members on those other components ?  Or
 will this risk app context serialization ?

 Thanks

 Andrew Humphies
 Analyst/Programmer


 This e-mail, and any attachment, is confidential. If you are not the
 intended recipient, please delete it from your system, do not use or
 disclose the information in any way, and notify the sender
 immediately.
 Any views expressed in this message are those of the individual sender

 and may not be the views of FOXTEL, unless specifically stated. No
 warranty is made that the e-mail or attachment (s) are free from
 computer viruses or other defects.



 -
 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 bean annotations

2009-01-20 Thread Igor Vaynberg
erm. s/with/without/ :)

-igor

On Tue, Jan 20, 2009 at 5:47 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote:
 there is a point, however, to passing references to injected
 dependencies into models and dataproviders - something you cannot do
 with wicket's proxy.

 -igor

 On Tue, Jan 20, 2009 at 4:15 PM, Andrew Humphries (MEL)
 andrew.humphr...@foxtel.com.au wrote:
 Thanks for your quick answer Jeremy.

 However, I would ask *why* do this?  If you're passing it to another
 component, why not just have that component also use an annotation?  I
 wouldn't
 think that passing services around is typically a great use-case.

 Yes, you're right, theres no point in annotating some components and not
 others, and then passing around the reference.  I'll stick to doing
 that, but I was also intersted out of curiosity.

 Andrew

 -Original Message-
 From: Jeremy Thomerson [mailto:jer...@wickettraining.com]
 Sent: Wednesday, 21 January 2009 11:03 AM
 To: users@wicket.apache.org
 Subject: Re: Wicket / Spring bean annotations

 Although I do not know for sure, I would think not, because my
 understanding is that a proxy is created that is safe to be serialized.

 However, I would ask *why* do this?  If you're passing it to another
 component, why not just have that component also use an annotation?  I
 wouldn't think that passing services around is typically a great
 use-case.

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

 On Tue, Jan 20, 2009 at 6:00 PM, Andrew Humphries (MEL) 
 andrew.humphr...@foxtel.com.au wrote:

 Hi -

 Probably a simple question : We are using Spring with Wicket in our
 project.  I have opted for the use of the Spring bean annotations as
 described in 'Wicket in Action'.  In the chapter on integrating the
 two technologies the book explains that you should use proxies instead

 of direct references to Spring beans in your components, so that you
 don't end up serializing your whole application context.  It then goes

 on to explain the technique of annotating Spring bean references in
 your components - which I gather is safe in this regard (else why
 would it be recommended).  Is it also safe to pass references to the
 Spring beans initialized in one component via an annotation to other
 components and set them as members on those other components ?  Or
 will this risk app context serialization ?

 Thanks

 Andrew Humphies
 Analyst/Programmer


 This e-mail, and any attachment, is confidential. If you are not the
 intended recipient, please delete it from your system, do not use or
 disclose the information in any way, and notify the sender
 immediately.
 Any views expressed in this message are those of the individual sender

 and may not be the views of FOXTEL, unless specifically stated. No
 warranty is made that the e-mail or attachment (s) are free from
 computer viruses or other defects.



 -
 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-tomcat integration

2008-12-15 Thread Arie Fishler
Hi,

I am using wicket via tomcat integrated into spring using a filter with *

org*.*apache*.*wicket*.protocol.*http*.WicketFilter

The thing is that I want to map the wicket application to several url
patterns (to know which environment the user is coming from)



Is there a way to map the filter to several patterns? like the below which
does not work...

filter-mapping

filter-nameWicketFilter/filter-name

url-pattern/*a*/*/url-pattern

/filter-mapping

and

filter-mapping

filter-nameWicketFilter/filter-name

url-pattern/*b*/*/url-pattern

/filter-mapping


Re: Wicket-spring-tomcat integration

2008-12-15 Thread Richard Allen
The url-pattern only supports using a wildcard at the end of the pattern
(e.g., /myapp/*) or as a extension mapping prefix (e.g., *.do). See
section SRV.11.2 of the servlet specification, which can be downloaded from
here:
http://jcp.org/aboutJava/communityprocess/final/jsr154/index.html

Therefore, I believe the closest you could do would be

filter-nameWicketFilter/filter-name
url-pattern/a/*/url-pattern

...

filter-nameWicketFilter/filter-name
url-pattern/b/*/url-pattern

If that doesn't suit your needs, you might need to extend WicketFilter with
a custom implementation.


On Mon, Dec 15, 2008 at 3:11 AM, Arie Fishler arie@gmail.com wrote:

 Hi,

 I am using wicket via tomcat integrated into spring using a filter with *

 org*.*apache*.*wicket*.protocol.*http*.WicketFilter

 The thing is that I want to map the wicket application to several url
 patterns (to know which environment the user is coming from)



 Is there a way to map the filter to several patterns? like the below which
 does not work...

 filter-mapping

 filter-nameWicketFilter/filter-name

 url-pattern/*a*/*/url-pattern

 /filter-mapping

 and

 filter-mapping

 filter-nameWicketFilter/filter-name

 url-pattern/*b*/*/url-pattern

 /filter-mapping



Wicket-Spring Injection

2008-11-27 Thread Arie Fishler
Hi,

I have some injection related issues in my wicket application.

1. My session hold a bean (managed by the spring container) that is passed
to it on construction of the session. It is not a Serializable object (some
of the interfaces that this object is using are spring interfaces and not
serializable by themselves) and in any case I would not like this object to
be serialized by wicket.

This object is not injected directly to the session since it depends on some
parameters provided in the http request.

Will it be ok to plug into the session's deserializing method and get this
object not to be null?

2. My authentication uses a proprietary User  class that uses AOP with the
@Configurable annotation. After invalidating the session (user loggs out)
any other user trying to login seems to run into problems that are caused
from the fact that it seems AOP is not working anymore on this class and the
objects supposed to be injected into it are not injected anymore. When I
restart my wicket application (on tomcat) after clearing the tomcat saved
caches...all seems to be okuntil the next time. What might cause spring
to stop injecting the objects using AOP?

Thanks,
Arie


Re: Wicket-Spring Injection

2008-11-27 Thread Igor Vaynberg
On Thu, Nov 27, 2008 at 4:44 AM, Arie Fishler [EMAIL PROTECTED] wrote:
 Hi,

 I have some injection related issues in my wicket application.

 1. My session hold a bean (managed by the spring container) that is passed
 to it on construction of the session. It is not a Serializable object (some
 of the interfaces that this object is using are spring interfaces and not
 serializable by themselves) and in any case I would not like this object to
 be serialized by wicket.

 This object is not injected directly to the session since it depends on some
 parameters provided in the http request.

 Will it be ok to plug into the session's deserializing method and get this
 object not to be null?

session cannot keep anything that is not serializable - that is the
http spec. what you should do is stick the object into some
application-bound map and store the key in session (clustering wont
work).

 2. My authentication uses a proprietary User  class that uses AOP with the
 @Configurable annotation. After invalidating the session (user loggs out)
 any other user trying to login seems to run into problems that are caused
 from the fact that it seems AOP is not working anymore on this class and the
 objects supposed to be injected into it are not injected anymore. When I
 restart my wicket application (on tomcat) after clearing the tomcat saved
 caches...all seems to be okuntil the next time. What might cause spring
 to stop injecting the objects using AOP?

wicket is not involved with @configurable, you should ask on spring forums

-igor


 Thanks,
 Arie


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: wicket-spring dependency in maven repository

2008-11-04 Thread Antony Stubbs

I've opened a jira issue
https://issues.apache.org/jira/browse/WICKET-1913



Erik van Oosten wrote:
 
 Doug Donohoe wrote:
 I'm using wicket-spring-annot and ran into a small problem with maven
 dependencies.  The wicket-spring-annot project depends on wicket-spring.

   
 
 This has come up a number of times already. Hopefully not as often in 
 the future as it is now also on the wiki :)
 http://cwiki.apache.org/WICKET/spring.html
 
 Regards,
 Erik.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 


-
___

http://stubbisms.wordpress.com http://stubbisms.wordpress.com 
-- 
View this message in context: 
http://www.nabble.com/wicket-spring-dependency-in-maven-repository-tp16764208p2034.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Wicket + spring + jpa/ hibernate = lazy load exception

2008-11-03 Thread JulianS

I am experiencing exactly the problem outlined in the subject of this post,
and I would really appreciate any help I can get, as I am under a deadline.
It's the first time I'm using Wicket with JPA, and I just don't understand
why this isn't working. 

I have a Wicket dataprovider that looks like this (I've simplified it a
bit):

public abstract class FooDataProvider extends SortableDataProvider
{
private static final long serialVersionUID = 1L;

@SpringBean
protected MyAPI myApi;

public FooDataProvider()
{
super();
// Injects the spring bean
InjectorHolder.getInjector().inject(this); 
}

public Iterator iterator(final int first, final int count)
{
ListBar bars = myApi.getBars();
ListFoo foos = bars.getFoos();
return foos.iterator();
}
}

I am using a very standard Spring JPA setup, and my web.xml includes a
OpenEntityManagerInViewFilter. The spring bean is being injected properly,
and my list of Bar is returned correctly. But I get a
LazyInitializationException no matter what I try. What am I doing wrong?

Many thanks,
Julian

-- 
View this message in context: 
http://www.nabble.com/wicket-%2B-spring-%2B-jpa--hibernate-%3D-lazy-load-exception-tp19721199p20308559.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicket + spring + jpa/ hibernate = lazy load exception

2008-11-03 Thread JulianS

Oops...I meant:

Bar bar = myApi.getBar();
ListFoo foos = bar.getFoos();


JulianS wrote:
 
 I am experiencing exactly the problem outlined in the subject of this
 post, and I would really appreciate any help I can get, as I am under a
 deadline. It's the first time I'm using Wicket with JPA, and I just don't
 understand why this isn't working. 
 
 I have a Wicket dataprovider that looks like this (I've simplified it a
 bit):
 
 public abstract class FooDataProvider extends SortableDataProvider
 {
   private static final long serialVersionUID = 1L;
 
   @SpringBean
   protected MyAPI myApi;
   
   public FooDataProvider()
   {
   super();
   // Injects the spring bean
   InjectorHolder.getInjector().inject(this); 
   }
 
   public Iterator iterator(final int first, final int count)
   {
   ListBar bars = myApi.getBars();
   ListFoo foos = bars.getFoos();
   return foos.iterator();
   }
 }
 
 I am using a very standard Spring JPA setup, and my web.xml includes a
 OpenEntityManagerInViewFilter. The spring bean is being injected properly,
 and my list of Bar is returned correctly. But I get a
 LazyInitializationException no matter what I try. What am I doing wrong?
 
 Many thanks,
 Julian
 
 

-- 
View this message in context: 
http://www.nabble.com/wicket-%2B-spring-%2B-jpa--hibernate-%3D-lazy-load-exception-tp19721199p20309299.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicket + spring + jpa/ hibernate = lazy load exception

2008-11-03 Thread James Perry
Firstly, your code is rather strange. That getFoos() method is not part of
the List Interface API.

Two possible solutions:

The filter chain maybe incorrect in your web.xml. Your
OpenEntityManagerInViewFilter might not be preceding the Wicket filter.
Check that it does precede it.

If you have a deadline then I recommend having one query that retrieving
both foos and bars in one hit. I've never touched JPQL but in Hibernate
Query Language (HQL), one could write this:

select f from Foo f inner join fetch f.boo b where b.id = :id

Good luck,
James.

On Mon, Nov 3, 2008 at 7:04 PM, JulianS [EMAIL PROTECTED] wrote:


 I am experiencing exactly the problem outlined in the subject of this post,
 and I would really appreciate any help I can get, as I am under a deadline.
 It's the first time I'm using Wicket with JPA, and I just don't understand
 why this isn't working.

 I have a Wicket dataprovider that looks like this (I've simplified it a
 bit):

 public abstract class FooDataProvider extends SortableDataProvider
 {
private static final long serialVersionUID = 1L;

@SpringBean
protected MyAPI myApi;

public FooDataProvider()
{
super();
// Injects the spring bean
InjectorHolder.getInjector().inject(this);
}

public Iterator iterator(final int first, final int count)
{
ListBar bars = myApi.getBars();
ListFoo foos = bars.getFoos();
return foos.iterator();
}
 }

 I am using a very standard Spring JPA setup, and my web.xml includes a
 OpenEntityManagerInViewFilter. The spring bean is being injected properly,
 and my list of Bar is returned correctly. But I get a
 LazyInitializationException no matter what I try. What am I doing wrong?

 Many thanks,
 Julian

 --
 View this message in context:
 http://www.nabble.com/wicket-%2B-spring-%2B-jpa--hibernate-%3D-lazy-load-exception-tp19721199p20308559.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: Wicket + spring + jpa/ hibernate = lazy load exception

2008-11-03 Thread Igor Vaynberg
what is your dataprovider#model() look like? are you using a loadable
detachable model?

-igor

On Mon, Nov 3, 2008 at 11:04 AM, JulianS [EMAIL PROTECTED] wrote:

 I am experiencing exactly the problem outlined in the subject of this post,
 and I would really appreciate any help I can get, as I am under a deadline.
 It's the first time I'm using Wicket with JPA, and I just don't understand
 why this isn't working.

 I have a Wicket dataprovider that looks like this (I've simplified it a
 bit):

 public abstract class FooDataProvider extends SortableDataProvider
 {
private static final long serialVersionUID = 1L;

@SpringBean
protected MyAPI myApi;

public FooDataProvider()
{
super();
// Injects the spring bean
InjectorHolder.getInjector().inject(this);
}

public Iterator iterator(final int first, final int count)
{
ListBar bars = myApi.getBars();
ListFoo foos = bars.getFoos();
return foos.iterator();
}
 }

 I am using a very standard Spring JPA setup, and my web.xml includes a
 OpenEntityManagerInViewFilter. The spring bean is being injected properly,
 and my list of Bar is returned correctly. But I get a
 LazyInitializationException no matter what I try. What am I doing wrong?

 Many thanks,
 Julian

 --
 View this message in context: 
 http://www.nabble.com/wicket-%2B-spring-%2B-jpa--hibernate-%3D-lazy-load-exception-tp19721199p20308559.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicket + spring + jpa/ hibernate = lazy load exception

2008-11-03 Thread JulianS

Igor,

I'm not using a loadable detachable model because I was hoping to get the
list of foos directly from the Bar object, as opposed to having a dedicated
dao method to get the list of foos, which seems to defeat the benefit of
using JPA's object chaining. To answer your question, here's my
implementation of dataprovider#model():

public IModel model(Object object)
{
return new Model((Serializable) object);
}

Of course, it's very possible I'm missing a fundamental point about loadable
detachable models...



igor.vaynberg wrote:
 
 what is your dataprovider#model() look like? are you using a loadable
 detachable model?
 
 -igor
 
 On Mon, Nov 3, 2008 at 11:04 AM, JulianS [EMAIL PROTECTED] wrote:

 I am experiencing exactly the problem outlined in the subject of this
 post,
 and I would really appreciate any help I can get, as I am under a
 deadline.
 It's the first time I'm using Wicket with JPA, and I just don't
 understand
 why this isn't working.

 I have a Wicket dataprovider that looks like this (I've simplified it a
 bit):

 public abstract class FooDataProvider extends SortableDataProvider
 {
private static final long serialVersionUID = 1L;

@SpringBean
protected MyAPI myApi;

public FooDataProvider()
{
super();
// Injects the spring bean
InjectorHolder.getInjector().inject(this);
}

public Iterator iterator(final int first, final int count)
{
ListBar bars = myApi.getBars();
ListFoo foos = bars.getFoos();
return foos.iterator();
}
 }

 I am using a very standard Spring JPA setup, and my web.xml includes a
 OpenEntityManagerInViewFilter. The spring bean is being injected
 properly,
 and my list of Bar is returned correctly. But I get a
 LazyInitializationException no matter what I try. What am I doing wrong?

 Many thanks,
 Julian

 --
 View this message in context:
 http://www.nabble.com/wicket-%2B-spring-%2B-jpa--hibernate-%3D-lazy-load-exception-tp19721199p20308559.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/wicket-%2B-spring-%2B-jpa--hibernate-%3D-lazy-load-exception-tp19721199p20310904.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicket + spring + jpa/ hibernate = lazy load exception

2008-11-03 Thread JulianS

James, thanks for your reply. I've checked that my
OpenEntityManagerInViewFilter precedes the Wicket filter. And my debug log
indeed shows that it seems to be opening and closing the entity manager
before and after the wicket filter runs. I'm hoping to avoid the type of
query you suggest, but I'm realizing I may need to resort to it.

Julian


msc65jap wrote:
 
 Firstly, your code is rather strange. That getFoos() method is not part of
 the List Interface API.
 
 Two possible solutions:
 
 The filter chain maybe incorrect in your web.xml. Your
 OpenEntityManagerInViewFilter might not be preceding the Wicket filter.
 Check that it does precede it.
 
 If you have a deadline then I recommend having one query that retrieving
 both foos and bars in one hit. I've never touched JPQL but in Hibernate
 Query Language (HQL), one could write this:
 
 select f from Foo f inner join fetch f.boo b where b.id = :id
 
 Good luck,
 James.
 
 On Mon, Nov 3, 2008 at 7:04 PM, JulianS [EMAIL PROTECTED] wrote:
 

 I am experiencing exactly the problem outlined in the subject of this
 post,
 and I would really appreciate any help I can get, as I am under a
 deadline.
 It's the first time I'm using Wicket with JPA, and I just don't
 understand
 why this isn't working.

 I have a Wicket dataprovider that looks like this (I've simplified it a
 bit):

 public abstract class FooDataProvider extends SortableDataProvider
 {
private static final long serialVersionUID = 1L;

@SpringBean
protected MyAPI myApi;

public FooDataProvider()
{
super();
// Injects the spring bean
InjectorHolder.getInjector().inject(this);
}

public Iterator iterator(final int first, final int count)
{
ListBar bars = myApi.getBars();
ListFoo foos = bars.getFoos();
return foos.iterator();
}
 }

 I am using a very standard Spring JPA setup, and my web.xml includes a
 OpenEntityManagerInViewFilter. The spring bean is being injected
 properly,
 and my list of Bar is returned correctly. But I get a
 LazyInitializationException no matter what I try. What am I doing wrong?

 Many thanks,
 Julian

 --
 View this message in context:
 http://www.nabble.com/wicket-%2B-spring-%2B-jpa--hibernate-%3D-lazy-load-exception-tp19721199p20308559.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 
 

-- 
View this message in context: 
http://www.nabble.com/wicket-%2B-spring-%2B-jpa--hibernate-%3D-lazy-load-exception-tp19721199p20310970.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicket + spring + jpa/ hibernate = lazy load exception

2008-11-03 Thread Igor Vaynberg
On Mon, Nov 3, 2008 at 2:09 PM, JulianS [EMAIL PROTECTED] wrote:

To answer your question, here's my
 implementation of dataprovider#model():

public IModel model(Object object)
{
return new Model((Serializable) object);
}

 Of course, it's very possible I'm missing a fundamental point about loadable
 detachable models...

yes, you are missing a very fundmental point about models and the
reason for your lazy init exception is that you are using Model. there
are quiet a lot of threads on this list that explain and show how to
fix your error. i suggest you search the archives, read the models
page on the wiki, and go to wicketinaction.com and search for smart
entitymodel.

-igor





 igor.vaynberg wrote:

 what is your dataprovider#model() look like? are you using a loadable
 detachable model?

 -igor

 On Mon, Nov 3, 2008 at 11:04 AM, JulianS [EMAIL PROTECTED] wrote:

 I am experiencing exactly the problem outlined in the subject of this
 post,
 and I would really appreciate any help I can get, as I am under a
 deadline.
 It's the first time I'm using Wicket with JPA, and I just don't
 understand
 why this isn't working.

 I have a Wicket dataprovider that looks like this (I've simplified it a
 bit):

 public abstract class FooDataProvider extends SortableDataProvider
 {
private static final long serialVersionUID = 1L;

@SpringBean
protected MyAPI myApi;

public FooDataProvider()
{
super();
// Injects the spring bean
InjectorHolder.getInjector().inject(this);
}

public Iterator iterator(final int first, final int count)
{
ListBar bars = myApi.getBars();
ListFoo foos = bars.getFoos();
return foos.iterator();
}
 }

 I am using a very standard Spring JPA setup, and my web.xml includes a
 OpenEntityManagerInViewFilter. The spring bean is being injected
 properly,
 and my list of Bar is returned correctly. But I get a
 LazyInitializationException no matter what I try. What am I doing wrong?

 Many thanks,
 Julian

 --
 View this message in context:
 http://www.nabble.com/wicket-%2B-spring-%2B-jpa--hibernate-%3D-lazy-load-exception-tp19721199p20308559.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




 --
 View this message in context: 
 http://www.nabble.com/wicket-%2B-spring-%2B-jpa--hibernate-%3D-lazy-load-exception-tp19721199p20310904.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: wicket + spring + jpa/ hibernate = lazy load exception

2008-10-09 Thread Lutz Müller
It might work if you dont have any ajax on your page. otherwise each ajax call 
happens in a new request and causes your domain object to be retrieved from 
the database.
this way you lose every change made to your object. writing all changes to 
database before detaching can be an option, but then you might persist 
something to your datastore that is in the midst of being edited.
i would be glad to offer a solution to the problems i just brought up, but i 
am struggling with this problem ever since i started using wicket.

On Tuesday 30 September 2008 08:40:11 Nino Saturnino Martinez Vazquez Wael 
wrote:
 Yup the way that I do it too almost down to every line:)

 Michael Sparer wrote:
  When using the OSIV-filter the lazyload exception may only happen if the
  same entity is used among different requests ... sothat it gets detached
  from hibernate. have a look at
  http://talk-on-tech.blogspot.com/2008/05/custom-reuseable-loadabledetacha
 blemode.html ... that's the way we're doing it
 
  regards,
  Michael
 
  Korbinian Bachl - privat wrote:
   I think it could be something about
missing usage of loadabledetachable model..?
 
  not for me, as the original entity is pulled using an
  loadabledetachableModel via a SortedDataProvider :/
 
  if you look around, the all called solution for this is the
  OpenSessionInViewFilter and the usage of
  bean id=transactionManager
  class=org.springframework.orm.jpa.JpaTransactionManager
  for that (latter one is used by me, too)
 
  However, the OpenSessionInViewFilter will not work with wicket, even if
  mapped to /* in the web.xml
 
  Best,
 
  Korbinian
 
  Nino Saturnino Martinez Vazquez Wael schrieb:
  Hi Korbinian
 
  Im facing the same problems... I also use extended.. So gonna be great
  to see the outcome of this thread.. I think it could be something about
  missing usage of loadabledetachable model..?
 
  Korbinian Bachl - privat wrote:
  Hi,
 
  I'm currently struggling with the famous lazy load exception under
  spring + jpa with wicket.
 
  The problem is, in my case, that i pull an entity from the database
  using a spring-bean (@SpringBean) and JPA (hibernate). Then in the
  wicket class i need to walk the entity tree a bit, based on the needs
  of the user (preloading wont work, as i dont know the direction the
  user wants to walk and the whole entity tree is too complex to grab it
  all at once).
 
  If I use the Entity myEntity.getMyOtherConnectedEntity I get the lazy
  load exception (transaction already closed). So I tried to use the
  OpenSessionInViewFilter to solve this, but it just won't work - no
  reason why, as the error stays exactly the same.
 
  Currently I ended up using this:
  @PersistenceContext(type = PersistenceContextType.EXTENDED)
  private EntityManager em;
 
  However, I'm not sure if this is the way it is supposed to be?
  ( I read so far that this disables a big part of springs-transaction
  handling support but didnt see any impacts so far)
 
  Has anyone a different aproach/ solution for this using wicket +
  spring with JPA?
 
  Best,
 
  Korbinan
 
  PS: im on wicket 1.4-m3
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
  -
  Michael Sparer
  http://talk-on-tech.blogspot.com



Re: wicket + spring + jpa/ hibernate = lazy load exception

2008-10-09 Thread Michael Sparer

you mean changing each property of an existing object by means of ajax? if
the object is serializable, clone the object and perform the changes on that
object ... if it isn't set the properties in your form and apply them
onsubmit ... or am I missing the point completely?


Lutz Müller wrote:
 
 It might work if you dont have any ajax on your page. otherwise each ajax
 call 
 happens in a new request and causes your domain object to be retrieved
 from 
 the database.
 this way you lose every change made to your object. writing all changes to 
 database before detaching can be an option, but then you might persist 
 something to your datastore that is in the midst of being edited.
 i would be glad to offer a solution to the problems i just brought up, but
 i 
 am struggling with this problem ever since i started using wicket.
 
 On Tuesday 30 September 2008 08:40:11 Nino Saturnino Martinez Vazquez Wael 
 wrote:
 Yup the way that I do it too almost down to every line:)

 Michael Sparer wrote:
  When using the OSIV-filter the lazyload exception may only happen if
 the
  same entity is used among different requests ... sothat it gets
 detached
  from hibernate. have a look at
 
 http://talk-on-tech.blogspot.com/2008/05/custom-reuseable-loadabledetacha
 blemode.html ... that's the way we're doing it
 
  regards,
  Michael
 
  Korbinian Bachl - privat wrote:
   I think it could be something about
missing usage of loadabledetachable model..?
 
  not for me, as the original entity is pulled using an
  loadabledetachableModel via a SortedDataProvider :/
 
  if you look around, the all called solution for this is the
  OpenSessionInViewFilter and the usage of
  bean id=transactionManager
  class=org.springframework.orm.jpa.JpaTransactionManager
  for that (latter one is used by me, too)
 
  However, the OpenSessionInViewFilter will not work with wicket, even
 if
  mapped to /* in the web.xml
 
  Best,
 
  Korbinian
 
  Nino Saturnino Martinez Vazquez Wael schrieb:
  Hi Korbinian
 
  Im facing the same problems... I also use extended.. So gonna be
 great
  to see the outcome of this thread.. I think it could be something
 about
  missing usage of loadabledetachable model..?
 
  Korbinian Bachl - privat wrote:
  Hi,
 
  I'm currently struggling with the famous lazy load exception under
  spring + jpa with wicket.
 
  The problem is, in my case, that i pull an entity from the database
  using a spring-bean (@SpringBean) and JPA (hibernate). Then in the
  wicket class i need to walk the entity tree a bit, based on the
 needs
  of the user (preloading wont work, as i dont know the direction the
  user wants to walk and the whole entity tree is too complex to grab
 it
  all at once).
 
  If I use the Entity myEntity.getMyOtherConnectedEntity I get the
 lazy
  load exception (transaction already closed). So I tried to use the
  OpenSessionInViewFilter to solve this, but it just won't work - no
  reason why, as the error stays exactly the same.
 
  Currently I ended up using this:
  @PersistenceContext(type = PersistenceContextType.EXTENDED)
  private EntityManager em;
 
  However, I'm not sure if this is the way it is supposed to be?
  ( I read so far that this disables a big part of springs-transaction
  handling support but didnt see any impacts so far)
 
  Has anyone a different aproach/ solution for this using wicket +
  spring with JPA?
 
  Best,
 
  Korbinan
 
  PS: im on wicket 1.4-m3
 
 
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
  -
  Michael Sparer
  http://talk-on-tech.blogspot.com
 
 
 


-
Michael Sparer
http://talk-on-tech.blogspot.com
-- 
View this message in context: 
http://www.nabble.com/wicket-%2B-spring-%2B-jpa--hibernate-%3D-lazy-load-exception-tp19721199p19899635.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: wicket + spring + jpa/ hibernate = lazy load exception

2008-10-09 Thread Igor Vaynberg
maybe this will help

http://wicketinaction.com/2008/09/building-a-smart-entitymodel/

-igor

On Thu, Oct 9, 2008 at 7:02 AM, Michael Sparer [EMAIL PROTECTED] wrote:

 you mean changing each property of an existing object by means of ajax? if
 the object is serializable, clone the object and perform the changes on that
 object ... if it isn't set the properties in your form and apply them
 onsubmit ... or am I missing the point completely?


 Lutz Müller wrote:

 It might work if you dont have any ajax on your page. otherwise each ajax
 call
 happens in a new request and causes your domain object to be retrieved
 from
 the database.
 this way you lose every change made to your object. writing all changes to
 database before detaching can be an option, but then you might persist
 something to your datastore that is in the midst of being edited.
 i would be glad to offer a solution to the problems i just brought up, but
 i
 am struggling with this problem ever since i started using wicket.

 On Tuesday 30 September 2008 08:40:11 Nino Saturnino Martinez Vazquez Wael
 wrote:
 Yup the way that I do it too almost down to every line:)

 Michael Sparer wrote:
  When using the OSIV-filter the lazyload exception may only happen if
 the
  same entity is used among different requests ... sothat it gets
 detached
  from hibernate. have a look at
 
 http://talk-on-tech.blogspot.com/2008/05/custom-reuseable-loadabledetacha
 blemode.html ... that's the way we're doing it
 
  regards,
  Michael
 
  Korbinian Bachl - privat wrote:
   I think it could be something about
missing usage of loadabledetachable model..?
 
  not for me, as the original entity is pulled using an
  loadabledetachableModel via a SortedDataProvider :/
 
  if you look around, the all called solution for this is the
  OpenSessionInViewFilter and the usage of
  bean id=transactionManager
  class=org.springframework.orm.jpa.JpaTransactionManager
  for that (latter one is used by me, too)
 
  However, the OpenSessionInViewFilter will not work with wicket, even
 if
  mapped to /* in the web.xml
 
  Best,
 
  Korbinian
 
  Nino Saturnino Martinez Vazquez Wael schrieb:
  Hi Korbinian
 
  Im facing the same problems... I also use extended.. So gonna be
 great
  to see the outcome of this thread.. I think it could be something
 about
  missing usage of loadabledetachable model..?
 
  Korbinian Bachl - privat wrote:
  Hi,
 
  I'm currently struggling with the famous lazy load exception under
  spring + jpa with wicket.
 
  The problem is, in my case, that i pull an entity from the database
  using a spring-bean (@SpringBean) and JPA (hibernate). Then in the
  wicket class i need to walk the entity tree a bit, based on the
 needs
  of the user (preloading wont work, as i dont know the direction the
  user wants to walk and the whole entity tree is too complex to grab
 it
  all at once).
 
  If I use the Entity myEntity.getMyOtherConnectedEntity I get the
 lazy
  load exception (transaction already closed). So I tried to use the
  OpenSessionInViewFilter to solve this, but it just won't work - no
  reason why, as the error stays exactly the same.
 
  Currently I ended up using this:
  @PersistenceContext(type = PersistenceContextType.EXTENDED)
  private EntityManager em;
 
  However, I'm not sure if this is the way it is supposed to be?
  ( I read so far that this disables a big part of springs-transaction
  handling support but didnt see any impacts so far)
 
  Has anyone a different aproach/ solution for this using wicket +
  spring with JPA?
 
  Best,
 
  Korbinan
 
  PS: im on wicket 1.4-m3
 
 
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
  -
  Michael Sparer
  http://talk-on-tech.blogspot.com





 -
 Michael Sparer
 http://talk-on-tech.blogspot.com
 --
 View this message in context: 
 http://www.nabble.com/wicket-%2B-spring-%2B-jpa--hibernate-%3D-lazy-load-exception-tp19721199p19899635.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: wicket + spring + jpa/ hibernate = lazy load exception

2008-10-09 Thread Nino Saturnino Martinez Vazquez Wael

Hi Lutz

I agree, there is something to this.. However it's not wicket related.. 
I know that Bjarni are hacking away at something, I've dicussed a few 
things with him.


I guess if you are creating entities then you can store your data in a 
temporary model... However Bjarni Gudmondurs thing(still under 
development, he will make post to his blog soon ) will remove the need 
for explicitly defining the temporary class. It follows the builder 
pattern and on the end of the form/wizard whatever you just call 
build... If you are editing stuff then a loadable detachable model 
should be okay if you just persist the changes on each request, if thats 
not okay. Because the editing needs to be confirmed first then you have 
to store your data in a temporary map or something and persist on 
submit.. Theres loads of different ways of handling this, with pros and 
cons. You could also put in an extended persistence context but there 
are performance/memory issues with this if you have too much data, and 
data will be persisted on the fly. But I actually like the fact that we 
get the lazy load exceptions. It tells us that we are not using 
detachable models and our entities have become stale...


Lutz Müller wrote:
It might work if you dont have any ajax on your page. otherwise each ajax call 
happens in a new request and causes your domain object to be retrieved from 
the database.
this way you lose every change made to your object. writing all changes to 
database before detaching can be an option, but then you might persist 
something to your datastore that is in the midst of being edited.
i would be glad to offer a solution to the problems i just brought up, but i 
am struggling with this problem ever since i started using wicket.


On Tuesday 30 September 2008 08:40:11 Nino Saturnino Martinez Vazquez Wael 
wrote:
  

Yup the way that I do it too almost down to every line:)

Michael Sparer wrote:


When using the OSIV-filter the lazyload exception may only happen if the
same entity is used among different requests ... sothat it gets detached
from hibernate. have a look at
http://talk-on-tech.blogspot.com/2008/05/custom-reuseable-loadabledetacha
blemode.html ... that's the way we're doing it

regards,
Michael

Korbinian Bachl - privat wrote:
  

 I think it could be something about
  missing usage of loadabledetachable model..?

not for me, as the original entity is pulled using an
loadabledetachableModel via a SortedDataProvider :/

if you look around, the all called solution for this is the
OpenSessionInViewFilter and the usage of
bean id=transactionManager
class=org.springframework.orm.jpa.JpaTransactionManager
for that (latter one is used by me, too)

However, the OpenSessionInViewFilter will not work with wicket, even if
mapped to /* in the web.xml

Best,

Korbinian

Nino Saturnino Martinez Vazquez Wael schrieb:


Hi Korbinian

Im facing the same problems... I also use extended.. So gonna be great
to see the outcome of this thread.. I think it could be something about
missing usage of loadabledetachable model..?

Korbinian Bachl - privat wrote:
  

Hi,

I'm currently struggling with the famous lazy load exception under
spring + jpa with wicket.

The problem is, in my case, that i pull an entity from the database
using a spring-bean (@SpringBean) and JPA (hibernate). Then in the
wicket class i need to walk the entity tree a bit, based on the needs
of the user (preloading wont work, as i dont know the direction the
user wants to walk and the whole entity tree is too complex to grab it
all at once).

If I use the Entity myEntity.getMyOtherConnectedEntity I get the lazy
load exception (transaction already closed). So I tried to use the
OpenSessionInViewFilter to solve this, but it just won't work - no
reason why, as the error stays exactly the same.

Currently I ended up using this:
@PersistenceContext(type = PersistenceContextType.EXTENDED)
private EntityManager em;

However, I'm not sure if this is the way it is supposed to be?
( I read so far that this disables a big part of springs-transaction
handling support but didnt see any impacts so far)

Has anyone a different aproach/ solution for this using wicket +
spring with JPA?

Best,

Korbinan

PS: im on wicket 1.4-m3

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
Michael Sparer
http://talk-on-tech.blogspot.com
  



  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: wicket + spring + jpa/ hibernate = lazy load exception

2008-10-09 Thread Timo Rantalaiho
On Thu, 09 Oct 2008, Lutz Müller wrote:
 It might work if you dont have any ajax on your page. otherwise each ajax 
 call 
 happens in a new request and causes your domain object to be retrieved from 
 the database.
 this way you lose every change made to your object. writing all changes to 
 database before detaching can be an option, but then you might persist 
 something to your datastore that is in the midst of being edited.
 i would be glad to offer a solution to the problems i just brought up, but i 
 am struggling with this problem ever since i started using wicket.

The best is if you can use autosave and just persist everything
(valid) always. Often this (combined with undo when needed) is
also a good solution for the user.

If not, at least we are not using detachable models in places 
where editing needs to span several requests.

Other option would be to use separate data transfer object 
style form beans.

Best wishes,
Timo

-- 
Timo Rantalaiho   
Reaktor Innovations OyURL: http://www.ri.fi/ 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: wicket + spring + jpa/ hibernate = lazy load exception

2008-10-09 Thread James Carman
Are we talking about a wizard here?  What if you used something like this:

https://wicketopia.svn.sourceforge.net/svnroot/wicketopia/trunk/wicketopia/src/main/java/org/wicketopia/model/proxy/ProxyModelManager.java

Basically, the models cache their values until you call commit on
the ProxyModelManager.  So, you can do as many steps in the wizard as
you want and if you base your components on proxied models (that wrap
PropertyModels around a LoadableDetachableModel), then your object
will only be loaded from the database at the end (during the commit
of the proxy models) and you won't lose your edits.

On Thu, Oct 9, 2008 at 10:37 PM, Timo Rantalaiho [EMAIL PROTECTED] wrote:
 On Thu, 09 Oct 2008, Lutz Müller wrote:
 It might work if you dont have any ajax on your page. otherwise each ajax 
 call
 happens in a new request and causes your domain object to be retrieved from
 the database.
 this way you lose every change made to your object. writing all changes to
 database before detaching can be an option, but then you might persist
 something to your datastore that is in the midst of being edited.
 i would be glad to offer a solution to the problems i just brought up, but i
 am struggling with this problem ever since i started using wicket.

 The best is if you can use autosave and just persist everything
 (valid) always. Often this (combined with undo when needed) is
 also a good solution for the user.

 If not, at least we are not using detachable models in places
 where editing needs to span several requests.

 Other option would be to use separate data transfer object
 style form beans.

 Best wishes,
 Timo

 --
 Timo Rantalaiho
 Reaktor Innovations OyURL: http://www.ri.fi/ 

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: wicket + spring + jpa/ hibernate = lazy load exception

2008-09-30 Thread Nino Saturnino Martinez Vazquez Wael

Yup the way that I do it too almost down to every line:)

Michael Sparer wrote:

When using the OSIV-filter the lazyload exception may only happen if the same
entity is used among different requests ... sothat it gets detached from
hibernate. have a look at
http://talk-on-tech.blogspot.com/2008/05/custom-reuseable-loadabledetachablemode.html
... that's the way we're doing it

regards,
Michael

Korbinian Bachl - privat wrote:
  

 I think it could be something about
  missing usage of loadabledetachable model..?

not for me, as the original entity is pulled using an 
loadabledetachableModel via a SortedDataProvider :/


if you look around, the all called solution for this is the 
OpenSessionInViewFilter and the usage of
bean id=transactionManager 
class=org.springframework.orm.jpa.JpaTransactionManager

for that (latter one is used by me, too)

However, the OpenSessionInViewFilter will not work with wicket, even if 
mapped to /* in the web.xml


Best,

Korbinian




Nino Saturnino Martinez Vazquez Wael schrieb:


Hi Korbinian

Im facing the same problems... I also use extended.. So gonna be great 
to see the outcome of this thread.. I think it could be something about 
missing usage of loadabledetachable model..?






Korbinian Bachl - privat wrote:
  

Hi,

I'm currently struggling with the famous lazy load exception under 
spring + jpa with wicket.


The problem is, in my case, that i pull an entity from the database 
using a spring-bean (@SpringBean) and JPA (hibernate). Then in the 
wicket class i need to walk the entity tree a bit, based on the needs 
of the user (preloading wont work, as i dont know the direction the 
user wants to walk and the whole entity tree is too complex to grab it 
all at once).


If I use the Entity myEntity.getMyOtherConnectedEntity I get the lazy 
load exception (transaction already closed). So I tried to use the 
OpenSessionInViewFilter to solve this, but it just won't work - no 
reason why, as the error stays exactly the same.


Currently I ended up using this:
@PersistenceContext(type = PersistenceContextType.EXTENDED)
private EntityManager em;

However, I'm not sure if this is the way it is supposed to be?
( I read so far that this disables a big part of springs-transaction 
handling support but didnt see any impacts so far)


Has anyone a different aproach/ solution for this using wicket + 
spring with JPA?


Best,

Korbinan

PS: im on wicket 1.4-m3

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







-
Michael Sparer
http://talk-on-tech.blogspot.com
  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



<    1   2   3   4   >