Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 952909
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T23:58:04+00:00 2026-05-15T23:58:04+00:00

Occasionally, I get following exception when running my Java EE application with Glassfish: Error

  • 0

Occasionally, I get following exception when running my Java EE application with Glassfish:

Error in allocating a connection. Cause: java.lang.IllegalStateException: 
Local transaction already has 1 non-XA Resource: cannot add more resources.

The application uses a single JDBC connection pool that is not XA-capable. However, I was not yet been able to identify the second resource that causes the exception.

Is there a way to debug/log transactions with Glassfish 2.1?

Something that would help me identifying the offending non-XA resource would be of great help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T23:58:04+00:00Added an answer on May 15, 2026 at 11:58 pm

    You can enable the logging of JTA / JTS in the log level of the admin console, plus other log levels (I don’t remember exactly which ones are available). The debug information that is produced is however quite cryptic.

    But your issue is quite strange. XA resource can be database connection, jms connection or connection from jca connectors. If you have only one datasource, this would mean that you try to obtain two connections for the same datasource during one transaction. Normally, the application server optimizes this case and serves the same physical connection twice when you try to obtain it from the datasource — but maybe this optimization is not done in your case.

    So if I were you I would try to enable the logging that shows when connection are obtained, and try to spot in the code also all potential places where a connection might be fetched from the pool either directly with a lookup, or indirectly by injection or through a framework (e.g. JPA).

    As a last resort, you can also try to enable “Allow non-component callers” in the datasource configuration, maybe it helps.

    That also reminded me of this other question: “Local transaction already has 1 non-XA Resource: cannot add more resources” error

    Hope it helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 501k
  • Answers 501k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I don't know objective C. In C++, adjacent string literals… May 16, 2026 at 2:22 pm
  • Editorial Team
    Editorial Team added an answer If this were Hibernate I'd think a lazily loaded field… May 16, 2026 at 2:22 pm
  • Editorial Team
    Editorial Team added an answer Do you need to have the file in the Documents… May 16, 2026 at 2:22 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

While debugging my application with Delphi 2009, I sometimes get the following exception occurring:
We have an ASP.NET web forms application which occasionally generates a validation error like
I have an application using the following code to get input based on a
I have an image uploader and cropper which creates thumbnails and I occasionally get
With several forms of mine, I occasionally run into the following issue: I edit
We have built a Windows Service that is running on client's machines, which occasionally
I'm calling a C# web service using the .net Service Model and occasionally this
When I try to compile an assembly in VS 2008, I got (occasionally, usually
Context: highly threaded server-side application with many reads, occasional writes. Let us consider the
I have a computer that is running a single program that manages up to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.