Sandro Queiroz Jr

Greenhorn
+ Follow
since Mar 07, 2011
Sandro likes ...
Java Ubuntu Linux
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Sandro Queiroz Jr

Hi guys,

I'm trying to add auditing functionality in a Struts 2 web project. I'm using Hibernate Envers for auditing. But it's not working. I can't get the user's session.
My code is:

The line 17 throws an exception:

The console:

I'm using Open Session in View pattern to get hibernate's session.
Frameworks: Struts 2.3.1.2, Hibernate 3.6.10.Final
Container: Tomcat 6.0.24.

Ideas?
11 years ago

Hemant Thard wrote:Hi,

try using getCurrentSession() instead of getSession() .



Hi there.

There is not getCurrentSession() method in ActionContext --> ActionContext Docs
Hi guys,

I'm trying to add auditing functionality in a Struts 2 web project. I'm using Hibernate Envers for auditing. But it's not working. I can't get the user's session.
My code is:


The line 17 is throwing an exception:


The console:

I'm using Open Session in View pattern to get hibernate's session: Open Session in View
Frameworks: Struts 2.3.1.2, Hibernate 3.6.10.Final
Container: Tomcat 6.0.24.

Ideas?
Hi guys,

I'm trying to add auditing functionality in a Struts 2 web project. I'm using Hibernate Envers for auditing. But it's not working. I can't get the user's session.
My code is:


The line 17 is throwing an exception:


The console:

I'm using Open Session in View pattern to get hibernate's session: Open Session in View
Frameworks: Struts 2.3.1.2, Hibernate 3.6.10.Final
Container: Tomcat 6.0.24.

Ideas?
11 years ago