Re: Hibernate3+Spring2.5+Struts2

2009-08-21 Thread ZiedBejaoui
I will split it into 3 war files. Cheers -- From: "Martin Gainty" Sent: Friday, August 21, 2009 3:35 PM To: "Struts Users Mailing List" Subject: RE: Hibernate3+Spring2.5+Struts2 no problem FYI: most email agents have a

RE: Hibernate3+Spring2.5+Struts2

2009-08-21 Thread Martin Gainty
bilité pour le contenu fourni. > From: 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

Re: Hibernate3+Spring2.5+Struts2

2009-08-21 Thread Wes Wannemacher
> > > cheers, > > -- > From: "Wes Wannemacher" > Sent: Thursday, August 20, 2009 7:44 PM > To: "Struts Users Mailing List" > Subject: Re: Hibernate3+Spring2.5+Struts2 > >> On Thu, Aug 20, 2009 at 12:38 PM, Zied Bejaoui

Re: Hibernate3+Spring2.5+Struts2

2009-08-21 Thread ZiedBejaoui
ot;Struts Users Mailing List" Subject: Re: Hibernate3+Spring2.5+Struts2 On Thu, Aug 20, 2009 at 12:38 PM, Zied Bejaoui wrote: Thanks for the help guys. change User usr= userService.getUser(username); to User usr=userServiceImp.getUser(username); userService is a UserServiceImp instan

RE: Hibernate3+Spring2.5+Struts2

2009-08-21 Thread Zied Bejaoui
example/message.jsp 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

Re: Hibernate3+Spring2.5+Struts2

2009-08-20 Thread Wes Wannemacher
On Thu, Aug 20, 2009 at 12:38 PM, Zied Bejaoui 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 the right track be

RE: Hibernate3+Spring2.5+Struts2

2009-08-20 Thread Zied Bejaoui
late().find("from User as u where u.name = ?", 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 g

Re: Hibernate3+Spring2.5+Struts2

2009-08-20 Thread Nils-Helge Garli Hegvik
On Thu, Aug 20, 2009 at 5:27 PM, Martin Gainty 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, e-mail: user-u

RE: Hibernate3+Spring2.5+Struts2

2009-08-20 Thread Martin Gainty
> Date: Thu, 20 Aug 2009 11:21: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 Gainty wrote: > > > > cannot do a get(0) on a null result > > Might be true, but

Re: Hibernate3+Spring2.5+Struts2

2009-08-20 Thread Wes Wannemacher
On Thu, Aug 20, 2009 at 11:13 AM, Martin Gainty 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 suggest breaking thi

RE: Hibernate3+Spring2.5+Struts2

2009-08-20 Thread Martin Gainty
le contenu fourni. > From: bejaouiz...@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

Re: Hibernate3+Spring2.5+Struts2

2009-08-20 Thread ZiedBejaoui
userService) { this.userService=userService; } I cant find out what is the reaosn of the NPE. Cheers, -- From: "Martin Gainty" Sent: Thursday, August 20, 2009 2:48 PM To: "Struts Users Mailing List" Subject: RE: Hibernat

RE: Hibernate3+Spring2.5+Struts2

2009-08-20 Thread Martin Gainty
;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. > From: bejaouiz...@hotmail.com > To: user@struts.apache.org > Subject: RE: Hiber

RE: Hibernate3+Spring2.5+Struts2

2009-08-20 Thread Zied Bejaoui
0 August 2009 13:32 To: Struts Users Mailing List Subject: RE: Hibernate3+Spring2.5+Struts2 mg>take a look inside all of the provided xml files.. did you mg>define a sessionFactory..alternatively implements mg> mg>or mappingResources mg> mg>or mappingDirectoryLocations mg&g

RE: Hibernate3+Spring2.5+Struts2

2009-08-20 Thread Martin Gainty
ous 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 Aug 2009 14:19:03 +0100 > > This is the definition of my ses

RE: Hibernate3+Spring2.5+Struts2

2009-08-20 Thread Zied Bejaoui
ty 'HibernateTemplate'; nested exception 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 Mai

RE: Hibernate3+Spring2.5+Struts2

2009-08-20 Thread Martin Gainty
t 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. > From: bejaouiz...@hotmail.com > To: user@struts.apache.org > Subject:

RE: Hibernate3+Spring2.5+Struts2

2009-08-20 Thread Zied Bejaoui
essage- 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 __ Verzicht und Vertraulich

RE: Hibernate3+Spring2.5+Struts2

2009-08-19 Thread Martin Gainty
à l'information 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 > Subje

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

Re: Hibernate3+Spring2.5+Struts2

2009-08-19 Thread Wes Wannemacher
On Wed, Aug 19, 2009 at 1:07 PM, Dave Newton 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 creation. > > >>> Fro

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 Are you using the Spring plugin? Dave ---

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 > > &

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 *are

Re: Hibernate3+Spring2.5+Struts2

2009-08-19 Thread Tommy Pham
- Original Message > From: ZiedBejaoui > To: Struts Users Mailing List > 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 a > userserviceImp

Re: Hibernate3+Spring2.5+Struts2

2009-08-19 Thread ZiedBejaoui
s Users Mailing List" Subject: Re: Hibernate3+Spring2.5+Struts2 - Original Message From: Dave Newton To: Struts Users Mailing List Sent: Wednesday, August 19, 2009 7:18:09 AM Subject: Re: Hibernate3+Spring2.5+Struts2 >> >> public class LoginAction ext

Re: Hibernate3+Spring2.5+Struts2

2009-08-19 Thread Tommy Pham
- Original Message > From: Dave Newton > To: Struts Users Mailing List > Sent: Wednesday, August 19, 2009 7:18:09 AM > Subject: Re: Hibernate3+Spring2.5+Struts2 > > >> > >> public class LoginAction extends ActionSupport { > >>

RE: Hibernate3+Spring2.5+Struts2

2009-08-19 Thread Zied Bejaoui
: 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 program in via SMS? It seems like everything is named reasonable except for "usr"

Re: Hibernate3+Spring2.5+Struts2

2009-08-19 Thread ZiedBejaoui
rs Mailing List" 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 get t

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 diffi

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 us

Re: Hibernate3+Spring2.5+Struts2

2009-08-19 Thread Dave Newton
e) { return (User)getHibernateTemplate().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+Stru

RE: Hibernate3+Spring2.5+Struts2

2009-08-19 Thread Zied Bejaoui
To: Struts 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, 20

Re: Hibernate3+Spring2.5+Struts2

2009-08-19 Thread Nils-Helge Garli Hegvik
ageSource messageSource) { >        this.messageSource = messageSource; >    } > > } > > This is the userServiceImpl: > > package service; > import po.User; > > /** >  * >  * @author ABIS1 >  */ > public class UserServiceImp implements UserService { > &

RE: Hibernate3+Spring2.5+Struts2

2009-08-19 Thread Zied Bejaoui
ssage- 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 by: org.hibernate.PropertyNotFoundException: Could not find a getter for admin i

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/ http://dailylog.

RE: Hibernate3+Spring2.5+Struts2

2009-08-19 Thread Zied Bejaoui
ts Users Mailing List Subject: Re: Hibernate3+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/applicationCon

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 org.hib