Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

WELD-000315: Failed to acquire conversation lock

WELD-000315: Failed to acquire conversation lock

WELD-000315: Failed to acquire conversation lock

Hello, everyone, I hope you have the patient to read my problem.
Any advice would be greatly appreciated, thanks in advance.

I want to create a report in a java web application with primefaces, deployed in Glassfish v4.0,
I use poi-3.10 library to write to Excel File.
My query is very simple but has six UNION instructions, also have INNER JOIN with four tables
and LEFT join with other four tables, that make 8 tables where I get data.

So instead of making the query with (because it takes so long):

WHERE (e.dt_creation >= TRUNC (TO_DATE ('Initial Date','dd/mm/yyyy'))
AND e.dt_creation < TRUNC (TO_DATE ('Final Date','dd/mm/yyyy'))+1)

I do one query for each day using:

WHERE e.dt_creation = TO_DATE ('Every Day','dd/mm/yyyy')

After trying to run the code for one year I get the error:

WARN: WELD-000315: Failed to acquire conversation lock in 1,000 ms for Transient conversation

Looking for the error I found:

"apparently in your case, there's an existing request holding the lock for a relatively long time,
while another parallel request is executed under the same conversation."

But I do not fully understand what I have to check or how,
If you can help me with this o tell me about some documentation I would by deeply grateful,
because sincerely from this point I am lost.
testing from a console application the code works fine and one year period takes about 2 hours and half to create the excel file.
But can't get the code to work in web application.

my code is something like this:

CODE --> Java

String query = "SELECT something FROM some_tables WHERE some_date = 'b_date' ";  --just for example

    try (Statement stmt = con.createStatement()) {
		while (InitialCalendar.getTime().compareTo(FinalDate) <= 0 )
		    --Here I replace date in query string so I can query the next day.
			try(ResultSet rs = stmt.executeQuery(qry))
				if (!rs.isBeforeFirst() ) { 
				  --Write in Excel file there were no register this date
					while (rs.next()) {
						 --Here I write all rows from ResulSet to Excel File, there are 26 columns 
			InitialCalendar.add(Calendar.DATE, 1); --Add one day to calendar
		--After all I write all content to File

    } catch (SQLException e) {
        --handle the exception


RE: WELD-000315: Failed to acquire conversation lock

I don't think it has tod do with SQL, but with the way the action is invoked. Maybe this helps


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close