RE: Hibernate3+Spring2.5+Struts2

2009-08-21 Thread Zied Bejaoui
/action /package /struts Thannks. -Original Message- From: Wes Wannemacher [mailto:w...@wantii.com] Sent: 20 August 2009 19:44 To: Struts Users Mailing List Subject: Re: Hibernate3+Spring2.5+Struts2 On Thu, Aug 20, 2009 at 12:38 PM, Zied Bejaouibejaouiz...@hotmail.com wrote

Re: Hibernate3+Spring2.5+Struts2

2009-08-21 Thread ZiedBejaoui
To: Struts Users Mailing List user@struts.apache.org Subject: Re: Hibernate3+Spring2.5+Struts2 On Thu, Aug 20, 2009 at 12:38 PM, Zied Bejaouibejaouiz...@hotmail.com wrote: Thanks for the help guys. change User usr= userService.getUser(username); to User usr=userServiceImp.getUser(username); userService

Re: Hibernate3+Spring2.5+Struts2

2009-08-21 Thread Wes Wannemacher
, -- From: Wes Wannemacher w...@wantii.com Sent: Thursday, August 20, 2009 7:44 PM To: Struts Users Mailing List user@struts.apache.org Subject: Re: Hibernate3+Spring2.5+Struts2 On Thu, Aug 20, 2009 at 12:38 PM, Zied Bejaouibejaouiz...@hotmail.com wrote: Thanks

RE: Hibernate3+Spring2.5+Struts2

2009-08-21 Thread Martin Gainty
: bejaouiz...@hotmail.com To: user@struts.apache.org Subject: Re: Hibernate3+Spring2.5+Struts2 Date: Fri, 21 Aug 2009 15:00:44 +0100 hi wes, I have changed the code but still have the same exception, would you min if I send you my whole code maybe you can find out the problem? cheers

Re: Hibernate3+Spring2.5+Struts2

2009-08-21 Thread ZiedBejaoui
I will split it into 3 war files. Cheers -- From: Martin Gainty mgai...@hotmail.com Sent: Friday, August 21, 2009 3:35 PM To: Struts Users Mailing List user@struts.apache.org Subject: RE: Hibernate3+Spring2.5+Struts2 no problem FYI: most email

Re:RE: Hibernate3+Spring2.5+Struts2

2009-08-20 Thread xnpeng
...@hotmail.com] Sent: 20 August 2009 03:36 To: Struts Users Mailing List Subject: RE: Hibernate3+Spring2.5+Struts2 he has his own MessageBundle which was left out Martin Gainty __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

RE: Hibernate3+Spring2.5+Struts2

2009-08-20 Thread Zied Bejaoui
Hope this can help. -Original Message- From: Martin Gainty [mailto:mgai...@hotmail.com] Sent: 20 August 2009 03:36 To: Struts Users Mailing List Subject: RE: Hibernate3+Spring2.5+Struts2 he has his own MessageBundle which was left out Martin Gainty

RE: Hibernate3+Spring2.5+Struts2

2009-08-20 Thread Martin Gainty
accepter aucune responsabilité pour le contenu fourni. From: bejaouiz...@hotmail.com To: user@struts.apache.org Subject: RE: Hibernate3+Spring2.5+Struts2 Date: Thu, 20 Aug 2009 11:17:16 +0100 I still have the same exception, I am posting all my code amd my project structure hope you can fix

RE: Hibernate3+Spring2.5+Struts2

2009-08-20 Thread Zied Bejaoui
is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'HibernateTemplate' is defined Thanks for your help -Original Message- From: Martin Gainty [mailto:mgai...@hotmail.com] Sent: 20 August 2009 13:32 To: Struts Users Mailing List Subject: RE: Hibernate3+Spring2.5+Struts2 mgtake a look inside all

RE: Hibernate3+Spring2.5+Struts2

2009-08-20 Thread Martin Gainty
: bejaouiz...@hotmail.com To: user@struts.apache.org Subject: RE: Hibernate3+Spring2.5+Struts2 Date: Thu, 20 Aug 2009 14:19:03 +0100 This is the definition of my session factory, hibernate properties and data source : bean id=dataSource class

RE: Hibernate3+Spring2.5+Struts2

2009-08-20 Thread Zied Bejaoui
both a String parameter. -Original Message- From: Martin Gainty [mailto:mgai...@hotmail.com] Sent: 20 August 2009 13:32 To: Struts Users Mailing List Subject: RE: Hibernate3+Spring2.5+Struts2 mgtake a look inside all of the provided xml files.. did you mgdefine a sessionFactory

RE: Hibernate3+Spring2.5+Struts2

2009-08-20 Thread Martin Gainty
effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. From: bejaouiz...@hotmail.com To: user@struts.apache.org Subject: RE: Hibernate3+Spring2.5+Struts2 Date: Thu, 20

Re: Hibernate3+Spring2.5+Struts2

2009-08-20 Thread ZiedBejaoui
: Hibernate3+Spring2.5+Struts2 snip action.LoginAction contents: public void setMessageSource(ResourceBundleMessageSource messageSource) { this.messageSource = messageSource; }since messageSource is private LoginAction will require getMessageSource e.g. public ResourceBundleMessageSource

Re: Hibernate3+Spring2.5+Struts2

2009-08-20 Thread Wes Wannemacher
On Thu, Aug 20, 2009 at 11:13 AM, Martin Gaintymgai...@hotmail.com wrote: cannot do a get(0) on a null result Might be true, but it also demonstrates why method chaining can be troublesome, we don't know if the NPE is coming from there or from the call to getHibernateTemplate(), etc. I would

RE: Hibernate3+Spring2.5+Struts2

2009-08-20 Thread Martin Gainty
:31 -0400 Subject: Re: Hibernate3+Spring2.5+Struts2 From: w...@wantii.com To: user@struts.apache.org On Thu, Aug 20, 2009 at 11:13 AM, Martin Gaintymgai...@hotmail.com wrote: cannot do a get(0) on a null result Might be true, but it also demonstrates why method chaining can

RE: Hibernate3+Spring2.5+Struts2

2009-08-20 Thread Martin Gainty
...@hotmail.com To: user@struts.apache.org Subject: Re: Hibernate3+Spring2.5+Struts2 Date: Thu, 20 Aug 2009 15:03:11 +0100 Hi martin, Thanks again the template are message source problems are solved, however now I am getting a NullPointerException in the Login Action class in this line

Re: Hibernate3+Spring2.5+Struts2

2009-08-20 Thread Nils-Helge Garli Hegvik
On Thu, Aug 20, 2009 at 5:27 PM, Martin Gaintymgai...@hotmail.com wrote: agreed..i would also suggest wrap the code in try catch for the NullPointerException good call wes! Martin Gainty Why? Nils-H - To unsubscribe,

RE: Hibernate3+Spring2.5+Struts2

2009-08-20 Thread Zied Bejaoui
= ?, userName).get(0); } } -Original Message- From: Martin Gainty [mailto:mgai...@hotmail.com] Sent: 20 August 2009 16:14 To: Struts Users Mailing List Subject: RE: Hibernate3+Spring2.5+Struts2 cannot do a get(0) on a null result public User getUser(String

Re: Hibernate3+Spring2.5+Struts2

2009-08-20 Thread Wes Wannemacher
On Thu, Aug 20, 2009 at 12:38 PM, Zied Bejaouibejaouiz...@hotmail.com wrote: Thanks for the help guys. change User usr= userService.getUser(username); to         User usr=userServiceImp.getUser(username); userService is a UserServiceImp instance-- UserServiceimp userService. You were on

Hibernate3+Spring2.5+Struts2

2009-08-19 Thread ZiedBejaoui
Hi, I am trying to run an example to integrate struts2 with hibernate and Spring. When running the example tomcat display en error: 404 resource is not available. This is my stack trace: 19-Aug-2009 11:29:06 org.apache.catalina.core.StandardContext start SEVERE: Error listenerStart

Re: Hibernate3+Spring2.5+Struts2

2009-08-19 Thread Nils-Helge Garli Hegvik
From your stack trace: SEVERE: Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is

RE: Hibernate3+Spring2.5+Struts2

2009-08-19 Thread Zied Bejaoui
+Spring2.5+Struts2 From your stack trace: SEVERE: Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception

Re: Hibernate3+Spring2.5+Struts2

2009-08-19 Thread Lukasz Lenart
Hi, That the source of your problems: Caused by: org.hibernate.PropertyNotFoundException: Could not find a getter for admin in class po.User Check mapping files, you are trying to map admin property which doesn't exist in User class. Regards -- Lukasz http://www.lenart.org.pl/

RE: Hibernate3+Spring2.5+Struts2

2009-08-19 Thread Zied Bejaoui
[mailto:lukasz.len...@googlemail.com] Sent: 19 August 2009 12:11 To: Struts Users Mailing List Subject: Re: Hibernate3+Spring2.5+Struts2 Hi, That the source of your problems: Caused by: org.hibernate.PropertyNotFoundException: Could not find a getter for admin in class po.User Check mapping files, you

Re: Hibernate3+Spring2.5+Struts2

2009-08-19 Thread Nils-Helge Garli Hegvik
) {        return this.userDao.getUser(userName);    } } -Original Message- From: Lukasz Lenart [mailto:lukasz.len...@googlemail.com] Sent: 19 August 2009 12:11 To: Struts Users Mailing List Subject: Re: Hibernate3+Spring2.5+Struts2 Hi, That the source of your problems: Caused

RE: Hibernate3+Spring2.5+Struts2

2009-08-19 Thread Zied Bejaoui
Users Mailing List Subject: Re: Hibernate3+Spring2.5+Struts2 java.lang.NullPointerException at action.LoginAction.execute(LoginAction.java:31) Looks like you have a NPE at line 31 in LoginAction. What line is that? Which references could have been null? Nils-H On Wed, Aug 19, 2009 at 1:59 PM

Re: Hibernate3+Spring2.5+Struts2

2009-08-19 Thread Dave Newton
().find(from User as u where u.name = ?, userName).get(0); } } -Original Message- From: Nils-Helge Garli Hegvik [mailto:nil...@gmail.com] Sent: 19 August 2009 13:05 To: Struts Users Mailing List Subject: Re: Hibernate3+Spring2.5+Struts2 java.lang.NullPointerException

RE: Hibernate3+Spring2.5+Struts2

2009-08-19 Thread Zied Bejaoui
= userService.getUser(username); I am sorry if I am not clear but it's because I didn't get the code. -Original Message- From: Dave Newton [mailto:newton.d...@yahoo.com] Sent: 19 August 2009 15:18 To: Struts Users Mailing List Subject: Re: Hibernate3+Spring2.5+Struts2 Is there a user service

Re: Hibernate3+Spring2.5+Struts2

2009-08-19 Thread Dave Newton
Zied Bejaoui wrote: The problem is in this line in my LoginAction : User usr = userService.getUser(username); Then I'd assume the userService is null. I am sorry if I am not clear but it's because I didn't get the code. This doesn't really seem to be a Struts issue, but Spring. It's

Re: Hibernate3+Spring2.5+Struts2

2009-08-19 Thread ZiedBejaoui
Users Mailing List user@struts.apache.org Subject: Re: Hibernate3+Spring2.5+Struts2 Zied Bejaoui wrote: The problem is in this line in my LoginAction : User usr = userService.getUser(username); Then I'd assume the userService is null. I am sorry if I am not clear but it's because I didn't

RE: Hibernate3+Spring2.5+Struts2

2009-08-19 Thread Zied Bejaoui
no luck... -Original Message- From: Dave Newton [mailto:newton.d...@yahoo.com] Sent: 19 August 2009 15:18 To: Struts Users Mailing List Subject: Re: Hibernate3+Spring2.5+Struts2 Is there a user service injected into your action? If so, does the service return a user? (Are you typing your

Re: Hibernate3+Spring2.5+Struts2

2009-08-19 Thread Tommy Pham
- Original Message From: Dave Newton newton.d...@yahoo.com To: Struts Users Mailing List user@struts.apache.org Sent: Wednesday, August 19, 2009 7:18:09 AM Subject: Re: Hibernate3+Spring2.5+Struts2 snip public class LoginAction extends ActionSupport { private

Re: Hibernate3+Spring2.5+Struts2

2009-08-19 Thread ZiedBejaoui
Mailing List user@struts.apache.org Subject: Re: Hibernate3+Spring2.5+Struts2 - Original Message From: Dave Newton newton.d...@yahoo.com To: Struts Users Mailing List user@struts.apache.org Sent: Wednesday, August 19, 2009 7:18:09 AM Subject: Re: Hibernate3+Spring2.5+Struts2

Re: Hibernate3+Spring2.5+Struts2

2009-08-19 Thread Tommy Pham
- Original Message From: ZiedBejaoui bejaouiz...@hotmail.com To: Struts Users Mailing List user@struts.apache.org Sent: Wednesday, August 19, 2009 9:23:35 AM Subject: Re: Hibernate3+Spring2.5+Struts2 Thanks for your reply however I didn't get you point, I have created

Re: Hibernate3+Spring2.5+Struts2

2009-08-19 Thread Dave Newton
ZiedBejaoui wrote: thanks dave for you help, I know hoe to use struts and since I need a database app i need hibernate can i just use theses technologies without spring? You *can*, but I'm not sure you *should*... it's just so much easier with Spring. I also always tell people that there

RE: Hibernate3+Spring2.5+Struts2

2009-08-19 Thread Martin Gainty
review your java speaking of which did the op display the source for ResourceBundleMessageSource.java? Martin Date: Wed, 19 Aug 2009 09:34:48 -0700 From: tommy...@yahoo.com Subject: Re: Hibernate3+Spring2.5+Struts2 To: user@struts.apache.org - Original Message From

Re: Hibernate3+Spring2.5+Struts2

2009-08-19 Thread Dave Newton
Tommy Pham wrote: [stuff about java object instantiation] I suggest you review your Spring: Spring handles object instantiation and injection; it should *not* be done in the action if Spring is handling object creation. From: ZiedBejaoui bejaouiz...@hotmail.com Are you using the Spring

Re: Hibernate3+Spring2.5+Struts2

2009-08-19 Thread Wes Wannemacher
On Wed, Aug 19, 2009 at 1:07 PM, Dave Newtonnewton.d...@yahoo.com wrote: Tommy Pham wrote: [stuff about java object instantiation] I suggest you review your Spring: Spring handles object instantiation and injection; it should *not* be done in the action if Spring is handling object

RE: Hibernate3+Spring2.5+Struts2

2009-08-19 Thread bejaoui zied
I do have spring installed and it's configured I wil post the code tomorrow. Thanks. ZIED BEJAOUI Tel: 0044(0)7506628905 Date: Wed, 19 Aug 2009 13:15:04 -0400 Subject: Re: Hibernate3+Spring2.5+Struts2 From: w...@wantii.com To: user@struts.apache.org On Wed, Aug 19, 2009 at 1:07 PM

RE: Hibernate3+Spring2.5+Struts2

2009-08-19 Thread Martin Gainty
seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. Date: Wed, 19 Aug 2009 13:15:04 -0400 Subject: Re: Hibernate3+Spring2.5+Struts2