into my DAO. That is working well
for me. (No constructors.)
Best Regards.
--Anas Mughal
http://anas-mughal.com
--- On Thu, 11/11/10, Everton Agner wrote:
From: Everton Agner
Subject: Re: session is NULL
To: "Tapestry users"
Date: Thursday, November 11, 2010, 8:23 AM
> @
0, Rich M wrote:
>
> From: Rich M
> Subject: Re: session is NULL
> To: "Tapestry users"
> Date: Wednesday, November 10, 2010, 10:34 AM
>
> On 11/10/2010 03:42 AM, Anas Mughal wrote:
> > I have setup my DAO as a Tapestry service in the AppModule as:
> &
Yes, that worked. I wish to thank everyone for their help!
Tapestry is great!
Coming from the Spring world, I do not miss those verbose Spring configuration
files!
--Anas Mughal
http://anas-mughal.com
--- On Wed, 11/10/10, Rich M wrote:
From: Rich M
Subject: Re: session is NULL
To
page classes cleaner.
Any suggestion would be greatly appreciated.
--- On Wed, 11/10/10, Kalle Korhonen wrote:
From: Kalle Korhonen
Subject: Re: session is NULL
To: "Tapestry users"
Date: Wednesday, November 10, 2010, 1:48 AM
@Inject is for pages. Make your DAO a T
On Wed, Nov 10, 2010 at 9:42 AM, Anas Mughal wrote:
>
> I have setup my DAO as a Tapestry service in the AppModule as:
>
>
[...]
Then, I try to inject the session as follows:
>
> public class BranchHibernateDAO implements BranchDAO {
>
> @Inject
> private Session session;
>
>
>
.nabble.com/session-is-NULL-tp3258165p3258344.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h
/10, Kalle Korhonen wrote:
From: Kalle Korhonen
Subject: Re: session is NULL
To: "Tapestry users"
Date: Wednesday, November 10, 2010, 1:48 AM
@Inject is for pages. Make your DAO a Tapestry service and inject the
session to it via its constructor.
Kalle
On Tue, Nov 9, 2010 at
s("unchecked")
> public Object find( Class c , BigDecimal id)
> {
> return session.get(c, id); // session is NULL here
> }
> }
>
>
> I get a NULL pointer exception because my session does not seem to be
> initialized.
>
> Searchin
no error with respect to the hibernate configuration.)
>
> I don't know how to resolve the session object being NULL in my simple DAO
> below.
>
>
>
>
>
>
>
> Thanks for your help!
> --
> Anas Mughal
>
> http://anas-mughal.com
>
>
>
>
>
Josh Kamau
Subject: Re: session is NULL
To: "Tapestry users"
Date: Wednesday, November 10, 2010, 1:04 AM
Hi Anas;
Have you added the tapestry-hibernate dependency on your pom.xml?
On Wed, Nov 10, 2010 at 12:52 AM, Anas Mughal wrote:
> I have setup my Tapestry project using the Mav
> public Object find( Class c , BigDecimal id)
> {
> return session.get(c, id); // session is NULL here
> }
> }
>
>
> I get a NULL pointer exception because my session does not seem to be
> initialized.
>
> Searching online, I came accross:
> htt
BranchDAO {
@Inject
private Session session;
@SuppressWarnings("unchecked")
public Object find( Class c , BigDecimal id)
{
return session.get(c, id); // session is NULL here
}
}
I get a NULL pointer exception because my session does not seem to be
i
Yep, Injection works only in page and component classes that live the
ordinary Page or component lifecycle, and are requested from the web. :)
Move the session to a real page and have that util to take the session as
parameter, or even better move your logic to service that a page can use.
(Secur
its look like, that your Security class is only a helper class
and no page component.
in such classes the @Inject annotation doesnt work
2008/7/28 <[EMAIL PROTECTED]>
> Ok, I have just checked. I have mysql-connector-java-5.1.5.jar in the maven
> repository.
>
>
> Code is:
>
Ok, I have just checked. I have mysql-connector-java-5.1.5.jar in the
maven repository.
Code is:
-
package uk.bl.dlportal.pages.util;
import java.util.List;
import org.apache.tapestry5.ioc.annotations.Inject;
import org.hibernate.Criteria;
import org.h
Check also that you have the mysql-connector-java-5.1.6.jar or similar in
your libraries.
I have the following list:
FieldValidatorSource: DEFINED
FormDAO: DEFINED
FormSupport: DEFINED
FreeMarkerService: DEFIN
Quoting 9902468 <[EMAIL PROTECTED]>:
Is the hibernate service initialized at all? When Tapestry starts it lists
all known services, is Hibernate in that list?
- 99
It looks like it:
...
FieldValidationSupport: DEFINED
FieldValidatorDefaultSource: DEFINED
Is the hibernate service initialized at all? When Tapestry starts it lists
all known services, is Hibernate in that list?
- 99
photos-4 wrote:
>
> Thanks for your help, but so far no joy:
>
> Quoting 9902468 <[EMAIL PROTECTED]>:
>
>> And of course, check that you have Hibernate and hibernat
Hi,
I also had some trouble configuring hibernate, my session was also null.
After searching for a while I found this tutorial:
http://linuxboy.javaeye.com/blog/68311
Since I dont use a DAO, my code looks something like the following.
my db entity:
...
import org.hibernate.Session;
@Entity
Thanks for your help, but so far no joy:
Quoting 9902468 <[EMAIL PROTECTED]>:
And of course, check that you have Hibernate and hibernate
annotation in your >libraries, they are NOT included automatically
by maven if maven is used.
The libraries appear in my repository and appear under "sou
Quoting 9902468 <[EMAIL PROTECTED]>:
Check that the
@Inject
private Session session;
session is org.hibernate.Session.
- 99
It is. I notice that when I switch on the mysql log that no attempt
is ever made to
access the db. Is there any kind of logging I can switch on from
Tapestry
And of course, check that you have Hibernate and hibernate annotation in your
libraries, they are NOT included automatically by maven if maven is used.
- 99
photos-4 wrote:
>
>
> I'm using Eclipse. The XML config appears in target/classes and
> appears to be in the classpath.
>
> I'm afra
Tapestry should be quite verbose about hibernate if tapestry is configured to
run in debug mode:
http://tapestry.apache.org/tapestry5/tapestry-core/guide/conf.html
add:
//This is the time in seconds that Tapestry waits before checking if a file
is modified
//Use a big number in product
Check that the
@Inject
private Session session;
session is org.hibernate.Session.
- 99
photos-4 wrote:
>
>
> I'm using Eclipse. The XML config appears in target/classes and
> appears to be in the classpath.
>
> I'm afraid I'm rather new to Tap 5 and also to Hibernate. I'm just
> fol
I'm using Eclipse. The XML config appears in target/classes and
appears to be in the classpath.
I'm afraid I'm rather new to Tap 5 and also to Hibernate. I'm just
following what is in the Tutorial. Unfortunately the session is still
coming out as null.
Is there anywhere I can see that T
25 matches
Mail list logo